Skip to content
Snippets Groups Projects
Commit bb2032fc authored by Trandinh Thien's avatar Trandinh Thien
Browse files

Updated doxygen for unit and its child classes

parent cfa0a44b
No related branches found
No related tags found
No related merge requests found
Showing with 191 additions and 58 deletions
......@@ -17,6 +17,9 @@ namespace View
/**
Animates attack of unit in specified direction. The animation consists of moving 10 pixels towards that direction, then moving back to original location.
Upon execution, gameState isAnimating is set to true, and false after it is finished.
\b Exceptions: \n
- The unit passed in must be alive, otherwise nothing will be shown to screen
- This function will not function properly if a direction other then Up, Down, Left or Right is given
\param direction The direction of the attack - can be Up, Down, Left, or Right
\param unit Unit to be animated.
*/
......@@ -110,6 +113,9 @@ namespace View
For horizontally, the unit will move right if the future position is greater in the x direction, otherwise it will move left. For vertical, the unit will move down if future y position is
greater then current, otherwise it will move up. animate is called to animate the walking from node to node, and the direction parameter in that call is determined by which direction the
unit is moving.
\b Exception: \n
- Thie function will only execute if the original and new location are different, otherwise nothing will happen
- The function assumes that the the path between original location and new location is valid
\param graph Graph of the map.
\param unit Unit to be animated.
\param node Node to move to.
......@@ -165,6 +171,9 @@ namespace View
/**
Animate sprite to "walk" in the specified direction. This is done by cycling through 3 frames. For each direction, there is a frame with right foot forward, one with both at neutral,
and one with left forward. The "walking" animation is done by cycling through the 3 frames.
\b Exceptions: \n
- The unit passed in must be alive, otherwise nothing will be shown to screen
- This function will not function properly if a direction other then Up, Down, Left or Right is given
* @param direction The direction the unit is moving in
*/
public static void animate(Direction direction, Unit unit)
......
......@@ -22,18 +22,24 @@ namespace Model
public bool Alive { get; set; }
/**
Sets and returns a unit's Speed
\b Exceptions: \n
-Negative skill will not result in an error as speed is only used for checking double attack boolean, which is binary
*/
public int Speed { get; set; }
/**
Sets and returns a unit's Defense
\b Exceptions: \n
-Negative defense will result in an attacker doing more damage than their attack
*/
public int Def { get; set; }
/**
Sets and returns a unit's Resistance
\b Exceptions: \n
-Negative resistance will result in an attacker doing more damage than their intelligence
*/
public int Res { get; set; }
/**
Sets and returns a unit's Level
Sets and returns a unit's Level. Currently does not have any use
*/
public int Level { get; set; }
......@@ -59,7 +65,7 @@ namespace Model
private Texture2D charInfo, charAttackInfo; // The character and attack info textures
/**
* The constructor for Unit Archer
* The constructor for Unit Archer. Stores all relevent data in model.
* @param spriteImage The character sprite
* @param attackButton The dropdownmenu attack button texture
* @param moveButton The dropdownmenu move button texture
......@@ -112,6 +118,8 @@ namespace Model
/**
Sets the new strength value
\n Gets the effective strength -> Unit strength + weapon strength
\b Exceptions: \n
-Negative strength will be treated as 0 in damage calculation, as damage dealt can not be negative
*/
public int Str
{
......@@ -128,6 +136,8 @@ namespace Model
/**
Sets the new intelligence value
\n Gets the effective intelligence -> Unit intelligence + weapon intelligence
\b Exceptions: \n
-Negative strength will be treated as 0 in damage calculation, as damage dealt can not be negative
*/
public int Int
{
......@@ -144,6 +154,8 @@ namespace Model
/**
Sets the new skill value
\n Gets the effective skill -> Unit skill + weapon skill
\b Exceptions: \n
-Negative skill will not result in an error, but will most likely result in a 0% hit and crit rate
*/
public int Skill
{
......@@ -158,9 +170,8 @@ namespace Model
}
/**
Sets the hp of the unit.
\n Gets the unit's hp.
*/
Sets and returns a unit's HP. Should HP fall under 0, Unit's Alive Boolean should change to false
*/
public int Hp
{
get
......@@ -180,6 +191,8 @@ namespace Model
/**
Returns the unit's movability range on grid (number of spaces the unit can move in one turn)
\b Exceptions: \n
-Negative movement will be treated as 0 in path finding algorithm
*/
public int getMovability()
{
......@@ -187,7 +200,8 @@ namespace Model
}
/**
returns all stats as an array
returns all stats as an array, where the index in array corresponds to stats in this order:
Level, Strength, Int, Skill, Speed, Def, Res
*/
public int[] getStats()
{
......@@ -227,7 +241,9 @@ namespace Model
}
/**
returns the button texture at index i
This method returns the texture associated with the bunttonType passed in, by going through a switch
case and matching it.
@param buttonType The buttontype that was clicked
*/
public Texture2D getButtonImage(ButtonType buttonType)
{
......@@ -257,7 +273,9 @@ namespace Model
}
/**
indicates whether a button has already been previously selected or not
This method takes in the buttonType specified, and checks if that button is currently active by calling
the getter in button.
@param buttonType The buttontype that was clicked
*/
public bool isButtonActive(ButtonType buttonType)
{
......@@ -303,7 +321,10 @@ namespace Model
}
/**
gets and sets unit's position by tile
gets and sets unit's position by tile. The set also updates pixelCoordinate's location by making
that vector equivalent to position*32 (since each tile is 32x32).
\b Exceptions: \n
-Dead units will still have a position, but won't impact the rest of the game
*/
public Tuple<int, int> Position
{
......@@ -321,6 +342,8 @@ namespace Model
/**
returns the pixel coordinate of the unit
\n sets the pixel coordinate, and also sets Position (which is the tile location of that coordinate)
\b Exceptions: \n
-Dead units will still have a position, but won't impact the rest of the game
*/
public Vector2 PixelCoordinates
{
......@@ -346,7 +369,7 @@ namespace Model
}
/**
Returns the button type
Method takes in the buttonType enum, then returns the object associated with that enum
* @param buttonType The button to return (Move, Attack, Item, Wait, and attack confirm)
*/
public Button getButtonType(ButtonType buttonType)
......@@ -377,7 +400,11 @@ namespace Model
}
/**
sets the coordinates of menu buttons
Sets the coordinates of menu buttons. One for loop will position the main Drop Down menu (potentailly
containing attack, move, item and wait directly 32 pixels to the right of unit (so the tile to right of unit)
, and for each active button, increment it downwards by 32 pixels (height of each button). The second
for loop is similiar and is for the inventory menu buttons, except it starts 160 pixels offsetted to
right (to the right of the main drop down menu).
* @param pixelCoordinates The pixel coordinate of the button
*/
public void setButtonCoordinates(Vector2 pixelCoordinates)
......@@ -399,7 +426,10 @@ namespace Model
}
/**
returns the current sprite frame in animation sequence
returns the current sprite frame in animation sequence. The rectangle starts at currentFrame * 32, where
32 is the sprite sheet offset between frames, and is 32 high and wide.
\b Exceptions: \n
-Assumes that each sprite frame is 32pixels wide
*/
public Rectangle getCurrentFrame() //return current frame the sprite is on
{
......
......@@ -157,10 +157,6 @@
<Content Include="GameThumbnail.png">
<XnaPlatformSpecific>true</XnaPlatformSpecific>
</Content>
<None Include="Blaze_Brigade_1_TemporaryKey.pfx" />
<None Include="Blaze_Brigade_2_TemporaryKey.pfx" />
<None Include="Blaze_Brigade_3_TemporaryKey.pfx" />
<None Include="Blaze_Brigade_TemporaryKey.pfx" />
<None Include="Resources\player2turn.png" />
<None Include="Resources\player1turn.png" />
<None Include="Resources\End_Button.jpg" />
......
File deleted
......@@ -35,6 +35,8 @@ namespace View
/**
Draw Damage pop up numbers from attacking. If GameState currentPlayerDamagePopup is true, draw the damage dealt by attacking player on top of the enemy unit.
If GameState enemyPlayerDamagePopup is true, draw the damage received by defender on top of the recipient.
\b Exceptions: \n
- This function assumes that the last time damage calculation was calculated and stored corresponds to the last attacking and defending unit
\param spriteBatch to draw 2D bitmap to screen
\param font the font to be used
*/
......@@ -55,6 +57,8 @@ namespace View
/**
Draw highlightable nodes. If a unit has yet to move, and unit is selected, all moveable nodes are highlighted blue, with the max attack range nodes
highlighted red. Otherwise if a unit is selected, and has finished moving, only display the attackable nodes from the unit's current position.
\b Exceptions: \n
- If a unit has no moveable nodes, no squares will be highlighted blue
\param spriteBatch to draw 2D bitmap to screen
\param graph The current game graph
\param moveableNode The texture for moveableNode
......@@ -182,7 +186,7 @@ namespace View
/**
Draw attack confirmation screen. All the damage calculations, 1 set each for each player: AttackType, damageDealt, hitCOunt, hitRate, critRate, HP and equipped weapons
are all printed to the screen. To make sure the damage numbers are properly displayed for which player's unit is attacking, and which is defending, the method will
check for whose player's turn it currently is. The method will also draw the attack confirm button.
check for whose player's turn it currently is. The method will also draw the attack confirm button. Negative numbers for stats are handled in DamageClass.
\param spriteBatch to draw 2D bitmap to screen
\param font small font to be used
\param largeFont Larger font to be used
......
......@@ -22,20 +22,27 @@ namespace Model
public bool Alive { get; set; }
/**
Sets and returns a unit's Speed
\b Exceptions: \n
-Negative skill will not result in an error as speed is only used for checking double attack boolean, which is binary
*/
public int Speed { get; set; }
/**
Sets and returns a unit's Defense
\b Exceptions: \n
-Negative defense will result in an attacker doing more damage than their attack
*/
public int Def { get; set; }
/**
Sets and returns a unit's Resistance
\b Exceptions: \n
-Negative resistance will result in an attacker doing more damage than their intelligence
*/
public int Res { get; set; }
/**
Sets and returns a unit's Level
Sets and returns a unit's Level. Currently does not have any use
*/
public int Level { get; set; }
/**
returns weapon the unit is currently equipping
*/
......@@ -58,7 +65,7 @@ namespace Model
private Texture2D charInfo, charAttackInfo; // The character and attack info textures
/**
* The constructor for Unit Mage
* The constructor for Unit Mage. Stores all relevent data in model.
* @param spriteImage The character sprite
* @param attackButton The dropdownmenu attack button texture
* @param moveButton The dropdownmenu move button texture
......@@ -91,10 +98,10 @@ namespace Model
position = new Tuple<int, int>(positionX, positionY);
currentFrame = 1;
setButtonCoordinates(pixelCoordinates);
setInitialStats(); // sets initial mage stats
setInitialStats(); // sets initial archer stats
}
// sets initial unit stats
//sets initial unit stats
public void setInitialStats()
{
Alive = true;
......@@ -111,6 +118,8 @@ namespace Model
/**
Sets the new strength value
\n Gets the effective strength -> Unit strength + weapon strength
\b Exceptions: \n
-Negative strength will be treated as 0 in damage calculation, as damage dealt can not be negative
*/
public int Str
{
......@@ -127,6 +136,8 @@ namespace Model
/**
Sets the new intelligence value
\n Gets the effective intelligence -> Unit intelligence + weapon intelligence
\b Exceptions: \n
-Negative strength will be treated as 0 in damage calculation, as damage dealt can not be negative
*/
public int Int
{
......@@ -143,6 +154,8 @@ namespace Model
/**
Sets the new skill value
\n Gets the effective skill -> Unit skill + weapon skill
\b Exceptions: \n
-Negative skill will not result in an error, but will most likely result in a 0% hit and crit rate
*/
public int Skill
{
......@@ -157,9 +170,8 @@ namespace Model
}
/**
Sets the hp of the unit.
\n Gets the unit's hp.
*/
Sets and returns a unit's HP. Should HP fall under 0, Unit's Alive Boolean should change to false
*/
public int Hp
{
get
......@@ -179,6 +191,8 @@ namespace Model
/**
Returns the unit's movability range on grid (number of spaces the unit can move in one turn)
\b Exceptions: \n
-Negative movement will be treated as 0 in path finding algorithm
*/
public int getMovability()
{
......@@ -186,7 +200,8 @@ namespace Model
}
/**
Returns all stats as an array
returns all stats as an array, where the index in array corresponds to stats in this order:
Level, Strength, Int, Skill, Speed, Def, Res
*/
public int[] getStats()
{
......@@ -226,7 +241,9 @@ namespace Model
}
/**
returns the button texture at index i
This method returns the texture associated with the bunttonType passed in, by going through a switch
case and matching it.
@param buttonType The buttontype that was clicked
*/
public Texture2D getButtonImage(ButtonType buttonType)
{
......@@ -256,7 +273,9 @@ namespace Model
}
/**
indicates whether a button has already been previously selected or not
This method takes in the buttonType specified, and checks if that button is currently active by calling
the getter in button.
@param buttonType The buttontype that was clicked
*/
public bool isButtonActive(ButtonType buttonType)
{
......@@ -301,8 +320,11 @@ namespace Model
return charAttackInfo;
}
/**
gets and sets unit's position by tile
/**
gets and sets unit's position by tile. The set also updates pixelCoordinate's location by making
that vector equivalent to position*32 (since each tile is 32x32).
\b Exceptions: \n
-Dead units will still have a position, but won't impact the rest of the game
*/
public Tuple<int, int> Position
{
......@@ -319,7 +341,9 @@ namespace Model
/**
returns the pixel coordinate of the unit
\n sets the pixel coordinate, and also sets Position (which is the tile location of that coordinate)
\n sets the pixel coordinate, and also sets Position (which is the tile location of that coordinate)
\b Exceptions: \n
-Dead units will still have a position, but won't impact the rest of the game
*/
public Vector2 PixelCoordinates
{
......@@ -345,7 +369,7 @@ namespace Model
}
/**
Returns the button type
Method takes in the buttonType enum, then returns the object associated with that enum
* @param buttonType The button to return (Move, Attack, Item, Wait, and attack confirm)
*/
public Button getButtonType(ButtonType buttonType)
......@@ -376,7 +400,11 @@ namespace Model
}
/**
sets the coordinates of menu buttons
Sets the coordinates of menu buttons. One for loop will position the main Drop Down menu (potentailly
containing attack, move, item and wait directly 32 pixels to the right of unit (so the tile to right of unit)
, and for each active button, increment it downwards by 32 pixels (height of each button). The second
for loop is similiar and is for the inventory menu buttons, except it starts 160 pixels offsetted to
right (to the right of the main drop down menu).
* @param pixelCoordinates The pixel coordinate of the button
*/
public void setButtonCoordinates(Vector2 pixelCoordinates)
......@@ -398,7 +426,10 @@ namespace Model
}
/**
returns the current sprite frame in animation sequence
returns the current sprite frame in animation sequence. The rectangle starts at currentFrame * 32, where
32 is the sprite sheet offset between frames, and is 32 high and wide.
\b Exceptions: \n
-Assumes that each sprite frame is 32pixels wide
*/
public Rectangle getCurrentFrame() //return current frame the sprite is on
{
......
......@@ -29,47 +29,61 @@ namespace Model
bool Alive { get; set; }
/**
Sets and returns a unit's HP
Sets and returns a unit's HP. Should HP fall under 0, Unit's Alive Boolean should change to false
*/
int Hp { get; set; }
/**
Sets and returns a unit's Strength
\b Exceptions: \n
-Negative strength will be treated as 0 in damage calculation, as damage dealt can not be negative
*/
int Str { get; set; }
/**
Sets and returns a unit's Intelliegence
\b Exceptions: \n
-Negative strength will be treated as 0 in damage calculation, as damage dealt can not be negative
*/
int Int { get; set; }
/**
Sets and returns a unit's Skill
\b Exceptions: \n
-Negative skill will not result in an error, but will most likely result in a 0% hit and crit rate
*/
int Skill { get; set; }
/**
Sets and returns a unit's Speed
\b Exceptions: \n
-Negative skill will not result in an error as speed is only used for checking double attack boolean, which is binary
*/
int Speed { get; set; }
/**
Sets and returns a unit's Defense
\b Exceptions: \n
-Negative defense will result in an attacker doing more damage than their attack
*/
int Def { get; set; }
/**
Sets and returns a unit's Resistance
\b Exceptions: \n
-Negative resistance will result in an attacker doing more damage than their intelligence
*/
int Res { get; set; }
/**
Sets and returns a unit's Level
Sets and returns a unit's Level. Currently does not have any use
*/
int Level { get; set; }
/**
Returns the unit's movability range on grid (number of spaces the unit can move in one turn)
\b Exceptions: \n
-Negative movement will be treated as 0 in path finding algorithm
*/
int getMovability();
......@@ -88,14 +102,20 @@ namespace Model
returns weapon the unit is currently equipping
*/
Weapon equippedWeapon { get; set; }
//void setEquipableWeapons(Weapon add); // need to update the weapon array, put new weapon into it
// TODO void setEquipableWeapons(Weapon add); // need to update the weapon array, put new weapon into it
/**
indicates whether a button has already been previously selected or not
*/
bool isButtonActive(ButtonType buttonType);
/**
sets the coordinates of menu buttons
Sets the coordinates of menu buttons. One for loop will position the main Drop Down menu (potentailly
containing attack, move, item and wait directly 32 pixels to the right of unit (so the tile to right of unit)
, and for each active button, increment it downwards by 32 pixels (height of each button). The second
for loop is similiar and is for the inventory menu buttons, except it starts 160 pixels offsetted to
right (to the right of the main drop down menu).
* @param pixelCoordinates The pixel coordinate of the button
*/
void setButtonCoordinates(Vector2 pixelCoordinates);
......@@ -125,13 +145,19 @@ namespace Model
*/
Texture2D getCharAttackInfo();
/**
gets and sets unit's position by tile
/**
gets and sets unit's position by tile. The set also updates pixelCoordinate's location by making
that vector equivalent to position*32 (since each tile is 32x32).
\b Exceptions: \n
-Dead units will still have a position, but won't impact the rest of the game
*/
Tuple<int, int> Position { get; set; }
/**
returns the pixel coordinate of the unit
\n sets the pixel coordinate, and also sets Position (which is the tile location of that coordinate)
\b Exceptions: \n
-Dead units will still have a position, but won't impact the rest of the game
*/
Vector2 PixelCoordinates { get; set; }
......@@ -141,18 +167,24 @@ namespace Model
Button[] getButtons();
/**
Returns the button type
* @param buttonType The button to return (Move, Attack, Item, Wait, and attack confirm)
*/
Method takes in the buttonType enum, then returns the object associated with that enum
* @param buttonType The button to return (Move, Attack, Item, Wait, and attack confirm)
*/
Button getButtonType(ButtonType buttonType);
/**
returns the current sprite frame in animation sequence
returns the current sprite frame in animation sequence. The rectangle starts at currentFrame * 32, where
32 is the sprite sheet offset between frames, and is 32 high and wide.
\b Exceptions: \n
-Assumes that each sprite frame is 32pixels wide
*/
Rectangle getCurrentFrame();
/**
TODO - Not yet used \n
returns array of equipable weapons
\b Exceptions: \n
-If this array is empty, unit cannot equip any weapons
*/
Weapon[] getEquipableWeapons();
......
......@@ -22,20 +22,27 @@ namespace Model
public bool Alive { get; set; }
/**
Sets and returns a unit's Speed
\b Exceptions: \n
-Negative skill will not result in an error as speed is only used for checking double attack boolean, which is binary
*/
public int Speed { get; set; }
/**
Sets and returns a unit's Defense
\b Exceptions: \n
-Negative defense will result in an attacker doing more damage than their attack
*/
public int Def { get; set; }
/**
Sets and returns a unit's Resistance
\b Exceptions: \n
-Negative resistance will result in an attacker doing more damage than their intelligence
*/
public int Res { get; set; }
/**
Sets and returns a unit's Level
Sets and returns a unit's Level. Currently does not have any use
*/
public int Level { get; set; }
/**
returns weapon the unit is currently equipping
*/
......@@ -45,7 +52,7 @@ namespace Model
*/
public int currentFrame { get; set; }
private readonly int movability = 7; // Archer movement is permanently set to 5
private readonly int movability = 7; // Warrior movement is permanently set to 5
private Weapon[] equipableWeapons; // Array of all equipable weapons
private int str; // unit strength
private int intelligence; // unit intelliegence
......@@ -58,7 +65,7 @@ namespace Model
private Texture2D charInfo, charAttackInfo; // The character and attack info textures
/**
* The constructor for Unit Warrior
* The constructor for Unit Warrior. Stores all relevent data in model.
* @param spriteImage The character sprite
* @param attackButton The dropdownmenu attack button texture
* @param moveButton The dropdownmenu move button texture
......@@ -91,7 +98,7 @@ namespace Model
position = new Tuple<int, int>(positionX, positionY);
currentFrame = 1;
setButtonCoordinates(pixelCoordinates);
setInitialStats(); //sets initial warrior stats
setInitialStats(); // sets initial archer stats
}
//sets initial unit stats
......@@ -111,6 +118,8 @@ namespace Model
/**
Sets the new strength value
\n Gets the effective strength -> Unit strength + weapon strength
\b Exceptions: \n
-Negative strength will be treated as 0 in damage calculation, as damage dealt can not be negative
*/
public int Str
{
......@@ -127,6 +136,8 @@ namespace Model
/**
Sets the new intelligence value
\n Gets the effective intelligence -> Unit intelligence + weapon intelligence
\b Exceptions: \n
-Negative strength will be treated as 0 in damage calculation, as damage dealt can not be negative
*/
public int Int
{
......@@ -143,6 +154,8 @@ namespace Model
/**
Sets the new skill value
\n Gets the effective skill -> Unit skill + weapon skill
\b Exceptions: \n
-Negative skill will not result in an error, but will most likely result in a 0% hit and crit rate
*/
public int Skill
{
......@@ -157,9 +170,8 @@ namespace Model
}
/**
Sets the hp of the unit.
\n Gets the unit's hp.
*/
Sets and returns a unit's HP. Should HP fall under 0, Unit's Alive Boolean should change to false
*/
public int Hp
{
get
......@@ -179,6 +191,8 @@ namespace Model
/**
Returns the unit's movability range on grid (number of spaces the unit can move in one turn)
\b Exceptions: \n
-Negative movement will be treated as 0 in path finding algorithm
*/
public int getMovability()
{
......@@ -186,7 +200,8 @@ namespace Model
}
/**
returns all stats as an array
returns all stats as an array, where the index in array corresponds to stats in this order:
Level, Strength, Int, Skill, Speed, Def, Res
*/
public int[] getStats()
{
......@@ -226,7 +241,9 @@ namespace Model
}
/**
returns the button texture at index i
This method returns the texture associated with the bunttonType passed in, by going through a switch
case and matching it.
@param buttonType The buttontype that was clicked
*/
public Texture2D getButtonImage(ButtonType buttonType)
{
......@@ -256,7 +273,9 @@ namespace Model
}
/**
indicates whether a button has already been previously selected or not
This method takes in the buttonType specified, and checks if that button is currently active by calling
the getter in button.
@param buttonType The buttontype that was clicked
*/
public bool isButtonActive(ButtonType buttonType)
{
......@@ -301,8 +320,11 @@ namespace Model
return charAttackInfo;
}
/**
gets and sets unit's position by tile
/**
gets and sets unit's position by tile. The set also updates pixelCoordinate's location by making
that vector equivalent to position*32 (since each tile is 32x32).
\b Exceptions: \n
-Dead units will still have a position, but won't impact the rest of the game
*/
public Tuple<int, int> Position
{
......@@ -320,6 +342,8 @@ namespace Model
/**
returns the pixel coordinate of the unit
\n sets the pixel coordinate, and also sets Position (which is the tile location of that coordinate)
\b Exceptions: \n
-Dead units will still have a position, but won't impact the rest of the game
*/
public Vector2 PixelCoordinates
{
......@@ -345,7 +369,7 @@ namespace Model
}
/**
Returns the button type
Method takes in the buttonType enum, then returns the object associated with that enum
* @param buttonType The button to return (Move, Attack, Item, Wait, and attack confirm)
*/
public Button getButtonType(ButtonType buttonType)
......@@ -376,7 +400,11 @@ namespace Model
}
/**
sets the coordinates of menu buttons
Sets the coordinates of menu buttons. One for loop will position the main Drop Down menu (potentailly
containing attack, move, item and wait directly 32 pixels to the right of unit (so the tile to right of unit)
, and for each active button, increment it downwards by 32 pixels (height of each button). The second
for loop is similiar and is for the inventory menu buttons, except it starts 160 pixels offsetted to
right (to the right of the main drop down menu).
* @param pixelCoordinates The pixel coordinate of the button
*/
public void setButtonCoordinates(Vector2 pixelCoordinates)
......@@ -398,7 +426,10 @@ namespace Model
}
/**
returns the current sprite frame in animation sequence
returns the current sprite frame in animation sequence. The rectangle starts at currentFrame * 32, where
32 is the sprite sheet offset between frames, and is 32 high and wide.
\b Exceptions: \n
-Assumes that each sprite frame is 32pixels wide
*/
public Rectangle getCurrentFrame() //return current frame the sprite is on
{
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment