Added new map
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -14,6 +14,7 @@ public class BlastEnemy extends Enemy{
|
||||
bullet = null;
|
||||
turretrotatespeed = 0f;
|
||||
mass = 0.8f;
|
||||
stopNearCore = false;
|
||||
|
||||
heal();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user