summaryrefslogtreecommitdiff
path: root/core/src/sk/neuromancer/sphaera/rewrite/LiveSphere.java
diff options
context:
space:
mode:
authorJ08nY2017-11-07 18:11:44 +0100
committerJ08nY2017-11-07 18:11:44 +0100
commitf07dcb0044e65ebff9143556adc3abe985394a14 (patch)
treec7be0a3e202c880748ca72bb1a1e1d7dd4077912 /core/src/sk/neuromancer/sphaera/rewrite/LiveSphere.java
downloadld34-master.tar.gz
ld34-master.tar.zst
ld34-master.zip
Diffstat (limited to 'core/src/sk/neuromancer/sphaera/rewrite/LiveSphere.java')
-rwxr-xr-xcore/src/sk/neuromancer/sphaera/rewrite/LiveSphere.java65
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;
+ }
+}