// Add a user icon to the HUD
// width, edgeMargin, ga.userPhotoKey, ga.userPhotoFrameKey, height
ga.addUserPhoto(x, y, userPhotoImgKey, photoFrameImgKey, height);
// Add score bar into the game at desired position.
// horizontal position, vertical poisition, icon asset key, score bar height
Genari.add.scoreBox(x, y, iconKey, height);
// Create lightning effects from startPos to endPos
// horizontal position, vertical position, delay, duration, lightning style
Genari.Effect.effLightning(x, y, delay, duration, redraw, width, height, angle, strokeStyle, soundKey, callback, callContext, delayAfter);
// Add an explosion sprite, animation, and add to the layer
// explosion spritesheet asset key, animation name, ga.layerEffects
Genari.Effect.addExplosion(key, animationName, layer);
// Play explosion animation at the target sprite object
// sprite object to have explosion on, destroy, explosionSprite, animation name
Genari.Effect.explosion(targetSprite, destroy, explosionSprite, animationName);
if( condition-here ){
// statements here
}
// iterate 100 times from 0 to 99
for(var i=99; i < 100; i++){
pdebug(i); // add statements here to be evaluated everytime
}
while (condition) {
//code block to be executed : add statements here to be evaluated everytime
}
switch(expression) {
case x:
//code block
break;
case y:
//code block
break;
default:
code block
}
try {
// statements to be tried here
}
catch(err) {
// statements for handling error here
}
this.dcGame.k.assetKey
// loaded tilemap, object's layer name in tilemap, object name in tilemap, asset key, list of frames, frame speed
groupName.addSpritesFromTilemapObjs(tileMap, objLayerName, tileMapObjName, spriteKey, frameSequence, frameRate);
var ClassName = function() {
if (!this instanceof ClassName) {
return new ClassName();
}
};
ClassName.prototype.constructor = ClassName;
var GroupClassName = function(layer, fixedToCamera, enableBody, physicsBodyType, /* new arguments */) {
if (!this instanceof GroupClassName) {
return new GroupClassName();
}
Genari.Group.call(layer, fixedToCamera, enableBody, physicsBodyType);
};
GroupClassName.prototype = Object.create(Genari.Group.prototype);
GroupClassName.prototype.constructor = GroupClassName;
var ClassName = function(/* superclass argument */, /* new arguments */) {
if (!this instanceof ClassName) {
return new ClassName();
}
SuperClass.call(/* arguments for superclass */);
};
ClassName.prototype = Object.create(ClassName.prototype);
ClassName.prototype.constructor = ClassName;