C# Class Swordening.Creature

This is a game component that implements IUpdateable.
Inheritance: Microsoft.Xna.Framework.DrawableGameComponent
Exibir arquivo Open project: ArghyV/Peliohjelmointi-s2011

Public Properties

Property Type Description
level int

Protected Properties

Property Type Description
_game SwordeningGame
_gameState InGame
attackSpeedFactor double
camera CameraAndLights
effects Effect
graphics GraphicsDeviceManager
movementSpeedFactor float
name string
previousTick TimeSpan
texture Texture2D

Public Methods

Method Description
Creature ( SwordeningGame game, InGame gameState, Vector3 position ) : System
Die ( ) : void

Kills current creature, removes it from game components and monster list.

Draw ( GameTime gameTime ) : void
Initialize ( ) : void

Allows the game component to perform any initialization it needs to before starting to run. This is where it can query for any required services and load content.

Protected Methods

Method Description
moveTo ( float possibleX, float possibleZ ) : void

Moves to given position if possible.

moveTowards ( float x, float z, GameTime gameTime ) : void

Moves towards given position.

Private Methods

Method Description
isValidPositionToMoveTo ( float x, float z ) : bool

Checks if the given position is possible to move into.

Method Details

Creature() public method

public Creature ( SwordeningGame game, InGame gameState, Vector3 position ) : System
game SwordeningGame
gameState InGame
position Vector3
return System

Die() public method

Kills current creature, removes it from game components and monster list.
public Die ( ) : void
return void

Draw() public method

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

Initialize() public method

Allows the game component to perform any initialization it needs to before starting to run. This is where it can query for any required services and load content.
public Initialize ( ) : void
return void

moveTo() protected method

Moves to given position if possible.
protected moveTo ( float possibleX, float possibleZ ) : void
possibleX float x coordinate
possibleZ float z coordinate
return void

moveTowards() protected method

Moves towards given position.
protected moveTowards ( float x, float z, GameTime gameTime ) : void
x float x coordinate
z float z coordinate
gameTime GameTime
return void

Property Details

_game protected_oe property

protected SwordeningGame,Swordening _game
return SwordeningGame

_gameState protected_oe property

protected InGame,Swordening _gameState
return InGame

attackSpeedFactor protected_oe property

protected double attackSpeedFactor
return double

camera protected_oe property

protected CameraAndLights,Swordening camera
return CameraAndLights

effects protected_oe property

protected Effect effects
return Effect

graphics protected_oe property

protected GraphicsDeviceManager graphics
return GraphicsDeviceManager

level public_oe property

public int level
return int

movementSpeedFactor protected_oe property

protected float movementSpeedFactor
return float

name protected_oe property

protected string name
return string

previousTick protected_oe property

protected TimeSpan previousTick
return TimeSpan

texture protected_oe property

protected Texture2D texture
return Texture2D