Exemplo n.º 1
0
        public void Awake()
        {
            Prototype = AiPrototype.ExtractPrototypeInfo(this);

            Mind = MindImpl();
            Mind.AiRig = this;

            //Movement
            Movement = MoveImpl();

            //Vision Setup
            GameObject vision = CreateContainer("Vision");
            var visionCollider = vision.AddComponent<SphereCollider>();
            vision.AddComponent<Rigidbody>()
                  .isKinematic = true;
            VisionSensor = vision.AddComponent<VisionSense>();
            VisionSensor.Collider = visionCollider;
            VisionSensor.Mind = Mind;

            //Audio Setup
            GameObject audio = CreateContainer("Audio");
            var audioCollider = audio.AddComponent<SphereCollider>();
            audio.AddComponent<Rigidbody>()
                 .isKinematic = true;
            AudioSensor = audio.AddComponent<AudiatorySense>();
            AudioSensor.Collider = audioCollider;
            AudioSensor.Mind = Mind;

            //Scent Setup
            GameObject smell = CreateContainer("Scent");
            var scentCollider = smell.AddComponent<SphereCollider>();
            smell.AddComponent<Rigidbody>()
                  .isKinematic = true;
            ScentSensor = smell.AddComponent<ScentSense>();
            ScentSensor.Collider = scentCollider;
            ScentSensor.Mind = Mind;

            //Ranking between AI's
            RankingSystem = RankingImpl();
        }
Exemplo n.º 2
0
 public virtual bool GreaterThan(Ranking other)
 {
     return Rank > other.Rank;
 }
Exemplo n.º 3
0
 public virtual bool GreaterThan(Ranking other)
 {
     return(Rank > other.Rank);
 }