Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from fsxfreak/master
Finally finished converting to the Vector2f system
- Loading branch information
Showing
17 changed files
with
486 additions
and
406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.gdc.gdcalaga; | ||
|
||
import org.newdawn.slick.Image; | ||
import org.newdawn.slick.geom.Vector2f; | ||
|
||
/* | ||
* DroppableUpgrade class. DroppableUpgrades are dropped randomly when enemies | ||
* die, and the player must pickup the upgrade to receive the upgrade. | ||
* Change this class to just an Upgrade class, that only collides with the player | ||
* to activate an upgrade() function | ||
*/ | ||
|
||
|
||
public abstract class DroppableUpgrade extends Entity | ||
{ | ||
private static final float SPEED = 50.f; | ||
private static final float SIZE = 25.f; | ||
|
||
protected Vector2f pos, vel, size; | ||
protected Shape shape; | ||
protected Image image; | ||
|
||
protected Path path; | ||
protected PathNode node; | ||
|
||
public DroppableUpgrade(EntityManager manager, Vector2f initPos) | ||
{ | ||
super(manager); | ||
|
||
pos = initPos; | ||
vel.set(-SPEED, 0); | ||
size.set(SIZE, SIZE); | ||
|
||
shape = new RectShape(pos, size); | ||
} | ||
} |
Oops, something went wrong.