diff --git a/client/assets/styles/instance.less b/client/assets/styles/instance.less index 461f8eb0..0f05fc8b 100644 --- a/client/assets/styles/instance.less +++ b/client/assets/styles/instance.less @@ -446,6 +446,17 @@ } } +.tutorial { + button { + width: 100%; + } + + button.focus { + animation: co 0.75s cubic-bezier(0, 0, 1, 1) 0s infinite alternate; + } + +} + @keyframes faceoff { from { color: @black; diff --git a/client/src/components/anims/wiggle.jsx b/client/src/components/anims/wiggle.jsx index 5886a47d..8a54b096 100644 --- a/client/src/components/anims/wiggle.jsx +++ b/client/src/components/anims/wiggle.jsx @@ -6,7 +6,7 @@ function wiggle(id, idle) { const target = document.getElementById(id); const x = window.innerWidth * 0.01 * (Math.round(Math.random()) ? Math.random() : -Math.random()); const y = window.innerHeight * 0.01 * (Math.round(Math.random()) ? Math.random() : -Math.random()); - + const originalX = parseFloat(idle.animations[0].currentValue); const originalY = parseFloat(idle.animations[1].currentValue); // console.log(x, y); diff --git a/client/src/components/info.component.jsx b/client/src/components/info.component.jsx index bf1c8cd6..f4aafd3e 100644 --- a/client/src/components/info.component.jsx +++ b/client/src/components/info.component.jsx @@ -2,211 +2,222 @@ const preact = require('preact'); const range = require('lodash/range'); const reactStringReplace = require('react-string-replace'); +const { Component } = require('preact'); const { INFO } = require('./../constants'); const { convertItem, removeTier } = require('../utils'); const { tutorialStage } = require('../tutorial.utils'); const shapes = require('./shapes'); -function InfoComponent(args) { - const { - ws, - itemInfo, - player, - instance, - info, - tutorial, - clearTutorial, - } = args; - function Info() { - if (tutorial) return tutorialStage(tutorial, ws, clearTutorial, instance); +class InfoComponent extends Component { + shouldComponentUpdate(newProps) { + if (newProps.tutorial !== this.props.tutorial) return true; + if (newProps.tutorial) return false; // We don't care about info during tutorial + if (newProps.info !== this.props.info) return true; + return false; + } - if (!info) { - return ( -
Strengthen and specialise your constructs by equipping items to them.
-Double click to purchase items in the VBOX and move them to your INVENTORY.
-
- Combine a SKILL or SPEC with 2 COLOURS to create an item.
- Combine 3 of the same item to upgrade it.
- Click an item and then click a construct to equip that item to it.
-
Click the READY button for the GAME PHASE.
-Strengthen and specialise your constructs by equipping items to them.
+Double click to purchase items in the VBOX and move them to your INVENTORY.
+
+ Combine a SKILL or SPEC with 2 COLOURS to create an item.
+ Combine 3 of the same item to upgrade it.
+ Click an item and then click a construct to equip that item to it.
+
Click the READY button for the GAME PHASE.
| {convertItem(c.item)} | + {c.components.map((u, j) =>{convertItem(u)} | )} +
| {convertItem(c.item)} | - {c.components.map((u, j) =>{convertItem(u)} | )} -
Each round you start with a vbox full of different skills, specs and colours.
Bits are your currency for buying skills, specs and colours from the vbox.
Colours cost 1b, Skills cost 2b and specs cost 3b.
- You can refill the vbox by pressing the refill button for 2b.
Press the REFILL button to get a new vbox and continue.