Skip to content

Commit

Permalink
Merge branch 'Projectile-Animation' into Team-1--Projectiles
Browse files Browse the repository at this point in the history
  • Loading branch information
cindyle1 committed Sep 11, 2023
2 parents aba48cc + e28b548 commit 0f02b04
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 17 deletions.
41 changes: 41 additions & 0 deletions source/core/assets/images/projectiles/oldstun_effect.atlas
Original file line number Diff line number Diff line change
@@ -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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 16 additions & 16 deletions source/core/assets/images/projectiles/stun_effect.atlas
Original file line number Diff line number Diff line change
@@ -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
Binary file modified source/core/assets/images/projectiles/stun_effect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class ProjectileDestructors {
*/
public static Entity destroyProjectile(Entity projectile) {
projectile.dispose();
projectile.getEvents().trigger("");
return projectile;
}
/**
Expand Down

0 comments on commit 0f02b04

Please sign in to comment.