C# Класс SunsetHigh.Projectile

Наследование: FreeMovingSprite
Показать файл Открыть проект Примеры использования класса

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

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