Esempio n. 1
0
        public void Start()
        {
            var rig = AiRig.ExtractRigInfo(this);
            Move = rig.Movement;

            //initiate a wander() state
            Wander();
        }
Esempio n. 2
0
        public void Start()
        {
            var rig = AiRig.ExtractRigInfo(this);

            Move = rig.Movement;

            //initiate a wander() state
            Wander();
        }
Esempio n. 3
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();
        }
Esempio n. 4
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();
        }
Esempio n. 5
0
 public void Start()
 {
     lastTarget = transform.position;
     _move      = AiRig.Movement;
 }
Esempio n. 6
0
 public void Start()
 {
     lastTarget = transform.position;
     _move = AiRig.Movement;
 }