Ejemplo n.º 1
0
        private void giveSightBehaviour(GameObject _Eye)
        {        //Every living create can see others.
            BHV_Vision newBehaviour = this.root.AddComponent <BHV_Vision>() as BHV_Vision;

            newBehaviour.TheEye    = _Eye;
            newBehaviour.Belonging = this.belonging;
        }
Ejemplo n.º 2
0
 public void destroyMatter(SimDim.Food _Target) //later do it with Matter
 {                                              //as we can NOT destroy objects, lets remove them for sights:
     foreach (Matter currentItem in this.Population)
     {
         BHV_Vision currentSight = currentItem.root.GetComponent <BHV_Vision>() as BHV_Vision;
         if (currentSight != null)
         {
             currentSight.currentVision.Remove(_Target);
             currentSight.FoodList.Remove(_Target);
         }
     }
 }
Ejemplo n.º 3
0
    public void Start()
    {
        //this.StatusList = new List<MonoBehaviour>();

        this.Hunger = this.gameObject.AddComponent <BHV_Hunger>() as BHV_Hunger;
        this.Sight  = this.gameObject.AddComponent <BHV_Vision>() as BHV_Vision;

        this.Sight.Belonging = theLivingCreature.belonging;


        this.Locomotion = this.gameObject.AddComponent <BHV_Motion>() as BHV_Motion;

        this.Empathy = this.gameObject.AddComponent <BHV_Social>() as BHV_Social;
    }