C# Class Category5.Victim

Show file Open project: AnyKey/tojam4 Class Usage Examples

Public Properties

Property Type Description
CurrentVicitimID int
TornadoHealth float
VictimID int
rnd System.Random
speed float
state State
tornado Tornado

Protected Properties

Property Type Description
ExplodeAnimation Animation
GroundAnimation Animation
StumpAnimation Animation
TornadoAnimation Animation
bounds Rectangle2D
clipRectangle Rectangle2D
drawAngle float
errorAngle float
errorDist float
errorSpeed float
explodeWait float
lastAnimTime float
megatile MegaTile
moveAngle float
removeFromMegaTileOnDeath bool
requestRemoveFromMegaTile bool
requestRemoveTornado bool
score int
settlingDistance float
soundHit string
staytime float
timeScaleFactor float
tornadoVelocityFactor float

Public Methods

Method Description
CanDrawVictim ( Level level, Victim victim ) : bool
Draw ( SpriteBatch batch ) : void

Draws the appropreate animation given the current graphics device

HitTest ( Tornado tornado, List victimsToCollideCheck ) : void
Update ( float Time ) : void

Protected Methods

Method Description
Clone ( ) : Victim
HitCheck ( Victim groundObject ) : void

Try and damage our victims with our stats

Move ( float time ) : void
PreLoadSounds ( ) : void
RecieveHit ( float Damage, Tornado tornado ) : float

Recieve a hit at a certain damange and returns if the building was destroyed

RubberBandMe ( float elapsedTime ) : void
getAngleToPoint ( Vector2 TargetPoint ) : float

gets the heading to target tornado

getDamage ( Victim target ) : float
getDistanceFromTornado ( ) : float

Calculates the distance to the center of the tornado used to compare with the radius to determine where you should place yourself

updateErrorAngle ( float factor, float clip ) : float
updateErrorDist ( float moveFactor, float moveClip ) : float

creates an error term within clipping ranges this can be used to perturb the bug

updateErrorSpeed ( float speedFactor, float speedClip ) : float

Method Details

CanDrawVictim() public static method

public static CanDrawVictim ( Level level, Victim victim ) : bool
level Level
victim Victim
return bool

Clone() protected abstract method

protected abstract Clone ( ) : Victim
return Victim

Draw() public method

Draws the appropreate animation given the current graphics device
public Draw ( SpriteBatch batch ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch sprite batch from the game drawing window
return void

HitCheck() protected method

Try and damage our victims with our stats
protected HitCheck ( Victim groundObject ) : void
groundObject Victim
return void

HitTest() public abstract method

public abstract HitTest ( Tornado tornado, List victimsToCollideCheck ) : void
tornado Tornado
victimsToCollideCheck List
return void

Move() protected abstract method

protected abstract Move ( float time ) : void
time float
return void

PreLoadSounds() protected method

protected PreLoadSounds ( ) : void
return void

RecieveHit() protected method

Recieve a hit at a certain damange and returns if the building was destroyed
protected RecieveHit ( float Damage, Tornado tornado ) : float
Damage float
tornado Tornado
return float

RubberBandMe() protected method

protected RubberBandMe ( float elapsedTime ) : void
elapsedTime float
return void

Update() public method

public Update ( float Time ) : void
Time float
return void

getAngleToPoint() protected method

gets the heading to target tornado
protected getAngleToPoint ( Vector2 TargetPoint ) : float
TargetPoint Vector2
return float

getDamage() protected method

protected getDamage ( Victim target ) : float
target Victim
return float

getDistanceFromTornado() protected method

Calculates the distance to the center of the tornado used to compare with the radius to determine where you should place yourself
protected getDistanceFromTornado ( ) : float
return float

updateErrorAngle() protected method

protected updateErrorAngle ( float factor, float clip ) : float
factor float
clip float
return float

updateErrorDist() protected method

creates an error term within clipping ranges this can be used to perturb the bug
protected updateErrorDist ( float moveFactor, float moveClip ) : float
moveFactor float
moveClip float
return float

updateErrorSpeed() protected method

protected updateErrorSpeed ( float speedFactor, float speedClip ) : float
speedFactor float
speedClip float
return float

Property Details

CurrentVicitimID public static property

public static int CurrentVicitimID
return int

ExplodeAnimation protected property

protected Animation,Category5 ExplodeAnimation
return Animation

GroundAnimation protected property

protected Animation,Category5 GroundAnimation
return Animation

StumpAnimation protected property

protected Animation,Category5 StumpAnimation
return Animation

TornadoAnimation protected property

protected Animation,Category5 TornadoAnimation
return Animation

TornadoHealth public property

public float TornadoHealth
return float

VictimID public property

public int VictimID
return int

bounds protected property

protected Rectangle2D,Category5 bounds
return Rectangle2D

clipRectangle protected property

protected Rectangle2D,Category5 clipRectangle
return Rectangle2D

drawAngle protected property

protected float drawAngle
return float

errorAngle protected property

protected float errorAngle
return float

errorDist protected property

protected float errorDist
return float

errorSpeed protected property

protected float errorSpeed
return float

explodeWait protected property

protected float explodeWait
return float

lastAnimTime protected property

protected float lastAnimTime
return float

megatile protected property

protected MegaTile,Category5 megatile
return MegaTile

moveAngle protected property

protected float moveAngle
return float

removeFromMegaTileOnDeath protected property

protected bool removeFromMegaTileOnDeath
return bool

requestRemoveFromMegaTile protected property

protected bool requestRemoveFromMegaTile
return bool

requestRemoveTornado protected property

protected bool requestRemoveTornado
return bool

rnd public static property

public static Random,System rnd
return System.Random

score protected property

protected int score
return int

settlingDistance protected property

protected float settlingDistance
return float

soundHit protected property

protected string soundHit
return string

speed public property

public float speed
return float

state public property

public State state
return State

staytime protected property

protected float staytime
return float

timeScaleFactor protected property

protected float timeScaleFactor
return float

tornado public property

public Tornado,Category5 tornado
return Tornado

tornadoVelocityFactor protected property

protected float tornadoVelocityFactor
return float