Packagekrewfw.builtin_actor.ui
Classpublic class KeyboardStatus
InheritanceKeyboardStatus Inheritance KrewActor Inheritance KrewGameObject Inheritance starling.display.Sprite

各キーの押下状態を保持する。 flash.ui.Keyboard クラスで定義されている keyCode に対して、 KEY_DOWN イベントから KEY_UP イベントまでの間 isPressed は true を返す。 また、このクラスは flash.events.KeyboardEvent を krewFramework の イベントに変えて投げる作用も持つ。 KeyboardStatus が投げる KrewSystemEventType.KEY_DOWN は Flash のそれと異なり、 押下されたタイミングだけ投げられる(押し続けで発火しない。) ToDo: キーストローク対応



Public Properties
 PropertyDefined By
 InheritedapplyForNewActor : Function
KrewActor
 InheritedcachedHeight : Number
[read-only]
KrewActor
 InheritedcachedWidth : Number
[read-only] [CAUTION] starling.display.DisplayObjectContainer の width / height の getter は重い行列計算が走るので滅多なことでもない限り使うな
KrewActor
 InheritedchildActors : Vector.<KrewActor>
[read-only]
KrewActor
 Inheritedcollidable : Boolean = true
false にすると CollisionShape が衝突判定を行わない
KrewActor
 Inheritedcolor : uint
Actor が持つ Image や TextField 全てに色をセットする
KrewActor
 Inheriteddisplayable : Boolean = true
addActor 前に false にすると addActor 時に addChild を行わない (Starling の DisplayList にのせない.) 見た目を持たずに仕事をする Actor はこれを false にすればよい
KrewActor
 InheriteddisplayOrder : int = 0
high is front
KrewActor
 InheritedhasInitialized : Boolean
Called from StageLayerManager for re-init global actor.
KrewActor
 Inheritedid : int
[read-only]
KrewGameObject
 InheritedisDead : Boolean
[read-only]
KrewActor
 Inheritedkrew : KrewTopUtil
[read-only] よく使う utility への簡易アクセス
KrewGameObject
 Inheritedlayer : StageLayer
KrewActor
 InheritedlayerName : String
KrewActor
 InheritednumActor : int
[read-only]
KrewActor
 Inheritedpoolable : Boolean = false
true にすると再セットアップが可能な状態に dispose する。 (GC を促すための null を入れることをしない)
KrewActor
 InheritedsharedObj : KrewSharedObjects
KrewGameObject
Protected Properties
 PropertyDefined By
 Inherited_cachedHeight : Number
KrewActor
 Inherited_cachedWidth : Number
KrewActor
 Inherited_checkDisplayArea : Boolean = false
KrewActor
Public Methods
 MethodDefined By
  
KeyboardStatus
 Inherited
act(action:StuntAction = null):StuntAction
KrewActor
 Inherited
addActor(actor:KrewActor, putOnDisplayList:Boolean = true):void
krewFramework のシステムに Actor を登録し、同時に Starling の DisplayList に追加する.
KrewActor
 Inherited
addChild(child:DisplayObject):DisplayObject
[override] addChild したものは Actor 破棄時に勝手に dispose が呼ばれる
KrewActor
 Inherited
addImage(image:Image, width:Number, height:Number, x:Number = 0, y:Number = 0, anchorX:Number = 0.5, anchorY:Number = 0.5):void
addChild の代わりに addImage を呼ぶことで破棄時に Image.texture の dispose が 呼ばれるようになる。また、KrewActor.color の指定で全 Image に色がかかるようになる
KrewActor
 Inherited
addInitializer(initFunc:Function):void
init が呼ばれる時(KrewScene.setUpActor に渡された時、または Actor から addActor されたとき)に、init 後に呼ばれる関数を登録。 コンストラクタでの使用を想定.
KrewActor
 Inherited
addPeriodicTask(interval:Number, task:Function, times:int = -1):void
Equivalent to setInterval(), but passed time will be based on game's timeline.
KrewActor
 Inherited
addScheduledTask(timeout:Number, task:Function):void
Equivalent to setTimeout(), but passed time will be based on game's timeline.
KrewActor
 Inherited
addText(text:TextField, x:Number, y:Number):void
Actor 全体の color に影響させたい場合は addChild ではなく addText で足す
KrewActor
 Inherited
addTouchMarginNode(touchWidth:Number = 0, touchHeight:Number = 0):void
for touch action adjustment.
KrewActor
 Inherited
addTween(tween:Tween):void
KrewActor
 Inherited
blackIn(duration:Number = 0.33, startAlpha:Number = 1):void
KrewGameObject
 Inherited
blackOut(duration:Number = 0.33, startAlpha:Number = 0):void
KrewGameObject
 Inherited
changeImage(image:Image, imageName:String):void
KrewActor
 Inherited
colorIn(color:uint, duration:Number = 0.33, startAlpha:Number = 1):void
KrewGameObject
 Inherited
colorOut(color:uint, duration:Number = 0.33, startAlpha:Number = 0):void
KrewGameObject
 Inherited
createActor(newActor:KrewActor, layerName:String = null):void
KrewActor
 Inherited
cyclic(interval:Number, task:Function, times:int = -1):void
Alias for addPeriodicTask
KrewActor
 Inherited
cyclicFrame(task:Function, waitFrames:int = 1, times:int = -1):void
Runs task several times after n frames.
KrewActor
 Inherited
delayed(timeout:Number, task:Function):void
Alias for addScheduledTask
KrewActor
 Inherited
delayedFrame(task:Function, waitFrames:int = 1):void
Runs task 1 times after n frames.
KrewActor
 Inherited
dispose():void
[override]
KrewGameObject
 Inherited
enchant(duration:Number, transition:String):Tween
KrewActor
 Inherited
getByteArray(fileName:String):ByteArray
KrewGameObject
 Inherited
getImage(fileName:String):Image
KrewGameObject
 Inherited
getLayer(layerName:String):StageLayer
KrewGameObject
 Inherited
getObject(fileName:String):Object
KrewGameObject
 Inherited
getSound(fileName:String):Sound
KrewGameObject
 Inherited
getTexture(fileName:String):Texture
KrewGameObject
 Inherited
getXml(fileName:String):XML
KrewGameObject
  
init():void
[override]
KeyboardStatus
  
isPressed(keyCode:int):Boolean
KeyboardStatus
 Inherited
listen(eventType:String, callback:Function):void
KrewGameObject
 Inherited
loadResources(fileNameList:Array, onLoadProgress:Function, onLoadComplete:Function):void
KrewGameObject
 Inherited
onUpdate(passedTime:Number):void
KrewGameObject
 Inherited
passAway():void
KrewActor
 Inherited
pauseBgm():void
KrewGameObject
 Inherited
playBgm(bgmId:String, vol:Number, startTime:Number = 0):void
同じ bgmId をすでに再生中の場合は、再生し直さない。 (0 から再生し直したい場合は先に stopBgm() を呼んでね)
KrewGameObject
 Inherited
playSe(seId:String, pan:Number = 0, loops:int = 0, vol:Number, startTime:Number = 0):void
KrewGameObject
 Inherited
react():void
KrewActor
 Inherited
KrewActor
 Inherited
resetTimeScale(layerName:String):void
KrewGameObject
 Inherited
resumeBgm():void
KrewGameObject
 Inherited
sendMessage(eventType:String, eventArgs:Object = null):void
KrewGameObject
 Inherited
setAllLayersEnabled(enabled:Boolean):void
KrewGameObject
 Inherited
setCollision(groupName:String, shape:CollisionShape):void
KrewGameObject
 Inherited
setLayerEnabled(layerNameList:Array, enabled:Boolean):void
KrewGameObject
 Inherited
setLayerEnabledOtherThan(excludeLayerNameList:Array, enabled:Boolean):void
KrewGameObject
 Inherited
setTimeScale(layerName:String, timeScale:Number):void
KrewGameObject
 Inherited
setVertexColor(color1:int = 0, color2:int = 0, color3:int = 0, color4:int = 0):void
KrewActor
 Inherited
displayOrder の値でツリーをソート。 children が皆 KrewActor である前提。 actor.displayOrder = 1; のように設定した上で getLayer('hoge').sortDisplayOrder(); のように使う
KrewActor
 Inherited
KrewGameObject
 Inherited
KrewGameObject
 Inherited
stopBgm():void
KrewGameObject
 Inherited
stopListening(eventType:String):void
KrewGameObject
 Inherited
stopSe():void
KrewGameObject
 Inherited
whiteIn(duration:Number = 0.33, startAlpha:Number = 1):void
KrewGameObject
 Inherited
whiteOut(duration:Number = 0.33, startAlpha:Number = 0):void
KrewGameObject
Protected Methods
 MethodDefined By
 Inherited
KrewActor
 Inherited
KrewActor
  
onDispose():void
[override]
KeyboardStatus
 Inherited
onRecycle():void
poolable = true な Actor が dispose されるタイミングで、 onDispose の代わりに呼ばれる
KrewActor
Constructor Detail
KeyboardStatus()Constructor
public function KeyboardStatus()



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

isPressed()method 
public function isPressed(keyCode:int):Boolean

Parameters

keyCode:int

Returns
Boolean
onDispose()method 
override protected function onDispose():void