Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- export default {
- data(){
- return {
- // Inverse pokemon type
- opponent: this.type == 'player' ? 'opponent' : 'player',
- // Pokemon image id (handy if needed in the future for applying effects)
- pokemonImageId: this.type + '-pokemon',
- // The main box's class, based on the position
- boxClass: {
- 'box-top-left': this.position == 'top',
- 'box-bottom-right': this.position == 'bottom',
- },
- // The HP box's class, based on the position
- hpBoxClass: {
- 'box-top-right': this.position == 'top',
- 'box-bottom-left': this.position == 'bottom',
- },
- // The HP bar's class, based on the position
- hpBarClass: {
- 'hp-bar-top': this.position == 'top',
- 'hp-bar-bottom': this.position == 'bottom',
- }
- };
- },
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement