Packagecom.whirled.contrib.platformer.display
Classpublic class BitmapSectionalLayer
InheritanceBitmapSectionalLayer Inheritance PieceSpriteLayer Inheritance Layer Inheritance flash.display.Sprite



Public Properties
 PropertyDefined by
  didPreload : Boolean
[static]
BitmapSectionalLayer
 InheriteddisplayCount : int
Layer
Protected Properties
 PropertyDefined by
  _bd : BitmapData
BitmapSectionalLayer
  _deltaX : int
BitmapSectionalLayer
  _deltaY : int
BitmapSectionalLayer
  _hasPieces : Boolean
BitmapSectionalLayer
  _missedPreload : int
BitmapSectionalLayer
  _oldnX : int = -1
BitmapSectionalLayer
  _oldnY : int = -1
BitmapSectionalLayer
  _pool : BitmapPool
BitmapSectionalLayer
  _preload : int
BitmapSectionalLayer
  _rect : Rect
BitmapSectionalLayer
  _sections : Object
BitmapSectionalLayer
  _sindex : SectionalIndex
BitmapSectionalLayer
 Inherited_snapToPixel : Boolean = true
Set to true and all coordinates will be floored.
Layer
Public Methods
 MethodDefined by
  
BitmapSectionalLayer(secWidth:int, secHeight:int, doPreload:Boolean = false)
BitmapSectionalLayer
  
BitmapSectionalLayer
  
clear():void
BitmapSectionalLayer
  
BitmapSectionalLayer
  
shutdown():void
BitmapSectionalLayer
  
update(nX:Number, nY:Number, scale:Number = 1):void
BitmapSectionalLayer
Protected Methods
 MethodDefined by
  
calcDist(x:int, y:int):int
BitmapSectionalLayer
  
checkSegments(dir:int):Boolean
BitmapSectionalLayer
  
generateBitmap(idx:int, bd:BitmapData):void
BitmapSectionalLayer
  
heuristic(current:PoolCache, test:PoolCache):Boolean
BitmapSectionalLayer
  
preload(force:Boolean = false):void
BitmapSectionalLayer
  
preloadSegment(xx:int, yy:int):Boolean
BitmapSectionalLayer
Protected Constants
 ConstantDefined by
  PRELOAD_RATE : int = 3
[static]
BitmapSectionalLayer
Property detail
_bdproperty
protected var _bd:BitmapData
_deltaXproperty 
protected var _deltaX:int
_deltaYproperty 
protected var _deltaY:int
didPreloadproperty 
public static var didPreload:Boolean
_hasPiecesproperty 
protected var _hasPieces:Boolean
_missedPreloadproperty 
protected var _missedPreload:int
_oldnXproperty 
protected var _oldnX:int = -1
_oldnYproperty 
protected var _oldnY:int = -1
_poolproperty 
protected var _pool:BitmapPool
_preloadproperty 
protected var _preload:int
_rectproperty 
protected var _rect:Rect
_sectionsproperty 
protected var _sections:Object
_sindexproperty 
protected var _sindex:SectionalIndex
Constructor detail
BitmapSectionalLayer()constructor
public function BitmapSectionalLayer(secWidth:int, secHeight:int, doPreload:Boolean = false)Parameters
secWidth:int
 
secHeight:int
 
doPreload:Boolean (default = false)
Method detail
addPieceSprite()method
public override function addPieceSprite(ps:PieceSprite):voidParameters
ps:PieceSprite
calcDist()method 
protected function calcDist(x:int, y:int):intParameters
x:int
 
y:int

Returns
int
checkSegments()method 
protected function checkSegments(dir:int):BooleanParameters
dir:int

Returns
Boolean
clear()method 
public override function clear():void
generateBitmap()method 
protected function generateBitmap(idx:int, bd:BitmapData):voidParameters
idx:int
 
bd:BitmapData
heuristic()method 
protected function heuristic(current:PoolCache, test:PoolCache):BooleanParameters
current:PoolCache
 
test:PoolCache

Returns
Boolean
preload()method 
protected function preload(force:Boolean = false):voidParameters
force:Boolean (default = false)
preloadSegment()method 
protected function preloadSegment(xx:int, yy:int):BooleanParameters
xx:int
 
yy:int

Returns
Boolean
showSectionData()method 
public function showSectionData():void
shutdown()method 
public override function shutdown():void
update()method 
public override function update(nX:Number, nY:Number, scale:Number = 1):voidParameters
nX:Number
 
nY:Number
 
scale:Number (default = 1)
Constant detail
PRELOAD_RATEconstant
protected static const PRELOAD_RATE:int = 3