diff options
| author | J08nY | 2017-11-07 18:11:44 +0100 |
|---|---|---|
| committer | J08nY | 2017-11-07 18:11:44 +0100 |
| commit | f07dcb0044e65ebff9143556adc3abe985394a14 (patch) | |
| tree | c7be0a3e202c880748ca72bb1a1e1d7dd4077912 /core/src/sk/neuromancer/sphaera/rewrite/LiveSphere.java | |
| download | ld34-master.tar.gz ld34-master.tar.zst ld34-master.zip | |
Diffstat (limited to 'core/src/sk/neuromancer/sphaera/rewrite/LiveSphere.java')
| -rwxr-xr-x | core/src/sk/neuromancer/sphaera/rewrite/LiveSphere.java | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/core/src/sk/neuromancer/sphaera/rewrite/LiveSphere.java b/core/src/sk/neuromancer/sphaera/rewrite/LiveSphere.java new file mode 100755 index 0000000..8f9235b --- /dev/null +++ b/core/src/sk/neuromancer/sphaera/rewrite/LiveSphere.java @@ -0,0 +1,65 @@ +package sk.neuromancer.sphaera.rewrite; + +import com.badlogic.gdx.graphics.g3d.Material; +import com.badlogic.gdx.math.Vector3; + +import sk.neuromancer.sphaera.interf.Tickable; + +public class LiveSphere extends DirectedSphere implements Tickable{ + + private SphereType type; + + public LiveSphere() { + super(); + } + + public LiveSphere(float radius) { + super(radius); + } + + public LiveSphere(float radius, SphereType type) { + super(radius, type.equals(SphereType.BIGGER) ? Sphere.BIGGER_MAT : Sphere.SMALLER_MAT); + this.type = type; + } + + public LiveSphere(float radius, Material... mat) { + super(radius, mat); + } + + public LiveSphere(float x, float y, float z, float radius, SphereType type) { + super(x, y, z, radius, type.equals(SphereType.BIGGER) ? Sphere.BIGGER_MAT : Sphere.SMALLER_MAT); + this.type = type; + } + + public LiveSphere(float x, float y, float z, float radius, Material... mat) { + super(x, y, z, radius, mat); + } + + + public LiveSphere(Sphere parent, float a, float b, float radius, + Vector3 direction, Material... mat) { + super(parent, a, b, radius, direction, mat); + } + + public LiveSphere(Sphere parent, float a, float b, float radius, + Material... mat) { + super(parent, a, b, radius, mat); + } + + @Override + public void tick(long tickCount) { + this.forward(0.5f); + } + + public SphereType getType(){ + return this.type; + } + + public void setType(SphereType type){ + this.type = type; + } + + public enum SphereType{ + SMALLER, BIGGER; + } +} |
