public void SaveStatePause() { GameObject boardOp = GameObject.Find("BoardOp"); BoardOp bo = boardOp.GetComponent <BoardOp> (); mainc = new CharacterDataHolder(bo.mC); for (int i = 0; i < ActivePMs.Length; i++) { ActivePMs [i] = new CharacterDataHolder(bo.PMs [i]); } this.entrenceX = mainc._x; this.entrenceY = mainc._y; SaveLoad.recentState = this; SaveLoad.SaveState(); }
public void InitMovementScene() { GameObject boardOp = GameObject.Find("BoardOp"); BoardOp bo = boardOp.GetComponent <BoardOp> (); bo.setPMsSize(ActivePMs.Length); currentScene = bo.currentScene; GameObject camera = GameObject.Find("Main Camera"); CameraFollow cf = camera.GetComponent <CameraFollow> (); bo.mC = mainc.createMain("archer"); cf.target = bo.mC.transform; for (int i = 0; i < ActivePMs.Length; i++) { string classselect = ""; if (i % 3 == 0) { classselect = "mage"; } else if (i % 3 == 1) { classselect = "warrior"; } else if (i % 3 == 2) { classselect = "monk"; } bo.PMs [i] = ActivePMs [i].createParty(classselect); } bo.MovePMsToCurrentPosition(); enemiesCDH = new CharacterDataHolder[bo.Enemies.Length]; for (int i = 0; i < enemiesCDH.Length; i++) { enemiesCDH [i] = new CharacterDataHolder(bo.Enemies[i]); } GameObject battleW = GameObject.Find("BattleWarp"); BattleWarps bwarp = battleW.GetComponent <BattleWarps> (); bo.bw = bwarp; PauseMenu pm = camera.GetComponent <PauseMenu> (); pm.go = this; SaveLoad.recentState = this; }