예제 #1
0
 void Awake()
 {
     armyMovement      = this.GetComponent <ArmyMovement> ();
     linkedTerritories = this.GetComponent <LinkedTerritories> ();
     countryManagement = this.GetComponent <CountryManagement> ();
     globalFunctions   = this.GetComponent <GlobalFunctions> ();
     phases            = this.GetComponent <Phases> ();
 }
예제 #2
0
    void Awake()
    {
        armyMovement      = this.GetComponent <ArmyMovement> ();
        countryManagement = this.GetComponent <CountryManagement> ();
        attack            = this.GetComponent <Attack> ();
        phases            = this.GetComponent <Phases> ();
        audioFadeOut      = this.GetComponent <AudioFadeOut> ();

        GUI          = GameObject.FindGameObjectWithTag("GUI");
        buttonColour = GUI.GetComponent <ButtonColour> ();
    }
예제 #3
0
    void Awake()
    {
        scriptHolder     = GameObject.FindGameObjectWithTag("ScriptHolder");
        allocateSoldiers = scriptHolder.GetComponent <AllocateSoldiers> ();
        targetCountry    = scriptHolder.GetComponent <TargetCountry> ();
        phases           = scriptHolder.GetComponent <Phases> ();
        armyMovement     = scriptHolder.GetComponent <ArmyMovement> ();
        playerTurn       = scriptHolder.GetComponent <PlayerTurn> ();
        audioFadeOut     = scriptHolder.GetComponent <AudioFadeOut> ();
        teamChecker      = scriptHolder.GetComponent <TeamChecker> ();

        GUI           = GameObject.FindGameObjectWithTag("GUI");
        displayEditor = GUI.GetComponent <DisplayEditor> ();
        buttonColour  = GUI.GetComponent <ButtonColour> ();
    }
예제 #4
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> ();
    }
예제 #5
0
 // Use this for initialization
 void Start()
 {
     foreach (CapsuleCollider rs in this.gameObject.GetComponentsInChildren<CapsuleCollider>())
     {
         rs.isTrigger = true;
     }
     foreach (BoxCollider rs in this.gameObject.GetComponentsInChildren<BoxCollider>())
     {
         rs.isTrigger = true;
     }
     foreach (SphereCollider rs in this.gameObject.GetComponentsInChildren<SphereCollider>())
     {
         rs.isTrigger = true;
     }
     foreach (Rigidbody rs in this.gameObject.GetComponentsInChildren<Rigidbody>())
     {
         rs.Sleep();
     }
     currentSpeed = MoveSpeed;
     dead = false;
     defaultRot = transform.rotation;
     complete = false;
     anim = gameObject.GetComponent<Animator>();
     GUI = Camera.mainCamera.GetComponent<GUIScript>();
     am = GameObject.Find("FellowHeroes").GetComponent<ArmyMovement>();
     ha = gameObject.GetComponent<HeroAttack>();
 }