Module engine.Projectile

Functions

_M:act () Called by the engine when the projectile can move
_M:addParticles (ps) Adds a particles emitter following the actor
_M:enoughEnergy (val) Do we have enough energy
_M:makeProject (src, display, def, do_move, do_act, do_stop) Generate a projectile for a project() call
_M:move (x, y, force, map) Moves an actor on the map *WARNING*: changing x and y properties manualy is *WRONG* and will blow up in your face.
_M:on_move (x, y, target) Something moved in the same spot as us, hit ?
_M:removeParticles (ps) Removes a particles emitter following the actor
_M:useEnergy (val) Use some energy


Functions

_M:act ()
Called by the engine when the projectile can move
_M:addParticles (ps)
Adds a particles emitter following the actor

Parameters

  • ps:
_M:enoughEnergy (val)
Do we have enough energy

Parameters

  • val:
_M:makeProject (src, display, def, do_move, do_act, do_stop)
Generate a projectile for a project() call

Parameters

  • src:
  • display:
  • def:
  • do_move:
  • do_act:
  • do_stop:
_M:move (x, y, force, map)
Moves an actor on the map *WARNING*: changing x and y properties manualy is *WRONG* and will blow up in your face. Use this method. Always.

Parameters

  • x: coord of the destination
  • y: coord of the destination
  • force: if true do not check for the presence of an other entity. *Use wisely*
  • map: the map to move onto

Return value:

true if a move was *ATTEMPTED*. This means the actor will proably want to use energy
_M:on_move (x, y, target)
Something moved in the same spot as us, hit ?

Parameters

  • x:
  • y:
  • target:
_M:removeParticles (ps)
Removes a particles emitter following the actor

Parameters

  • ps:
_M:useEnergy (val)
Use some energy

Parameters

  • val:

Valid XHTML 1.0!