How to stop a scene to wait the result of an 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;
SceneManager.LoadScene(1, LoadSceneMode.Additive);
time.timescale = 0;
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
Unity not loading scene 0 Answers
Game crashes on mobile 0 Answers
Scene Changing changes speed of objects 0 Answers
Using 2 scenes massively hurts performance - why ? 0 Answers
Unity can't save scenes 0 Answers