Skip to content

RollingItem

Movable entitiessource

Derived from Entity, Movable, Purchasable

Fields

roll_speed

number

source

Methods

clear_virtual

function RollingItem:clear_virtual(callback_id: integer)
callback_id: integer
source

give_powerup

function RollingItem:give_powerup(who: Entity?, play_sfx: boolean)
who: Entity?
play_sfx: boolean
source

set_post_give_powerup

function RollingItem:set_post_give_powerup(fun: fun(self: Entity?, who: Entity?, play_sfx: boolean)): integer
fun: fun(self: Entity?, who: Entity?, play_sfx: boolean)

Returns integer

Skip this function for item to be unpickable

source

set_post_virtual

function RollingItem:set_post_virtual(index: integer, fun: function): integer?
index: integer
fun: function
Callback signature not known from the code.

Returns integer? (may be nil)

source

set_pre_give_powerup

function RollingItem:set_pre_give_powerup(fun: fun(self: Entity?, who: Entity?, play_sfx: boolean): boolean): integer
fun: fun(self: Entity?, who: Entity?, play_sfx: boolean): boolean
Returning nil (or nothing): treated as false: the original function runs (true skips it).

Returns integer

Skip this function for item to be unpickable

source

set_pre_virtual

function RollingItem:set_pre_virtual(index: integer, fun: function): integer?
index: integer
fun: function
Callback signature not known from the code.

Returns integer? (may be nil)

source