Class BulletState
Represents the state of a bullet that has been fired by a bot.
Inherited Members
Namespace: Robocode.TankRoyale.BotApi
Assembly: Robocode.TankRoyale.BotApi.dll
Syntax
public sealed class BulletState
Constructors
| Edit this page View SourceBulletState(int, int, double, double, double, double, Color)
Initializes a new instance of the BulletState class.
Declaration
public BulletState(int bulletId, int ownerId, double power, double x, double y, double direction, Color color)
Parameters
Type | Name | Description |
---|---|---|
int | bulletId | Unique id of the bullet. |
int | ownerId | Id of the bot that fired the bullet. |
double | power | Bullet firepower level. |
double | x | X coordinate of the bullet. |
double | y | Y coordinate of the bullet. |
double | direction | Direction in degrees. |
Color | color | color of the bullet. |
Properties
| Edit this page View SourceBulletId
Unique id of the bullet.
Declaration
public int BulletId { get; }
Property Value
Type | Description |
---|---|
int | The unique id of the bullet. |
Color
color of the bullet.
Declaration
public Color Color { get; }
Property Value
Type | Description |
---|---|
Color | The color of the bullet. |
Direction
Direction of the bullet in degrees.
Declaration
public double Direction { get; }
Property Value
Type | Description |
---|---|
double | The direction of the bullet in degrees. |
OwnerId
Id of the owner bot that fired the bullet.
Declaration
public int OwnerId { get; }
Property Value
Type | Description |
---|---|
int | The id of the owner bot that fired the bullet. |
Power
Bullet firepower level.
Declaration
public double Power { get; }
Property Value
Type | Description |
---|---|
double | The bullet firepower level. |
Speed
Speed measured of the bullet in units per turn.
Declaration
public double Speed { get; }
Property Value
Type | Description |
---|---|
double | The speed measured of the bullet in units per turn. |
X
X coordinate of the bullet.
Declaration
public double X { get; }
Property Value
Type | Description |
---|---|
double | The X coordinate of the bullet. |
Y
Y coordinate of the bullet.
Declaration
public double Y { get; }
Property Value
Type | Description |
---|---|
double | The Y coordinate of the bullet. |