This commit is contained in:
Epowerj 2018-01-03 14:50:53 -05:00
commit cbebb31211
15 changed files with 54 additions and 58 deletions

View File

@ -102,7 +102,7 @@ public class EnemyType {
}
if(enemy.target == null || alwaysRotate){
enemy.angle = Mathf.slerp(enemy.angle, 180f + enemy.velocity.angle(), rotatespeed * Timers.delta());
enemy.angle = Mathf.slerp(enemy.angle, enemy.velocity.angle(), rotatespeed * Timers.delta());
}else{
enemy.angle = Mathf.slerp(enemy.angle, enemy.angleTo(enemy.target), turretrotatespeed * Timers.delta());
}

View File

@ -1,32 +1,32 @@
package io.anuke.mindustry.entities.enemies;
import io.anuke.mindustry.entities.enemies.types.BlastEnemy;
import io.anuke.mindustry.entities.enemies.types.EmpEnemy;
import io.anuke.mindustry.entities.enemies.types.FastEnemy;
import io.anuke.mindustry.entities.enemies.types.FlamerEnemy;
import io.anuke.mindustry.entities.enemies.types.FortressEnemy;
import io.anuke.mindustry.entities.enemies.types.HealerEnemy;
import io.anuke.mindustry.entities.enemies.types.MortarEnemy;
import io.anuke.mindustry.entities.enemies.types.RapidEnemy;
import io.anuke.mindustry.entities.enemies.types.BlastType;
import io.anuke.mindustry.entities.enemies.types.EmpType;
import io.anuke.mindustry.entities.enemies.types.FastType;
import io.anuke.mindustry.entities.enemies.types.FlamerType;
import io.anuke.mindustry.entities.enemies.types.FortressType;
import io.anuke.mindustry.entities.enemies.types.HealerType;
import io.anuke.mindustry.entities.enemies.types.MortarType;
import io.anuke.mindustry.entities.enemies.types.RapidType;
import io.anuke.mindustry.entities.enemies.types.*;
import io.anuke.mindustry.entities.enemies.types.TankEnemy;
import io.anuke.mindustry.entities.enemies.types.TargetEnemy;
import io.anuke.mindustry.entities.enemies.types.TitanEnemy;
import io.anuke.mindustry.entities.enemies.types.TankType;
import io.anuke.mindustry.entities.enemies.types.TargetType;
import io.anuke.mindustry.entities.enemies.types.TitanType;
public class EnemyTypes {
public static final EnemyType
standard = new StandardEnemy(),
fast = new FastEnemy(),
rapid = new RapidEnemy(),
flamer = new FlamerEnemy(),
tank = new TankEnemy(),
blast = new BlastEnemy(),
mortar = new MortarEnemy(),
healer = new HealerEnemy(),
titan = new TitanEnemy(),
emp = new EmpEnemy(),
fortress = new FortressEnemy(),
target = new TargetEnemy();
standard = new StandardType(),
fast = new FastType(),
rapid = new RapidType(),
flamer = new FlamerType(),
tank = new TankType(),
blast = new BlastType(),
mortar = new MortarType(),
healer = new HealerType(),
titan = new TitanType(),
emp = new EmpType(),
fortress = new FortressType(),
target = new TargetType();
}

View File

@ -10,9 +10,9 @@ import io.anuke.mindustry.entities.enemies.Enemy;
import io.anuke.mindustry.entities.enemies.EnemyType;
import io.anuke.ucore.util.Tmp;
public class BlastEnemy extends EnemyType {
public class BlastType extends EnemyType {
public BlastEnemy() {
public BlastType() {
super("blastenemy");
health = 30;
speed = 0.7f;

View File

@ -3,9 +3,9 @@ package io.anuke.mindustry.entities.enemies.types;
import io.anuke.mindustry.entities.BulletType;
import io.anuke.mindustry.entities.enemies.EnemyType;
public class EmpEnemy extends EnemyType {
public class EmpType extends EnemyType {
public EmpEnemy() {
public EmpType() {
super("empenemy");
speed = 0.3f;

View File

@ -2,9 +2,9 @@ package io.anuke.mindustry.entities.enemies.types;
import io.anuke.mindustry.entities.enemies.EnemyType;
public class FastEnemy extends EnemyType {
public class FastType extends EnemyType {
public FastEnemy() {
public FastType() {
super("fastenemy");
speed = 0.73f;

View File

@ -3,9 +3,9 @@ package io.anuke.mindustry.entities.enemies.types;
import io.anuke.mindustry.entities.BulletType;
import io.anuke.mindustry.entities.enemies.EnemyType;
public class FlamerEnemy extends EnemyType {
public class FlamerType extends EnemyType {
public FlamerEnemy() {
public FlamerType() {
super("flamerenemy");
speed = 0.35f;

View File

@ -10,11 +10,11 @@ import io.anuke.ucore.core.Effects;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.util.Angles;
public class FortressEnemy extends EnemyType {
public class FortressType extends EnemyType {
final int maxSpawn = 6;
final float spawnTime = 190;
public FortressEnemy() {
public FortressType() {
super("fortressenemy");
speed = 0.25f;

View File

@ -14,9 +14,9 @@ import io.anuke.ucore.entities.Entities;
import io.anuke.ucore.graphics.Hue;
import io.anuke.ucore.util.Angles;
public class HealerEnemy extends EnemyType {
public class HealerType extends EnemyType {
public HealerEnemy() {
public HealerType() {
super("healerenemy");
speed = 0.25f;

View File

@ -3,9 +3,9 @@ package io.anuke.mindustry.entities.enemies.types;
import io.anuke.mindustry.entities.BulletType;
import io.anuke.mindustry.entities.enemies.EnemyType;
public class MortarEnemy extends EnemyType {
public class MortarType extends EnemyType {
public MortarEnemy() {
public MortarType() {
super("mortarenemy");
health = 200;

View File

@ -3,9 +3,9 @@ package io.anuke.mindustry.entities.enemies.types;
import io.anuke.mindustry.entities.BulletType;
import io.anuke.mindustry.entities.enemies.EnemyType;
public class RapidEnemy extends EnemyType {
public class RapidType extends EnemyType {
public RapidEnemy() {
public RapidType() {
super("rapidenemy");
reload = 8;

View File

@ -2,9 +2,9 @@ package io.anuke.mindustry.entities.enemies.types;
import io.anuke.mindustry.entities.enemies.EnemyType;
public class StandardEnemy extends EnemyType {
public class StandardType extends EnemyType {
public StandardEnemy(){
public StandardType(){
super("standardenemy");
}
}

View File

@ -5,9 +5,9 @@ import io.anuke.mindustry.entities.enemies.Enemy;
import io.anuke.mindustry.entities.enemies.EnemyType;
import io.anuke.ucore.util.Angles;
public class TankEnemy extends EnemyType {
public class TankType extends EnemyType {
public TankEnemy() {
public TankType() {
super("tankenemy");
health = 350;

View File

@ -10,9 +10,9 @@ import io.anuke.ucore.core.Draw;
import io.anuke.ucore.core.Timers;
import io.anuke.ucore.util.Mathf;
public class TargetEnemy extends EnemyType {
public class TargetType extends EnemyType {
public TargetEnemy(){
public TargetType(){
super("targetenemy");
speed = 0f;

View File

@ -7,9 +7,9 @@ import io.anuke.ucore.core.Timers;
import io.anuke.ucore.util.Angles;
import io.anuke.ucore.util.Mathf;
public class TitanEnemy extends EnemyType {
public class TitanType extends EnemyType {
public TitanEnemy() {
public TitanType() {
super("titanenemy");
speed = 0.26f;

View File

@ -37,6 +37,11 @@ public class DesktopLauncher {
config.setWindowedMode(960, 540);
config.setWindowIcon("sprites/icon.png");
DiscordRPC lib = DiscordRPC.INSTANCE;
String applicationId = "397335883319083018";
DiscordEventHandlers handlers = new DiscordEventHandlers();
lib.Discord_Initialize(applicationId, handlers, true, "");
Mindustry.platforms = new PlatformFunction(){
DateFormat format = SimpleDateFormat.getDateTimeInstance();
@ -66,22 +71,13 @@ public class DesktopLauncher {
@Override
public void onSceneChange(String state, String details, String icon) {
DiscordRPC lib = DiscordRPC.INSTANCE;
if(lib == null) return;
String applicationId = "397335883319083018";
DiscordEventHandlers handlers = new DiscordEventHandlers();
lib.Discord_Initialize(applicationId, handlers, true, "");
DiscordRichPresence presence = new DiscordRichPresence();
presence.startTimestamp = System.currentTimeMillis() / 1000; // epoch second
presence.state = state;
presence.details = details;
presence.largeImageKey = "logo";
presence.largeImageText = details;
lib.Discord_UpdatePresence(presence);
}