C# 클래스 SunsetHigh.Projectile

상속: FreeMovingSprite
파일 보기 프로젝트 열기: ErraticUnicorn/MOSH 1 사용 예제들

공개 메소드들

메소드 설명
Projectile ( ) : System

Initializes a Projectile at the origin with a default speed and heading east.

Projectile ( float speed, Direction dir ) : System

Initializes a Projectile with the given speed and direction

Projectile ( float speed, float angle ) : System

Initializes a Projectile with the given speed and angle

Projectile ( int x, int y, float speed, Direction dir ) : System

Initializes a Projectile with a given position, speed, and direction

Projectile ( int x, int y, float speed, float angle ) : System

Initializes a Projectile with a given position, speed, and angle

Projectile ( int x, int y, int width, int height ) : System

Initializes a Projectile with a given position and dimensions, a default speed heading east

Projectile ( int x, int y, int width, int height, float speed, Direction dir ) : System

Initializes a Projectile with a given position, dimensions, speed, and angle

Projectile ( int x, int y, int width, int height, float speed, float angle ) : System

Initializes a Projectile with a given position, dimensions, speed, and angle

addCollideEvent ( ProjectileCollideEvent e ) : void
getAngle ( ) : float
getDirection ( ) : Direction
onCollide ( IInteractable other ) : void
setAngle ( float angle ) : void
setCollideEvent ( ProjectileCollideEvent e ) : void
setDirection ( Direction dir ) : void
update ( float elapsed ) : void

메소드 상세

Projectile() 공개 메소드

Initializes a Projectile at the origin with a default speed and heading east.
public Projectile ( ) : System
리턴 System

Projectile() 공개 메소드

Initializes a Projectile with the given speed and direction
public Projectile ( float speed, Direction dir ) : System
speed float A positive speed (in pixels per second)
dir Direction A direction in which it will move
리턴 System

Projectile() 공개 메소드

Initializes a Projectile with the given speed and angle
public Projectile ( float speed, float angle ) : System
speed float A positive speed (in pixels per second)
angle float An angle in radians (from 0 to 2 PI)
리턴 System

Projectile() 공개 메소드

Initializes a Projectile with a given position, speed, and direction
public Projectile ( int x, int y, float speed, Direction dir ) : System
x int X coordinate of the top-left corner
y int Y coordinate of the top-left corner
speed float A positive speed (in pixels per second)
dir Direction A direction in which it will move
리턴 System

Projectile() 공개 메소드

Initializes a Projectile with a given position, speed, and angle
public Projectile ( int x, int y, float speed, float angle ) : System
x int X coordinate of the top-left corner
y int Y coordinate of the top-left corner
speed float A positive speed (in pixels per second)
angle float An angle in radians (from 0 to 2 PI)
리턴 System

Projectile() 공개 메소드

Initializes a Projectile with a given position and dimensions, a default speed heading east
public Projectile ( int x, int y, int width, int height ) : System
x int X coordinate of the top-left corner
y int Y coordinate of the top-left corner
width int Width in pixels
height int Height in pixels
리턴 System

Projectile() 공개 메소드

Initializes a Projectile with a given position, dimensions, speed, and angle
public Projectile ( int x, int y, int width, int height, float speed, Direction dir ) : System
x int X coordinate of the top-left corner
y int Y coordinate of the top-left corner
width int Width in pixels
height int Height in pixels
speed float A positive speed (in pixels per second)
dir Direction A direction in which it will move
리턴 System

Projectile() 공개 메소드

Initializes a Projectile with a given position, dimensions, speed, and angle
public Projectile ( int x, int y, int width, int height, float speed, float angle ) : System
x int X coordinate of the top-left corner
y int Y coordinate of the top-left corner
width int Width in pixels
height int Height in pixels
speed float A positive speed (in pixels per second)
angle float An angle in radians (from 0 to 2 PI)
리턴 System

addCollideEvent() 공개 메소드

public addCollideEvent ( ProjectileCollideEvent e ) : void
e ProjectileCollideEvent
리턴 void

getAngle() 공개 메소드

public getAngle ( ) : float
리턴 float

getDirection() 공개 메소드

public getDirection ( ) : Direction
리턴 Direction

onCollide() 공개 메소드

public onCollide ( IInteractable other ) : void
other IInteractable
리턴 void

setAngle() 공개 메소드

public setAngle ( float angle ) : void
angle float
리턴 void

setCollideEvent() 공개 메소드

public setCollideEvent ( ProjectileCollideEvent e ) : void
e ProjectileCollideEvent
리턴 void

setDirection() 공개 메소드

public setDirection ( Direction dir ) : void
dir Direction
리턴 void

update() 공개 메소드

public update ( float elapsed ) : void
elapsed float
리턴 void