コード例 #1
0
    protected IEnumerator LaunchAttack(float delay)
    {
        spawn += 1;
        yield return(Gm.WaitFor(delay));

        if (IsInvisible)
        {
            spawn -= 1;
            yield break;
        }
        Spawn(3, 1);
    }
コード例 #2
0
    protected IEnumerator chooseAttack(float delay)
    {
        yield return(Gm.WaitFor(delay));

        while (true)
        {
            foreach (BlackPawnMinon m in minions)
            {
                if (m.Position.y < Position.y)
                {
                    m.launchAttack();
                    yield break;
                }
            }
            yield return(Gm.WaitFor(0.2f));
        }
    }
コード例 #3
0
    protected IEnumerator Wait()
    {
        foreach (GameObject b in ButtonsEnemy)
        {
            b.SetActive(false);
        }
        EnemyLifeObj.SetActive(false);
        Rend.enabled = false;
        float spd = Speed;

        Speed = 0;
        yield return(Gm.WaitFor(1.0f));

        Speed = spd;
        foreach (GameObject b in ButtonsEnemy)
        {
            b.SetActive(true);
        }
        EnemyLifeObj.SetActive(true);
        Rend.enabled = true;
    }