Module ...
Handles player resting
Functions
_M:onRestStart () | We started resting Rewrite this method to do whatever you need |
_M:onRestStop () | We stopped resting Rewrite this method to do whatever you need |
_M:restCheck () | Can we continue resting ? Rewrite this method to check for mana, life, whatever. |
_M:restInit (turns, what, past, on_end, on_very_end) | Initializes resting |
_M:restStep () | Rest a turn For a turn based game you want in you player's act() something like that:if not self:restStep() then game.paused = true end |
_M:restStop (msg) | Stops resting |
Functions
- _M:onRestStart ()
- We started resting Rewrite this method to do whatever you need
- _M:onRestStop ()
- We stopped resting Rewrite this method to do whatever you need
- _M:restCheck ()
-
Can we continue resting ? Rewrite this method to check for mana, life, whatever. By default we always return false so resting will never work
Return value:
true if we can continue to rest, false otherwise - _M:restInit (turns, what, past, on_end, on_very_end)
-
Initializes resting
Parameters
- turns:
- what:
- past:
- on_end:
- on_very_end:
- _M:restStep ()
-
Rest a turn For a turn based game you want in you player's act() something like that:
if not self:restStep() then game.paused = true end
Return value:
true if we can continue to rest, false otherwise - _M:restStop (msg)
-
Stops resting
Parameters
- msg: