Ejemplo n.º 1
0
    void Awake()
    {
        targetingNetwork = this.GetComponent <TargetingNetwork> ();
        teamChecker      = this.GetComponent <TeamChecker> ();

        GUI = GameObject.FindGameObjectWithTag("GUI");
        gameInstructions = GUI.GetComponent <GameInstructions> ();
    }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
    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> ();
    }
Ejemplo n.º 4
0
    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> ();
    }
Ejemplo n.º 5
0
    private void StartGameInstructions()
    {
        GameInstructions instructions = new GameInstructions();

        _gameInstructions.Clear();

        foreach (string instruction in instructions.Instructions)
        {
            _gameInstructions.Enqueue(instruction);
        }

        DisplayNextInstruction();
    }
Ejemplo n.º 6
0
    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> ();
    }
Ejemplo n.º 7
0
    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>();
    }
Ejemplo n.º 8
0
    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> ();
    }
Ejemplo n.º 9
0
    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> ();
    }
Ejemplo n.º 10
0
    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> ();
    }
Ejemplo n.º 11
0
    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();
        }
    }
Ejemplo n.º 12
0
    // 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> ();
    }
Ejemplo n.º 13
0
    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");
    }
Ejemplo n.º 14
0
    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> ();
    }
Ejemplo n.º 15
0
    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();
        }
    }
Ejemplo n.º 16
0
 public void RestartLevel()
 {
     GameInstructions.SaveGame();
     GameInstructions.ResetInstructions();
     SceneManager.LoadScene(0);
 }