C# Class Shooter.Controls.Weapon

Show file Open project: JoeyTheAsian/Just-Force Class Usage Examples

Public Properties

Property Type Description
isReloading bool
maxAmmo int
reloadTimer double
timeSinceLastShot double

Protected Properties

Property Type Description
ammo List
ammoCount int
ammoTexture Microsoft.Xna.Framework.Graphics.Texture2D
auto bool
damage int
fireRate double
isAcquired bool
level int
name string
range double
reload Microsoft.Xna.Framework.Audio.SoundEffect
reloadTime double
shoot Microsoft.Xna.Framework.Audio.SoundEffect
spread double
texture Microsoft.Xna.Framework.Graphics.Texture2D

Public Methods

Method Description
CheckAmmo ( ) : bool
CheckFireRate ( double timeElapsed ) : bool
FillAmmo ( ) : void
GetSpread ( ) : double
Reload ( Queue curSounds ) : void
Reloading ( double timeElapsed ) : bool
Shoot ( Microsoft.Xna.Framework.Content.ContentManager content, Character p, Camera c, int tileSize, Character e ) : Projectile
TotalAmmo ( ) : int
Weapon ( Microsoft.Xna.Framework.Content.ContentManager content ) : Microsoft.Xna.Framework
Weapon ( Microsoft.Xna.Framework.Content.ContentManager content, List a, bool au, double spr, int fr, string t, int d ) : Microsoft.Xna.Framework
Weapon ( Microsoft.Xna.Framework.Content.ContentManager content, bool au, double spr, int fr, string t, int d, string ammoT, string n, int maxAm, int ammoC, double rlTime, int rng, int lvl, bool acq ) : Microsoft.Xna.Framework
Weapon ( Microsoft.Xna.Framework.Content.ContentManager content, bool au, double spr, int fr, string t, int d, string ammoT, string n, int maxAm, int ammoC, double rlTime, int rng, int lvl, bool acq, SoundEffect shot, SoundEffect rl ) : Microsoft.Xna.Framework

Method Details

CheckAmmo() public method

public CheckAmmo ( ) : bool
return bool

CheckFireRate() public method

public CheckFireRate ( double timeElapsed ) : bool
timeElapsed double
return bool

FillAmmo() public method

public FillAmmo ( ) : void
return void

GetSpread() public method

public GetSpread ( ) : double
return double

Reload() public method

public Reload ( Queue curSounds ) : void
curSounds Queue
return void

Reloading() public method

public Reloading ( double timeElapsed ) : bool
timeElapsed double
return bool

Shoot() public method

public Shoot ( Microsoft.Xna.Framework.Content.ContentManager content, Character p, Camera c, int tileSize, Character e ) : Projectile
content Microsoft.Xna.Framework.Content.ContentManager
p Shooter.Entities.Character
c Camera
tileSize int
e Shooter.Entities.Character
return Shooter.Entities.Projectile

TotalAmmo() public method

public TotalAmmo ( ) : int
return int

Weapon() public method

public Weapon ( Microsoft.Xna.Framework.Content.ContentManager content ) : Microsoft.Xna.Framework
content Microsoft.Xna.Framework.Content.ContentManager
return Microsoft.Xna.Framework

Weapon() public method

public Weapon ( Microsoft.Xna.Framework.Content.ContentManager content, List a, bool au, double spr, int fr, string t, int d ) : Microsoft.Xna.Framework
content Microsoft.Xna.Framework.Content.ContentManager
a List
au bool
spr double
fr int
t string
d int
return Microsoft.Xna.Framework

Weapon() public method

public Weapon ( Microsoft.Xna.Framework.Content.ContentManager content, bool au, double spr, int fr, string t, int d, string ammoT, string n, int maxAm, int ammoC, double rlTime, int rng, int lvl, bool acq ) : Microsoft.Xna.Framework
content Microsoft.Xna.Framework.Content.ContentManager
au bool
spr double
fr int
t string
d int
ammoT string
n string
maxAm int
ammoC int
rlTime double
rng int
lvl int
acq bool
return Microsoft.Xna.Framework

Weapon() public method

public Weapon ( Microsoft.Xna.Framework.Content.ContentManager content, bool au, double spr, int fr, string t, int d, string ammoT, string n, int maxAm, int ammoC, double rlTime, int rng, int lvl, bool acq, SoundEffect shot, SoundEffect rl ) : Microsoft.Xna.Framework
content Microsoft.Xna.Framework.Content.ContentManager
au bool
spr double
fr int
t string
d int
ammoT string
n string
maxAm int
ammoC int
rlTime double
rng int
lvl int
acq bool
shot Microsoft.Xna.Framework.Audio.SoundEffect
rl Microsoft.Xna.Framework.Audio.SoundEffect
return Microsoft.Xna.Framework

Property Details

ammo protected property

protected List ammo
return List

ammoCount protected property

protected int ammoCount
return int

ammoTexture protected property

protected Texture2D,Microsoft.Xna.Framework.Graphics ammoTexture
return Microsoft.Xna.Framework.Graphics.Texture2D

auto protected property

protected bool auto
return bool

damage protected property

protected int damage
return int

fireRate protected property

protected double fireRate
return double

isAcquired protected property

protected bool isAcquired
return bool

isReloading public property

public bool isReloading
return bool

level protected property

protected int level
return int

maxAmmo public property

public int maxAmmo
return int

name protected property

protected string name
return string

range protected property

protected double range
return double

reload protected property

protected SoundEffect,Microsoft.Xna.Framework.Audio reload
return Microsoft.Xna.Framework.Audio.SoundEffect

reloadTime protected property

protected double reloadTime
return double

reloadTimer public property

public double reloadTimer
return double

shoot protected property

protected SoundEffect,Microsoft.Xna.Framework.Audio shoot
return Microsoft.Xna.Framework.Audio.SoundEffect

spread protected property

protected double spread
return double

texture protected property

protected Texture2D,Microsoft.Xna.Framework.Graphics texture
return Microsoft.Xna.Framework.Graphics.Texture2D

timeSinceLastShot public property

public double timeSinceLastShot
return double