Skip to content

Commit

Permalink
Changed Burn Effect Animation
Browse files Browse the repository at this point in the history
  • Loading branch information
cindyle1 committed Sep 11, 2023
1 parent a1bf312 commit a355fc0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions source/core/assets/images/projectiles/burn_effect.atlas
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ projectile
orig: 36, 31
offset: 0, 0
index: -1
projectileFinal
projectile
rotate: false
xy: 116, 2
size: 36, 31
orig: 36, 31
offset: 0, 0
index: -1
projectile
projectileFinal
rotate: false
xy: 191, 2
size: 31, 31
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.badlogic.gdx.math.Vector2;
import com.csse3200.game.ai.tasks.DefaultTask;
import com.csse3200.game.ai.tasks.PriorityTask;
import com.csse3200.game.components.ProjectileEffects;
import com.csse3200.game.entities.Entity;
import com.csse3200.game.entities.factories.ProjectileFactory;
import com.csse3200.game.physics.PhysicsEngine;
Expand Down Expand Up @@ -102,8 +103,8 @@ public void updateTowerState() {
towerState = STATE.IDLE;
} else {
owner.getEntity().getEvents().trigger(ATTACK);
Entity newProjectile = ProjectileFactory.createFireBall(PhysicsLayer.NPC,
new Vector2(100, owner.getEntity().getPosition().y), new Vector2(2f, 2f));
Entity newProjectile = ProjectileFactory.createEffectProjectile(PhysicsLayer.NPC,
new Vector2(100, owner.getEntity().getPosition().y), new Vector2(2f, 2f), ProjectileEffects.BURN, false);
newProjectile.setPosition((float) (owner.getEntity().getPosition().x + 0.25),
(float) (owner.getEntity().getPosition().y + 0.25));
ServiceLocator.getEntityService().register(newProjectile);
Expand Down

0 comments on commit a355fc0

Please sign in to comment.