feat(game): add TableUtil

This commit is contained in:
2024-05-23 19:19:31 +03:00
parent 449936e4c9
commit 32e16e2bca
12 changed files with 92 additions and 39 deletions

View File

@@ -81,6 +81,10 @@ class Render extends SpriteView implements IRender {
onStart(event.start.state);
} else if (event.hasChange()) {
var part:PartView = parts[event.change.partId];
// TODO:
if (part == null) {
return;
}
part.playerId = event.change.playerId;
part.position = event.change.position;
switch event.change.location {

View File

@@ -5,8 +5,8 @@ import hw.view.frame.FrameSwitcher;
import hw.view.frame.FrameView;
import hw.view.popup.ConfirmView;
import promhx.Promise;
import ru.m.puzzlez.image.Game;
import ru.m.puzzlez.image.IGame;
import ru.m.puzzlez.game.Game;
import ru.m.puzzlez.game.IGame;
import ru.m.puzzlez.proto.event.GameAction;
import ru.m.puzzlez.proto.event.GameEvent;
import ru.m.puzzlez.proto.event.gameaction.Action;

View File

@@ -5,7 +5,7 @@ import hw.view.data.DataView;
import hw.view.form.ToggleButtonView;
import hw.view.frame.FrameSwitcher;
import hw.view.frame.FrameView;
import ru.m.puzzlez.image.GameUtil;
import ru.m.puzzlez.game.GameUtil;
import ru.m.puzzlez.proto.game.ImageId;
import ru.m.puzzlez.view.common.PresetView;

View File

@@ -3,7 +3,7 @@ package ru.m.puzzlez.view.common;
import hw.view.theme.StyleId;
import hw.view.form.LabelView;
import hw.view.group.GroupView;
import ru.m.puzzlez.image.GameUtil;
import ru.m.puzzlez.game.GameUtil;
import ru.m.puzzlez.proto.game.GameState;
@:template class GameStateView extends GroupView {