- Home /
How can i stop a scene to wait the result of another scene ?
Hello, i actually developping a cardgame wich, the Battle betwin the 2 cards is a Fighting game. For this i init two boolean "IsAlive" set to true, then i load my fighting scene, and when it's finished the result of the duel define the boolean to false for the correspondant card. My probleme is, when i load the scene, the code of the card scne is continue, and my card are automaticaly go back to there position before the fighting scene is loaded. I tried to stop the card scene to wait the result, with time.timescale = 0; but it still continue and reset my cards to there initial position before the fighting game.
StaticClass.AliveAttacker = true;
StaticClass.AliveBlocker = true;
time.timescale = 0;
SceneManager.LoadScene(1, LoadSceneMode.Additive);
if (StaticClass.AliveBlocker == false && StaticClass.AliveAttacker == true)
bi.blocker[i].CardInstanceToGraveyard();
else if (StaticClass.AliveBlocker == true && StaticClass.AliveAttacker == false)
inst.CardInstanceToGraveyard();
p.DropCard(inst, false);
p.currentHolder.SetCardDown(inst);
inst.SetFlatfooted(true);
e.DoDamage(attackValue);
Your answer
Follow this Question
Related Questions
click second or third time play crushes unity. no script mistake 0 Answers
Keeping audio between all but one scene? 1 Answer
GetPersistentManager problem? Can't save a scene anymore 1 Answer
Callback for when an object is deleted from the scene by the user in EditorMode. 3 Answers
Unity takes forever to load scene 1 Answer