Exemplo n.º 1
0
    void Cheats(int code)
    {
        SoundManager.smInstance_.PlayCLip(SoundManager.FXSounds.PULSE_END);
        switch (code)
        {
        case 1:
            player_.transform.position = endPoint.position;
            break;

        case 2:
            foreach (EnemigoManager e in enemies)
            {
                e.Death();
            }
            break;

        case 3:
            Collider2D[] coll = Physics2D.OverlapCircleAll(player_.transform.position, 100);

            foreach (Collider2D col in coll)
            {
                Enemigo enemy = col.GetComponent <Enemigo>();
                if (enemy && enemy.GetState() != Enemigo.State.Atacking)
                {
                    enemy.SetState(Enemigo.State.Alerted);
                }
            }
            break;

        case 4:
            TGM = !TGM;
            break;

        case 5:
            Uammo = !Uammo;
            break;
        }
    }