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

View File

@@ -102,7 +102,7 @@ public class EnemyType {
} }
if(enemy.target == null || alwaysRotate){ 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{ }else{
enemy.angle = Mathf.slerp(enemy.angle, enemy.angleTo(enemy.target), turretrotatespeed * Timers.delta()); 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; package io.anuke.mindustry.entities.enemies;
import io.anuke.mindustry.entities.enemies.types.BlastEnemy; import io.anuke.mindustry.entities.enemies.types.BlastType;
import io.anuke.mindustry.entities.enemies.types.EmpEnemy; import io.anuke.mindustry.entities.enemies.types.EmpType;
import io.anuke.mindustry.entities.enemies.types.FastEnemy; import io.anuke.mindustry.entities.enemies.types.FastType;
import io.anuke.mindustry.entities.enemies.types.FlamerEnemy; import io.anuke.mindustry.entities.enemies.types.FlamerType;
import io.anuke.mindustry.entities.enemies.types.FortressEnemy; import io.anuke.mindustry.entities.enemies.types.FortressType;
import io.anuke.mindustry.entities.enemies.types.HealerEnemy; import io.anuke.mindustry.entities.enemies.types.HealerType;
import io.anuke.mindustry.entities.enemies.types.MortarEnemy; import io.anuke.mindustry.entities.enemies.types.MortarType;
import io.anuke.mindustry.entities.enemies.types.RapidEnemy; import io.anuke.mindustry.entities.enemies.types.RapidType;
import io.anuke.mindustry.entities.enemies.types.*; import io.anuke.mindustry.entities.enemies.types.*;
import io.anuke.mindustry.entities.enemies.types.TankEnemy; import io.anuke.mindustry.entities.enemies.types.TankType;
import io.anuke.mindustry.entities.enemies.types.TargetEnemy; import io.anuke.mindustry.entities.enemies.types.TargetType;
import io.anuke.mindustry.entities.enemies.types.TitanEnemy; import io.anuke.mindustry.entities.enemies.types.TitanType;
public class EnemyTypes { public class EnemyTypes {
public static final EnemyType public static final EnemyType
standard = new StandardEnemy(), standard = new StandardType(),
fast = new FastEnemy(), fast = new FastType(),
rapid = new RapidEnemy(), rapid = new RapidType(),
flamer = new FlamerEnemy(), flamer = new FlamerType(),
tank = new TankEnemy(), tank = new TankType(),
blast = new BlastEnemy(), blast = new BlastType(),
mortar = new MortarEnemy(), mortar = new MortarType(),
healer = new HealerEnemy(), healer = new HealerType(),
titan = new TitanEnemy(), titan = new TitanType(),
emp = new EmpEnemy(), emp = new EmpType(),
fortress = new FortressEnemy(), fortress = new FortressType(),
target = new TargetEnemy(); 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.mindustry.entities.enemies.EnemyType;
import io.anuke.ucore.util.Tmp; import io.anuke.ucore.util.Tmp;
public class BlastEnemy extends EnemyType { public class BlastType extends EnemyType {
public BlastEnemy() { public BlastType() {
super("blastenemy"); super("blastenemy");
health = 30; health = 30;
speed = 0.7f; 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.BulletType;
import io.anuke.mindustry.entities.enemies.EnemyType; import io.anuke.mindustry.entities.enemies.EnemyType;
public class EmpEnemy extends EnemyType { public class EmpType extends EnemyType {
public EmpEnemy() { public EmpType() {
super("empenemy"); super("empenemy");
speed = 0.3f; speed = 0.3f;

View File

@@ -2,9 +2,9 @@ package io.anuke.mindustry.entities.enemies.types;
import io.anuke.mindustry.entities.enemies.EnemyType; import io.anuke.mindustry.entities.enemies.EnemyType;
public class FastEnemy extends EnemyType { public class FastType extends EnemyType {
public FastEnemy() { public FastType() {
super("fastenemy"); super("fastenemy");
speed = 0.73f; 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.BulletType;
import io.anuke.mindustry.entities.enemies.EnemyType; import io.anuke.mindustry.entities.enemies.EnemyType;
public class FlamerEnemy extends EnemyType { public class FlamerType extends EnemyType {
public FlamerEnemy() { public FlamerType() {
super("flamerenemy"); super("flamerenemy");
speed = 0.35f; 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.core.Timers;
import io.anuke.ucore.util.Angles; import io.anuke.ucore.util.Angles;
public class FortressEnemy extends EnemyType { public class FortressType extends EnemyType {
final int maxSpawn = 6; final int maxSpawn = 6;
final float spawnTime = 190; final float spawnTime = 190;
public FortressEnemy() { public FortressType() {
super("fortressenemy"); super("fortressenemy");
speed = 0.25f; 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.graphics.Hue;
import io.anuke.ucore.util.Angles; import io.anuke.ucore.util.Angles;
public class HealerEnemy extends EnemyType { public class HealerType extends EnemyType {
public HealerEnemy() { public HealerType() {
super("healerenemy"); super("healerenemy");
speed = 0.25f; 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.BulletType;
import io.anuke.mindustry.entities.enemies.EnemyType; import io.anuke.mindustry.entities.enemies.EnemyType;
public class MortarEnemy extends EnemyType { public class MortarType extends EnemyType {
public MortarEnemy() { public MortarType() {
super("mortarenemy"); super("mortarenemy");
health = 200; 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.BulletType;
import io.anuke.mindustry.entities.enemies.EnemyType; import io.anuke.mindustry.entities.enemies.EnemyType;
public class RapidEnemy extends EnemyType { public class RapidType extends EnemyType {
public RapidEnemy() { public RapidType() {
super("rapidenemy"); super("rapidenemy");
reload = 8; reload = 8;

View File

@@ -2,9 +2,9 @@ package io.anuke.mindustry.entities.enemies.types;
import io.anuke.mindustry.entities.enemies.EnemyType; import io.anuke.mindustry.entities.enemies.EnemyType;
public class StandardEnemy extends EnemyType { public class StandardType extends EnemyType {
public StandardEnemy(){ public StandardType(){
super("standardenemy"); 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.mindustry.entities.enemies.EnemyType;
import io.anuke.ucore.util.Angles; import io.anuke.ucore.util.Angles;
public class TankEnemy extends EnemyType { public class TankType extends EnemyType {
public TankEnemy() { public TankType() {
super("tankenemy"); super("tankenemy");
health = 350; health = 350;

View File

@@ -10,9 +10,9 @@ import io.anuke.ucore.core.Draw;
import io.anuke.ucore.core.Timers; import io.anuke.ucore.core.Timers;
import io.anuke.ucore.util.Mathf; import io.anuke.ucore.util.Mathf;
public class TargetEnemy extends EnemyType { public class TargetType extends EnemyType {
public TargetEnemy(){ public TargetType(){
super("targetenemy"); super("targetenemy");
speed = 0f; 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.Angles;
import io.anuke.ucore.util.Mathf; import io.anuke.ucore.util.Mathf;
public class TitanEnemy extends EnemyType { public class TitanType extends EnemyType {
public TitanEnemy() { public TitanType() {
super("titanenemy"); super("titanenemy");
speed = 0.26f; speed = 0.26f;

View File

@@ -37,6 +37,11 @@ public class DesktopLauncher {
config.setWindowedMode(960, 540); config.setWindowedMode(960, 540);
config.setWindowIcon("sprites/icon.png"); 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(){ Mindustry.platforms = new PlatformFunction(){
DateFormat format = SimpleDateFormat.getDateTimeInstance(); DateFormat format = SimpleDateFormat.getDateTimeInstance();
@@ -66,22 +71,13 @@ public class DesktopLauncher {
@Override @Override
public void onSceneChange(String state, String details, String icon) { 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(); DiscordRichPresence presence = new DiscordRichPresence();
presence.startTimestamp = System.currentTimeMillis() / 1000; // epoch second presence.startTimestamp = System.currentTimeMillis() / 1000; // epoch second
presence.state = state; presence.state = state;
presence.details = details; presence.details = details;
presence.largeImageKey = "logo"; presence.largeImageKey = "logo";
presence.largeImageText = details; presence.largeImageText = details;
lib.Discord_UpdatePresence(presence); lib.Discord_UpdatePresence(presence);
} }