From 0380617849435191a8bf7c395997501ffe24d194 Mon Sep 17 00:00:00 2001 From: Mashy Date: Fri, 29 Mar 2019 12:39:51 +1000 Subject: [PATCH] Ready takes you into game --- html-client/src/components/body.component.jsx | 2 +- html-client/src/components/cryp.list.jsx | 0 html-client/src/components/game.jsx | 54 ++++++------------- .../src/components/login.component.jsx | 0 .../src/components/login.container.jsx | 0 html-client/src/events.jsx | 3 +- html-client/src/keyboard.jsx | 0 html-client/src/main.jsx | 0 html-client/src/socket.jsx | 0 9 files changed, 20 insertions(+), 39 deletions(-) mode change 100755 => 100644 html-client/src/components/body.component.jsx mode change 100755 => 100644 html-client/src/components/cryp.list.jsx mode change 100755 => 100644 html-client/src/components/game.jsx mode change 100755 => 100644 html-client/src/components/login.component.jsx mode change 100755 => 100644 html-client/src/components/login.container.jsx mode change 100755 => 100644 html-client/src/keyboard.jsx mode change 100755 => 100644 html-client/src/main.jsx mode change 100755 => 100644 html-client/src/socket.jsx diff --git a/html-client/src/components/body.component.jsx b/html-client/src/components/body.component.jsx old mode 100755 new mode 100644 index fcb6abcf..7c1b3b8f --- a/html-client/src/components/body.component.jsx +++ b/html-client/src/components/body.component.jsx @@ -39,7 +39,7 @@ function renderBody(props) { type="submit" onClick={() => setGame(null)} > - Return to Main Menu + Back to instance ); diff --git a/html-client/src/components/cryp.list.jsx b/html-client/src/components/cryp.list.jsx old mode 100755 new mode 100644 diff --git a/html-client/src/components/game.jsx b/html-client/src/components/game.jsx old mode 100755 new mode 100644 index 0a81b6a7..4327a515 --- a/html-client/src/components/game.jsx +++ b/html-client/src/components/game.jsx @@ -69,7 +69,6 @@ function GamePanel(props) {

{cryp.name}

-

Level {cryp.lvl}

@@ -78,11 +77,9 @@ function GamePanel(props) {
-
{cryp.hp.value} / {cryp.stam.value} HP
- +
{cryp.hp.value} / {cryp.hp.max} HP
+ -
{cryp.xp} / {Math.pow(2, cryp.lvl + 1)} XP
- {effects} {skills} @@ -111,7 +108,6 @@ function GamePanel(props) {

{cryp.name}

-

Level {cryp.lvl}

@@ -120,11 +116,8 @@ function GamePanel(props) {
-
{cryp.hp.value} / {cryp.stam.value} HP
- - -
{cryp.xp} / {Math.pow(2, cryp.lvl + 1)} XP
- +
{cryp.hp.value} / {cryp.hp.value} HP
+ {effects} @@ -138,43 +131,30 @@ function GamePanel(props) {
selectSkillTarget(team.id)} > + onClick={() => console.log(activeSkill)} > {cryps}
); } - // style={{ "min-height": "100%" }} - function phaseText(phase) { - switch (phase) { - case 'Skill': - return 'Choose abilities'; - case 'Target': - return 'Block abilities'; - case 'Finish': - return 'Game over'; - } - } - const logs = game.log.reverse().map((l, i) => (
{l}
)); return ( -
-
- {phaseText(game.phase)} -
-
- {PlayerTeam(playerTeam, setActiveSkill)} -
-
-
+
+
+
+ {playerTeam.id} + {PlayerTeam(playerTeam, setActiveSkill)} +
+
+ Round X +
+
+ {otherTeams.id} {otherTeams.map(OpponentTeam)}
-
- {incoming} -
-
+
{logs}
diff --git a/html-client/src/components/login.component.jsx b/html-client/src/components/login.component.jsx old mode 100755 new mode 100644 diff --git a/html-client/src/components/login.container.jsx b/html-client/src/components/login.container.jsx old mode 100755 new mode 100644 diff --git a/html-client/src/events.jsx b/html-client/src/events.jsx index 3eae6e4d..515c535e 100644 --- a/html-client/src/events.jsx +++ b/html-client/src/events.jsx @@ -16,7 +16,8 @@ function registerEvents(store) { } function setGame(game) { - return console.log('EVENT ->', 'game', game); + store.dispatch(actions.setGame(game)); + // return console.log('EVENT ->', 'game', game); } function setAccount(account) { diff --git a/html-client/src/keyboard.jsx b/html-client/src/keyboard.jsx old mode 100755 new mode 100644 diff --git a/html-client/src/main.jsx b/html-client/src/main.jsx old mode 100755 new mode 100644 diff --git a/html-client/src/socket.jsx b/html-client/src/socket.jsx old mode 100755 new mode 100644