feat: damage container

This commit is contained in:
cha0s 2019-04-19 00:51:18 -05:00
parent d571acb883
commit b2c9fbaa2f
2 changed files with 35 additions and 0 deletions

33
client/ui/damage.js Normal file
View File

@ -0,0 +1,33 @@
// 3rd party.
import * as I from 'immutable';
import React, {useEffect, useState} from 'react';
// 2nd party.
import {compose} from '@avocado/core';
import contempo from 'contempo';
const decorate = compose(
contempo(`
.damage {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
overflow: hidden;
}
.particle {
}
.particle .text {
display: inline-block;
font-family: monospace;
font-weight: bold;
text-shadow: 1px 1px 0px black;
}
`),
);
const DamageComponent = ({damageProton}) => {
return <div className="damage unselectable"></div>;
}
export default decorate(DamageComponent);

View File

@ -3,10 +3,12 @@ import React from 'react';
import {hot} from 'react-hot-loader/root';
// 1st party.
import ConnectionStatus from './connection-status';
import Damage from './damage';
import WorldTime from './world-time';
const Ui = ({socket, worldTime}) => {
return <React.Fragment>
<Damage />
<WorldTime worldTime={worldTime} />
<ConnectionStatus socket={socket} />
</React.Fragment>;