Skip to content

Commit

Permalink
fix: assets (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
hmbanan666 authored Jan 10, 2025
1 parent 0ebf9ce commit 26eedca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions apps/website/app/pages/(games)/wagon/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ const id = route.query.id?.toString() ?? ''
const stage = ref<HTMLElement>()
const game = ref<BaseGameAddon>()
const christmasId = 'iq9f2634d3q3ans243dhxmj7'
const { data: leaderboard, execute: refreshLeaderboard } = useFetch<LeaderboardData>(`https://chatgame.space/api/leaderboard/${christmasId}/list?limit=9`)
const currentEventId = 'iq9f2634d3q3ans243dhxmj7'
const { data: leaderboard, execute: refreshLeaderboard } = useFetch<LeaderboardData>(`https://chatgame.space/api/leaderboard/${currentEventId}/list?limit=9`)
onMounted(async () => {
game.value = new BaseGameAddon({ websocketUrl: publicEnv.websocketUrl, client: 'WAGON_CLIENT', updateUI: () => {} })
Expand Down Expand Up @@ -131,6 +131,10 @@ onMounted(async () => {
font-size: 32px;
}
.hidden {
display: none;
}
.distance {
font-size: 48px;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/game/src/lib/objects/unit/unitObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ export class UnitObject extends BaseObject implements GameObjectUnit {
this.animationMoving = undefined
}

const idle = await Assets.load(`/units/${codename}/idle.json`)
const idle = await Assets.load(`https://storage.yandexcloud.net/chatgame-assets/units/${codename}/idle.json`)
const idleSprite = new AnimatedSprite(idle.animations.main)
idleSprite.anchor.set(0.5, 1)
idleSprite.scale.set(4)
this.animationIdle = idleSprite
this.addChild(this.animationIdle)

const moving = await Assets.load(`/units/${codename}/moving.json`)
const moving = await Assets.load(`https://storage.yandexcloud.net/chatgame-assets/units/${codename}/moving.json`)
const movingSprite = new AnimatedSprite(moving.animations.main)
movingSprite.anchor.set(0.5, 1)
movingSprite.scale.set(4)
Expand Down

0 comments on commit 26eedca

Please sign in to comment.