C# 클래스 PantheonPrototype.CharacterEntity

The character entity provides the properties and methods used for a character in the game. It inherits the basic traits of an Entity and adds things such as velocity and healing.
상속: Entity
파일 보기 프로젝트 열기: Bacon41/PantheonPrototype 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ArmedItem Item
EquippedItems Item>.Dictionary

보호된 프로퍼티들

프로퍼티 타입 설명
angleFacing float
currentArmor int
facing Direction
totalArmor int
velocity Vector2

공개 메소드들

메소드 설명
CharacterEntity ( Vector2 location, Rectangle drawBox, Rectangle boundingBox ) : System

The constuctor... does nothing except call the parent constructor.

Damage ( int damage ) : void

The damage calculation will be in this function.

Draw ( SpriteBatch spriteBatch ) : void

Draw the character class... and override the default behavior... take over the entity. Let none of it survive... except all of it.

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

Loads any assets the entity may or may not need.

Update ( GameTime gameTime, Pantheon gameReference ) : void

Update the character class.

메소드 상세

CharacterEntity() 공개 메소드

The constuctor... does nothing except call the parent constructor.
public CharacterEntity ( Vector2 location, Rectangle drawBox, Rectangle boundingBox ) : System
location Vector2 The location of the entity relative to global space. Note that the reference point of the entity is the center of the bounding box.
drawBox Microsoft.Xna.Framework.Rectangle The box to which the sprite will be drawn. Only the width and height will be used.
boundingBox Microsoft.Xna.Framework.Rectangle The bounding box of the entity relative to the upper right hand corner of the entity.
리턴 System

Damage() 공개 메소드

The damage calculation will be in this function.
public Damage ( int damage ) : void
damage int The amount of damage that is being taken
리턴 void

Draw() 공개 메소드

Draw the character class... and override the default behavior... take over the entity. Let none of it survive... except all of it.
public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
리턴 void

Load() 공개 메소드

Loads any assets the entity may or may not need.
Thrown when the content manager is unable to load the player sprite.
public Load ( Microsoft.Xna.Framework.Content.ContentManager contentManager ) : void
contentManager Microsoft.Xna.Framework.Content.ContentManager The intialized content manager that will be used to load the asset information.
리턴 void

Update() 공개 메소드

Update the character class.
public Update ( GameTime gameTime, Pantheon gameReference ) : void
gameTime Microsoft.Xna.Framework.GameTime The game time object for letting you know how old you've gotten since starting the game.
gameReference Pantheon A deeper game reference to the game reference of doom.
리턴 void

프로퍼티 상세

ArmedItem 공개적으로 프로퍼티

public Item ArmedItem
리턴 Item

EquippedItems 공개적으로 프로퍼티

The currently equipped items. Just holds items which are equipped and usable. The character can do things with equipped items. Because they're equipped. If they weren't equipped, the character couldn't use them. I just want to make sure you understand that these are the equipped items. Not the non-equipped ones. If they were not equipped, why would the list be called equipped items? Use your brain. It's not that hard to figure out. Why would anyone need a comment like this to help them understand what an equiped item is? Go... eat a hamburger... and realize it was actually a tortoise... or something equally demeaning. Also, the string refers to which slot the equipment is located. Any child classes should decide which slots are valid. Possibly consider adding a convention so that the item may be accessed outside the character.
public Dictionary EquippedItems
리턴 Item>.Dictionary

angleFacing 보호되어 있는 프로퍼티

This is the angle (in radians) that the character should be looking at.
protected float angleFacing
리턴 float

currentArmor 보호되어 있는 프로퍼티

The current armor of the character.
protected int currentArmor
리턴 int

facing 보호되어 있는 프로퍼티

The direction in which the character is facing.
protected Direction facing
리턴 Direction

totalArmor 보호되어 있는 프로퍼티

The total armor of the character.
protected int totalArmor
리턴 int

velocity 보호되어 있는 프로퍼티

The velocity of the character.
protected Vector2 velocity
리턴 Vector2