public void NewGame(int direction) { if (currentGameBlock) { currentGameBlock.gameObject.SetActive(false); } global.activeGame += direction; if (global.activeGame < 0) { global.activeGame = gameBlocks.Count - 1; } else if (global.activeGame > gameBlocks.Count - 1) { global.activeGame = 0; } currentGameBlock = gameBlocks[global.activeGame]; currentGameBlock.gameObject.SetActive(true); gameShakeController.ShakeGameObject(gameShakeController.gameObject, gameShakeDuration, gameDecreasePoint); UpdateListTrackerCubeMaterials(gameListCubes, global.activeGame, unlockedGames); }
public void NewMap(int direction) { if (currentMapBlock) { currentMapBlock.gameObject.SetActive(false); } global.activeMap += direction; if (global.activeMap < 0) { global.activeMap = mapBlocks.Count - 1; } else if (global.activeMap > mapBlocks.Count - 1) { global.activeMap = 0; } currentMapBlock = mapBlocks[global.activeMap]; currentMapBlock.gameObject.SetActive(true); mapShakeController.ShakeGameObject(mapShakeController.gameObject, mapShakeDuration, mapDecreasePoint); UpdateListTrackerCubeMaterials(mapListCubes, global.activeMap, unlockedMaps); }