Méthode | Description | |
---|---|---|
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 |
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 |
Résultat | System |
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) |
Résultat | System |
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 |
Résultat | System |
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) |
Résultat | System |
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 |
Résultat | System |
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 |
Résultat | System |
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) |
Résultat | System |
public addCollideEvent ( ProjectileCollideEvent e ) : void | ||
e | ProjectileCollideEvent | |
Résultat | void |
public onCollide ( IInteractable other ) : void | ||
other | IInteractable | |
Résultat | void |
public setCollideEvent ( ProjectileCollideEvent e ) : void | ||
e | ProjectileCollideEvent | |
Résultat | void |
public setDirection ( Direction dir ) : void | ||
dir | Direction | |
Résultat | void |