Replaced modal resize icon, started writing components for character type management, spride field made optional

This commit is contained in:
2024-10-19 02:15:48 +02:00
parent 68222ab511
commit a0f0b40ed3
11 changed files with 315 additions and 16 deletions

View File

@ -62,7 +62,7 @@ const createFogEffect = (scene: Phaser.Scene) => {
const updateEffects = () => {
const effects = zoneStore.zone?.zoneEffects || []
effects.forEach(effect => {
effects.forEach((effect) => {
switch (effect.effect) {
case 'light':
updateLightEffect(effect.strength)
@ -79,7 +79,7 @@ const updateEffects = () => {
const updateLightEffect = (strength: number) => {
if (!lightEffect.value) return
const darkness = 1 - (strength / 100)
const darkness = 1 - strength / 100
lightEffect.value.clear()
lightEffect.value.fillStyle(0x000000, darkness)
lightEffect.value.fillRect(0, 0, window.innerWidth, window.innerHeight)
@ -105,4 +105,6 @@ watch(() => zoneStore.zone?.zoneEffects, updateEffects, { deep: true })
onBeforeUnmount(() => {
if (sceneRef.value) sceneRef.value.scene.remove('effects')
})
</script>
// @TODO : Fix resize issue
</script>