core anims
This commit is contained in:
@@ -7,7 +7,7 @@ const shapes = require('./shapes');
|
||||
const { removeTier } = require('../utils');
|
||||
const { TIMES } = require('./../constants');
|
||||
|
||||
const addState = connect(({ animText, itemInfo }) => ({ animText, itemInfo }));
|
||||
const addState = connect(({ animText, animSkill, itemInfo }) => ({ animText, animSkill, itemInfo }));
|
||||
|
||||
class AnimText extends preact.Component {
|
||||
shouldComponentUpdate(newProps) {
|
||||
@@ -27,11 +27,11 @@ class AnimText extends preact.Component {
|
||||
}
|
||||
}
|
||||
|
||||
render(props) {
|
||||
const { construct, animText, itemInfo } = props;
|
||||
render() {
|
||||
const { construct, animText, animSkill, itemInfo } = this.props;
|
||||
if (animText && animText.constructId === construct.id) {
|
||||
const itemSourceDescription = () => {
|
||||
const itemSource = itemInfo.combos.filter(c => c.item === removeTier(animText.skill));
|
||||
const itemSource = itemInfo.combos.filter(c => c.item === removeTier(animSkill));
|
||||
const itemSourceInfo = itemSource.length
|
||||
? `${itemSource[0].components[0]} ${itemSource[0].components[1]} ${itemSource[0].components[2]}`
|
||||
: false;
|
||||
@@ -60,7 +60,7 @@ class AnimText extends preact.Component {
|
||||
|
||||
return (
|
||||
<div class="combat-text">
|
||||
<h2><span>{animText.skill}</span></h2>
|
||||
<h2><span>{animSkill}</span></h2>
|
||||
<span>{itemSourceDescription()}</span>
|
||||
{animationTextHtml()}
|
||||
</div>
|
||||
|
||||
@@ -6,11 +6,11 @@ const reactStringReplace = require('react-string-replace');
|
||||
const throttle = require('lodash/throttle');
|
||||
|
||||
const shapes = require('./shapes');
|
||||
const { effectInfo, removeTier } = require('../utils');
|
||||
const { effectInfo } = require('../utils');
|
||||
|
||||
const addState = connect(
|
||||
({ game, account, animSkill, animating, itemInfo, gameEffectInfo, tutorialGame }) =>
|
||||
({ game, account, animSkill, animating, itemInfo, gameEffectInfo, tutorialGame })
|
||||
({ game, account, animating, itemInfo, gameEffectInfo, tutorialGame }) =>
|
||||
({ game, account, animating, itemInfo, gameEffectInfo, tutorialGame })
|
||||
);
|
||||
|
||||
class TargetSvg extends Component {
|
||||
|
||||
Reference in New Issue
Block a user