This commit is contained in:
2014-06-23 18:06:10 +04:00
parent a4afd49eb9
commit bd6af04156
9 changed files with 244 additions and 162 deletions

View File

@@ -1,10 +1,11 @@
package ru.m.armageddon.client;
import flash.Lib;
import flash.events.MouseEvent;
import flash.events.Event;
import ru.m.armageddon.core.connect.FlashConnection;
import ru.m.armageddon.core.connect.IConnection;
import haxework.log.TraceLogger;
import ru.m.armageddon.proto.LoginRequest;
class Client {
@@ -22,12 +23,12 @@ class Client {
public function new() {
connection = new FlashConnection("localhost", 5000, onConnect);
flash.Lib.current.stage.addEventListener(MouseEvent.CLICK, function(_) {
Lib.current.stage.addEventListener(MouseEvent.CLICK, function(_) {
onConnect(_);
});
}
public function onConnect(event:Event):Void {
public function onConnect(?event:Dynamic):Void {
var request = new LoginRequest();
request.login = "shmyga";
request.password = "xkbp8jh9z2";