示例#1
0
 public void Reset()
 {
     IsAlive = true;
     IsRemoved = false;
     //Render.material.color = Color.white;
     gameObject.SetActive(true);
     GetComponent<BoxCollider>().enabled = true;
     Action = new EnemyEmptyBehaviour();
     StartLive = System.DateTime.Now;
     target = null;
     transform.rotation = Quaternion.Euler(0, 180, 0);
 }
示例#2
0
    private void Awake()
    {
        //render = GetComponent<Renderer>();
        //render.material.color = Color.white;

        rigidbody = GetComponent<Rigidbody>();
        rigidbody.useGravity = false;

        IsAlive = true;

        Action = new EnemyBasicShoot();

        Game_UIControler.onPause += onPause;
    }
示例#3
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.layer == LayerMask.NameToLayer("Analilation Plane"))
     {
         Remove(0);
     }
     else if (other.gameObject.layer == LayerMask.NameToLayer("Player"))
     {
         Remove(3);
     }
     else if (other.tag == "EnemySlow")
     {
         rigidbody.velocity /= 10f;
         lookForPlayer();
         Action = new EnemyBasicShoot();
     }
 }