Packagecitrus.core.away3d
Classpublic class Away3DCitrusEngine
InheritanceAway3DCitrusEngine Inheritance CitrusEngine Inheritance flash.display.MovieClip

Extends this class if you create an Away3D based game. Don't forget to call setUpAway3D function.

CitrusEngine can access to the Stage3D power thanks to the Away3D Framework.



Public Properties
 PropertyDefined By
  away3D : View3D
[read-only]
Away3DCitrusEngine
 Inheritedconsole : Console
[read-only] A reference to the console, so that you can add your own console commands.
CitrusEngine
 InheritedDEBUG : Boolean = false
DEBUG is not used by CitrusEngine, it is there for your own convenience so you can access it wherever the _ce 'shortcut' is.
CitrusEngine
 InheritedfullScreen : Boolean
CitrusEngine
 InheritedfutureState : IState
Get a direct access to the futureState.
CitrusEngine
 InheritedgameData : AGameData
You may use a class to store your game's data, this is already an abstract class made for that.
CitrusEngine
 Inheritedinput : Input
[read-only] You can get access to the Input manager object from this reference so that you can see which keys are pressed and stuff.
CitrusEngine
 InheritedlevelManager : LevelManager
You may use the Citrus Engine's level manager if you have several levels to handle.
CitrusEngine
 InheritedonPlayingChange : Signal
Used to pause animations in SpriteArt and StarlingArt.
CitrusEngine
 InheritedonStageResize : Signal
called after a stage resize event signal passes the new screenWidth and screenHeight as arguments.
CitrusEngine
 Inheritedplaying : Boolean
Runs and pauses the game loop.
CitrusEngine
 InheritedscreenHeight : int
[read-only]
CitrusEngine
 InheritedscreenWidth : int
[read-only]
CitrusEngine
 Inheritedsound : SoundManager
[read-only] A reference to the SoundManager instance.
CitrusEngine
 Inheritedstate : IState
A reference to the active game state.
CitrusEngine
Protected Properties
 PropertyDefined By
  _antiAliasing : Number = 1
Away3DCitrusEngine
  _away3D : View3D
Away3DCitrusEngine
 Inherited_fullScreen : Boolean = false
CitrusEngine
 Inherited_futureState : IState
CitrusEngine
 Inherited_input : Input
CitrusEngine
 Inherited_newState : IState
CitrusEngine
 Inherited_playing : Boolean = true
CitrusEngine
 Inherited_screenHeight : int = 0
CitrusEngine
 Inherited_screenWidth : int = 0
CitrusEngine
 Inherited_state : IState
CitrusEngine
 Inherited_stateDisplayIndex : uint = 0
CitrusEngine
 Inherited_stateTransitionning : IState
CitrusEngine
 Inherited_timeDelta : Number
CitrusEngine
Public Methods
 MethodDefined By
  
Away3DCitrusEngine
  
destroy():void
[override]
Away3DCitrusEngine
 Inherited
[static]
CitrusEngine
 Inherited
initialize():void
Called when CitrusEngine is added to the stage and ready to run.
CitrusEngine
  
setUpAway3D(debugMode:Boolean = false, antiAliasing:uint = 4, scene3D:Scene3D = null, stage3DProxy:Stage3DProxy = null):void
You should call this function to create your Away3D view.
Away3DCitrusEngine
Protected Methods
 MethodDefined By
 Inherited
handleAddedToStage(e:Event):void
Set up things that need the stage access.
CitrusEngine
  
handleEnterFrame(e:Event):void
[override]
Away3DCitrusEngine
 Inherited
handlePlayingChange(value:Boolean):void
called when the value of 'playing' changes.
CitrusEngine
 Inherited
handleStageActivated(e:Event):void
Set CitrusEngine's playing to true.
CitrusEngine
 Inherited
Set CitrusEngine's playing to false.
CitrusEngine
 Inherited
handleStageFullscreen(e:FullScreenEvent):void
CitrusEngine
  
handleStageResize(evt:Event):void
[override]
Away3DCitrusEngine
 Inherited
on resize or fullscreen this is called and makes sure _screenWidth/_screenHeight is correct, it can be overriden to update other values that depend on the values of _screenWidth/_screenHeight.
CitrusEngine
Public Constants
 ConstantDefined By
 InheritedtransformMatrix : Matrix
the matrix that describes the transformation required to go from state container space to flash stage space.
CitrusEngine
 InheritedVERSION : String = 3.1.12
[static]
CitrusEngine
Property Detail
_antiAliasingproperty
protected var _antiAliasing:Number = 1

_away3Dproperty 
protected var _away3D:View3D

away3Dproperty 
away3D:View3D  [read-only]


Implementation
    public function get away3D():View3D
Constructor Detail
Away3DCitrusEngine()Constructor
public function Away3DCitrusEngine()



Method Detail
destroy()method
override public function destroy():void

handleEnterFrame()method 
override protected function handleEnterFrame(e:Event):void

Parameters

e:Event

handleStageResize()method 
override protected function handleStageResize(evt:Event):void

Parameters

evt:Event

setUpAway3D()method 
public function setUpAway3D(debugMode:Boolean = false, antiAliasing:uint = 4, scene3D:Scene3D = null, stage3DProxy:Stage3DProxy = null):void

You should call this function to create your Away3D view. Away3DState is added on the Away3D's scene.

Parameters

debugMode:Boolean (default = false) — If true, display a AwayStats class instance.
 
antiAliasing:uint (default = 4) — The antialiasing value allows you to set the anti-aliasing (0 - 16), generally a value of 4 is totally acceptable.
 
scene3D:Scene3D (default = null) — You may already have a Scene3D to set up.
 
stage3DProxy:Stage3DProxy (default = null) — If you want to use Starling, or multiple Away3D instance you need to use a Stage3DProxy.