// Use this for initialization
    void Awake()
    {
        // Currenthp auf MaxHP festlegen
        mpu_CurrentHP = mpi_MaxHP;

        // Enemy_Navigation script festlegen
        mpi_Enav = GetComponent <Enemy_Navigaton>();
    }
Beispiel #2
0
    private void OnCollisionEnter(Collision _col)
    {
        mpi_Enav = GetComponentInParent <Enemy_Navigaton>();

        if (_col.gameObject.tag == "Player")
        {
            foreach (GameObject GO in mpu_Players)
            {
                if (GO == _col.gameObject)
                {
                    if (mpi_Enav.mpu_Target != null)
                    {
                        mpi_Enav.mpu_Target = GO.transform;
                    }
                }
            }
        }
    }