Пример #1
0
    void Damage(Transform enemy)
    {
        enemy_CS e = enemy.GetComponent <enemy_CS>();

        if (e != null)
        {
            e.TakeDamage(damage);
        }
    }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     enemy  = GetComponent <enemy_CS>();
     target = WayPoints_CS.waypoints[0];
 }