Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        CurrentState = PetState.None;

        anim           = GetComponent <Animator>();
        petConstructor = GetComponent <ARPetConstructor>();
        //anim.CrossFade(idle.name);

        currentTarget = petMaster;
    }
    public void BuildPet(PetData petData)
    {
        if (pet == null)
        {
            pet = Instantiate(petPrefab);

            petControl           = pet.GetComponentInChildren <ARPet>();
            petControl.petMaster = petMaster;

            petConstructor = pet.GetComponentInChildren <ARPetConstructor>();

            SetPosition();
        }

        petConstructor.UpdatePetGenes(petData);
    }