mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-28 15:57:59 +03:00
function description LevelFuncs.OnUseItem
This commit is contained in:
parent
37be06150e
commit
2478afca68
1 changed files with 9 additions and 1 deletions
|
@ -1108,7 +1108,7 @@ __The order of loading is as follows:__
|
|||
@tfield function(float) OnLoop Will be called during the game's update loop,
|
||||
and provides the delta time (a float representing game time since last call) via its argument.
|
||||
@tfield function OnSave Will be called when the player saves the game, just *before* data is saved
|
||||
@tfield function OnEnd(EndReason) Will be called when leaving a level. This includes finishing it, exiting to the menu, or loading a save in a different level. It can take an `EndReason` arg:
|
||||
@tfield function(EndReason) OnEnd Will be called when leaving a level. This includes finishing it, exiting to the menu, or loading a save in a different level. It can take an `EndReason` arg:
|
||||
|
||||
EXITTOTITLE
|
||||
LEVELCOMPLETE
|
||||
|
@ -1122,6 +1122,14 @@ For example:
|
|||
print("death")
|
||||
end
|
||||
end
|
||||
|
||||
@tfield function(obj) OnUseItem Will be called when the player will use an inventory item
|
||||
For example:
|
||||
LevelFuncs.OnUseItem = function(obj)
|
||||
if obj == Objects.ObjID.PICKUP_ITEM2 then
|
||||
print("Good job!")
|
||||
end
|
||||
end
|
||||
@table LevelFuncs
|
||||
*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue