コード例 #1
0
ファイル: Phases.cs プロジェクト: SamanGharatchorlou/RISK
    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> ();
    }
コード例 #2
0
    // Use this for initialization
    void Awake()
    {
        territories    = GameObject.FindGameObjectWithTag("Territories");
        troopCount     = territories.GetComponent <TroopCount> ();
        boardSetUp     = territories.GetComponent <BoardSetUp> ();
        changeCategory = territories.GetComponent <ChangeCatagory> ();

        GUI = GameObject.FindGameObjectWithTag("GUI");
        openingDeployment = GUI.GetComponent <OpeningDeployment> ();
        displayEditor     = GUI.GetComponent <DisplayEditor> ();
        buttonColour      = GUI.GetComponent <ButtonColour> ();

        countryManagement = this.GetComponent <CountryManagement> ();
        playerTurn        = this.GetComponent <PlayerTurn> ();
        teamChecker       = this.GetComponent <TeamChecker> ();
        phases            = this.GetComponent <Phases> ();
        globalFunctions   = this.GetComponent <GlobalFunctions> ();
    }
コード例 #3
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");
    }