Exemplo n.º 1
0
 void Start()
 {
     petBelly = GameObject.Find("PetGarden").GetComponent<PetBelly>();
 }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        if (!GameObject.Find("PetGarden"))
        {
            Instantiate(petGardenPrefab).name = "PetGarden";
        }

        petBelly = 		GameObject.Find("PetGarden").GetComponent<PetBelly>();
        petInventory = 	GameObject.Find("PetGarden").GetComponent<Inventory>();
    }
Exemplo n.º 3
0
    void Start()
    {
        myPetObject = this.gameObject;

        FOV = transform.FindChild("PetFOV").GetComponent<PetFieldOfView>();

        petStats = GameObject.Find("PetGarden").GetComponent<PetStats>();
        petBelly = GameObject.Find("PetGarden").GetComponent<PetBelly>();
        petInventory = GameObject.Find("PetGarden").GetComponent<Inventory>();

        myEnergy = petBelly.GetMaxEnergy();
    }