Got a working version of character animations, finished HUD styling, cleaned SCSS, npm update

This commit is contained in:
2024-06-08 00:04:28 +02:00
parent b2b4f3c60e
commit 7428521fb2
13 changed files with 95 additions and 24 deletions

View File

@ -14,13 +14,13 @@
stroke: '#213547'
}"
/>
<Sprite ref="sprite" texture="character" :x="props.character.position_x" :y="props.character.position_y" />
<Sprite ref="sprite" :x="props.character.position_x" :y="props.character.position_y" play="walk" />
</Container>
</template>
<script lang="ts" setup>
import { Container, Sprite, Text, useScene } from 'phavuer'
import { onMounted, reactive, type Ref, ref, watch } from 'vue'
import { onBeforeMount, onMounted, reactive, type Ref, ref, watch } from 'vue'
import config from '@/config'
import { useSocketStore } from '@/stores/socket'
import { type Character as CharacterT } from '@/types'
@ -79,14 +79,6 @@ function getTile(x: number, y: number, layer: Phaser.Tilemaps.TilemapLayer): Pha
return tile
}
scene.anims.create({
key: 'walk',
frames: scene.anims.generateFrameNumbers('walk', {
start: 0,
end: 4
}),
});
/**
* Resources:
* https://www.youtube.com/watch?v=9sWrGohw9qo