예제 #1
0
        public void Start()
        {
            var rig = AiRig.ExtractRigInfo(this);

            Move = rig.Movement;

            //initiate a wander() state
            Wander();
        }
예제 #2
0
 internal override void ReportDetectOf(Sense origin, Collider other)
 {
     if (origin is VisionSense)
     {
         var otherAiRig  = AiRig.ExtractRigInfo(other);
         var isDangerous = this.AiRig.RankingSystem.GreaterThan(otherAiRig.RankingSystem);
         if (isDangerous)
         {
             threats.Add(other);
         }
         //else if (isDangerous) threats.Add(other);
         else
         {
             prey.Add(other);
         }
     }
     else if (origin is AudiatorySense)
     {
         //turn towards the sound
         //var dir = transform.position - other.transform.position;
         //_charController.transform.rotation.SetLookRotation(dir);
     }
 }