public void evolvePet()
 {
     //petObject = GameObject.Find("PetObject");
     class_pet = ObjectSpawner.pet.GetComponent <Class_Pet>();
     if (class_pet.petType == "CatBaby")
     {
         ObjectSpawner.pet.transform.Find("CatBaby").gameObject.SetActive(false);
         ObjectSpawner.pet.transform.Find("CatChild").gameObject.SetActive(true);
     }
 }
Exemple #2
0
    //public bool hold;

    // Use this for initialization
    void Start()
    {
        //Get input mode controller
        inputModeController = GameObject.Find("InputModeController");
        inputMode           = inputModeController.GetComponent <InputModeScript>();

        newWayPoint = Random.insideUnitCircle * area;
        wayPoint    = new Vector3(newWayPoint.x, transform.position.y, newWayPoint.y);
        oldWayPoint = wayPoint;

        //Get pet's controller, animator, and class
        controller = GetComponent <CharacterController>();
        //anim = GetComponentInChildren<Animator>();
        Pet = GetComponent <Class_Pet>();

        waitTimer      = 0;
        hungerTimer    = 0;
        boredomTimer   = 0;
        dirtinessTimer = 0;
        happinessTimer = 0;

        Idle();
    }