Added new map

This commit is contained in:
Anuken
2017-11-29 23:20:15 -05:00
parent 6fb5cb839e
commit ff993a353d
9 changed files with 34 additions and 21 deletions

View File

@@ -14,7 +14,8 @@ public class DamageArea{
public static void damageEntities(float x, float y, float radius, int damage){
damage(true, x, y, radius, damage);
if(!Vars.android){
if(!Vars.android && Vars.player.distanceTo(x, y) < radius){
Player player = Vars.player;
int amount = calculateDamage(x, y, player.x, player.y, radius, damage);
player.damage(amount);
@@ -46,7 +47,7 @@ public class DamageArea{
}
}
if(!Vars.android){
if(!Vars.android && Vars.player.distanceTo(x, y) < radius){
Player player = Vars.player;
int amount = calculateDamage(x, y, player.x, player.y, radius, damage);
player.damage(amount);

View File

@@ -14,6 +14,7 @@ public class BlastEnemy extends Enemy{
bullet = null;
turretrotatespeed = 0f;
mass = 0.8f;
stopNearCore = false;
heal();
}

View File

@@ -36,6 +36,7 @@ public class Enemy extends DestructibleEntity{
protected int spawned = 0;
protected float angle;
protected boolean targetCore = false;
protected boolean stopNearCore = true;
protected float mass = 1f;
public int spawn;
@@ -63,7 +64,7 @@ public class Enemy extends DestructibleEntity{
void move(){
Tile core = Vars.control.getCore();
boolean nearCore = distanceTo(core.worldx(), core.worldy()) <= range - 18f;
boolean nearCore = distanceTo(core.worldx(), core.worldy()) <= range - 18f && stopNearCore;
Vector2 vec;