C# Класс PantheonPrototype.PlayerCharacter

This is the visual element of the player. It extends the Character Entity.
Наследование: CharacterEntity
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
playOnce System.Boolean

Защищенные свойства (Protected)

Свойство Тип Описание
currentArmedItem int
cursorLocation Vector2
drawLasar bool
laserDot Microsoft.Xna.Framework.Graphics.Texture2D
laserTexture Microsoft.Xna.Framework.Graphics.Texture2D
offset Vector2
totalOffset Vector2

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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.

Описание методов

Draw() публичный Метод

Draw the player.
public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
Результат void

Load() публичный Метод

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.
Результат void

PlayerCharacter() публичный Метод

The constructor for the player entity class.
public PlayerCharacter ( Pantheon gameReference ) : System
gameReference Pantheon
Результат System

Update() публичный Метод

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.
Результат void

initializeInventory() публичный Метод

public initializeInventory ( ) : void
Результат void

Описание свойств

currentArmedItem защищенное свойство

protected int currentArmedItem
Результат int

cursorLocation защищенное свойство

Class variables.
protected Vector2 cursorLocation
Результат Vector2

drawLasar защищенное свойство

protected bool drawLasar
Результат bool

laserDot защищенное свойство

protected Texture2D,Microsoft.Xna.Framework.Graphics laserDot
Результат Microsoft.Xna.Framework.Graphics.Texture2D

laserTexture защищенное свойство

protected Texture2D,Microsoft.Xna.Framework.Graphics laserTexture
Результат Microsoft.Xna.Framework.Graphics.Texture2D

offset защищенное свойство

protected Vector2 offset
Результат Vector2

playOnce публичное свойство

public Boolean,System playOnce
Результат System.Boolean

totalOffset защищенное свойство

protected Vector2 totalOffset
Результат Vector2