C# Class SmashBros.Models.CharacterModel

显示文件 Open project: Grutn/TDT4240-X2 Class Usage Examples

Public Properties

Property Type Description
JumpStartVelocity int
_faceRight bool
acceleration int
attackMode bool
damagePoints int
inAir bool
invounerableTimeLeft float
jumpsLeft int
maxSpeed int
onSoftBox bool
playerIndex int
position Vector2
powerUp PowerUp
resetTimeLeft float
stats CharacterStats
view SmashBros.Views.CharacterView
weight int

Public Methods

Method Description
CharacterModel ( GamepadController pad, Vector2 startPos, int countDown, CharacterStats stats ) : System
setState ( CharacterState newState, MoveStats move = null ) : void

Method Details

CharacterModel() public method

public CharacterModel ( GamepadController pad, Vector2 startPos, int countDown, CharacterStats stats ) : System
pad SmashBros.Controllers.GamepadController
startPos Vector2
countDown int
stats CharacterStats
return System

setState() public method

public setState ( CharacterState newState, MoveStats move = null ) : void
newState CharacterState
move MoveStats
return void

Property Details

JumpStartVelocity public_oe property

The CURRENT (powerup concidered) velocity of the characters jump.
public int JumpStartVelocity
return int

_faceRight public_oe property

The character is facing right direction?
public bool _faceRight
return bool

acceleration public_oe property

CURRENT (powerup concidered) Acceleration!
public int acceleration
return int

attackMode public_oe property

Whether the character is in an attackCharacterState.
public bool attackMode
return bool

damagePoints public_oe property

An int that describes how much damage the player has taken in the current game/characterlife.
public int damagePoints
return int

inAir public_oe property

The character is in air or on ground?
public bool inAir
return bool

invounerableTimeLeft public_oe property

Time left of invounerability.
public float invounerableTimeLeft
return float

jumpsLeft public_oe property

Number of jumps left. One of them is supermove, and once super is used, jumpsleft = 0.
public int jumpsLeft
return int

maxSpeed public_oe property

The CURRENT (powerup concidered) maximum magnitude of speed in x-direction this character can have.
public int maxSpeed
return int

onSoftBox public_oe property

Whether the character is standing on a box which can be gone through.
public bool onSoftBox
return bool

playerIndex public_oe property

Wich player this is range 0-3
public int playerIndex
return int

position public_oe property

The current position of character sprite.
public Vector2 position
return Vector2

powerUp public_oe property

A powerUp the player currently is in posetion of.
public PowerUp,SmashBros.Models powerUp
return PowerUp

resetTimeLeft public_oe property

Time left to when the character reappears on the map.
public float resetTimeLeft
return float

stats public_oe property

The stats of the chosen character. STATIC attributes!!
public CharacterStats,SmashBros.Models stats
return CharacterStats

view public_oe property

Currently chosen character of this player.
public CharacterView,SmashBros.Views view
return SmashBros.Views.CharacterView

weight public_oe property

The CURRENT (powerup concidered) weight of the character. Determines, along with players damagePoints, how far the character is pushed by some force.
public int weight
return int