Game Development Reference
In-Depth Information
function set x(value:Number):void;
function get y():Number;
function set y(value:Number):void;
function get width():Number;
function set width(value:Number):void;
function get height():Number;
function set height(value:Number):void;
function getRect(targetCoordinateSpace:
DisplayObject):Rectangle;
}
}
The PlatformerEvent Class
All the messages dispatched by the PlatformerEngine, with the
exception of progress messages during loading, are in the form of a
PlatformerEvent object.
package com.flashgamebook.engines.platformer.events {
import flash.events.DataEvent;
public class PlatformerEvent extends DataEvent {
public static const LEVEL_LOAD_COMPLETE:String =
" levelLoadComplete " ;
public static const ASSET_LOAD_COMPLETE:String =
" assetLoadComplete " ;
public static const GAME_START:String = " gameStart " ;
public static const PLAYER_DIE:String = " playerDie " ;
public static const INVENTORY_UPDATE:String =
" inventoryUpdate " ;
public static const ENTER_PORTAL:String =
" enterPortal " ;
public function PlatformerEvent(type:String, data:
String = null, bubbles:Boolean = false,
cancelable:Boolean = false) {
super(type, bubbles, cancelable, data);
}
}
}
As it becomes necessary to dispatch events about additional
functionality, those event enumerations will easily be added here.
Search Nedrilad ::




Custom Search