diff --git a/source/core/assets/images/projectiles/oldstun_effect.atlas b/source/core/assets/images/projectiles/oldstun_effect.atlas new file mode 100644 index 000000000..a50132d0b --- /dev/null +++ b/source/core/assets/images/projectiles/oldstun_effect.atlas @@ -0,0 +1,41 @@ + +stun_effect.png +size: 256, 32 +format: RGBA8888 +filter: Nearest, Nearest +repeat: none +projectile + rotate: false + xy: 86, 3 + size: 41, 27 + orig: 41, 27 + offset: 0, 0 + index: -1 +projectile + rotate: false + xy: 2, 2 + size: 40, 28 + orig: 40, 28 + offset: 0, 0 + index: -1 +projectile + rotate: false + xy: 129, 2 + size: 40, 28 + orig: 40, 28 + offset: 0, 0 + index: -1 +projectile + rotate: false + xy: 44, 2 + size: 40, 28 + orig: 40, 28 + offset: 0, 0 + index: -1 +default + rotate: false + xy: 86, 3 + size: 41, 27 + orig: 41, 27 + offset: 0, 0 + index: -1 \ No newline at end of file diff --git a/source/core/assets/images/projectiles/oldstun_effect.png b/source/core/assets/images/projectiles/oldstun_effect.png new file mode 100644 index 000000000..238eac60d Binary files /dev/null and b/source/core/assets/images/projectiles/oldstun_effect.png differ diff --git a/source/core/assets/images/projectiles/stun_effect.atlas b/source/core/assets/images/projectiles/stun_effect.atlas index a50132d0b..6aa98a315 100644 --- a/source/core/assets/images/projectiles/stun_effect.atlas +++ b/source/core/assets/images/projectiles/stun_effect.atlas @@ -1,41 +1,41 @@ stun_effect.png -size: 256, 32 +size: 128, 32 format: RGBA8888 filter: Nearest, Nearest repeat: none projectile rotate: false - xy: 86, 3 - size: 41, 27 - orig: 41, 27 + xy: 2, 2 + size: 21, 19 + orig: 21, 19 offset: 0, 0 index: -1 projectile rotate: false - xy: 2, 2 - size: 40, 28 - orig: 40, 28 + xy: 48, 2 + size: 20, 19 + orig: 20, 19 offset: 0, 0 index: -1 projectile rotate: false - xy: 129, 2 - size: 40, 28 - orig: 40, 28 + xy: 25, 2 + size: 21, 19 + orig: 21, 19 offset: 0, 0 index: -1 projectile rotate: false - xy: 44, 2 - size: 40, 28 - orig: 40, 28 + xy: 70, 2 + size: 17, 19 + orig: 17, 19 offset: 0, 0 index: -1 default rotate: false - xy: 86, 3 - size: 41, 27 - orig: 41, 27 + xy: 2, 2 + size: 21, 19 + orig: 21, 19 offset: 0, 0 index: -1 \ No newline at end of file diff --git a/source/core/assets/images/projectiles/stun_effect.png b/source/core/assets/images/projectiles/stun_effect.png index 238eac60d..cd862a426 100644 Binary files a/source/core/assets/images/projectiles/stun_effect.png and b/source/core/assets/images/projectiles/stun_effect.png differ diff --git a/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java b/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java index 64351bdb2..2340ac3e6 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/StunTowerCombatTask.java @@ -98,8 +98,9 @@ public void updateTowerState() { owner.getEntity().getEvents().trigger(ATTACK); Entity newProjectile = ProjectileFactory.createEffectProjectile(PhysicsLayer.NPC, new Vector2(100, owner.getEntity().getPosition().y), new Vector2(2,2), ProjectileEffects.STUN, false); + newProjectile.setScale(-0.4f, -0.4f); newProjectile.setPosition((float) (owner.getEntity().getPosition().x + 0.25), - (float) (owner.getEntity().getPosition().y + 0.25)); + (float) (owner.getEntity().getPosition().y + 0.85)); ServiceLocator.getEntityService().register(newProjectile); } } diff --git a/source/core/src/main/com/csse3200/game/entities/destructors/ProjectileDestructors.java b/source/core/src/main/com/csse3200/game/entities/destructors/ProjectileDestructors.java index 2fbd01930..1df39162d 100644 --- a/source/core/src/main/com/csse3200/game/entities/destructors/ProjectileDestructors.java +++ b/source/core/src/main/com/csse3200/game/entities/destructors/ProjectileDestructors.java @@ -15,6 +15,7 @@ public class ProjectileDestructors { */ public static Entity destroyProjectile(Entity projectile) { projectile.dispose(); + projectile.getEvents().trigger(""); return projectile; } /**