Пример #1
0
 // Start is called before the first frame update
 void Awake()
 {
     rb               = GetComponent <Rigidbody>();
     mover            = GetComponent <MoveTowardsPoint>();
     seekingBehaviour = GetComponent <OrderAgentSeeking>();
     dyingBehaviour   = GetComponent <OrderAgentDying>();
 }
Пример #2
0
        public void Spawn()
        {
            GetComponent <Collider>().enabled = false;

            transform.localScale = Vector3.zero;
            seekingBehaviour     = GetComponent <OrderAgentSeeking>();
            audioSource.PlayOneShot(SoundEffectClips.instance.orderSpawn[Random.Range(0, SoundEffectClips.instance.orderSpawn.Count)]);
            StartCoroutine(SpawnInRoutine());
        }