mirror of
https://github.com/MapMakersAndProgrammers/TankiOnline2.0DemoClient.git
synced 2025-10-26 01:49:11 -07:00
package_22 alternativa.tanks.game.subsystems.inputsystem
This commit is contained in:
@@ -11,3 +11,4 @@ package_13 alternativa.tanks.config
|
||||
package_14 platform.client.a3d.osgi
|
||||
package_16 alternativa.protocol.osgi
|
||||
package_17 platform.clients.fp10.libraries.alternativaprotocol
|
||||
package_22
|
||||
@@ -22,8 +22,8 @@ package alternativa.tanks
|
||||
import package_20.name_56;
|
||||
import package_21.name_77;
|
||||
import package_21.name_78;
|
||||
import package_22.name_83;
|
||||
import package_22.name_87;
|
||||
import alternativa.tanks.game.subsystems.inputsystem.KeyboardEventType;
|
||||
import alternativa.tanks.game.subsystems.inputsystem.IInput;
|
||||
import package_25.name_250;
|
||||
import package_28.name_129;
|
||||
import package_28.name_241;
|
||||
@@ -198,8 +198,8 @@ package alternativa.tanks
|
||||
|
||||
override public function start() : void
|
||||
{
|
||||
var _loc1_:name_87 = name_87(var_4.getTaskInterface(name_87));
|
||||
_loc1_.name_94(name_83.KEY_DOWN,this.onKeyDown);
|
||||
var _loc1_:IInput = IInput(var_4.getTaskInterface(IInput));
|
||||
_loc1_.name_94(KeyboardEventType.KEY_DOWN,this.onKeyDown);
|
||||
var _loc2_:name_56 = name_56(var_4.getTaskInterface(name_56));
|
||||
_loc2_.addEventListener(name_253.TANK_CLICK,this);
|
||||
this.var_67 = new name_299(this.gameKernel.name_5().name_27(),this.gameKernel.method_112().name_246().collisionDetector,name_257.STATIC,_loc1_);
|
||||
@@ -287,7 +287,7 @@ package alternativa.tanks
|
||||
this.addTank(TankParams.name_322(param2));
|
||||
}
|
||||
|
||||
private function onKeyDown(param1:name_83, param2:uint) : void
|
||||
private function onKeyDown(param1:KeyboardEventType, param2:uint) : void
|
||||
{
|
||||
var _loc3_:name_44 = null;
|
||||
var _loc4_:int = 0;
|
||||
|
||||
@@ -4,8 +4,8 @@ package alternativa.tanks.game
|
||||
import package_18.name_44;
|
||||
import package_20.name_179;
|
||||
import package_20.name_56;
|
||||
import package_22.name_181;
|
||||
import package_22.name_87;
|
||||
import alternativa.tanks.game.subsystems.inputsystem.InputSystem;
|
||||
import alternativa.tanks.game.subsystems.inputsystem.IInput;
|
||||
import package_26.name_100;
|
||||
import package_27.name_180;
|
||||
import package_42.name_177;
|
||||
@@ -45,7 +45,7 @@ package alternativa.tanks.game
|
||||
|
||||
private var var_44:name_182;
|
||||
|
||||
private var inputSystem:name_181;
|
||||
private var inputSystem:InputSystem;
|
||||
|
||||
private var eventSystem:name_179;
|
||||
|
||||
@@ -75,7 +75,7 @@ package alternativa.tanks.game
|
||||
this.var_4 = new TaskManager();
|
||||
this.var_44 = new name_182(TIME_SYSTEM_PRIORITY);
|
||||
this.var_4.addTask(this.var_44);
|
||||
this.inputSystem = new name_181(INPUT_SYSTEM_PRIORITY,stage);
|
||||
this.inputSystem = new InputSystem(INPUT_SYSTEM_PRIORITY,stage);
|
||||
this.var_4.addTask(this.inputSystem);
|
||||
this.eventSystem = new name_179(EVENT_SYSTEM_PRIORITY);
|
||||
this.var_4.addTask(this.eventSystem);
|
||||
@@ -158,7 +158,7 @@ package alternativa.tanks.game
|
||||
entity.removeFromGame(this);
|
||||
}
|
||||
|
||||
public function name_66() : name_87
|
||||
public function name_66() : IInput
|
||||
{
|
||||
return this.inputSystem;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ package alternativa.tanks.game.entities.map
|
||||
import package_21.name_126;
|
||||
import package_21.name_77;
|
||||
import package_21.name_78;
|
||||
import package_22.name_83;
|
||||
import alternativa.tanks.game.subsystems.inputsystem.KeyboardEventType;
|
||||
import package_24.DirectionalLight;
|
||||
import package_24.OmniLight;
|
||||
import package_24.SpotLight;
|
||||
@@ -80,7 +80,7 @@ package alternativa.tanks.game.entities.map
|
||||
{
|
||||
this.gameKernel = gameKernel;
|
||||
this.createSkybox();
|
||||
gameKernel.name_66().name_94(name_83.KEY_DOWN,this.onKeyDown);
|
||||
gameKernel.name_66().name_94(KeyboardEventType.KEY_DOWN,this.onKeyDown);
|
||||
if(gameKernel.options[MapOptions.FAKE_MAP] != null)
|
||||
{
|
||||
this.buildFakeMap();
|
||||
@@ -149,7 +149,7 @@ package alternativa.tanks.game.entities.map
|
||||
lights.omniLigths.remove(OmniLight(light));
|
||||
}
|
||||
}
|
||||
gameKernel.name_66().name_384(name_83.KEY_DOWN,this.onKeyDown);
|
||||
gameKernel.name_66().name_384(KeyboardEventType.KEY_DOWN,this.onKeyDown);
|
||||
this.gameKernel = null;
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@ package alternativa.tanks.game.entities.map
|
||||
renderSystem.method_68().addChild(box);
|
||||
}
|
||||
|
||||
private function onKeyDown(eventType:name_83, keyCode:uint) : void
|
||||
private function onKeyDown(eventType:KeyboardEventType, keyCode:uint) : void
|
||||
{
|
||||
switch(keyCode)
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package package_22
|
||||
package alternativa.tanks.game.subsystems.inputsystem
|
||||
{
|
||||
public interface name_87
|
||||
public interface IInput
|
||||
{
|
||||
function name_94(param1:name_83, param2:Function, param3:uint = 0) : void;
|
||||
function name_94(param1:KeyboardEventType, param2:Function, param3:uint = 0) : void;
|
||||
|
||||
function name_384(param1:name_83, param2:Function, param3:uint = 0) : void;
|
||||
function name_384(param1:KeyboardEventType, param2:Function, param3:uint = 0) : void;
|
||||
|
||||
function name_192(param1:uint) : int;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package package_22
|
||||
package alternativa.tanks.game.subsystems.inputsystem
|
||||
{
|
||||
import flash.display.InteractiveObject;
|
||||
import flash.events.KeyboardEvent;
|
||||
@@ -6,7 +6,7 @@ package package_22
|
||||
import alternativa.tanks.game.GameTask;
|
||||
import package_27.name_479;
|
||||
|
||||
public class name_181 extends GameTask implements name_87
|
||||
public class InputSystem extends GameTask implements IInput
|
||||
{
|
||||
private static const NUM_KEYS:int = 256;
|
||||
|
||||
@@ -46,7 +46,7 @@ package package_22
|
||||
|
||||
private var var_222:KeybardEventQueue;
|
||||
|
||||
public function name_181(priority:int, eventSource:InteractiveObject)
|
||||
public function InputSystem(priority:int, eventSource:InteractiveObject)
|
||||
{
|
||||
super(priority);
|
||||
this.eventSource = eventSource;
|
||||
@@ -58,48 +58,48 @@ package package_22
|
||||
this.var_222 = new KeybardEventQueue();
|
||||
}
|
||||
|
||||
public function name_94(eventType:name_83, listener:Function, keyCode:uint = 0) : void
|
||||
public function name_94(eventType:KeyboardEventType, listener:Function, keyCode:uint = 0) : void
|
||||
{
|
||||
switch(eventType)
|
||||
{
|
||||
case name_83.KEY_DOWN:
|
||||
case KeyboardEventType.KEY_DOWN:
|
||||
if(keyCode == 0)
|
||||
{
|
||||
this.method_335(this.var_219,listener);
|
||||
this.addKeyListener(this.var_219,listener);
|
||||
break;
|
||||
}
|
||||
this.method_337(this.var_220,keyCode,listener);
|
||||
this.addDistinctKeyListener(this.var_220,keyCode,listener);
|
||||
break;
|
||||
case name_83.KEY_UP:
|
||||
case KeyboardEventType.KEY_UP:
|
||||
if(keyCode == 0)
|
||||
{
|
||||
this.method_335(this.var_218,listener);
|
||||
this.addKeyListener(this.var_218,listener);
|
||||
break;
|
||||
}
|
||||
this.method_337(this.var_217,keyCode,listener);
|
||||
this.addDistinctKeyListener(this.var_217,keyCode,listener);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public function name_384(eventType:name_83, listener:Function, keyCode:uint = 0) : void
|
||||
public function name_384(eventType:KeyboardEventType, listener:Function, keyCode:uint = 0) : void
|
||||
{
|
||||
switch(eventType)
|
||||
{
|
||||
case name_83.KEY_DOWN:
|
||||
case KeyboardEventType.KEY_DOWN:
|
||||
if(keyCode == 0)
|
||||
{
|
||||
this.method_339(this.var_219,listener);
|
||||
this.removeKeyListener(this.var_219,listener);
|
||||
break;
|
||||
}
|
||||
this.method_334(this.var_220,keyCode,listener);
|
||||
this.removeDistinctKeyListener(this.var_220,keyCode,listener);
|
||||
break;
|
||||
case name_83.KEY_UP:
|
||||
case KeyboardEventType.KEY_UP:
|
||||
if(keyCode == 0)
|
||||
{
|
||||
this.method_339(this.var_218,listener);
|
||||
this.removeKeyListener(this.var_218,listener);
|
||||
break;
|
||||
}
|
||||
this.method_334(this.var_217,keyCode,listener);
|
||||
this.removeDistinctKeyListener(this.var_217,keyCode,listener);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -114,7 +114,7 @@ package package_22
|
||||
return this.var_216.name_478(keyCode) == 1;
|
||||
}
|
||||
|
||||
private function method_337(keyTypeListeners:Vector.<Vector.<Function>>, keyCode:uint, listener:Function) : void
|
||||
private function addDistinctKeyListener(keyTypeListeners:Vector.<Vector.<Function>>, keyCode:uint, listener:Function) : void
|
||||
{
|
||||
var listeners:Vector.<Function> = keyTypeListeners[keyCode];
|
||||
if(listeners == null)
|
||||
@@ -129,7 +129,7 @@ package package_22
|
||||
}
|
||||
}
|
||||
|
||||
private function method_334(keyTypeListeners:Vector.<Vector.<Function>>, keyCode:uint, listener:Function) : void
|
||||
private function removeDistinctKeyListener(keyTypeListeners:Vector.<Vector.<Function>>, keyCode:uint, listener:Function) : void
|
||||
{
|
||||
var index:int = 0;
|
||||
var newLength:int = 0;
|
||||
@@ -146,7 +146,7 @@ package package_22
|
||||
}
|
||||
}
|
||||
|
||||
private function method_335(listeners:Vector.<Function>, listener:Function) : void
|
||||
private function addKeyListener(listeners:Vector.<Function>, listener:Function) : void
|
||||
{
|
||||
if(listeners.indexOf(listener) < 0)
|
||||
{
|
||||
@@ -154,7 +154,7 @@ package package_22
|
||||
}
|
||||
}
|
||||
|
||||
private function method_339(listeners:Vector.<Function>, listener:Function) : void
|
||||
private function removeKeyListener(listeners:Vector.<Function>, listener:Function) : void
|
||||
{
|
||||
var newLength:int = 0;
|
||||
var index:int = int(listeners.indexOf(listener));
|
||||
@@ -195,39 +195,39 @@ package package_22
|
||||
{
|
||||
this.var_224 = new CleanupTask(int.MAX_VALUE,this);
|
||||
var_4.addTask(this.var_224);
|
||||
this.eventSource.addEventListener(KeyboardEvent.KEY_DOWN,this.method_15);
|
||||
this.eventSource.addEventListener(KeyboardEvent.KEY_UP,this.method_233);
|
||||
this.eventSource.addEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDown);
|
||||
this.eventSource.addEventListener(KeyboardEvent.KEY_UP,this.onKeyUp);
|
||||
this.eventSource.addEventListener(MouseEvent.MOUSE_MOVE,this.onMouseMove);
|
||||
this.eventSource.addEventListener(MouseEvent.MOUSE_WHEEL,this.onMouseWheel);
|
||||
this.eventSource.addEventListener(MouseEvent.MOUSE_DOWN,this.onMouseDown);
|
||||
this.eventSource.addEventListener(MouseEvent.MOUSE_UP,this.method_338);
|
||||
this.eventSource.addEventListener(MouseEvent.MOUSE_UP,this.onMouseUp);
|
||||
}
|
||||
|
||||
override public function stop() : void
|
||||
{
|
||||
var_4.killTask(this.var_224);
|
||||
this.eventSource.removeEventListener(KeyboardEvent.KEY_DOWN,this.method_15);
|
||||
this.eventSource.removeEventListener(KeyboardEvent.KEY_UP,this.method_233);
|
||||
this.eventSource.removeEventListener(KeyboardEvent.KEY_DOWN,this.onKeyDown);
|
||||
this.eventSource.removeEventListener(KeyboardEvent.KEY_UP,this.onKeyUp);
|
||||
this.eventSource.removeEventListener(MouseEvent.MOUSE_MOVE,this.onMouseMove);
|
||||
this.eventSource.removeEventListener(MouseEvent.MOUSE_WHEEL,this.onMouseWheel);
|
||||
this.eventSource.removeEventListener(MouseEvent.MOUSE_DOWN,this.onMouseDown);
|
||||
this.eventSource.removeEventListener(MouseEvent.MOUSE_UP,this.method_338);
|
||||
this.eventSource.removeEventListener(MouseEvent.MOUSE_UP,this.onMouseUp);
|
||||
}
|
||||
|
||||
override public function run() : void
|
||||
{
|
||||
this.var_229 = this.mouseX - this.var_227;
|
||||
this.var_228 = this.mouseY - this.var_226;
|
||||
this.method_340();
|
||||
this.dispatchKeyboardEvents();
|
||||
}
|
||||
|
||||
private function method_340() : void
|
||||
private function dispatchKeyboardEvents() : void
|
||||
{
|
||||
var distinctListeners:Vector.<Function> = null;
|
||||
var listeners:Vector.<Function> = null;
|
||||
var event:KeyboardEventItem = null;
|
||||
var keyCode:uint = 0;
|
||||
var eventType:name_83 = null;
|
||||
var eventType:KeyboardEventType = null;
|
||||
while(true)
|
||||
{
|
||||
event = this.var_222.poll();
|
||||
@@ -239,27 +239,27 @@ package package_22
|
||||
eventType = event.type;
|
||||
switch(eventType)
|
||||
{
|
||||
case name_83.KEY_DOWN:
|
||||
case KeyboardEventType.KEY_DOWN:
|
||||
distinctListeners = this.var_220[keyCode];
|
||||
listeners = this.var_219;
|
||||
break;
|
||||
case name_83.KEY_UP:
|
||||
case KeyboardEventType.KEY_UP:
|
||||
distinctListeners = this.var_217[keyCode];
|
||||
listeners = this.var_218;
|
||||
}
|
||||
if(distinctListeners != null)
|
||||
{
|
||||
this.method_336(distinctListeners,eventType,keyCode);
|
||||
this.dispatchKeyboardEvent(distinctListeners,eventType,keyCode);
|
||||
}
|
||||
if(listeners != null)
|
||||
{
|
||||
this.method_336(listeners,eventType,keyCode);
|
||||
this.dispatchKeyboardEvent(listeners,eventType,keyCode);
|
||||
}
|
||||
event.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
private function method_336(listeners:Vector.<Function>, eventType:name_83, keyCode:uint) : void
|
||||
private function dispatchKeyboardEvent(listeners:Vector.<Function>, eventType:KeyboardEventType, keyCode:uint) : void
|
||||
{
|
||||
var func:Function = null;
|
||||
var numListeners:int = int(listeners.length);
|
||||
@@ -279,7 +279,7 @@ package package_22
|
||||
this.var_223 = 0;
|
||||
}
|
||||
|
||||
private function method_15(event:KeyboardEvent) : void
|
||||
private function onKeyDown(event:KeyboardEvent) : void
|
||||
{
|
||||
var keyCode:uint = uint(event.keyCode);
|
||||
if(keyCode < NUM_KEYS)
|
||||
@@ -287,12 +287,12 @@ package package_22
|
||||
if(this.var_216.name_478(keyCode) == 0)
|
||||
{
|
||||
this.var_216.name_480(keyCode,true);
|
||||
this.var_222.add(keyCode,name_83.KEY_DOWN);
|
||||
this.var_222.add(keyCode,KeyboardEventType.KEY_DOWN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function method_233(event:KeyboardEvent) : void
|
||||
private function onKeyUp(event:KeyboardEvent) : void
|
||||
{
|
||||
var keyCode:uint = uint(event.keyCode);
|
||||
if(keyCode < NUM_KEYS)
|
||||
@@ -300,7 +300,7 @@ package package_22
|
||||
if(this.var_216.name_478(keyCode) == 1)
|
||||
{
|
||||
this.var_216.name_480(keyCode,false);
|
||||
this.var_222.add(keyCode,name_83.KEY_UP);
|
||||
this.var_222.add(keyCode,KeyboardEventType.KEY_UP);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -322,7 +322,7 @@ package package_22
|
||||
this.var_225 = true;
|
||||
}
|
||||
|
||||
private function method_338(event:MouseEvent) : void
|
||||
private function onMouseUp(event:MouseEvent) : void
|
||||
{
|
||||
this.var_221 = false;
|
||||
}
|
||||
@@ -333,9 +333,9 @@ import alternativa.tanks.game.GameTask;
|
||||
|
||||
class CleanupTask extends GameTask
|
||||
{
|
||||
private var inputSystem:name_181;
|
||||
private var inputSystem:InputSystem;
|
||||
|
||||
public function CleanupTask(priority:int, inputSystem:name_181)
|
||||
public function CleanupTask(priority:int, inputSystem:InputSystem)
|
||||
{
|
||||
super(priority);
|
||||
this.inputSystem = inputSystem;
|
||||
@@ -351,7 +351,7 @@ class KeyboardEventItem
|
||||
{
|
||||
private static var pool:KeyboardEventItem;
|
||||
|
||||
public var type:name_83;
|
||||
public var type:KeyboardEventType;
|
||||
|
||||
public var keyCode:uint;
|
||||
|
||||
@@ -392,7 +392,7 @@ class KeybardEventQueue
|
||||
super();
|
||||
}
|
||||
|
||||
public function add(keyCode:uint, type:name_83) : void
|
||||
public function add(keyCode:uint, type:KeyboardEventType) : void
|
||||
{
|
||||
var keyItem:KeyboardEventItem = KeyboardEventItem.create();
|
||||
keyItem.keyCode = keyCode;
|
||||
@@ -0,0 +1,15 @@
|
||||
package alternativa.tanks.game.subsystems.inputsystem
|
||||
{
|
||||
public class KeyboardEventType
|
||||
{
|
||||
public static const KEY_DOWN:KeyboardEventType = new KeyboardEventType();
|
||||
|
||||
public static const KEY_UP:KeyboardEventType = new KeyboardEventType();
|
||||
|
||||
public function KeyboardEventType()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@ package package_18
|
||||
import package_21.name_77;
|
||||
import package_21.name_78;
|
||||
import package_21.name_81;
|
||||
import package_22.name_83;
|
||||
import package_22.name_87;
|
||||
import alternativa.tanks.game.subsystems.inputsystem.KeyboardEventType;
|
||||
import alternativa.tanks.game.subsystems.inputsystem.IInput;
|
||||
import package_23.name_103;
|
||||
import package_23.name_92;
|
||||
import package_23.name_97;
|
||||
@@ -612,10 +612,10 @@ package package_18
|
||||
|
||||
override public function start() : void
|
||||
{
|
||||
var input:name_87 = name_87(var_4.getTaskInterface(name_87));
|
||||
input.name_94(name_83.KEY_DOWN,this.method_36,Keyboard.F7);
|
||||
input.name_94(name_83.KEY_DOWN,this.method_36,Keyboard.F8);
|
||||
input.name_94(name_83.KEY_DOWN,this.method_36,Keyboard.TAB);
|
||||
var input:IInput = IInput(var_4.getTaskInterface(IInput));
|
||||
input.name_94(KeyboardEventType.KEY_DOWN,this.method_36,Keyboard.F7);
|
||||
input.name_94(KeyboardEventType.KEY_DOWN,this.method_36,Keyboard.F8);
|
||||
input.name_94(KeyboardEventType.KEY_DOWN,this.method_36,Keyboard.TAB);
|
||||
}
|
||||
|
||||
override public function stop() : void
|
||||
@@ -733,7 +733,7 @@ package package_18
|
||||
this.var_10 = null;
|
||||
}
|
||||
|
||||
private function method_36(eventType:name_83, keyCode:uint) : void
|
||||
private function method_36(eventType:KeyboardEventType, keyCode:uint) : void
|
||||
{
|
||||
switch(keyCode)
|
||||
{
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package package_22
|
||||
{
|
||||
public class name_83
|
||||
{
|
||||
public static const KEY_DOWN:name_83 = new name_83();
|
||||
|
||||
public static const KEY_UP:name_83 = new name_83();
|
||||
|
||||
public function name_83()
|
||||
{
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ package package_71
|
||||
import alternativa.tanks.game.GameKernel;
|
||||
import alternativa.tanks.game.GameEvents;
|
||||
import package_15.name_191;
|
||||
import package_22.name_83;
|
||||
import package_22.name_87;
|
||||
import alternativa.tanks.game.subsystems.inputsystem.KeyboardEventType;
|
||||
import alternativa.tanks.game.subsystems.inputsystem.IInput;
|
||||
import package_42.name_477;
|
||||
import package_75.class_15;
|
||||
|
||||
@@ -27,7 +27,7 @@ package package_71
|
||||
|
||||
private var center:Boolean;
|
||||
|
||||
private var input:name_87;
|
||||
private var input:IInput;
|
||||
|
||||
public function name_311(callback:class_10)
|
||||
{
|
||||
@@ -54,13 +54,13 @@ package package_71
|
||||
{
|
||||
this.gameKernel = gameKernel;
|
||||
this.input = gameKernel.name_66();
|
||||
this.input.name_94(name_83.KEY_DOWN,this.method_15,KEY_CENTER);
|
||||
this.input.name_94(KeyboardEventType.KEY_DOWN,this.method_15,KEY_CENTER);
|
||||
}
|
||||
|
||||
override public function removeFromGame(gameKernel:GameKernel) : void
|
||||
{
|
||||
this.method_409();
|
||||
this.input.name_384(name_83.KEY_DOWN,this.method_15,KEY_CENTER);
|
||||
this.input.name_384(KeyboardEventType.KEY_DOWN,this.method_15,KEY_CENTER);
|
||||
}
|
||||
|
||||
public function runLogic() : void
|
||||
@@ -111,7 +111,7 @@ package package_71
|
||||
this.method_409();
|
||||
}
|
||||
|
||||
private function method_15(eventType:name_83, keyCode:uint) : void
|
||||
private function method_15(eventType:KeyboardEventType, keyCode:uint) : void
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ package package_71
|
||||
import alternativa.tanks.game.GameKernel;
|
||||
import alternativa.tanks.game.GameEvents;
|
||||
import package_15.name_191;
|
||||
import package_22.name_83;
|
||||
import package_22.name_87;
|
||||
import alternativa.tanks.game.subsystems.inputsystem.KeyboardEventType;
|
||||
import alternativa.tanks.game.subsystems.inputsystem.IInput;
|
||||
import package_42.name_477;
|
||||
import package_74.class_24;
|
||||
|
||||
@@ -42,17 +42,17 @@ package package_71
|
||||
override public function addToGame(gameKernel:GameKernel) : void
|
||||
{
|
||||
this.gameKernel = gameKernel;
|
||||
var inputSystem:name_87 = gameKernel.name_66();
|
||||
inputSystem.name_94(name_83.KEY_DOWN,this.method_193,KEY_FIRE);
|
||||
inputSystem.name_94(name_83.KEY_UP,this.method_193,KEY_FIRE);
|
||||
var inputSystem:IInput = gameKernel.name_66();
|
||||
inputSystem.name_94(KeyboardEventType.KEY_DOWN,this.method_193,KEY_FIRE);
|
||||
inputSystem.name_94(KeyboardEventType.KEY_UP,this.method_193,KEY_FIRE);
|
||||
}
|
||||
|
||||
override public function removeFromGame(gameKernel:GameKernel) : void
|
||||
{
|
||||
this.method_409();
|
||||
var inputSystem:name_87 = gameKernel.name_66();
|
||||
inputSystem.name_384(name_83.KEY_DOWN,this.method_193,KEY_FIRE);
|
||||
inputSystem.name_384(name_83.KEY_UP,this.method_193,KEY_FIRE);
|
||||
var inputSystem:IInput = gameKernel.name_66();
|
||||
inputSystem.name_384(KeyboardEventType.KEY_DOWN,this.method_193,KEY_FIRE);
|
||||
inputSystem.name_384(KeyboardEventType.KEY_UP,this.method_193,KEY_FIRE);
|
||||
}
|
||||
|
||||
public function runLogic() : void
|
||||
@@ -73,18 +73,18 @@ package package_71
|
||||
this.var_507 = false;
|
||||
}
|
||||
|
||||
private function method_193(eventType:name_83, keyCode:uint) : void
|
||||
private function method_193(eventType:KeyboardEventType, keyCode:uint) : void
|
||||
{
|
||||
switch(eventType)
|
||||
{
|
||||
case name_83.KEY_DOWN:
|
||||
case KeyboardEventType.KEY_DOWN:
|
||||
this.var_508 = true;
|
||||
if(!this.name_308)
|
||||
{
|
||||
this.var_507 = false;
|
||||
}
|
||||
break;
|
||||
case name_83.KEY_UP:
|
||||
case KeyboardEventType.KEY_UP:
|
||||
this.var_507 = true;
|
||||
if(!this.name_308)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ package package_71
|
||||
import alternativa.tanks.game.EntityComponent;
|
||||
import alternativa.tanks.game.GameKernel;
|
||||
import alternativa.tanks.game.GameEvents;
|
||||
import package_22.name_87;
|
||||
import alternativa.tanks.game.subsystems.inputsystem.IInput;
|
||||
import package_42.name_477;
|
||||
import package_45.name_182;
|
||||
|
||||
@@ -23,7 +23,7 @@ package package_71
|
||||
|
||||
private static const SYNC_INTERVAL:int = 4000;
|
||||
|
||||
private var input:name_87;
|
||||
private var input:IInput;
|
||||
|
||||
private var physicsComponent:class_30;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ package package_9
|
||||
import package_18.name_102;
|
||||
import package_18.name_90;
|
||||
import package_21.name_78;
|
||||
import package_22.name_87;
|
||||
import alternativa.tanks.game.subsystems.inputsystem.IInput;
|
||||
import package_45.name_182;
|
||||
import package_46.Matrix3;
|
||||
import package_46.Matrix4;
|
||||
@@ -52,7 +52,7 @@ package package_9
|
||||
|
||||
private var currentPosition:Vector3D = new Vector3D();
|
||||
|
||||
private var input:name_87;
|
||||
private var input:IInput;
|
||||
|
||||
private var controller:ObjectController;
|
||||
|
||||
@@ -62,7 +62,7 @@ package package_9
|
||||
|
||||
private var var_45:Matrix4 = new Matrix4();
|
||||
|
||||
public function name_20(camera:name_90, input:name_87)
|
||||
public function name_20(camera:name_90, input:IInput)
|
||||
{
|
||||
super();
|
||||
this.input = input;
|
||||
|
||||
@@ -9,7 +9,7 @@ package package_9
|
||||
import package_18.name_90;
|
||||
import package_19.name_380;
|
||||
import package_21.name_78;
|
||||
import package_22.name_87;
|
||||
import alternativa.tanks.game.subsystems.inputsystem.IInput;
|
||||
import package_27.name_501;
|
||||
import package_45.name_182;
|
||||
import package_46.Matrix3;
|
||||
@@ -109,7 +109,7 @@ package package_9
|
||||
|
||||
private var var_521:Number;
|
||||
|
||||
private var input:name_87;
|
||||
private var input:IInput;
|
||||
|
||||
private var var_515:name_380;
|
||||
|
||||
@@ -137,7 +137,7 @@ package package_9
|
||||
|
||||
private var var_523:name_194 = new name_194();
|
||||
|
||||
public function name_298(camera:name_90, collisionDetector:name_256, collisionMask:int, input:name_87)
|
||||
public function name_298(camera:name_90, collisionDetector:name_256, collisionMask:int, input:IInput)
|
||||
{
|
||||
super();
|
||||
this.camera = camera;
|
||||
|
||||
@@ -9,7 +9,7 @@ package package_9
|
||||
import package_18.name_90;
|
||||
import package_19.name_380;
|
||||
import package_21.name_78;
|
||||
import package_22.name_87;
|
||||
import alternativa.tanks.game.subsystems.inputsystem.IInput;
|
||||
import package_27.name_501;
|
||||
import package_45.name_182;
|
||||
import package_46.Matrix3;
|
||||
@@ -113,11 +113,11 @@ package package_9
|
||||
|
||||
private var var_528:Number = 0;
|
||||
|
||||
private var input:name_87;
|
||||
private var input:IInput;
|
||||
|
||||
private var var_515:name_380;
|
||||
|
||||
public function name_299(camera:name_90, collisionDetector:name_256, collisionMask:int, input:name_87)
|
||||
public function name_299(camera:name_90, collisionDetector:name_256, collisionMask:int, input:IInput)
|
||||
{
|
||||
super();
|
||||
this.camera = camera;
|
||||
|
||||
Reference in New Issue
Block a user