Game Development Reference
In-Depth Information
import flash.display.Sprite;
public class Item extends Sprite implements IItem {
private var _points:Number;
private var _type:String;
public function get points():Number {
return _points;
public function set points(value:Number):void {
_points = value;
public function get type():String {
return _type;
public function set type(value:String):void {
_type = value;
public function pickUp():void {
override public function get hitArea():Sprite {
return this;
In another implementation of this engine, the pickUp method
could be used to play some type of animation or play a sound.
The Portal Class and Wall Class
These classes implement the IPortal and IWall interfaces.
package example {
import com.flashgamebook.engines.platformer.sprites.
import flash.display.Sprite;
public class Portal extends Sprite implements IPortal {
private var _requirements:Array = new Array();
Search Nedrilad ::

Custom Search