Blaze Brigade
Model.Warrior Class Reference

The Warrior model class, extends Unit This unit excels in dealing melee physical damage, with a high defense, but suffers from lack of any magical attack or resistance More...

Inheritance diagram for Model.Warrior:
Model.Unit

Public Member Functions

 Warrior (Texture2D spriteImage, Button attackButton, Button moveButton, Button itemButton, Button waitButton, Button confirmButton, Texture2D charInfo, Texture2D charAttackInfo, Vector2 coordinates, int player)
 
void setInitialStats ()
 
int getMovability ()
 
int [] getStats ()
 
Weapon [] getEquipableWeapons ()
 
UnitType getClass ()
 
Texture2D getSpriteImage ()
 
Texture2D getButtonImage (ButtonType buttonType)
 
bool isButtonActive (ButtonType buttonType)
 
Texture2D getCharInfo ()
 
Texture2D getCharAttackInfo ()
 
Button [] getButtons ()
 
Button getButtonOfType (ButtonType buttonType)
 
void setButtonCoordinates (Vector2 pixelCoordinates)
 
Rectangle getCurrentFrame ()
 
void animate (Direction direction)
 

Properties

bool Alive [get, set]
 
int Hp [get, set]
 
int Speed [get, set]
 
int Def [get, set]
 
int Res [get, set]
 
int Level [get, set]
 
Weapon equippedWeapon [get, set]
 
int Str [get, set]
 
int Int [get, set]
 
int Skill [get, set]
 
Tuple< int, int > Position [get, set]
 
Vector2 PixelCoordinates [get, set]
 
- Properties inherited from Model.Unit
bool Alive [get, set]
 
int Hp [get, set]
 
int Str [get, set]
 
int Int [get, set]
 
int Skill [get, set]
 
int Speed [get, set]
 
int Def [get, set]
 
int Res [get, set]
 
int Level [get, set]
 
Weapon equippedWeapon [get, set]
 
Tuple< int, int > Position [get, set]
 
Vector2 PixelCoordinates [get, set]
 

Detailed Description

The Warrior model class, extends Unit This unit excels in dealing melee physical damage, with a high defense, but suffers from lack of any magical attack or resistance

Constructor & Destructor Documentation

§ Warrior()

Model.Warrior.Warrior ( Texture2D  spriteImage,
Button  attackButton,
Button  moveButton,
Button  itemButton,
Button  waitButton,
Button  confirmButton,
Texture2D  charInfo,
Texture2D  charAttackInfo,
Vector2  coordinates,
int  player 
)

The constructor for Unit Warrior

Parameters
spriteImageThe character sprite
attackButtonThe dropdownmenu attack button texture
moveButtonThe dropdownmenu move button texture
itemButtonThe dropdownmenu item button texture
waitButtonThe dropdownmenu wait button texture
confirmButtonThe attack confirm button texture
charInfoThe character info popup texture
charAttackInfoThe character attack menu popup texture
coordinatesThe unit's current coordinate on screen
playerThe player of which the unit belongs to

Member Function Documentation

§ animate()

void Model.Warrior.animate ( Direction  direction)

animate sprite walking the direction specified

Parameters
directionThe direction the unit is moving in

Implements Model.Unit.

§ getButtonImage()

Texture2D Model.Warrior.getButtonImage ( ButtonType  buttonType)

returns the button texture at index i

Implements Model.Unit.

§ getButtonOfType()

Button Model.Warrior.getButtonOfType ( ButtonType  buttonType)

Returns the button type

Parameters
buttonTypeThe button to return (Move, Attack, Item, Wait, and attack confirm)

Implements Model.Unit.

§ getButtons()

Button [] Model.Warrior.getButtons ( )

returns the dropdown menu buttons of the unit

Implements Model.Unit.

§ getCharAttackInfo()

Texture2D Model.Warrior.getCharAttackInfo ( )

returns the char attack info screen texture

Implements Model.Unit.

§ getCharInfo()

Texture2D Model.Warrior.getCharInfo ( )

returns the char info screen texture

Implements Model.Unit.

§ getClass()

UnitType Model.Warrior.getClass ( )

returns unit's class (warrior, mage, archer)

Implements Model.Unit.

§ getCurrentFrame()

Rectangle Model.Warrior.getCurrentFrame ( )

returns the current sprite frame in animation sequence

Implements Model.Unit.

§ getEquipableWeapons()

Weapon [] Model.Warrior.getEquipableWeapons ( )

returns array of equipable weapons

Implements Model.Unit.

§ getMovability()

int Model.Warrior.getMovability ( )

Returns the unit's movability range on grid (number of spaces the unit can move in one turn)

Implements Model.Unit.

§ getSpriteImage()

Texture2D Model.Warrior.getSpriteImage ( )

returns the sprite image of the unit

Implements Model.Unit.

§ getStats()

int [] Model.Warrior.getStats ( )

returns all stats as an array

Implements Model.Unit.

§ isButtonActive()

bool Model.Warrior.isButtonActive ( ButtonType  buttonType)

indicates whether a button has already been previously selected or not

Implements Model.Unit.

§ setButtonCoordinates()

void Model.Warrior.setButtonCoordinates ( Vector2  pixelCoordinates)

sets the coordinates of menu buttons

Parameters
pixelCoordinatesThe pixel coordinate of the button

Implements Model.Unit.

§ setInitialStats()

void Model.Warrior.setInitialStats ( )

sets initial unit stats upon creation

Implements Model.Unit.

Property Documentation

§ Alive

bool Model.Warrior.Alive
getset

Sets and returns whether or not unit is alive

§ Def

int Model.Warrior.Def
getset

Sets and returns a unit's Defense

§ equippedWeapon

Weapon Model.Warrior.equippedWeapon
getset

returns weapon the unit is currently equipping

§ Hp

int Model.Warrior.Hp
getset

Sets and returns a unit's HP

§ Level

int Model.Warrior.Level
getset

Sets and returns a unit's Level

§ PixelCoordinates

Vector2 Model.Warrior.PixelCoordinates
getset

returns the pixel coordinate of the unit
sets the pixel coordinate, and also sets Position (which is the tile location of that coordinate)

§ Position

Tuple<int, int> Model.Warrior.Position
getset

gets and sets unit's position by tile

§ Res

int Model.Warrior.Res
getset

Sets and returns a unit's Resistance

§ Speed

int Model.Warrior.Speed
getset

Sets and returns a unit's Speed


The documentation for this class was generated from the following file: