C# Class UHSampleGame.CoreObjects.Units.Unit

Inheritance: StaticTileObject
Datei anzeigen Open project: holtkampw/UH-Sample-XNA-Project Class Usage Examples

Public Properties

Property Type Description
CurrentTileID int
Damage int
Health int
HealthCapacity int
ID int
MoneyToGive int
PathLength int
PlayerNum int
PlayerToAttack int
Position Vector3
Scale float
Status UnitStatus
TeamNum int
Transforms Matrix
Type UnitType
XPToGive int

Protected Properties

Property Type Description
currentTile UHSampleGame.TileSystem.Tile
focalTile UHSampleGame.TileSystem.Tile
goalTile UHSampleGame.TileSystem.Tile
health int
previousTile UHSampleGame.TileSystem.Tile

Public Methods

Method Description
Activate ( ) : void
Deploy ( Tile baseTile, Tile goalTile, int playerToAttack ) : void
Draw ( GameTime gameTime ) : void
Equals ( object obj ) : bool
GetPathLength ( ) : int
IsActive ( ) : bool
IsDeployed ( ) : bool
PathToGoal ( ) : List
RotateToFace ( Vector3 O, Vector3 P, Vector3 U ) : void
RotateX ( float rotation ) : void
RotateY ( float rotation ) : void
RotateZ ( float rotation ) : void
SetCurrentTile ( int tileID ) : void
SetFocalPointAndVelocity ( int newTileID ) : void
SetScale ( float newScale ) : void
TakeDamage ( int damage ) : bool
TakeDamage ( int damage ) : void
ToString ( ) : string
Unit ( Model model, Base goalBase ) : System
Unit ( UnitType unitType ) : System
Update ( GameTime gameTime ) : bool
Update ( GameTime gameTime ) : void
UpdatePath ( ) : void
UpdatePositionAndRotation ( ) : void
UpdateScaleRotations ( ) : void
UpdateTargetPlayer ( Tile &newGoalTile, int newTargetPlayer ) : void
UpdateTransforms ( ) : void

Private Methods

Method Description
CheckIfStuck ( ) : bool
GetTile ( ) : Tile
IsNewTile ( ) : bool
OnDied ( ) : void
SetCurrentTile ( Tile tile ) : void
SetFocalPointAndVelocity ( Tile newTile ) : void

Method Details

Activate() public method

public Activate ( ) : void
return void

Deploy() public method

public Deploy ( Tile baseTile, Tile goalTile, int playerToAttack ) : void
baseTile UHSampleGame.TileSystem.Tile
goalTile UHSampleGame.TileSystem.Tile
playerToAttack int
return void

Draw() public method

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

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetPathLength() public method

public GetPathLength ( ) : int
return int

IsActive() public method

public IsActive ( ) : bool
return bool

IsDeployed() public method

public IsDeployed ( ) : bool
return bool

PathToGoal() public method

public PathToGoal ( ) : List
return List

RotateToFace() public method

public RotateToFace ( Vector3 O, Vector3 P, Vector3 U ) : void
O Vector3
P Vector3
U Vector3
return void

RotateX() public method

public RotateX ( float rotation ) : void
rotation float
return void

RotateY() public method

public RotateY ( float rotation ) : void
rotation float
return void

RotateZ() public method

public RotateZ ( float rotation ) : void
rotation float
return void

SetCurrentTile() public method

public SetCurrentTile ( int tileID ) : void
tileID int
return void

SetFocalPointAndVelocity() public method

public SetFocalPointAndVelocity ( int newTileID ) : void
newTileID int
return void

SetScale() public method

public SetScale ( float newScale ) : void
newScale float
return void

TakeDamage() public method

public TakeDamage ( int damage ) : bool
damage int
return bool

TakeDamage() public method

public TakeDamage ( int damage ) : void
damage int
return void

ToString() public method

public ToString ( ) : string
return string

Unit() public method

public Unit ( Model model, Base goalBase ) : System
model Microsoft.Xna.Framework.Graphics.Model
goalBase UHSampleGame.CoreObjects.Base.Base
return System

Unit() public method

public Unit ( UnitType unitType ) : System
unitType UnitType
return System

Update() public method

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

Update() public method

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

UpdatePath() public method

public UpdatePath ( ) : void
return void

UpdatePositionAndRotation() public method

public UpdatePositionAndRotation ( ) : void
return void

UpdateScaleRotations() public method

public UpdateScaleRotations ( ) : void
return void

UpdateTargetPlayer() public method

public UpdateTargetPlayer ( Tile &newGoalTile, int newTargetPlayer ) : void
newGoalTile UHSampleGame.TileSystem.Tile
newTargetPlayer int
return void

UpdateTransforms() public method

public UpdateTransforms ( ) : void
return void

Property Details

CurrentTileID public_oe property

public int CurrentTileID
return int

Damage public_oe property

public int Damage
return int

Health public_oe property

public int Health
return int

HealthCapacity public_oe property

public int HealthCapacity
return int

ID public_oe property

public int ID
return int

MoneyToGive public_oe property

public int MoneyToGive
return int

PathLength public_oe property

public int PathLength
return int

PlayerNum public_oe property

public int PlayerNum
return int

PlayerToAttack public_oe property

public int PlayerToAttack
return int

Position public_oe property

public Vector3 Position
return Vector3

Scale public_oe property

public float Scale
return float

Status public_oe property

public UnitStatus Status
return UnitStatus

TeamNum public_oe property

public int TeamNum
return int

Transforms public_oe property

public Matrix Transforms
return Matrix

Type public_oe property

public UnitType Type
return UnitType

XPToGive public_oe property

public int XPToGive
return int

currentTile protected_oe property

protected Tile,UHSampleGame.TileSystem currentTile
return UHSampleGame.TileSystem.Tile

focalTile protected_oe property

protected Tile,UHSampleGame.TileSystem focalTile
return UHSampleGame.TileSystem.Tile

goalTile protected_oe property

protected Tile,UHSampleGame.TileSystem goalTile
return UHSampleGame.TileSystem.Tile

health protected_oe property

protected int health
return int

previousTile protected_oe property

protected Tile,UHSampleGame.TileSystem previousTile
return UHSampleGame.TileSystem.Tile