-
Notifications
You must be signed in to change notification settings - Fork 1
/
Game.hx
40 lines (33 loc) · 881 Bytes
/
Game.hx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package;
import schema.Avatar;
import Types;
@:expose
class Game
{
public function new() {}
public function processAvatarMessage(data:Dynamic, avatar:Avatar, state:Dynamic)
{
if (avatar == null)
return;
if (data == null)
{
trace("null avatar data");
return;
}
if (data.x != null) avatar.x = data.x;
if (data.y != null) avatar.y = data.y;
if (data.name != null) avatar.name = data.name;
if (data.skin != null) avatar.skin = data.skin;
if (data.state != null) avatar.state = data.state;
if (data.emote != null)
avatar.emote = data.emote;
else
avatar.emote = 0;
}
public function init()
{
}
public function update(dt:Float, state:Dynamic)
{
}
}