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"
|
||||
onClick={() => setGame(null)}
|
||||
>
|
||||
Return to Main Menu
|
||||
Back to instance
|
||||
</button>
|
||||
</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="column is-10">
|
||||
<p className="title">{cryp.name}</p>
|
||||
<p className="subtitle">Level {cryp.lvl}</p>
|
||||
</div>
|
||||
<div className="column">
|
||||
<figure className="image">
|
||||
@ -78,11 +77,9 @@ function GamePanel(props) {
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div className="has-text-centered">{cryp.hp.value} / {cryp.stam.value} HP </div>
|
||||
<progress className="progress is-dark" value={cryp.hp.value} max={cryp.stam.value}></progress>
|
||||
<div className="has-text-centered">{cryp.hp.value} / {cryp.hp.max} HP </div>
|
||||
<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>
|
||||
{effects}
|
||||
{skills}
|
||||
@ -111,7 +108,6 @@ function GamePanel(props) {
|
||||
<div className="columns" >
|
||||
<div className="column is-10">
|
||||
<p className="title">{cryp.name}</p>
|
||||
<p className="subtitle">Level {cryp.lvl}</p>
|
||||
</div>
|
||||
<div className="column">
|
||||
<figure className="image">
|
||||
@ -120,11 +116,8 @@ function GamePanel(props) {
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div className="has-text-centered">{cryp.hp.value} / {cryp.stam.value} HP </div>
|
||||
<progress className="progress is-dark" value={cryp.hp.value} max={cryp.stam.value}></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 className="has-text-centered">{cryp.hp.value} / {cryp.hp.value} HP </div>
|
||||
<progress className="progress is-dark" value={cryp.hp.value} max={cryp.hp.max}></progress>
|
||||
|
||||
</div>
|
||||
{effects}
|
||||
@ -138,43 +131,30 @@ function GamePanel(props) {
|
||||
<div
|
||||
className="tile"
|
||||
style={activeSkill ? { cursor: 'pointer' } : {}}
|
||||
onClick={() => selectSkillTarget(team.id)} >
|
||||
onClick={() => console.log(activeSkill)} >
|
||||
{cryps}
|
||||
</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>));
|
||||
|
||||
return (
|
||||
<section className="columns">
|
||||
<div className="column is-2 title is-1">
|
||||
{phaseText(game.phase)}
|
||||
</div>
|
||||
<div className="column is-4">
|
||||
<section>
|
||||
<div className="row">
|
||||
<div className="three columns">
|
||||
{playerTeam.id}
|
||||
{PlayerTeam(playerTeam, setActiveSkill)}
|
||||
</div>
|
||||
<div className="column is-4">
|
||||
<div>
|
||||
<div className="six columns" align="center">
|
||||
Round X
|
||||
</div>
|
||||
<div className="three columns">
|
||||
{otherTeams.id}
|
||||
{otherTeams.map(OpponentTeam)}
|
||||
</div>
|
||||
<div>
|
||||
{incoming}
|
||||
</div>
|
||||
</div>
|
||||
<div className="column is-2">
|
||||
<div className="row">
|
||||
<div className="title is-4">{logs}</div>
|
||||
</div>
|
||||
</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) {
|
||||
return console.log('EVENT ->', 'game', game);
|
||||
store.dispatch(actions.setGame(game));
|
||||
// return console.log('EVENT ->', 'game', game);
|
||||
}
|
||||
|
||||
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