Java Reference
In-Depth Information
public var blockInput = false;
public var lightAnim:Timeline;
function run():Void{
initStartScreen();
initAboutScreen();
Stage {
title: "Clown Cannon"
resizable: false;
scene: scene
}
rootGroup.requestFocus();
lightAnim.play();
}
function keyReleased(event:KeyEvent){
gameModel.keyReleased(event);
}
public function addLights(gameAsset:GameAssetsUI):Timeline{
var yCenter = gameAsset.backPanelGroup2.boundsInParent.height/2.0;
var spotLight = SpotLight{
x: 320
y: yCenter
z: 50;
pointsAtZ: 0
pointsAtX: 320
pointsAtY: yCenter
color: Color.WHITE;
specularExponent: 2
}
gameAsset.backPanelGroup1.effect = Lighting{
light: spotLight
diffuseConstant: 2
}
var anim = Timeline{
repeatCount: Timeline.INDEFINITE;
keyFrames: [
KeyFrame{
time: 0s
values: [spotLight.pointsAtX => 320 tween Interpolator.EASEBOTH,
spotLight.pointsAtY => yCenter tween Interpolator.EASEBOTH]
},
KeyFrame{
time: 1s
values: spotLight.pointsAtY => yCenter+100 tween Interpolator.EASEBOTH
},
KeyFrame{
time: 2s
Search WWH ::




Custom Search