예제 #1
0
    void Update()
    {
        if (playerInTerritory == true)
        {
            basicenemy.MoveToPlayer();
            basicenemy.AttackTimer();

            if (enemy2 != null)
            {
                basicenemy2.MoveToPlayer();
                basicenemy2.AttackTimer();
            }
        }

        if (playerInTerritory == false)
        {
            basicenemy.Rest();

            if (enemy2 != null)
            {
                basicenemy2.Rest();
            }
        }
    }