-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
LoadMarker.cs
50 lines (40 loc) · 1.21 KB
/
LoadMarker.cs
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
using System;
public class LoadMarker : Marker {
public Foreman foreman;
public LoadMarker () {
this.origin = new TerraVector3 ();
this.basis = TerraBasis.InitEmpty();
}
public LoadMarker (TerraVector3 origin, TerraBasis basis) {
this.origin = origin;
this.basis = basis;
}
public LoadMarker (TerraVector3 origin) {
this.origin = origin;
this.basis = TerraBasis.InitEmpty();
}
public LoadMarker (int x, int y, int z) {
this.origin = new TerraVector3 (x, y, z);
this.basis = TerraBasis.InitEmpty();
}
public void Attach (Foreman foreman) {
this.foreman = foreman;
}
public override void ChangePosition (TerraVector3 origin, TerraBasis basis) {
this.origin = origin;
this.basis = basis;
foreman.Release ();
}
public override void Move (TerraVector3 origin) {
this.origin = this.origin + origin;
foreman.Release ();
}
public void MoveTo (TerraVector3 origin) {
this.origin = origin;
foreman.Release ();
}
public override void Rotate (TerraBasis basis) {
this.basis = this.basis * basis;
foreman.Release ();
}
}