Skip to content

Commit

Permalink
Fixed the dispose functionality. I also had to comment out atlas.disp…
Browse files Browse the repository at this point in the history
…ose in AnimationRenderComponent
  • Loading branch information
Mohamad11Dab committed Sep 7, 2023
1 parent 3ec0494 commit f56ca5f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ public void create() {
displayUI();

spawnTerrain();
spawnBuilding1();
spawnBuilding2();
spawnMountains();
// spawnBuilding1();
// spawnBuilding2();
// spawnMountains();
player = spawnPlayer();

playMusic();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* of the events is triggered.
*/
public class TNTAnimationController extends Component {
AnimationRenderComponent animator;
private AnimationRenderComponent animator;

/**
* Creation call for a TNTAnimationController, fetches the animationRenderComponent that this controller will
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static Entity createFireBall(Entity target, Vector2 destination, Vector2
.addComponent(new ColliderComponent().setSensor(true))

// This is the component that allows the projectile to damage a specified target.
.addComponent(new TouchAttackComponent(PhysicsLayer.PLAYER, 1.5f, true))
.addComponent(new TouchAttackComponent(PhysicsLayer.NPC, 1.5f, true))
.addComponent(new CombatStatsComponent(config.health, config.baseAttack));

projectile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ protected void draw(SpriteBatch batch) {

@Override
public void dispose() {
atlas.dispose();
// atlas.dispose();
super.dispose();
}
}

0 comments on commit f56ca5f

Please sign in to comment.