public void Start() { var rig = AiRig.ExtractRigInfo(this); Move = rig.Movement; //initiate a wander() state Wander(); }
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); } }