Feat : various fixes, sounds and multiplayer additions
This commit is contained in:
@@ -1,18 +1,30 @@
|
||||
<script setup lang="ts">
|
||||
import type { Player } from "~/netcode/interfaces";
|
||||
import { playSound } from "~/helpers/audioHelpers";
|
||||
import type { Game, Player } from "~/netcode/interfaces";
|
||||
|
||||
export interface Props {
|
||||
game: Game;
|
||||
player: Player;
|
||||
}
|
||||
|
||||
const props = defineProps<Props>();
|
||||
|
||||
const team = computed(() =>
|
||||
props.game.teams.find((t) =>
|
||||
t.players.map((p) => p._id).includes(props.player._id)
|
||||
)
|
||||
);
|
||||
|
||||
const isTurn = computed(
|
||||
() => team.value && team.value?._id == props.game.currentTurn.currentTeam
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="turn_icon">
|
||||
<img src="/img/champion-shield.png" class="icon_img" draggable="false" />
|
||||
<span class="turn_icon_number">
|
||||
{{ player.team?.health }}
|
||||
{{ team?.health }}
|
||||
</span>
|
||||
</div>
|
||||
<!-- <div class="turn_icon" v-if="showTurnData">
|
||||
@@ -30,7 +42,7 @@ const props = defineProps<Props>();
|
||||
<div class="turn_icon">
|
||||
<img src="/img/fuck.svg" class="icon_img" draggable="false" />
|
||||
<span class="turn_icon_number">{{
|
||||
(player.turn?.discard_markers ?? 0) + (player.turn?.fuck_u_markers ?? 0)
|
||||
(isTurn && (player.discardMarkers ?? 0) + (player.fuckUMarkers ?? 0)) || 0
|
||||
}}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user