20 lines
549 B
JavaScript
20 lines
549 B
JavaScript
const preact = require('preact');
|
|
|
|
const Attack = require('./anims/attack');
|
|
|
|
function animations(props) {
|
|
const { combatTextClass, combatText, stage, player, construct } = props;
|
|
|
|
if (combatText === 'Attack') {
|
|
return (
|
|
<div class={combatTextClass}>
|
|
<Attack id={construct.id} stage={stage} team={player}/>
|
|
</div>
|
|
);
|
|
}
|
|
if (combatText) return <div construct={construct} class={combatTextClass}>{combatText}</div>;
|
|
return (<div> </div>);
|
|
}
|
|
|
|
module.exports = animations;
|