private void ModeChanged(GameController.GameMode mode) { GameController.Instance.warriorSelected -= SelectWarrior; if (mode == GameController.GameMode.Adventure) { GameController.Instance.warriorSelected += SelectWarrior; } }
// Start is called before the first frame update void Start() { Player = GameObject.Find("Player"); diferenceY = enemyPrefab.transform.position.y - Player.transform.position.y; spawnPosition = enemyPrefab.transform.localPosition; gamemode = new GameController.GameMode(); waveSpawner = GetComponent <WaveSpawner>(); GameMode(); }
//Constructor invoked when new MatchData is used public MatchData() { this.numMatch = -1; this.dateTime = (DateTime.Now).ToString(); this.namePlayer = ""; this.scorePlayer = 0; this.gameMode = GameController.GameMode.IDLE; this.levels = new List <LevelData>(); AddNewLevel(); }
public void PlayUnfair() { if (unfairButton.GetComponent<GameModeButton>().canClick) { GameController.script.PlayGame(GameController.GameMode.Unfair); } else { popupGameMode = GameController.GameMode.Unfair; popupText.text = "Unlock Unfair Mode permanently for just $0.99?"; popup.SetActive(true); anim.SetBool("show", true); } }
public void PlayImpossible() { if (impossibleButton.GetComponent<GameModeButton>().canClick) { GameController.script.PlayGame(GameController.GameMode.Impossible); } else { popupGameMode = GameController.GameMode.Impossible; popupText.text = "Unlock Impossible Mode permanently for just $0.99?"; popup.SetActive(true); anim.SetBool("show", true); } }
private void ModeChanged(GameController.GameMode mode) { Clear(); if (mode == GameController.GameMode.Battle) { foreach (BattleWarrior bw in GameController.Instance.CurrentField.Warriors) { AddWarrior(bw); } Show(); } else { Hide(); } }
public void ActivateMenuInMode(GameController.GameMode gameMode, GameBuilding building) { CloseAllMenus(); switch (gameMode) { case GameController.GameMode.egm_Observe: m_BuildMenu.gameObject.SetActive(true); break; case GameController.GameMode.egm_Build: break; case GameController.GameMode.egm_Info: if (building != null) { OnBuildingClickHandler(building); } break; } }
//public void CreateFakeMap() //{ // CreateTiles(MENU_MAP_WIDTH, MENU_MAP_HEIGHT); // DefineGameMode(GameController.GameMode.DEMOSTRATION); // DefineMap(CreateAFakeMapObjects()); //} public void DefineGameMode(GameController.GameMode gameMode) { currentGameMode = gameMode; }