C# Class PantheonPrototype.PlayerCharacter

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

Méthodes publiques

Свойство Type Description
playOnce System.Boolean

Protected Properties

Свойство Type Description
currentArmedItem int
cursorLocation Vector2
drawLasar bool
laserDot Microsoft.Xna.Framework.Graphics.Texture2D
laserTexture Microsoft.Xna.Framework.Graphics.Texture2D
offset Vector2
totalOffset Vector2

Méthodes publiques

Méthode 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

Méthode 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 méthode

Draw the player.
public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
Résultat void

Load() public méthode

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.
Résultat void

PlayerCharacter() public méthode

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

Update() public méthode

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.
Résultat void

initializeInventory() public méthode

public initializeInventory ( ) : void
Résultat void

Property Details

currentArmedItem protected_oe property

protected int currentArmedItem
Résultat int

cursorLocation protected_oe property

Class variables.
protected Vector2 cursorLocation
Résultat Vector2

drawLasar protected_oe property

protected bool drawLasar
Résultat bool

laserDot protected_oe property

protected Texture2D,Microsoft.Xna.Framework.Graphics laserDot
Résultat Microsoft.Xna.Framework.Graphics.Texture2D

laserTexture protected_oe property

protected Texture2D,Microsoft.Xna.Framework.Graphics laserTexture
Résultat Microsoft.Xna.Framework.Graphics.Texture2D

offset protected_oe property

protected Vector2 offset
Résultat Vector2

playOnce public_oe property

public Boolean,System playOnce
Résultat System.Boolean

totalOffset protected_oe property

protected Vector2 totalOffset
Résultat Vector2