Shift from Game-Design

This commit is contained in:
Jose 2017-10-30 14:10:21 -04:00
commit bb41a130ba
153 changed files with 4046 additions and 0 deletions

View file

@ -0,0 +1,54 @@
package edu.utc.gamedev.Manager;
import edu.utc.gamedev.Entity.Projectile.EntityPotatoProjectile;
import java.util.ConcurrentModificationException;
import java.util.LinkedList;
public class ProjectileManager
{
private LinkedList<EntityPotatoProjectile> projectiles;
public ProjectileManager()
{
projectiles = new LinkedList<>();
}
public void drawAll()
{
for (EntityPotatoProjectile e : projectiles)
{
e.draw();
}
}
public void updateAll(float delta)
{
try
{
for (EntityPotatoProjectile e : projectiles)
{
e.update(delta);
}
}
catch (ConcurrentModificationException e)
{
// We do nothing because nothing can be done ¯\_(ツ)_/¯
}
}
public void addProjectile(EntityPotatoProjectile e)
{
projectiles.add(e);
}
public void removeProjectile(EntityPotatoProjectile e)
{
projectiles.remove(e);
}
public LinkedList<EntityPotatoProjectile> getProjectiles()
{
return this.projectiles;
}
}