-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Trung0246 edited this page Oct 25, 2016
·
6 revisions
- Shmup
- Type: Constructor
- Parameter: name --- [string] --- (Set new constructor name)
Example:
var mainGun = Shmup("demo");
- configs
- Set new configs for constructor
- Parameter: configs --- [object] --- (Set new configs)
Example:
mainGun.configs({}); //Please go to configs page for more detail
===
-
actions
- Set new action or new actionRef
- Parameter:
- actionLabel --- [string] --- (Set name of current action)
- isFire --- [boolean] --- (true if action is main fire, false actionRef)
- actionData --- [array] --- (Set action method array)
Example:
mainGun.actions("main", true, []); //Please go to actions page for more detail
===
-
fire
- Fire !!!
- Parameter: actionLabel --- [string] --- (Determite action label)
Example:
mainGun.fire("main");
===
-
update
- Update all main action, put this command in main game loop
Example:
function gameLoop() {
mainGun.update();
requestAnimationFrame(gameLoop);
}
gameLoop();