-
Notifications
You must be signed in to change notification settings - Fork 25
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 #4 from DaanVanYperen/develop
Upgrade to Artemis 0.9 and GDX 1.5.3
- Loading branch information
Showing
5 changed files
with
57 additions
and
19 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
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
29 changes: 29 additions & 0 deletions
29
core/src/net/mostlyoriginal/game/manager/factory/DefaultEntity.java
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,29 @@ | ||
package net.mostlyoriginal.game.manager.factory; | ||
|
||
import com.artemis.EntityFactory; | ||
import com.artemis.annotations.Bind; | ||
import net.mostlyoriginal.api.component.basic.Angle; | ||
import net.mostlyoriginal.api.component.basic.Bounds; | ||
import net.mostlyoriginal.api.component.basic.Pos; | ||
import net.mostlyoriginal.api.component.graphics.Anim; | ||
import net.mostlyoriginal.api.component.map.MapSolid; | ||
import net.mostlyoriginal.api.component.physics.Gravity; | ||
import net.mostlyoriginal.api.component.physics.Physics; | ||
|
||
/** | ||
* Example entity factory | ||
* | ||
* To test Artemis-ODB's Annotation Processor. | ||
* | ||
* @author Daan van Yperen | ||
*/ | ||
@Bind({Pos.class, Angle.class, Bounds.class, Anim.class, MapSolid.class, Physics.class, Gravity.class}) | ||
public interface DefaultEntity extends EntityFactory<DefaultEntity> { | ||
|
||
// By convention, method name is mapped to class with same name. | ||
DefaultEntity pos(float x, float y); | ||
|
||
DefaultEntity bounds(int minx, int miny, int maxx, int maxy); | ||
|
||
DefaultEntity anim(String id); | ||
} |