示例#1
0
        public void Start()
        {
            var rig = AiRig.ExtractRigInfo(this);
            Move = rig.Movement;

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

            Move = rig.Movement;

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