Beispiel #1
0
    void Start()
    {
        uiMaster      = GameObject.FindGameObjectWithTag("GM").GetComponent <UI_Master> ();
        dialoguePanel = uiMaster.dialoguePanel;
        dialogueText  = uiMaster.dialogueText;
        charPortrait  = uiMaster.charPortrait;
        survivorPanel = uiMaster.survivorPanel;
        charName      = uiMaster.charName;

        myTransform = transform;

        if (mySprite == null)
        {
            // when this Survivor is spawned they need a name
            name = GetName(false);
            // get the Sprite (for the Player's UI if this Survivor joins a town)
            mySprite = GetComponent <SpriteRenderer> ().sprite;
        }



        // get the current mood Type
        moodType = GetMoodType();
        // and store the current mood
        currMood = mood;

        if (townCentral == null)
        {
            townCentral = GameObject.FindGameObjectWithTag("Town_Central").GetComponent <Town_Central>();
        }
    }
Beispiel #2
0
    bool buildingChecked;     // so I can stop update calling CheckBuilding
    void Start()
    {
        mySurvivor = GetComponent <Survivor> ();
        uiMaster   = mySurvivor.uiMaster;
        myTurret   = mySurvivor.townTile.GetComponentInChildren <Turret>();
//		myTurret.seekPlayer = true;
    }
Beispiel #3
0
 void Start()
 {
     mySurvivor = GetComponent <Survivor> ();
     uiMaster   = mySurvivor.uiMaster;
 }
 private void Start()
 {
     uiMaster = UIMaster.GetComponent <UI_Master>();
 }
Beispiel #5
0
 void Start()
 {
     mySurvivor = GetComponent <Survivor> ();
     uiMaster   = mySurvivor.uiMaster;
     myFarm     = mySurvivor.townTile.GetComponentInChildren <Farm>();
 }