Ballz.GameSession.Logic.Weapons.Pistol.Update C# (CSharp) Method

Update() public method

public Update ( float elapsedSeconds, bool>.Dictionary KeysPressed, bool &turnEndindActionHappened, bool &canSwitchWeapon ) : void
elapsedSeconds float
KeysPressed bool>.Dictionary
turnEndindActionHappened bool
canSwitchWeapon bool
return void
        public override void Update(float elapsedSeconds, Dictionary<InputMessage.MessageType, bool> KeysPressed, out bool turnEndindActionHappened, out bool canSwitchWeapon)
        {
            base.Update(elapsedSeconds, KeysPressed, out turnEndindActionHappened, out canSwitchWeapon);

            // Weapon switching is only allowed if the pistol has not been used yet
            canSwitchWeapon = (ShotsFired == 0) || !Game.Match.UsePlayerTurns;

            // Turn ends after two shots
            turnEndindActionHappened = ShotsFired >= MaxShots;
        }