public class Bullet
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
exists()
Returns true if the bullet is accessible.
|
double |
getAngle()
Returns the direction the bullet is facing/traveling in, measured in radians.
|
int |
getID()
Returns a unique ID for this bullet.
|
Player |
getPlayer()
Returns the player of the source unit, or NULL if the source unit has been destroyed or is otherwise inaccessible.
|
Position |
getPosition()
Returns the position of the bullet, or an invalid position if the bullet is inaccessible.
|
int |
getRemoveTimer()
Returns the maximum number of frames until this bullet is removed.
|
Unit |
getSource()
Returns the unit that fired the bullet.
|
Unit |
getTarget()
Returns the unit that the bullet is trying to hit.
|
Position |
getTargetPosition()
Returns the target position of the bullet.
|
BulletType |
getType()
Returns the type of the bullet.
|
double |
getVelocityX()
Returns the x component of the bullet's velocity, measured in pixels per frame.
|
double |
getVelocityY()
Returns the y component of the bullet's velocity, measured in pixels per frame.
|
boolean |
isVisible()
bool isVisible(Player* player) const;
Returns true if the bullet is visible.
|
boolean |
isVisible(Player player)
bool isVisible(Player* player) const;
Returns true if the bullet is visible.
|
public int getID()
public Player getPlayer()
public BulletType getType()
public Unit getSource()
public Position getPosition()
public double getAngle()
public double getVelocityX()
public double getVelocityY()
public Unit getTarget()
public Position getTargetPosition()
public int getRemoveTimer()
public boolean exists()
public boolean isVisible()
public boolean isVisible(Player player)