예제 #1
0
파일: Player.cs 프로젝트: lordee/godotfps
    private void UseSpecialSkill()
    {
        switch ((PLAYERCLASS)this.PlayerClass)
        {
        case PLAYERCLASS.DEMOMAN:
            Demoman.Detpipe(this);
            break;

        case PLAYERCLASS.MEDIC:
            ToggleAura();
            break;

        case PLAYERCLASS.HWGUY:
            HWGuy.ToggleSpin(this);
            break;

        case PLAYERCLASS.PYRO:
            Pyro.AirBlast(this);
            break;
        }
    }
예제 #2
0
파일: Player.cs 프로젝트: lordee/godotfps
    private void ProcessImpulses(PlayerCmd pCmd)
    {
        foreach (float i in pCmd.impulses)
        {
            IMPULSE imp = (IMPULSE)i;
            switch (imp)
            {
            case IMPULSE.WEAPONONE:
                if (_weapon1 != null)
                {
                    ActiveWeapon = Weapon1;
                }
                break;

            case IMPULSE.WEAPONTWO:
                if (Weapon2 != null)
                {
                    ActiveWeapon = Weapon2;
                }
                break;

            case IMPULSE.WEAPONTHREE:
                if (Weapon3 != null)
                {
                    ActiveWeapon = Weapon3;
                }
                break;

            case IMPULSE.WEAPONFOUR:
                if (Weapon4 != null)
                {
                    ActiveWeapon = Weapon4;
                }
                break;

            case IMPULSE.GRENONE:
            case IMPULSE.GRENTWO:
                UseHandGrenade(imp, pCmd);
                break;

            case IMPULSE.DETPIPE:
                Demoman.Detpipe(this);
                break;

            case IMPULSE.SPECIAL:
                UseSpecialSkill();
                break;

            case IMPULSE.DETPACK5:
                Demoman.Detpack(this, 5, true);
                break;

            case IMPULSE.DETPACK20:
                Demoman.Detpack(this, 20, true);
                break;

            case IMPULSE.DETPACK50:
                Demoman.Detpack(this, 50, true);
                break;

            case IMPULSE.DETPACK255:
                Demoman.Detpack(this, 255, true);
                break;

            case IMPULSE.DETPACKUNSET:
                Demoman.Detpack(this, 0, false);
                break;
            }
        }
    }