Added a bunch more turrets
This commit is contained in:
@@ -6,203 +6,217 @@ filter: Nearest,Nearest
|
|||||||
repeat: none
|
repeat: none
|
||||||
block
|
block
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 57, 23
|
xy: 105, 23
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
bullet
|
bullet
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 67, 23
|
xy: 115, 23
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
coal1
|
circle
|
||||||
rotate: false
|
|
||||||
xy: 77, 23
|
|
||||||
size: 8, 8
|
|
||||||
orig: 8, 8
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
coal2
|
|
||||||
rotate: false
|
|
||||||
xy: 87, 23
|
|
||||||
size: 8, 8
|
|
||||||
orig: 8, 8
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
coal3
|
|
||||||
rotate: false
|
|
||||||
xy: 97, 23
|
|
||||||
size: 8, 8
|
|
||||||
orig: 8, 8
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
coaldrill
|
|
||||||
rotate: false
|
|
||||||
xy: 107, 23
|
|
||||||
size: 8, 8
|
|
||||||
orig: 8, 8
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
conveyor
|
|
||||||
rotate: false
|
|
||||||
xy: 117, 23
|
|
||||||
size: 8, 8
|
|
||||||
orig: 8, 8
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
conveyormove
|
|
||||||
rotate: false
|
|
||||||
xy: 127, 23
|
|
||||||
size: 8, 8
|
|
||||||
orig: 8, 8
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
core
|
|
||||||
rotate: false
|
|
||||||
xy: 137, 23
|
|
||||||
size: 8, 8
|
|
||||||
orig: 8, 8
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
dirt1
|
|
||||||
rotate: false
|
|
||||||
xy: 147, 23
|
|
||||||
size: 8, 8
|
|
||||||
orig: 8, 8
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
dirt2
|
|
||||||
rotate: false
|
|
||||||
xy: 157, 23
|
|
||||||
size: 8, 8
|
|
||||||
orig: 8, 8
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
dirt3
|
|
||||||
rotate: false
|
|
||||||
xy: 167, 23
|
|
||||||
size: 8, 8
|
|
||||||
orig: 8, 8
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
dirtblock
|
|
||||||
rotate: false
|
|
||||||
xy: 177, 23
|
|
||||||
size: 8, 8
|
|
||||||
orig: 8, 8
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
doubleturret
|
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 1, 1
|
xy: 1, 1
|
||||||
size: 10, 10
|
size: 10, 10
|
||||||
orig: 10, 10
|
orig: 10, 10
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
drill
|
coal1
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 187, 23
|
xy: 125, 23
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
furnace
|
coal2
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 197, 23
|
xy: 135, 23
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
smelter
|
coal3
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 197, 23
|
xy: 145, 23
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
grass
|
coaldrill
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 207, 23
|
xy: 155, 23
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
healturret
|
conveyor
|
||||||
|
rotate: false
|
||||||
|
xy: 165, 23
|
||||||
|
size: 8, 8
|
||||||
|
orig: 8, 8
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
conveyormove
|
||||||
|
rotate: false
|
||||||
|
xy: 175, 23
|
||||||
|
size: 8, 8
|
||||||
|
orig: 8, 8
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
core
|
||||||
|
rotate: false
|
||||||
|
xy: 185, 23
|
||||||
|
size: 8, 8
|
||||||
|
orig: 8, 8
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
dirt1
|
||||||
|
rotate: false
|
||||||
|
xy: 195, 23
|
||||||
|
size: 8, 8
|
||||||
|
orig: 8, 8
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
dirt2
|
||||||
|
rotate: false
|
||||||
|
xy: 205, 23
|
||||||
|
size: 8, 8
|
||||||
|
orig: 8, 8
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
dirt3
|
||||||
|
rotate: false
|
||||||
|
xy: 215, 23
|
||||||
|
size: 8, 8
|
||||||
|
orig: 8, 8
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
dirtblock
|
||||||
|
rotate: false
|
||||||
|
xy: 225, 23
|
||||||
|
size: 8, 8
|
||||||
|
orig: 8, 8
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
doubleturret
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 13, 1
|
xy: 13, 1
|
||||||
size: 10, 10
|
size: 10, 10
|
||||||
orig: 10, 10
|
orig: 10, 10
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
icon-coal
|
drill
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 217, 23
|
xy: 235, 23
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
icon-iron
|
flameturret
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 227, 23
|
xy: 21, 21
|
||||||
|
size: 10, 10
|
||||||
|
orig: 10, 10
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
furnace
|
||||||
|
rotate: false
|
||||||
|
xy: 245, 23
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
icon-steel
|
smelter
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 237, 23
|
xy: 245, 23
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
icon-stone
|
grass
|
||||||
rotate: false
|
|
||||||
xy: 247, 23
|
|
||||||
size: 8, 8
|
|
||||||
orig: 8, 8
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
iron1
|
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 25, 11
|
xy: 25, 11
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
iron2
|
healturret
|
||||||
|
rotate: false
|
||||||
|
xy: 33, 21
|
||||||
|
size: 10, 10
|
||||||
|
orig: 10, 10
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
icon-coal
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 25, 1
|
xy: 25, 1
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
iron3
|
icon-iron
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 35, 11
|
xy: 35, 11
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
irondrill
|
icon-steel
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 35, 1
|
xy: 35, 1
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
ironwall
|
icon-stone
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 45, 11
|
xy: 45, 11
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
|
iron1
|
||||||
|
rotate: false
|
||||||
|
xy: 45, 1
|
||||||
|
size: 8, 8
|
||||||
|
orig: 8, 8
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
iron2
|
||||||
|
rotate: false
|
||||||
|
xy: 55, 11
|
||||||
|
size: 8, 8
|
||||||
|
orig: 8, 8
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
iron3
|
||||||
|
rotate: false
|
||||||
|
xy: 55, 1
|
||||||
|
size: 8, 8
|
||||||
|
orig: 8, 8
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
irondrill
|
||||||
|
rotate: false
|
||||||
|
xy: 65, 11
|
||||||
|
size: 8, 8
|
||||||
|
orig: 8, 8
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
ironwall
|
||||||
|
rotate: false
|
||||||
|
xy: 65, 1
|
||||||
|
size: 8, 8
|
||||||
|
orig: 8, 8
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
laser
|
laser
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 55, 7
|
xy: 135, 9
|
||||||
size: 1, 12
|
size: 1, 12
|
||||||
orig: 1, 12
|
orig: 1, 12
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
@@ -216,112 +230,126 @@ laserend
|
|||||||
index: -1
|
index: -1
|
||||||
machineturret
|
machineturret
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 21, 21
|
xy: 45, 21
|
||||||
size: 10, 10
|
size: 10, 10
|
||||||
orig: 10, 10
|
orig: 10, 10
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
mech1
|
mech1
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 45, 1
|
xy: 75, 11
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
player
|
player
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 58, 13
|
xy: 75, 1
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
router
|
router
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 68, 13
|
xy: 85, 11
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
shadow
|
shadow
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 33, 21
|
xy: 57, 21
|
||||||
|
size: 10, 10
|
||||||
|
orig: 10, 10
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
shotgunturret
|
||||||
|
rotate: false
|
||||||
|
xy: 69, 21
|
||||||
|
size: 10, 10
|
||||||
|
orig: 10, 10
|
||||||
|
offset: 0, 0
|
||||||
|
index: -1
|
||||||
|
sniperturret
|
||||||
|
rotate: false
|
||||||
|
xy: 81, 21
|
||||||
size: 10, 10
|
size: 10, 10
|
||||||
orig: 10, 10
|
orig: 10, 10
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
steelconveyor
|
steelconveyor
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 78, 13
|
xy: 85, 1
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
steelconveyormove
|
steelconveyormove
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 88, 13
|
xy: 95, 11
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
stone
|
stone
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 98, 13
|
xy: 95, 1
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
stone1
|
stone1
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 108, 13
|
xy: 105, 13
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
stone2
|
stone2
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 118, 13
|
xy: 105, 3
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
stone3
|
stone3
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 128, 13
|
xy: 115, 13
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
stoneblock
|
stoneblock
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 138, 13
|
xy: 115, 3
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
stonedrill
|
stonedrill
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 148, 13
|
xy: 125, 13
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
stonedrillhead
|
stonedrillhead
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 148, 13
|
xy: 125, 13
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
stonewall
|
stonewall
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 158, 13
|
xy: 125, 3
|
||||||
size: 8, 8
|
size: 8, 8
|
||||||
orig: 8, 8
|
orig: 8, 8
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
turret
|
turret
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 45, 21
|
xy: 93, 21
|
||||||
size: 10, 10
|
size: 10, 10
|
||||||
orig: 10, 10
|
orig: 10, 10
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.8 KiB |
@@ -4,7 +4,6 @@ import com.badlogic.gdx.Input.Keys;
|
|||||||
import com.badlogic.gdx.utils.Array;
|
import com.badlogic.gdx.utils.Array;
|
||||||
import com.badlogic.gdx.utils.ObjectMap;
|
import com.badlogic.gdx.utils.ObjectMap;
|
||||||
|
|
||||||
import io.anuke.aabb.Collider;
|
|
||||||
import io.anuke.moment.entities.Enemy;
|
import io.anuke.moment.entities.Enemy;
|
||||||
import io.anuke.moment.entities.Player;
|
import io.anuke.moment.entities.Player;
|
||||||
import io.anuke.moment.resource.Item;
|
import io.anuke.moment.resource.Item;
|
||||||
@@ -67,8 +66,7 @@ public class Moment extends ModuleController<Moment>{
|
|||||||
|
|
||||||
items.put(Item.stone, 200);
|
items.put(Item.stone, 200);
|
||||||
items.put(Item.iron, 200);
|
items.put(Item.iron, 200);
|
||||||
|
items.put(Item.steel, 200);
|
||||||
Collider.defaultDrag = 0.2f;
|
|
||||||
|
|
||||||
player = new Player().add();
|
player = new Player().add();
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,13 @@ public enum BulletType{
|
|||||||
Draw.clear();
|
Draw.clear();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
sniper(3f, 17){
|
||||||
|
public void draw(Bullet b){
|
||||||
|
Draw.color("light gray");
|
||||||
|
Draw.rect("bullet", b.x, b.y, b.angle());
|
||||||
|
Draw.clear();
|
||||||
|
}
|
||||||
|
},
|
||||||
small(1.5f, 1){
|
small(1.5f, 1){
|
||||||
public void draw(Bullet b){
|
public void draw(Bullet b){
|
||||||
Draw.color("orange");
|
Draw.color("orange");
|
||||||
@@ -27,6 +34,14 @@ public enum BulletType{
|
|||||||
Draw.clear();
|
Draw.clear();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
flame(0.6f, 4){
|
||||||
|
public void draw(Bullet b){
|
||||||
|
Draw.color(Color.YELLOW, Color.SCARLET, b.time/lifetime);
|
||||||
|
float size = 6f-b.time/lifetime*5f;
|
||||||
|
Draw.rect("circle", b.x, b.y, size, size);
|
||||||
|
Draw.clear();
|
||||||
|
}
|
||||||
|
},
|
||||||
shot(2.4f, 2){
|
shot(2.4f, 2){
|
||||||
{lifetime=40;}
|
{lifetime=40;}
|
||||||
public void draw(Bullet b){
|
public void draw(Bullet b){
|
||||||
|
|||||||
@@ -9,12 +9,16 @@ public enum Recipe{
|
|||||||
irondrill(TileType.irondrill, stack(Item.stone, 30)),
|
irondrill(TileType.irondrill, stack(Item.stone, 30)),
|
||||||
coaldrill(TileType.coaldrill, stack(Item.stone, 30), stack(Item.iron, 30)),
|
coaldrill(TileType.coaldrill, stack(Item.stone, 30), stack(Item.iron, 30)),
|
||||||
conveyor(TileType.conveyor, stack(Item.stone, 1)),
|
conveyor(TileType.conveyor, stack(Item.stone, 1)),
|
||||||
|
fastconveyor(TileType.steelconveyor, stack(Item.steel, 1)),
|
||||||
router(TileType.router, stack(Item.stone, 3)),
|
router(TileType.router, stack(Item.stone, 3)),
|
||||||
smelter(TileType.smelter, stack(Item.stone, 40), stack(Item.iron, 40)),
|
smelter(TileType.smelter, stack(Item.stone, 40), stack(Item.iron, 40)),
|
||||||
healturret(TileType.healturret, stack(Item.iron, 20)),
|
healturret(TileType.healturret, stack(Item.iron, 20)),
|
||||||
turret(TileType.turret, stack(Item.stone, 4)),
|
turret(TileType.turret, stack(Item.stone, 4)),
|
||||||
dturret(TileType.doubleturret, stack(Item.stone, 6)),
|
dturret(TileType.doubleturret, stack(Item.stone, 6)),
|
||||||
machineturret(TileType.machineturret, stack(Item.iron, 8), stack(Item.stone, 6));
|
machineturret(TileType.machineturret, stack(Item.iron, 10), stack(Item.stone, 6)),
|
||||||
|
shotgunturret(TileType.shotgunturret, stack(Item.iron, 10), stack(Item.steel, 8)),
|
||||||
|
flameturret(TileType.flameturret, stack(Item.iron, 12), stack(Item.steel, 12)),
|
||||||
|
sniperturret(TileType.sniperturret, stack(Item.iron, 15), stack(Item.steel, 20));
|
||||||
|
|
||||||
public TileType result;
|
public TileType result;
|
||||||
public ItemStack[] requirements;
|
public ItemStack[] requirements;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class Generator{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(color == white){
|
if(color == white){
|
||||||
block = TileType.dirtblock;
|
block = TileType.stoneblock;
|
||||||
|
|
||||||
|
|
||||||
}else if(color == blue){
|
}else if(color == blue){
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ public enum TileType{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String description(){
|
public String description(){
|
||||||
return "Moves Items (faster than a normal conveyor!)";
|
return "Moves Items\nFaster than a normal conveyor";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -273,7 +273,7 @@ public enum TileType{
|
|||||||
doubleturret(true, true, false){
|
doubleturret(true, true, false){
|
||||||
{
|
{
|
||||||
range = 40;
|
range = 40;
|
||||||
reload = 10f;
|
reload = 13f;
|
||||||
bullet = BulletType.stone;
|
bullet = BulletType.stone;
|
||||||
ammo = Item.stone;
|
ammo = Item.stone;
|
||||||
health = 50;
|
health = 50;
|
||||||
@@ -294,11 +294,19 @@ public enum TileType{
|
|||||||
public String description(){
|
public String description(){
|
||||||
return "Shoots things.";
|
return "Shoots things.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void shoot(Tile tile){
|
||||||
|
vector.set(4, -2).rotate(tile.entity.rotation);
|
||||||
|
bullet(tile, tile.entity.rotation);
|
||||||
|
vector.set(4, 2).rotate(tile.entity.rotation);
|
||||||
|
bullet(tile, tile.entity.rotation);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
machineturret(true, true, false){
|
machineturret(true, true, false){
|
||||||
{
|
{
|
||||||
range = 65;
|
range = 65;
|
||||||
reload = 5f;
|
reload = 7f;
|
||||||
bullet = BulletType.iron;
|
bullet = BulletType.iron;
|
||||||
ammo = Item.iron;
|
ammo = Item.iron;
|
||||||
health = 65;
|
health = 65;
|
||||||
@@ -320,6 +328,91 @@ public enum TileType{
|
|||||||
return "Shoots things.";
|
return "Shoots things.";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
flameturret(true, true, false){
|
||||||
|
{
|
||||||
|
range = 30f;
|
||||||
|
reload = 6f;
|
||||||
|
bullet = BulletType.flame;
|
||||||
|
ammo = Item.coal;
|
||||||
|
health = 75;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update(Tile tile){
|
||||||
|
updateTurret(tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void draw(Tile tile){
|
||||||
|
Draw.rect("block", tile.worldx(), tile.worldy());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawOver(Tile tile){
|
||||||
|
Draw.rect(name(), tile.worldx(), tile.worldy(), tile.entity.rotation - 90);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String description(){
|
||||||
|
return "Burns things.";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sniperturret(true, true, false){
|
||||||
|
{
|
||||||
|
range = 100;
|
||||||
|
reload = 60f;
|
||||||
|
bullet = BulletType.sniper;
|
||||||
|
ammo = Item.steel;
|
||||||
|
health = 60;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update(Tile tile){
|
||||||
|
updateTurret(tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void draw(Tile tile){
|
||||||
|
Draw.rect("block", tile.worldx(), tile.worldy());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawOver(Tile tile){
|
||||||
|
Draw.rect(name(), tile.worldx(), tile.worldy(), tile.entity.rotation - 90);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String description(){
|
||||||
|
return "Shoots things.";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
shotgunturret(true, true, false){
|
||||||
|
{
|
||||||
|
range = 65;
|
||||||
|
reload = 40f;
|
||||||
|
bullet = BulletType.iron;
|
||||||
|
ammo = Item.iron;
|
||||||
|
health = 70;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update(Tile tile){
|
||||||
|
updateTurret(tile);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void draw(Tile tile){
|
||||||
|
Draw.rect("block", tile.worldx(), tile.worldy());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawOver(Tile tile){
|
||||||
|
Draw.rect(name(), tile.worldx(), tile.worldy(), tile.entity.rotation - 90);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String description(){
|
||||||
|
return "Shoots things.";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void shoot(Tile tile){
|
||||||
|
vector.set(0, 4).setAngle(tile.entity.rotation);
|
||||||
|
for(int i = 0; i < 6; i ++)
|
||||||
|
Timers.run(i, ()->{
|
||||||
|
bullet(tile, tile.entity.rotation + Mathf.range(6));
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
healturret(true, true, false){
|
healturret(true, true, false){
|
||||||
{
|
{
|
||||||
range = 30;
|
range = 30;
|
||||||
@@ -416,23 +509,33 @@ public enum TileType{
|
|||||||
tile.entity.removeItem(ammo, 1);
|
tile.entity.removeItem(ammo, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tile.entity.shots > 0){
|
//TODO readd
|
||||||
|
//if(tile.entity.shots > 0){
|
||||||
Enemy enemy = findTarget(tile, range);
|
Enemy enemy = findTarget(tile, range);
|
||||||
if(enemy != null){
|
if(enemy != null){
|
||||||
tile.entity.rotation = MathUtils.lerpAngleDeg(tile.entity.rotation, Angles.predictAngle(tile.worldx(), tile.worldy(), enemy.x, enemy.y, enemy.xvelocity, enemy.yvelocity, bullet.speed - 0.1f), 0.2f);
|
tile.entity.rotation = MathUtils.lerpAngleDeg(tile.entity.rotation, Angles.predictAngle(tile.worldx(), tile.worldy(), enemy.x, enemy.y, enemy.xvelocity, enemy.yvelocity, bullet.speed - 0.1f), 0.2f);
|
||||||
if(Timers.get(tile, reload)){
|
if(Timers.get(tile, reload)){
|
||||||
new Bullet(bullet, tile.entity, tile.worldx(), tile.worldy(), tile.entity.rotation).add();
|
shoot(tile);
|
||||||
tile.entity.shots--;
|
tile.entity.shots--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
void shoot(Tile tile){
|
||||||
|
vector.set(0, 4).setAngle(tile.entity.rotation);
|
||||||
|
new Bullet(bullet, tile.entity, tile.worldx()+vector.x, tile.worldy()+vector.y, tile.entity.rotation).add();
|
||||||
|
}
|
||||||
|
|
||||||
|
void bullet(Tile tile, float angle){
|
||||||
|
new Bullet(bullet, tile.entity, tile.worldx()+vector.x, tile.worldy()+vector.y, angle).add();
|
||||||
}
|
}
|
||||||
|
|
||||||
Enemy findTarget(Tile tile, float range){
|
Enemy findTarget(Tile tile, float range){
|
||||||
Entity closest = null;
|
Entity closest = null;
|
||||||
float dst = 0;
|
float dst = 0;
|
||||||
|
|
||||||
Array<SolidEntity> array = Entities.getNearby(tile.worldx(), tile.worldy(), 100);
|
Array<SolidEntity> array = Entities.getNearby(tile.worldx(), tile.worldy(), range*2);
|
||||||
|
|
||||||
for(Entity e : array){
|
for(Entity e : array){
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ public class DesktopLauncher {
|
|||||||
config.setTitle("Moment");
|
config.setTitle("Moment");
|
||||||
config.setMaximized(true);
|
config.setMaximized(true);
|
||||||
config.useVsync(false);
|
config.useVsync(false);
|
||||||
|
config.setWindowedMode(800, 600);
|
||||||
new Lwjgl3Application(new Moment(), config);
|
new Lwjgl3Application(new Moment(), config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user