C# 클래스 PantheonPrototype.Bullet

A bullet object meant to hurt people, porcupines, or pinapple. Bullets inherit from projectile and add the capacity to deal damage. In this initial implementation, they will be a leaf class with its own image etc...
상속: Projectile
파일 보기 프로젝트 열기: Bacon41/PantheonPrototype 1 사용 예제들

공개 메소드들

메소드 설명
Bullet ( Vector2 location, int speed, float angle, int range, int damage, Pantheon gameReference ) : System

The constructor assumes that you are generating the bullet from a given location at a given velocity.

Draw ( SpriteBatch canvas ) : void

Draws the bullet... yes it does.

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

Loads the bullet.

Update ( GameTime gameTime, Pantheon gameReference ) : void

May the bullet update evermore... or at least until it reaches the edge of the screen...

비공개 메소드들

메소드 설명
setDirection ( ) : void

Sets the direction of the sprite based on the current velocity.

메소드 상세

Bullet() 공개 메소드

The constructor assumes that you are generating the bullet from a given location at a given velocity.
public Bullet ( Vector2 location, int speed, float angle, int range, int damage, Pantheon gameReference ) : System
location Vector2 The initial position for the bullet.
speed int
angle float
range int
damage int
gameReference Pantheon
리턴 System

Draw() 공개 메소드

Draws the bullet... yes it does.
public Draw ( SpriteBatch canvas ) : void
canvas Microsoft.Xna.Framework.Graphics.SpriteBatch The thingy onto which the bullet is drawn.
리턴 void

Load() 공개 메소드

Loads the bullet.
public Load ( Microsoft.Xna.Framework.Content.ContentManager contentManager, String type ) : void
contentManager Microsoft.Xna.Framework.Content.ContentManager Using this content manager.
type String
리턴 void

Update() 공개 메소드

May the bullet update evermore... or at least until it reaches the edge of the screen...
public Update ( GameTime gameTime, Pantheon gameReference ) : void
gameTime Microsoft.Xna.Framework.GameTime The amount of time since last calling the Update function.
gameReference Pantheon The reference to life the universe and everything.
리턴 void