Esempio n. 1
0
 public PerceptionEntry(AnimalAI animal, bool isFlock)
 {
     this.animal       = animal;
     this.lkp          = new Vector3();
     this.isLkpValid   = false;
     this.lkpTimeStamp = float.MinValue;
     this.aversion     = 0.0f;
     this.isFlock      = isFlock;
     this.boxCollider  = animal.GetComponent <BoxCollider>();
 }
    // Use this for initialization
    void Start()
    {
        animal.GetComponent <AnimalAI>();
        stealth.GetComponent <Stealth>();
        //player.GetComponent<PlayerMoverment1>();
        //path = Path.Combine(Application.persistentDataPath, "Data.txt");

        //Debug.Log(player.SwitchToScene2);

        LoadData();

        if (player != null)
        {
            if (player.freedBear)
            {
                //Debug.Log("Found bear");
                Destroy(GameObject.FindGameObjectWithTag("Bear"));
                animal.haveBear = true;
            }



            if (player.freedBird)
            {
                //Debug.Log("Found bird");
                Destroy(GameObject.FindGameObjectWithTag("Bird"));
                animal.haveBird = true;
            }


            if (player.freedHare)
            {
                //Debug.Log("Found hare");
                Destroy(GameObject.FindGameObjectWithTag("Rabbit"));
                animal.haveRabbit = true;
            }
        }
    }