Exemplo n.º 1
0
    public void setBulletSpeed(enemy boss)
    {
        int health = boss.getHealth();

        if (Enumerable.Range(1, 3).Contains(health))
        {
            speed = 11f;
        }
        else if (Enumerable.Range(3, 7).Contains(health))
        {
            speed = 6f;
        }
        else if (Enumerable.Range(7, 10).Contains(health))
        {
            speed = 2f;
        }
    }
Exemplo n.º 2
0
    public boss_state getState()
    {
        //Debug.Log(instance.getSpeed());
        int health = boss.getHealth();

        if (Enumerable.Range(1, 3).Contains(health))
        {
            return(boss_state.third);
        }
        else if (Enumerable.Range(3, 7).Contains(health))
        {
            return(boss_state.second);
        }
        else if (Enumerable.Range(7, 10).Contains(health))
        {
            return(boss_state.first);
        }
        else
        {
            return(boss_state.invalid);
        }
    }