summaryrefslogtreecommitdiff
path: root/core/src/sk/neuromancer/sphaera/rewrite/LiveSphere.java
blob: 8f9235bae20d187817b84f7ca4832162495af6c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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;
    }
}