void OnEnable() { gameManagerMain = GetComponent <GameManager_Main>(); levelSetting = GetComponent <GameManager_LevelSettings>(); levelChanger = GetComponent <GameManager_LevelChanger>(); floorLength = (int)(levelChanger.deathGround.floorBaseSize.x / floorScale); floorWidth = (int)(levelChanger.deathGround.floorBaseSize.z / floorScale); floor = new Floor[floorLength, floorWidth]; floorManipulator = new FloorManipulator(); stillFlyingTileIndex = new List <Pair>(); emptyTileIndex = new List <Pair>(); //---Add Events---// gameManagerMain.StartLevelEvents += SetupFloor; }
void Awake() { instance = this; }