Finished doc

This commit is contained in:
Oliver Rümpelein 2014-10-24 17:25:04 +02:00
parent 9de08a7e20
commit a4a3c1c3b9
2 changed files with 7 additions and 2 deletions

View File

@ -7,11 +7,13 @@ Thing: A base class, providing the Canvas- and Color-Mechanisms and positioning.
Creature: Creatures are everything tha may attack and move (that is, players and monsters) Creature: Creatures are everything tha may attack and move (that is, players and monsters)
Additional to Thing, this class provides mechanisms for moving the element by mouse or arrow-keys, Additional to Thing, this class provides mechanisms for moving the element by mouse or arrow-keys,
collision-control to prevent overlaps, and bindings. collision-control to prevent overlaps, and bindings.
(*) Furthermore, every creture-object has a variable set to the associated game-object. (*) Furthermore, every creture-object has a variable set to the id of the associated game-object,
such that one may call that one by "player[<id>]".
The following additional functions and variables are defined in jsds_crafty.js: The following additional functions and variables are defined in jsds_crafty.js:
last_sel: contains a reference to the game-object associated to the last clicked object. cur_sel/last_sel: contain references to game-object associated to the last and previously clicked object.
Needed for several functions like attacking, as well as for reset_bug (see below).
end_init(): This function should be called as last after an adventure is loaded and initialized. Usually, end_init(): This function should be called as last after an adventure is loaded and initialized. Usually,
when using arrow key control, crafty moves every EACH object where it is activated. when using arrow key control, crafty moves every EACH object where it is activated.
end_init disables this control for each object of type "Creature", and sets a hook needed to work end_init disables this control for each object of type "Creature", and sets a hook needed to work

View File

@ -20,3 +20,6 @@ If this happens, DON'T CLICK ANOTHER OBJECT! Open the JS-console and trigger the
If you accidentily clicked ONE other object, it is still possible to get back to the old state: If you accidentily clicked ONE other object, it is still possible to get back to the old state:
Manually reset_bug(), de- and refocus the window, and trigger reset_bug() once more. Manually reset_bug(), de- and refocus the window, and trigger reset_bug() once more.
=== "Mobility " ===
JSDSH does NOT work on mobile devices!