-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed entity pointers, added an entity pointer test component
- Loading branch information
Flafla2
committed
Nov 27, 2013
1 parent
dfa4734
commit ad03634
Showing
6 changed files
with
77 additions
and
4 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
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
44 changes: 44 additions & 0 deletions
44
Remote2D/src/com/remote/remote2d/extras/test/entity/ComponentEntityPointerTest.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,44 @@ | ||
package com.remote.remote2d.extras.test.entity; | ||
|
||
import com.remote.remote2d.engine.art.Fonts; | ||
import com.remote.remote2d.engine.entity.Entity; | ||
import com.remote.remote2d.engine.entity.component.Component; | ||
import com.remote.remote2d.engine.logic.Vector2; | ||
|
||
public class ComponentEntityPointerTest extends Component { | ||
|
||
public Entity testEntity; | ||
|
||
@Override | ||
public void tick(int i, int j, int k) { | ||
|
||
} | ||
|
||
@Override | ||
public void renderBefore(boolean editor, float interpolation) { | ||
|
||
} | ||
|
||
@Override | ||
public void onEntitySpawn() { | ||
|
||
} | ||
|
||
@Override | ||
public void renderAfter(boolean editor, float interpolation) { | ||
Vector2 pos = entity.getPosGlobal(interpolation); | ||
if(entity != null) | ||
Fonts.get("Arial").drawString(testEntity.name, pos.x, pos.y, 20, 0x000000); | ||
} | ||
|
||
@Override | ||
public void init() { | ||
|
||
} | ||
|
||
@Override | ||
public void apply() { | ||
|
||
} | ||
|
||
} |