Ready takes you into game
This commit is contained in:
parent
2b4f7de097
commit
0380617849
2
html-client/src/components/body.component.jsx
Executable file → Normal file
2
html-client/src/components/body.component.jsx
Executable file → Normal file
@ -39,7 +39,7 @@ function renderBody(props) {
|
|||||||
type="submit"
|
type="submit"
|
||||||
onClick={() => setGame(null)}
|
onClick={() => setGame(null)}
|
||||||
>
|
>
|
||||||
Return to Main Menu
|
Back to instance
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
0
html-client/src/components/cryp.list.jsx
Executable file → Normal file
0
html-client/src/components/cryp.list.jsx
Executable file → Normal file
50
html-client/src/components/game.jsx
Executable file → Normal file
50
html-client/src/components/game.jsx
Executable file → Normal file
@ -69,7 +69,6 @@ function GamePanel(props) {
|
|||||||
<div className="columns" >
|
<div className="columns" >
|
||||||
<div className="column is-10">
|
<div className="column is-10">
|
||||||
<p className="title">{cryp.name}</p>
|
<p className="title">{cryp.name}</p>
|
||||||
<p className="subtitle">Level {cryp.lvl}</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="column">
|
<div className="column">
|
||||||
<figure className="image">
|
<figure className="image">
|
||||||
@ -78,11 +77,9 @@ function GamePanel(props) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className="has-text-centered">{cryp.hp.value} / {cryp.stam.value} HP </div>
|
<div className="has-text-centered">{cryp.hp.value} / {cryp.hp.max} HP </div>
|
||||||
<progress className="progress is-dark" value={cryp.hp.value} max={cryp.stam.value}></progress>
|
<progress className="progress is-dark" value={cryp.hp.value} max={cryp.hp.max}></progress>
|
||||||
|
|
||||||
<div className="has-text-centered">{cryp.xp} / {Math.pow(2, cryp.lvl + 1)} XP </div>
|
|
||||||
<progress className="progress is-dark" value={cryp.xp} max={Math.pow(2, cryp.lvl + 1)}></progress>
|
|
||||||
</div>
|
</div>
|
||||||
{effects}
|
{effects}
|
||||||
{skills}
|
{skills}
|
||||||
@ -111,7 +108,6 @@ function GamePanel(props) {
|
|||||||
<div className="columns" >
|
<div className="columns" >
|
||||||
<div className="column is-10">
|
<div className="column is-10">
|
||||||
<p className="title">{cryp.name}</p>
|
<p className="title">{cryp.name}</p>
|
||||||
<p className="subtitle">Level {cryp.lvl}</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div className="column">
|
<div className="column">
|
||||||
<figure className="image">
|
<figure className="image">
|
||||||
@ -120,11 +116,8 @@ function GamePanel(props) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div className="has-text-centered">{cryp.hp.value} / {cryp.stam.value} HP </div>
|
<div className="has-text-centered">{cryp.hp.value} / {cryp.hp.value} HP </div>
|
||||||
<progress className="progress is-dark" value={cryp.hp.value} max={cryp.stam.value}></progress>
|
<progress className="progress is-dark" value={cryp.hp.value} max={cryp.hp.max}></progress>
|
||||||
|
|
||||||
<div className="has-text-centered">{cryp.xp} / {Math.pow(2, cryp.lvl + 1)} XP </div>
|
|
||||||
<progress className="progress is-dark" value={cryp.xp} max={Math.pow(2, cryp.lvl + 1)}></progress>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{effects}
|
{effects}
|
||||||
@ -138,43 +131,30 @@ function GamePanel(props) {
|
|||||||
<div
|
<div
|
||||||
className="tile"
|
className="tile"
|
||||||
style={activeSkill ? { cursor: 'pointer' } : {}}
|
style={activeSkill ? { cursor: 'pointer' } : {}}
|
||||||
onClick={() => selectSkillTarget(team.id)} >
|
onClick={() => console.log(activeSkill)} >
|
||||||
{cryps}
|
{cryps}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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) => (<div key={i}>{l}</div>));
|
const logs = game.log.reverse().map((l, i) => (<div key={i}>{l}</div>));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="columns">
|
<section>
|
||||||
<div className="column is-2 title is-1">
|
<div className="row">
|
||||||
{phaseText(game.phase)}
|
<div className="three columns">
|
||||||
</div>
|
{playerTeam.id}
|
||||||
<div className="column is-4">
|
|
||||||
{PlayerTeam(playerTeam, setActiveSkill)}
|
{PlayerTeam(playerTeam, setActiveSkill)}
|
||||||
</div>
|
</div>
|
||||||
<div className="column is-4">
|
<div className="six columns" align="center">
|
||||||
<div>
|
Round X
|
||||||
|
</div>
|
||||||
|
<div className="three columns">
|
||||||
|
{otherTeams.id}
|
||||||
{otherTeams.map(OpponentTeam)}
|
{otherTeams.map(OpponentTeam)}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
{incoming}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div className="row">
|
||||||
<div className="column is-2">
|
|
||||||
<div className="title is-4">{logs}</div>
|
<div className="title is-4">{logs}</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
0
html-client/src/components/login.component.jsx
Executable file → Normal file
0
html-client/src/components/login.component.jsx
Executable file → Normal file
0
html-client/src/components/login.container.jsx
Executable file → Normal file
0
html-client/src/components/login.container.jsx
Executable file → Normal file
@ -16,7 +16,8 @@ function registerEvents(store) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setGame(game) {
|
function setGame(game) {
|
||||||
return console.log('EVENT ->', 'game', game);
|
store.dispatch(actions.setGame(game));
|
||||||
|
// return console.log('EVENT ->', 'game', game);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAccount(account) {
|
function setAccount(account) {
|
||||||
|
|||||||
0
html-client/src/keyboard.jsx
Executable file → Normal file
0
html-client/src/keyboard.jsx
Executable file → Normal file
0
html-client/src/main.jsx
Executable file → Normal file
0
html-client/src/main.jsx
Executable file → Normal file
0
html-client/src/socket.jsx
Executable file → Normal file
0
html-client/src/socket.jsx
Executable file → Normal file
Loading…
x
Reference in New Issue
Block a user