C# Class PantheonPrototype.PlayerCharacter

This is the visual element of the player. It extends the Character Entity.
Inheritance: CharacterEntity
Mostrar archivo Open project: Bacon41/PantheonPrototype

Public Properties

Property Type Description
playOnce System.Boolean

Protected Properties

Property Type Description
currentArmedItem int
cursorLocation Vector2
drawLasar bool
laserDot Microsoft.Xna.Framework.Graphics.Texture2D
laserTexture Microsoft.Xna.Framework.Graphics.Texture2D
offset Vector2
totalOffset Vector2

Public Methods

Method Description
Draw ( SpriteBatch spriteBatch ) : void

Draw the player.

Load ( Microsoft.Xna.Framework.Content.ContentManager contentManager ) : void

Load the player entity.

PlayerCharacter ( Pantheon gameReference ) : System

The constructor for the player entity class.

Update ( GameTime gameTime, Pantheon gameReference ) : void

Updates the player entity. Unlike the name suggests... (What did you think it did?)

initializeInventory ( ) : void

Private Methods

Method Description
updateEquipped ( Pantheon gameReference, GameTime gameTime ) : void

Updates the equipped items according to user input.

updateInteractions ( Pantheon gameReference ) : void

Updates the interactions between the NPCs and the player, firing off an event for the DialogueManager to handle.

updateLaser ( Pantheon gameReference, Vector2 offset ) : void

Puts the laser in the right spot on screen.

updateLocation ( Pantheon gameReference ) : void

Updates the location of the character. This is a subfunction of the update function meant to take some of the logic and stick it istor a logical subdivision. All game logic concerning movement and the player's character should go here. Note: Forces the entity state into Idle if not moving. This should be overwritten by other functions which can update the state to Attack or some other relevant state.

updateScope ( Pantheon gameReference ) : void

Updates where the camera should be looking while the player is scoping.

updateSprite ( ) : void

Updates the sprite into the correct state.

Method Details

Draw() public method

Draw the player.
public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

Load() public method

Load the player entity.
public Load ( Microsoft.Xna.Framework.Content.ContentManager contentManager ) : void
contentManager Microsoft.Xna.Framework.Content.ContentManager Read the parameter name... that's what it is.
return void

PlayerCharacter() public method

The constructor for the player entity class.
public PlayerCharacter ( Pantheon gameReference ) : System
gameReference Pantheon
return System

Update() public method

Updates the player entity. Unlike the name suggests... (What did you think it did?)
public Update ( GameTime gameTime, Pantheon gameReference ) : void
gameTime Microsoft.Xna.Framework.GameTime The time object that lets the Update object know how old it is.
gameReference Pantheon A reference to the entire game universe for the purpose of making the player feel small.
return void

initializeInventory() public method

public initializeInventory ( ) : void
return void

Property Details

currentArmedItem protected_oe property

protected int currentArmedItem
return int

cursorLocation protected_oe property

Class variables.
protected Vector2 cursorLocation
return Vector2

drawLasar protected_oe property

protected bool drawLasar
return bool

laserDot protected_oe property

protected Texture2D,Microsoft.Xna.Framework.Graphics laserDot
return Microsoft.Xna.Framework.Graphics.Texture2D

laserTexture protected_oe property

protected Texture2D,Microsoft.Xna.Framework.Graphics laserTexture
return Microsoft.Xna.Framework.Graphics.Texture2D

offset protected_oe property

protected Vector2 offset
return Vector2

playOnce public_oe property

public Boolean,System playOnce
return System.Boolean

totalOffset protected_oe property

protected Vector2 totalOffset
return Vector2