Skip to content
Trung0246 edited this page Oct 25, 2016 · 6 revisions

Welcome to the Shmup wiki!

Main constructor:

  • Shmup
  • Type: Constructor
  • Parameter: name --- [string] --- (Set new constructor name)

Example:

var mainGun = Shmup("demo");

Commands:

  • 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:
      1. actionLabel --- [string] --- (Set name of current action)
      2. isFire --- [boolean] --- (true if action is main fire, false actionRef)
      3. 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();
Clone this wiki locally