Constructor


Bullet(x: any, y: any, texture: any)

Arguments:

x: any
y: any
texture: any




Methods








Bullet:isBullet(id: any)

Arguments:

id: any

Returns:

1: boolean


Bullet:onCollide(soul: any)

Arguments:

soul: any


Bullet:onDamage(soul: any)

Arguments:

soul: any

Returns:

1: unknown[]|nil


Bullet:onWaveSpawn(wave: any)

Arguments:

wave: any


Bullet:setSprite(texture: any, speed: any, loop: any, on_finished: any)

Arguments:

texture: any
speed: any
loop: any
on_finished: any

Returns:

1: Sprite





Fields





Undocumented



Bullet.collider: Hitbox

Default collider to half this object's size



Bullet.damage: nil

Damage given to the player when hit by this bullet (defaults to 5x the attacker's attack stat)



Bullet.destroy_on_hit: boolean

Whether this bullet gets removed on collision with the player



Bullet.grazed: boolean

Whether this bullet has already been grazed (reduces graze rewards)





Bullet.inv_timer: number

Invulnerability timer to apply to the player when hit by this bullet





Bullet.remove_offscreen: boolean

Whether to remove this bullet when it goes offscreen



Bullet.sprite: Sprite

A simple object that renders a texture.
This texture must be placed inside assets/sprites/.



Bullet.time_bonus: integer

Turn time reduced when you graze this bullet (Also applied each frame after the first graze, 30x less at 30FPS)



Bullet.tp: number

TP added when you graze this bullet (Also given each frame after the first graze, 30x less at 30FPS) (1/10 of a defend, or cheap spell)