Implemented new enemy spawning, sorter, teleporter and others

This commit is contained in:
Anuken
2017-11-06 23:05:22 -05:00
parent c36d985054
commit 7e3e34ffe1
26 changed files with 486 additions and 152 deletions
@@ -162,8 +162,16 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
Draw.reset();
}
},
smallSlow = new BulletType(1.2f, 1){
public void draw(Bullet b){
Draw.color("orange");
Draw.rect("bullet", b.x, b.y, b.angle());
Draw.reset();
}
},
purple = new BulletType(1.6f, 2){
Color color = new Color(0x8b5ec9ff);
public void draw(Bullet b){
Draw.color(color);
Draw.rect("bullet", b.x, b.y, b.angle());
@@ -12,14 +12,14 @@ import io.anuke.ucore.graphics.Hue;
import io.anuke.ucore.util.Angles;
public class HealerEnemy extends Enemy{
int healTime = 10;
int healTime = 14;
public HealerEnemy(int spawn) {
super(spawn);
speed = 0.2f;
reload = 30;
maxhealth = 210;
maxhealth = 130;
range = 90f;
bullet = BulletType.shot;
range = 30f;
@@ -10,7 +10,7 @@ public class TankEnemy extends Enemy{
public TankEnemy(int spawn) {
super(spawn);
maxhealth = 400;
maxhealth = 350;
speed = 0.2f;
reload = 90f;
bullet = BulletType.small;
@@ -12,7 +12,7 @@ public class TitanEnemy extends Enemy{
speed = 0.1f;
reload = 30;
maxhealth = 210;
maxhealth = 330;
range = 80f;
bullet = BulletType.small;
hitbox.setSize(7f);
@@ -26,23 +26,23 @@ public class TitanEnemy extends Enemy{
@Override
void updateShooting(){
Timers.get(this, "salvo", 200);
Timers.get(this, "salvo", 250);
if(Timers.getTime(this, "salvo") < 60){
if(Timers.get(this, "salvoShoot", 5)){
if(Timers.get(this, "salvoShoot", 6)){
shoot(BulletType.flame, Mathf.range(20f));
}
}
if(Timers.get(this, "shotgun", 80)){
if(Timers.get(this, "shotgun", 90)){
Angles.shotgun(5, 10f, 0f, f->{
shoot(BulletType.small, f);
shoot(BulletType.smallSlow, f);
});
}
if(Timers.get(this, "circle", 200)){
Angles.circle(8, f->{
shoot(BulletType.small, f);
shoot(BulletType.smallSlow, f);
});
}
}