C# Class WindowsGame1.ActionHandler

ActionHandler Detects Collision and Check Visivility of Enemy. This class use only values of sprites not reference, so this needs to update each movement. ::Future possible development:: Position List can be converted to sprite list which is referece type. No need to update each movement,but need to change most of codes.
Show file Open project: csce3513/Team18 Class Usage Examples

Public Properties

Property Type Description
PlayerState CharacterStatus

Public Methods

Method Description
ActionHandler ( ) : System
CollisionCheck ( int ID ) : Vector2
IgnoreObject ( Sprite name ) : void
RecognizeObject ( Sprite name ) : void
UpdatePos ( Sprite name ) : void
Visibility ( int ID1, int ID2 ) : Vector2
addObject ( Vector2 Pos, int ID, float Width, float Height ) : void
getHeight ( int ID ) : double
getPos ( int ID ) : Vector2
getWidth ( int ID ) : double

Protected Methods

Method Description
CollisionDetect ( int n, int m ) : Vector2

Private Methods

Method Description
FindSprite ( int ID ) : int

Method Details

ActionHandler() public method

public ActionHandler ( ) : System
return System

CollisionCheck() public method

public CollisionCheck ( int ID ) : Vector2
ID int
return Vector2

CollisionDetect() protected method

protected CollisionDetect ( int n, int m ) : Vector2
n int
m int
return Vector2

IgnoreObject() public method

public IgnoreObject ( Sprite name ) : void
name Sprite
return void

RecognizeObject() public method

public RecognizeObject ( Sprite name ) : void
name Sprite
return void

UpdatePos() public method

public UpdatePos ( Sprite name ) : void
name Sprite
return void

Visibility() public method

public Visibility ( int ID1, int ID2 ) : Vector2
ID1 int
ID2 int
return Vector2

addObject() public method

public addObject ( Vector2 Pos, int ID, float Width, float Height ) : void
Pos Vector2
ID int
Width float
Height float
return void

getHeight() public method

public getHeight ( int ID ) : double
ID int
return double

getPos() public method

public getPos ( int ID ) : Vector2
ID int
return Vector2

getWidth() public method

public getWidth ( int ID ) : double
ID int
return double

Property Details

PlayerState public property

public CharacterStatus PlayerState
return CharacterStatus