C# Class Manic_Shooter.Classes.PelletGun

Inheritance: IWeapon
Exibir arquivo Open project: TheGameDevelopmentClub/Manic-Shooter

Public Methods

Method Description
Fire ( ) : void
IsCoolingDown ( ) : bool
PelletGun ( Vector2 referencePosition, Vector2 muzzlePosition, Vector2 firingVelocity, double maxCoolDown, bool isPlayerGun = false ) : System
PelletGun ( Vector2 &referencePosition, Vector2 muzzleOffset, double firingAngle, float firingSpeed, double maxCoolDownTime, bool isPlayerGun = false ) : System

Initialize the pellet gun weapon

SetReferencePosition ( Vector2 newPosition ) : void
SetReferencePosition ( int x, int y ) : void
Update ( GameTime gameTime ) : void

Method Details

Fire() public method

public Fire ( ) : void
return void

IsCoolingDown() public method

public IsCoolingDown ( ) : bool
return bool

PelletGun() public method

public PelletGun ( Vector2 referencePosition, Vector2 muzzlePosition, Vector2 firingVelocity, double maxCoolDown, bool isPlayerGun = false ) : System
referencePosition Vector2
muzzlePosition Vector2
firingVelocity Vector2
maxCoolDown double
isPlayerGun bool
return System

PelletGun() public method

Initialize the pellet gun weapon
public PelletGun ( Vector2 &referencePosition, Vector2 muzzleOffset, double firingAngle, float firingSpeed, double maxCoolDownTime, bool isPlayerGun = false ) : System
referencePosition Vector2
muzzleOffset Vector2 The 2-component Vector position of the muzzle or firing location
firingAngle double The angle (in radians) to fire the pellet at
firingSpeed float The speed (in pixels per second) to fire the pellet
maxCoolDownTime double The amount of time (in seconds) to cool down before allowing another shot to fire
isPlayerGun bool
return System

SetReferencePosition() public method

public SetReferencePosition ( Vector2 newPosition ) : void
newPosition Vector2
return void

SetReferencePosition() public method

public SetReferencePosition ( int x, int y ) : void
x int
y int
return void

Update() public method

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void