Replaced modal resize icon, started writing components for character type management, spride field made optional
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user