Module ...

Handles player resting

Functions

_M:restCheck () Can we continue resting ? Rewrite this method to check for mana, life, whatever.
_M:restInit () 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:restCheck ()
Can we continue resting ? Rewrite this method to check for mana, life, whatever. By default we alawys return false so resting will never work

Return value:

true if we can continue to rest, false otherwise
_M:restInit ()
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 

Return value:

true if we can continue to rest, false otherwise
_M:restStop (msg)
Stops resting

Parameters

  • msg:

Valid XHTML 1.0!