remove code, fix animation reset

This commit is contained in:
ntr
2019-09-12 11:41:53 +10:00
parent 1f5d57a276
commit 9a70c1f34e
5 changed files with 20 additions and 30 deletions
+13 -7
View File
@@ -53,13 +53,19 @@ function Welcome() {
<section>
<div class="news">
<h1>mnml.gg</h1>
<p>mnml is a turn-based 1v1 strategy game in an abstract setting.</p>
<p>outplay your opponents by building your team of 3 constructs from a shifting meta of skills, effects and specialisations.</p>
<p>simple rules, complex interactions, simultaneous turns to increase the pace, and a unique speed mechanic;</p>
<p>mnml is a tactical game unlike any other.</p>
<p>free to play</p>
<p>no email required</p>
<p>glhf</p>
<p>
mnml is a turn-based 1v1 strategy game in an abstract setting.<br />
outplay your opponents by building your team of 3 constructs from a shifting meta of skills, effects and specialisations.<br />
</p>
<p>
simple rules, complex interactions, simultaneous turns to increase the pace, and a unique speed mechanic;<br />
mnml is a tactical game unlike any other.
</p>
<p>
free to play<br />
no email required<br />
glhf
</p>
</div>
{pageEl()}
</section>
+4 -13
View File
@@ -12,8 +12,8 @@ const addState = connect(
ws
} = state;
function submitRegister(name, password, code) {
postData('/account/register', { name, password, code })
function submitRegister(name, password) {
postData('/account/register', { name, password })
.then(res => res.json())
.then(data => {
if (data.error) return errorToast(data.error);
@@ -34,12 +34,11 @@ function Register(args) {
submitRegister,
} = args;
const { password, confirm, name, code } = this.state;
const { password, confirm, name } = this.state;
const registerSubmit = (event) => {
event.preventDefault();
submitRegister(name, password, code);
// this.setState({ name: '', password: '', confirm: '', code: ''});
submitRegister(name, password);
}
const registerConfirm = () =>
@@ -75,14 +74,6 @@ function Register(args) {
value={this.state.confirm}
onInput={linkState(this, 'confirm')}
/>
<label for="code">Access Code</label>
<input
class="login-input"
type="text"
placeholder="code"
value={this.state.code}
onInput={linkState(this, 'code')}
/>
<button
class="login-btn"
disabled={registerDisabled()}
+1
View File
@@ -200,6 +200,7 @@ function registerEvents(store) {
const startDemo = () => {
console.log(initial);
store.dispatch(actions.setDemo(initial));
store.dispatch(actions.setAnimTarget(null));
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, initial, { combiner: [0] }))), 2000);
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, initial, { combiner: [0, 1] }))), 4000);
setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, initial, { combiner: [0, 1, 2] }))), 6000);