Beispiel #1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == "Zonbie")
        {
            m_MainSystem.DecreaseStock();
            Destroy(other.gameObject);

            if (!MainSystem.m_isGameOver)
            {
                SEManager.Instance.Play(SEPath.BITE);
            }
        }
    }
    private void Update()
    {
        if (!m_isDead)
        {
            m_NavAgent.destination = m_Bar.position;

            if (transform.position.z <= -1.5f)
            {
                m_MainSystem.DecreaseStock();
                Destroy(gameObject);
            }
        }
    }