void Awake() { targetingNetwork = this.GetComponent <TargetingNetwork> (); teamChecker = this.GetComponent <TeamChecker> (); GUI = GameObject.FindGameObjectWithTag("GUI"); gameInstructions = GUI.GetComponent <GameInstructions> (); }
void Start() { GameInstructions.LoadSaves(); bestScoreHeat = GameInstructions.HighScoresValues.bestScoreHeat; bestScoreNormal = GameInstructions.HighScoresValues.bestScoreNormal; bestTimeHeat = GameInstructions.HighScoresValues.bestTime; bestTimeNormal = GameInstructions.HighScoresValues.bestTimeNormal; bestHeat = GameInstructions.HighScoresValues.topHeat; bestLevel = GameInstructions.HighScoresValues.topLevel; }
void Awake() { scriptHolder = GameObject.FindGameObjectWithTag("ScriptHolder"); countryManagement = scriptHolder.GetComponent <CountryManagement> (); teamChecker = scriptHolder.GetComponent <TeamChecker> (); playerTurn = scriptHolder.GetComponent <PlayerTurn> (); GUI = GameObject.FindGameObjectWithTag("GUI"); gameInstructions = GUI.GetComponent <GameInstructions> (); }
void Awake() { GUI = GameObject.FindGameObjectWithTag("GUI"); displayEditor = GUI.GetComponent <DisplayEditor> (); buttonColour = GUI.GetComponent <ButtonColour> (); gameInstructions = GUI.GetComponent <GameInstructions> (); scriptHolder = GameObject.FindGameObjectWithTag("ScriptHolder"); teamChecker = scriptHolder.GetComponent <TeamChecker> (); attack = scriptHolder.GetComponent <Attack> (); countryManagement = scriptHolder.GetComponent <CountryManagement> (); }
private void StartGameInstructions() { GameInstructions instructions = new GameInstructions(); _gameInstructions.Clear(); foreach (string instruction in instructions.Instructions) { _gameInstructions.Enqueue(instruction); } DisplayNextInstruction(); }
void Awake() { countryManagement = this.GetComponent <CountryManagement> (); armyManagement = this.GetComponent <ArmyManagement> (); soldierTransfer = this.GetComponent <SoldierTransfer> (); territories = GameObject.FindGameObjectWithTag("Territories"); territoryCount = territories.GetComponent <TerritoryCount> (); continentBonus = territories.GetComponent <ContinentBonus> (); GUI = GameObject.FindGameObjectWithTag("GUI"); buttonColour = GUI.GetComponent <ButtonColour> (); gameInstructions = GUI.GetComponent <GameInstructions> (); }
void Start() { survivalDefaultColor = GameObject.FindGameObjectWithTag(Tags.survival).GetComponent <Image>().color; normalDefaultColor = GameObject.FindGameObjectWithTag(Tags.normal).GetComponent <Image>().color; survivalImage = GameObject.FindGameObjectWithTag(Tags.survival).GetComponent <Image>(); normalImage = GameObject.FindGameObjectWithTag(Tags.normal).GetComponent <Image>(); timer = GameObject.FindGameObjectWithTag(Tags.HUD).GetComponent <TimeClass>(); menuHUD = GameObject.FindGameObjectWithTag(Tags.menu); player = GameObject.FindGameObjectWithTag(Tags.player); pauseMenu = GameObject.FindGameObjectWithTag(Tags.pauseMenu); mainLight = GameObject.FindGameObjectWithTag(Tags.mainLight).GetComponentInChildren <Light>(); anim = menuHUD.GetComponent <Animator>(); GI = GetComponent <GameInstructions>(); }
void Awake() { GUI = GameObject.FindGameObjectWithTag("GUI"); gameInstructions = GUI.GetComponent <GameInstructions> (); displayEditor = GUI.GetComponent <DisplayEditor> (); targetingNetwork = this.GetComponent <TargetingNetwork> (); armyManagement = this.GetComponent <ArmyManagement>(); countryManagement = this.GetComponent <CountryManagement> (); takeControl = this.GetComponent <TakeControl> (); diceRoll = this.GetComponent <DiceRoll>(); phases = this.GetComponent <Phases> (); teamChecker = this.GetComponent <TeamChecker> (); targetCountry = this.GetComponent <TargetCountry> (); audioFadeOut = this.GetComponent <AudioFadeOut> (); }
void Awake() { territories = GameObject.FindGameObjectWithTag("Territories"); troopCount = territories.GetComponent <TroopCount> (); GUI = GameObject.FindGameObjectWithTag("GUI"); gameInstructions = GUI.GetComponent <GameInstructions> (); buttonColour = GUI.GetComponent <ButtonColour> (); displayEditor = GUI.GetComponent <DisplayEditor> (); phases = this.GetComponent <Phases> (); countryManagement = this.GetComponent <CountryManagement> (); addSoldier = this.GetComponent <AddSoldier> (); linkedTerritories = this.GetComponent <LinkedTerritories> (); playerTurn = this.GetComponent <PlayerTurn> (); teamChecker = this.GetComponent <TeamChecker> (); }
void Awake() { GUI = GameObject.FindGameObjectWithTag("GUI"); receiveBonus = GUI.GetComponent <ReceiveBonus> (); gameInstructions = GUI.GetComponent <GameInstructions> (); buttonColour = GUI.GetComponent <ButtonColour> (); openingDeployment = GUI.GetComponent <OpeningDeployment> (); endGame = GUI.GetComponent <EndGame>(); displayEditor = GUI.GetComponent <DisplayEditor>(); territories = GameObject.FindGameObjectWithTag("Territories"); territoryCount = territories.GetComponent <TerritoryCount> (); playerTurn = this.GetComponent <PlayerTurn> (); deploySoldiers = this.GetComponent <DeploySoldiers> (); armyMovement = this.GetComponent <ArmyMovement> (); }
public void SetHighScores() { if (PlayerPrefs.HasKey(Literals.Saves.First_SAVE)) { GameInstructions.LoadSaves(); bestTime.text = GameInstructions.HighScoresValues.bestTime; bestTimeNormal.text = GameInstructions.HighScoresValues.bestTimeNormal; bestScoreNormal.text = GameInstructions.HighScoresValues.bestScoreNormal.ToString(); bestScoreHeat.text = GameInstructions.HighScoresValues.bestScoreHeat.ToString(); LKS.text = GameInstructions.HighScoresValues.longestKS.ToString(); LKSNormal.text = GameInstructions.HighScoresValues.longestKSNormal.ToString(); HZK.text = GameInstructions.HighScoresValues.HZK.ToString(); HZKNormal.text = GameInstructions.HighScoresValues.HZKNormal.ToString(); topLevel.text = GameInstructions.HighScoresValues.topLevel.ToString(); topHeat.text = GameInstructions.HighScoresValues.topHeat.ToString(); } }
// Set up array of player colours void Awake() { deploySoldiers = this.GetComponent <DeploySoldiers> (); phases = this.GetComponent <Phases> (); starterPhase = this.GetComponent <StarterPhase> (); setupPhase = this.GetComponent <SetupPhase> (); allocateSoldiers = this.GetComponent <AllocateSoldiers> (); territories = GameObject.FindGameObjectWithTag("Territories"); continentBonus = territories.GetComponent <ContinentBonus> (); changeCategory = territories.GetComponent <ChangeCatagory> (); boardSetUp = territories.GetComponent <BoardSetUp> (); GUI = GameObject.FindGameObjectWithTag("GUI"); lockoutPlayer = GUI.GetComponent <LockoutPlayer> (); displayTurn = GUI.GetComponent <DisplayTurn> (); gameInstructions = GUI.GetComponent <GameInstructions> (); }
void Awake() { GUI = GameObject.FindGameObjectWithTag("GUI"); openingDeployment = GUI.GetComponent <OpeningDeployment> (); gameInstructions = GUI.GetComponent <GameInstructions> (); scriptHolder = GameObject.FindGameObjectWithTag("ScriptHolder"); soldierManagement = scriptHolder.GetComponent <SoldierManagement> (); allocateSoldiers = scriptHolder.GetComponent <AllocateSoldiers> (); phases = scriptHolder.GetComponent <Phases> (); playerTurn = scriptHolder.GetComponent <PlayerTurn> (); countryManagement = scriptHolder.GetComponent <CountryManagement> (); audioFadeOut = scriptHolder.GetComponent <AudioFadeOut> (); //testing targetContinent = scriptHolder.GetComponent <TargetContinent>(); gameStats = this.GetComponentInChildren <GameStats> (); inputBox = GameObject.Find("InputField"); }
void Awake() { gameInstructions = this.GetComponent <GameInstructions> (); scriptHolder = GameObject.FindGameObjectWithTag("ScriptHolder"); phases = scriptHolder.GetComponent <Phases> (); teamChecker = scriptHolder.GetComponent <TeamChecker> (); countryManagement = scriptHolder.GetComponent <CountryManagement> (); attack = scriptHolder.GetComponent <Attack> (); deploySoldiers = scriptHolder.GetComponent <DeploySoldiers> (); plusColour = plusBtn.GetComponent <Image> (); minusColour = minusBtn.GetComponent <Image> (); attackColour = attackBtn.GetComponent <Image> (); battleColour = battleBtn.GetComponent <Image> (); turnColour = turnBtn.GetComponent <Image> (); moveColour = moveBtn.GetComponent <Image> (); categoryColour = catergoryBtn.GetComponent <Image> (); attackText = attackBtn.GetComponentInChildren <Text> (); moveText = moveBtn.GetComponentInChildren <Text> (); }
void Update() { text.text = "Score: " + score; resetTime += Time.deltaTime; if (GameInstructions.GAME_MODE == Literals.GAME_MODES.HEAT_GAME_MODE) { if ((int)resetTime == 59) { GameInstructions.UpdateEnemyHeat(); } else if ((int)resetTime == 60) { resetTime = 0; IncreaseHeat(); } levelText.text = "Heat " + heat.ToString(); GameInstructions.ENEMY_HEAT = heat; } else { if (score / nextLevel >= scoreLevelChange) { levelUP = true; if (powerup != null) { powerup.DisplayText("Level UP"); } LevelUP(); } levelText.text = "Level " + nextLevel.ToString(); } }
public void RestartLevel() { GameInstructions.SaveGame(); GameInstructions.ResetInstructions(); SceneManager.LoadScene(0); }