C# 클래스 PantheonPrototype.Projectile

Contains all that is necessary to create a projectile in the game. May be used for bullets, fireballs, and maybe even eggs. When given an initial location and velocity, the projectile shall continue onwards unless told otherwise.
상속: Entity
파일 보기 프로젝트 열기: Bacon41/PantheonPrototype

보호된 프로퍼티들

프로퍼티 타입 설명
timeToLive int
velocity Vector2

공개 메소드들

메소드 설명
Draw ( SpriteBatch canvas ) : void

Draws the projectile.

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

Loads the projectile object.

Projectile ( Vector2 location, Rectangle drawBox, Rectangle boundingBox ) : System

A pass through constructor for the Entity class

Update ( GameTime gameTime, Pantheon gameReference ) : void

Updates the projectile each frame.

메소드 상세

Draw() 공개 메소드

Draws the projectile.
public Draw ( SpriteBatch canvas ) : void
canvas Microsoft.Xna.Framework.Graphics.SpriteBatch The spritebatch onto which to draw the projectile.
리턴 void

Load() 공개 메소드

Loads the projectile object.
public Load ( Microsoft.Xna.Framework.Content.ContentManager contentManager ) : void
contentManager Microsoft.Xna.Framework.Content.ContentManager The content manager for loading resources.
리턴 void

Projectile() 공개 메소드

A pass through constructor for the Entity class
public Projectile ( 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

Update() 공개 메소드

Updates the projectile each frame.
public Update ( GameTime gameTime, Pantheon gameReference ) : void
gameTime Microsoft.Xna.Framework.GameTime The amount of time since the last call of Update.
gameReference Pantheon A reference to the entire game.
리턴 void

프로퍼티 상세

timeToLive 보호되어 있는 프로퍼티

protected int timeToLive
리턴 int

velocity 보호되어 있는 프로퍼티

This is the velocity of the projectile. This class causes the projectile to move by this amount every Update cycle.
protected Vector2 velocity
리턴 Vector2