Skip to content

Commit

Permalink
Changed the createFireBall code to match what is called in the main b…
Browse files Browse the repository at this point in the history
…ranch
  • Loading branch information
ThivanW authored Sep 9, 2023
1 parent 4a6823b commit cba4021
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.csse3200.game.entities.Entity;
import com.csse3200.game.entities.factories.ProjectileFactory;
import com.csse3200.game.services.ServiceLocator;
import com.csse3200.game.physics.PhysicsLayer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -57,7 +58,8 @@ public void start() {
public void update() {
if (currentTask.getStatus() != Status.ACTIVE) {
if (currentTask == movementTask) {
Entity newProjectile = ProjectileFactory.createFireBall(owner.getEntity(), new Vector2(0, (currentPos.y + 0.75f)), new Vector2(2f,2f));
Entity newProjectile = ProjectileFactory.createFireBall(PhysicsLayer.OBSTACLE, new Vector2(0, currentPos.y + 0.75f), new Vector2(2f,2f));

newProjectile.scaleHeight(-0.4f);
newProjectile.setPosition((float) (currentPos.x), (float) (currentPos.y+0.75f));
ServiceLocator.getEntityService().register(newProjectile);
Expand Down

0 comments on commit cba4021

Please sign in to comment.