PlayerBullet

abstract class PlayerBullet(initialX: Int, initialY: Int) : AbstractBullet

Inheritors

Constructors

Link copied to clipboard
constructor(initialX: Int, initialY: Int)

Properties

Link copied to clipboard
open override val uuid: UUID

The universally unique identifier(UUID) of this object

Functions

Link copied to clipboard
open override fun collide(o: Object): Boolean

Test if the object collide with another object o.

Link copied to clipboard
override fun collideTest(): Boolean

Collide test, and it is unnecessary to override this method, otherwise you know how this works.

Link copied to clipboard
open override fun from(): Player

The entity which fired this, and you can just return null.

Link copied to clipboard
abstract fun move()

Determines how the bullet moves.

Link copied to clipboard
abstract fun paint(g: Graphics2D)

Render the object.

Link copied to clipboard
fun pos(): Point

Get the coordinates of the bullet.

Link copied to clipboard
fun setX(nX: Double)
fun setX(nX: Int)
Link copied to clipboard
fun setY(nY: Double)
fun setY(nY: Int)
Link copied to clipboard
abstract fun shape(): Shape

The shape for collide test.

Link copied to clipboard
override fun toString(): String
Link copied to clipboard
open override fun update(): Boolean

Check the state of the object, and if this need to be removed, true should be returned.

Link copied to clipboard
fun x(): Int

Get the X coordinates of the bullet in int.

Link copied to clipboard
fun xD(): Double

Get the X coordinates of the bullet in double.

Link copied to clipboard
fun y(): Int

Get the Y coordinates of the bullet in int.

Link copied to clipboard
fun yD(): Double

Get the Y coordinates of the bullet in double.