mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-05-03 18:53:24 -07:00
Updates for new uCore version
This commit is contained in:
parent
53ca2d0755
commit
5172ae781f
15 changed files with 220 additions and 220 deletions
|
|
@ -25,7 +25,7 @@ allprojects {
|
|||
appName = 'Mindustry'
|
||||
gdxVersion = '1.9.8'
|
||||
aiVersion = '1.8.1'
|
||||
uCoreVersion = 'a41b4c2'
|
||||
uCoreVersion = 'b41a747'
|
||||
|
||||
getVersionString = {
|
||||
String buildVersion = getBuildVersion()
|
||||
|
|
|
|||
|
|
@ -64,11 +64,11 @@ void main() {
|
|||
if(i >= u_hitamount) break;
|
||||
vec3 hit = u_hits[i];
|
||||
float rad = hit.z * HIT_RADIUS;
|
||||
float fract = 1.0 - hit.z;
|
||||
float fin = 1.0 - hit.z;
|
||||
|
||||
if(abs(distance(vec2(hit.x, hit.y), coords - u_texsize/2.0) - rad) < 1.0){
|
||||
color = mix(color, u_color* vec4(si, si, si, 1.0), (1.0 * fract));
|
||||
color.a = ALPHA + 0.82 *fract;
|
||||
color = mix(color, u_color* vec4(si, si, si, 1.0), (1.0 * fin));
|
||||
color.a = ALPHA + 0.82 *fin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#Autogenerated file. Do not modify.
|
||||
#Tue Apr 03 23:58:20 EDT 2018
|
||||
#Thu Apr 05 22:28:48 EDT 2018
|
||||
version=release
|
||||
androidBuildCode=501
|
||||
androidBuildCode=502
|
||||
name=Mindustry
|
||||
code=3.5
|
||||
build=custom build
|
||||
|
|
|
|||
|
|
@ -541,14 +541,14 @@ public class Renderer extends RendererModule{
|
|||
}
|
||||
|
||||
//TODO optimize!
|
||||
public void drawBar(Color color, float x, float y, float fraction){
|
||||
fraction = Mathf.clamp(fraction);
|
||||
public void drawBar(Color color, float x, float y, float finion){
|
||||
finion = Mathf.clamp(finion);
|
||||
|
||||
if(fraction > 0) fraction = Mathf.clamp(fraction + 0.2f, 0.24f, 1f);
|
||||
if(finion > 0) finion = Mathf.clamp(finion + 0.2f, 0.24f, 1f);
|
||||
|
||||
float len = 3;
|
||||
|
||||
float w = (int) (len * 2 * fraction) + 0.5f;
|
||||
float w = (int) (len * 2 * finion) + 0.5f;
|
||||
|
||||
x -= 0.5f;
|
||||
y += 0.5f;
|
||||
|
|
|
|||
|
|
@ -168,8 +168,8 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||
}
|
||||
|
||||
public void draw(Bullet b) {
|
||||
Draw.color(Color.LIGHT_GRAY, Color.GRAY, b.ifract());
|
||||
Lines.stroke(2f - b.ifract());
|
||||
Draw.color(Color.LIGHT_GRAY, Color.GRAY, b.fout());
|
||||
Lines.stroke(2f - b.fout());
|
||||
Lines.lineAngleCenter(b.x, b.y, b.angle(), 2f);
|
||||
Draw.reset();
|
||||
}
|
||||
|
|
@ -325,7 +325,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||
}
|
||||
|
||||
public void draw(Bullet b){
|
||||
Draw.color(Color.WHITE, lightOrange, b.fract()/2f + 0.25f);
|
||||
Draw.color(Color.WHITE, lightOrange, b.fin()/2f + 0.25f);
|
||||
Lines.stroke(1.5f);
|
||||
Lines.lineAngle(b.x, b.y, b.angle(), 3f);
|
||||
Draw.reset();
|
||||
|
|
@ -337,7 +337,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||
}
|
||||
|
||||
public void draw(Bullet b) {
|
||||
float size = 3f - b.ifract()*1f;
|
||||
float size = 3f - b.fout()*1f;
|
||||
|
||||
Draw.color(Color.PURPLE, Color.WHITE, 0.8f);
|
||||
Lines.stroke(1f);
|
||||
|
|
@ -356,8 +356,8 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||
Draw.color(lightOrange, Color.WHITE, 0.4f);
|
||||
Lines.poly(b.x, b.y, 3, 1.6f, b.angle());
|
||||
Lines.stroke(1f);
|
||||
Draw.color(Color.WHITE, lightOrange, b.ifract()/2f);
|
||||
Draw.alpha(b.ifract());
|
||||
Draw.color(Color.WHITE, lightOrange, b.fout()/2f);
|
||||
Draw.alpha(b.fout());
|
||||
Lines.spikes(b.x, b.y, 1.5f, 2f, 6);
|
||||
Draw.reset();
|
||||
}
|
||||
|
|
@ -408,9 +408,9 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||
}
|
||||
|
||||
public void draw(Bullet b) {
|
||||
Draw.color(Color.WHITE, Color.ORANGE, b.ifract());
|
||||
Draw.color(Color.WHITE, Color.ORANGE, b.fout());
|
||||
Lines.stroke(2f);
|
||||
Lines.lineAngleCenter(b.x, b.y, b.angle(), b.fract()*5f);
|
||||
Lines.lineAngleCenter(b.x, b.y, b.angle(), b.fin()*5f);
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
|
|
@ -436,9 +436,9 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||
}
|
||||
|
||||
public void draw(Bullet b) {
|
||||
Draw.color(Color.WHITE, Color.ORANGE, b.ifract());
|
||||
Draw.color(Color.WHITE, Color.ORANGE, b.fout());
|
||||
Lines.stroke(1f);
|
||||
Lines.lineAngleCenter(b.x, b.y, b.angle(), b.fract()*4f);
|
||||
Lines.lineAngleCenter(b.x, b.y, b.angle(), b.fin()*4f);
|
||||
Draw.reset();
|
||||
}
|
||||
},
|
||||
|
|
@ -454,7 +454,7 @@ public abstract class BulletType extends BaseBulletType<Bullet>{
|
|||
}
|
||||
|
||||
public void draw(Bullet b) {
|
||||
float f = b.fract()*1.5f;
|
||||
float f = b.fin()*1.5f;
|
||||
|
||||
Draw.color(beam);
|
||||
Draw.rect("circle", b.x, b.y, 6f*f, 6f*f);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public class Player extends SyncEntity{
|
|||
}
|
||||
|
||||
@Override
|
||||
public void damage(int amount){
|
||||
public void damage(float amount){
|
||||
if(debug || isAndroid) return;
|
||||
|
||||
health -= amount;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public class EMP extends TimedEntity{
|
|||
|
||||
drawLine(target.worldx(), target.worldy());
|
||||
|
||||
float rad = 5f*fract();
|
||||
float rad = 5f*fin();
|
||||
Draw.rect("circle", target.worldx(), target.worldy(), rad, rad);
|
||||
}
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ public class EMP extends TimedEntity{
|
|||
drawLine(x + tr.x, y + tr.y);
|
||||
}
|
||||
|
||||
Lines.stroke(fract()*2f);
|
||||
Lines.stroke(fin()*2f);
|
||||
Lines.poly(x, y, 34, radius * tilesize);
|
||||
|
||||
Draw.reset();
|
||||
|
|
@ -114,7 +114,7 @@ public class EMP extends TimedEntity{
|
|||
}
|
||||
|
||||
private void drawLaser(float x, float y, float x2, float y2){
|
||||
Lines.stroke(fract() * 2f);
|
||||
Lines.stroke(fin() * 2f);
|
||||
Lines.line(x, y, x2, y2);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public class Enemy extends SyncEntity {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void damage(int amount){
|
||||
public void damage(float amount){
|
||||
super.damage(amount);
|
||||
hitTime = EnemyType.hitDuration;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,125 +27,125 @@ public class Fx{
|
|||
public static final Effect
|
||||
|
||||
generatorexplosion = new Effect(28, 40f, e -> {
|
||||
Angles.randLenVectors(e.id, 16, 10f + e.ifract()*8f, (x, y)->{
|
||||
float size = e.fract()*12f + 1f;
|
||||
Draw.color(Color.WHITE, lightOrange, e.ifract());
|
||||
Angles.randLenVectors(e.id, 16, 10f + e.fout()*8f, (x, y)->{
|
||||
float size = e.fin()*12f + 1f;
|
||||
Draw.color(Color.WHITE, lightOrange, e.fout());
|
||||
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
||||
Draw.reset();
|
||||
});
|
||||
}),
|
||||
|
||||
reactorsmoke = new Effect(17, e -> {
|
||||
Angles.randLenVectors(e.id, 4, e.ifract()*8f, (x, y)->{
|
||||
float size = 1f+e.fract()*5f;
|
||||
Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.ifract());
|
||||
Angles.randLenVectors(e.id, 4, e.fout()*8f, (x, y)->{
|
||||
float size = 1f+e.fin()*5f;
|
||||
Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fout());
|
||||
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
||||
Draw.reset();
|
||||
});
|
||||
}),
|
||||
|
||||
nuclearsmoke = new Effect(40, e -> {
|
||||
Angles.randLenVectors(e.id, 4, e.ifract()*13f, (x, y)->{
|
||||
float size = e.sfract()*4f;
|
||||
Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.ifract());
|
||||
Angles.randLenVectors(e.id, 4, e.fout()*13f, (x, y)->{
|
||||
float size = e.finpow()*4f;
|
||||
Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fout());
|
||||
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
||||
Draw.reset();
|
||||
});
|
||||
}),
|
||||
|
||||
nuclearcloud = new Effect(90, 200f, e -> {
|
||||
Angles.randLenVectors(e.id, 10, e.powfract()*90f, (x, y)->{
|
||||
float size = e.fract()*14f;
|
||||
Draw.color(Color.LIME, Color.GRAY, e.ifract());
|
||||
Angles.randLenVectors(e.id, 10, e.finpow()*90f, (x, y)->{
|
||||
float size = e.fin()*14f;
|
||||
Draw.color(Color.LIME, Color.GRAY, e.fout());
|
||||
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
||||
Draw.reset();
|
||||
});
|
||||
}),
|
||||
|
||||
chainshot = new Effect(9f, e -> {
|
||||
Draw.color(Color.WHITE, lightOrange, e.ifract());
|
||||
Lines.stroke(e.fract()*4f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*7f);
|
||||
Lines.stroke(e.fract()*2f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*10f);
|
||||
Draw.color(Color.WHITE, lightOrange, e.fout());
|
||||
Lines.stroke(e.fin()*4f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*7f);
|
||||
Lines.stroke(e.fin()*2f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*10f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
mortarshot = new Effect(10f, e -> {
|
||||
Draw.color(Color.WHITE, Color.DARK_GRAY, e.ifract());
|
||||
Lines.stroke(e.fract()*6f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*10f);
|
||||
Lines.stroke(e.fract()*5f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*14f);
|
||||
Lines.stroke(e.fract()*1f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*16f);
|
||||
Draw.color(Color.WHITE, Color.DARK_GRAY, e.fout());
|
||||
Lines.stroke(e.fin()*6f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*10f);
|
||||
Lines.stroke(e.fin()*5f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*14f);
|
||||
Lines.stroke(e.fin()*1f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*16f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
railshot = new Effect(9f, e -> {
|
||||
Draw.color(Color.WHITE, Color.DARK_GRAY, e.ifract());
|
||||
Lines.stroke(e.fract()*5f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*8f);
|
||||
Lines.stroke(e.fract()*4f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*12f);
|
||||
Lines.stroke(e.fract()*1f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*14f);
|
||||
Draw.color(Color.WHITE, Color.DARK_GRAY, e.fout());
|
||||
Lines.stroke(e.fin()*5f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*8f);
|
||||
Lines.stroke(e.fin()*4f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*12f);
|
||||
Lines.stroke(e.fin()*1f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*14f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
titanshot = new Effect(12f, e -> {
|
||||
Draw.color(Color.WHITE, lightOrange, e.ifract());
|
||||
Lines.stroke(e.fract()*7f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*12f);
|
||||
Lines.stroke(e.fract()*4f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*16f);
|
||||
Lines.stroke(e.fract()*2f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*18f);
|
||||
Draw.color(Color.WHITE, lightOrange, e.fout());
|
||||
Lines.stroke(e.fin()*7f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*12f);
|
||||
Lines.stroke(e.fin()*4f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*16f);
|
||||
Lines.stroke(e.fin()*2f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*18f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
largeCannonShot = new Effect(11f, e -> {
|
||||
Draw.color(Color.WHITE, whiteYellow, e.ifract());
|
||||
Lines.stroke(e.fract()*6f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*12f);
|
||||
Lines.stroke(e.fract()*3f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*16f);
|
||||
Lines.stroke(e.fract()*1f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fract()*18f);
|
||||
Draw.color(Color.WHITE, whiteYellow, e.fout());
|
||||
Lines.stroke(e.fin()*6f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*12f);
|
||||
Lines.stroke(e.fin()*3f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*16f);
|
||||
Lines.stroke(e.fin()*1f);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, e.fin()*18f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
shockwave = new Effect(10f, 80f, e -> {
|
||||
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
|
||||
Lines.stroke(e.fract()*2f + 0.2f);
|
||||
Lines.circle(e.x, e.y, e.ifract()*28f);
|
||||
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fout());
|
||||
Lines.stroke(e.fin()*2f + 0.2f);
|
||||
Lines.circle(e.x, e.y, e.fout()*28f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
nuclearShockwave = new Effect(10f, 200f, e -> {
|
||||
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
|
||||
Lines.stroke(e.fract()*3f + 0.2f);
|
||||
Lines.poly(e.x, e.y, 40, e.ifract()*140f);
|
||||
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fout());
|
||||
Lines.stroke(e.fin()*3f + 0.2f);
|
||||
Lines.poly(e.x, e.y, 40, e.fout()*140f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
shockwaveSmall = new Effect(10f, e -> {
|
||||
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
|
||||
Lines.stroke(e.fract()*2f + 0.1f);
|
||||
Lines.circle(e.x, e.y, e.ifract()*15f);
|
||||
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fout());
|
||||
Lines.stroke(e.fin()*2f + 0.1f);
|
||||
Lines.circle(e.x, e.y, e.fout()*15f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
empshockwave = new Effect(7f, e -> {
|
||||
Draw.color(Color.WHITE, Color.SKY, e.ifract());
|
||||
Lines.stroke(e.fract()*2f);
|
||||
Lines.circle(e.x, e.y, e.ifract()*40f);
|
||||
Draw.color(Color.WHITE, Color.SKY, e.fout());
|
||||
Lines.stroke(e.fin()*2f);
|
||||
Lines.circle(e.x, e.y, e.fout()*40f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
empspark = new Effect(13, e -> {
|
||||
Angles.randLenVectors(e.id, 7, 1f + e.ifract()*12f, (x, y)->{
|
||||
float len = 1f+e.fract()*6f;
|
||||
Angles.randLenVectors(e.id, 7, 1f + e.fout()*12f, (x, y)->{
|
||||
float len = 1f+e.fin()*6f;
|
||||
Draw.color(Color.SKY);
|
||||
Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), len);
|
||||
Draw.reset();
|
||||
|
|
@ -153,67 +153,67 @@ public class Fx{
|
|||
}),
|
||||
|
||||
redgeneratespark = new Effect(18, e -> {
|
||||
Angles.randLenVectors(e.id, 5, e.ifract()*8f, (x, y)->{
|
||||
float len = e.fract()*4f;
|
||||
Draw.color(Color.valueOf("fbb97f"), Color.GRAY, e.ifract());
|
||||
//Draw.alpha(e.fract());
|
||||
Angles.randLenVectors(e.id, 5, e.fout()*8f, (x, y)->{
|
||||
float len = e.fin()*4f;
|
||||
Draw.color(Color.valueOf("fbb97f"), Color.GRAY, e.fout());
|
||||
//Draw.alpha(e.fin());
|
||||
Draw.rect("circle", e.x + x, e.y + y, len, len);
|
||||
Draw.reset();
|
||||
});
|
||||
}),
|
||||
|
||||
generatespark = new Effect(18, e -> {
|
||||
Angles.randLenVectors(e.id, 5, e.ifract()*8f, (x, y)->{
|
||||
float len = e.fract()*4f;
|
||||
Draw.color(Color.valueOf("d2b29c"), Color.GRAY, e.ifract());
|
||||
//Draw.alpha(e.fract());
|
||||
Angles.randLenVectors(e.id, 5, e.fout()*8f, (x, y)->{
|
||||
float len = e.fin()*4f;
|
||||
Draw.color(Color.valueOf("d2b29c"), Color.GRAY, e.fout());
|
||||
//Draw.alpha(e.fin());
|
||||
Draw.rect("circle", e.x + x, e.y + y, len, len);
|
||||
Draw.reset();
|
||||
});
|
||||
}),
|
||||
|
||||
fuelburn = new Effect(23, e -> {
|
||||
Angles.randLenVectors(e.id, 5, e.ifract()*9f, (x, y)->{
|
||||
float len = e.fract()*4f;
|
||||
Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.ifract());
|
||||
//Draw.alpha(e.fract());
|
||||
Angles.randLenVectors(e.id, 5, e.fout()*9f, (x, y)->{
|
||||
float len = e.fin()*4f;
|
||||
Draw.color(Color.LIGHT_GRAY, Color.GRAY, e.fout());
|
||||
//Draw.alpha(e.fin());
|
||||
Draw.rect("circle", e.x + x, e.y + y, len, len);
|
||||
Draw.reset();
|
||||
});
|
||||
}),
|
||||
|
||||
laserspark = new Effect(14, e -> {
|
||||
Angles.randLenVectors(e.id, 8, 1f + e.ifract()*11f, (x, y)->{
|
||||
float len = 1f+e.fract()*5f;
|
||||
Draw.color(Color.WHITE, Color.CORAL, e.ifract());
|
||||
Draw.alpha(e.ifract()/1.3f);
|
||||
Angles.randLenVectors(e.id, 8, 1f + e.fout()*11f, (x, y)->{
|
||||
float len = 1f+e.fin()*5f;
|
||||
Draw.color(Color.WHITE, Color.CORAL, e.fout());
|
||||
Draw.alpha(e.fout()/1.3f);
|
||||
Lines.lineAngle(e.x + x, e.y + y, Mathf.atan2(x, y), len);
|
||||
Draw.reset();
|
||||
});
|
||||
}),
|
||||
|
||||
shellsmoke = new Effect(20, e -> {
|
||||
Angles.randLenVectors(e.id, 8, 3f + e.ifract()*17f, (x, y)->{
|
||||
float size = 2f+e.fract()*5f;
|
||||
Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.ifract());
|
||||
Angles.randLenVectors(e.id, 8, 3f + e.fout()*17f, (x, y)->{
|
||||
float size = 2f+e.fin()*5f;
|
||||
Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.fout());
|
||||
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
||||
Draw.reset();
|
||||
});
|
||||
}),
|
||||
|
||||
blastsmoke = new Effect(26, e -> {
|
||||
Angles.randLenVectors(e.id, 12, 1f + e.ifract()*23f, (x, y)->{
|
||||
float size = 2f+e.fract()*6f;
|
||||
Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.ifract());
|
||||
Angles.randLenVectors(e.id, 12, 1f + e.fout()*23f, (x, y)->{
|
||||
float size = 2f+e.fin()*6f;
|
||||
Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.fout());
|
||||
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
||||
Draw.reset();
|
||||
});
|
||||
}),
|
||||
|
||||
lava = new Effect(18, e -> {
|
||||
Angles.randLenVectors(e.id, 3, 1f + e.ifract()*10f, (x, y)->{
|
||||
float size = e.sfract()*4f;
|
||||
Draw.color(Color.ORANGE, Color.GRAY, e.ifract());
|
||||
Angles.randLenVectors(e.id, 3, 1f + e.fout()*10f, (x, y)->{
|
||||
float size = e.finpow()*4f;
|
||||
Draw.color(Color.ORANGE, Color.GRAY, e.fout());
|
||||
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
||||
Draw.reset();
|
||||
});
|
||||
|
|
@ -222,194 +222,194 @@ public class Fx{
|
|||
lavabubble = new Effect(45f, e -> {
|
||||
Draw.color(Color.ORANGE);
|
||||
float scl = 0.35f;
|
||||
Lines.stroke(1f - Mathf.clamp(e.ifract() - (1f-scl)) * (1f/scl));
|
||||
Lines.circle(e.x, e.y, e.ifract()*4f);
|
||||
Lines.stroke(1f - Mathf.clamp(e.fout() - (1f-scl)) * (1f/scl));
|
||||
Lines.circle(e.x, e.y, e.fout()*4f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
oilbubble = new Effect(64f, e -> {
|
||||
Draw.color(Color.DARK_GRAY);
|
||||
float scl = 0.25f;
|
||||
Lines.stroke(1f - Mathf.clamp(e.ifract() - (1f-scl)) * (1f/scl));
|
||||
Lines.circle(e.x, e.y, e.ifract()*3f);
|
||||
Lines.stroke(1f - Mathf.clamp(e.fout() - (1f-scl)) * (1f/scl));
|
||||
Lines.circle(e.x, e.y, e.fout()*3f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
shellexplosion = new Effect(9, e -> {
|
||||
Lines.stroke(2f - e.ifract()*1.7f);
|
||||
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.ifract());
|
||||
Lines.circle(e.x, e.y, 3f + e.ifract() * 9f);
|
||||
Lines.stroke(2f - e.fout()*1.7f);
|
||||
Draw.color(Color.WHITE, Color.LIGHT_GRAY, e.fout());
|
||||
Lines.circle(e.x, e.y, 3f + e.fout() * 9f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
blastexplosion = new Effect(14, e -> {
|
||||
Lines.stroke(1.2f - e.ifract());
|
||||
Draw.color(Color.WHITE, lightOrange, e.ifract());
|
||||
Lines.circle(e.x, e.y, 1.5f + e.ifract() * 9f);
|
||||
Lines.stroke(1.2f - e.fout());
|
||||
Draw.color(Color.WHITE, lightOrange, e.fout());
|
||||
Lines.circle(e.x, e.y, 1.5f + e.fout() * 9f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
place = new Effect(16, e -> {
|
||||
Lines.stroke(3f - e.ifract() * 2f);
|
||||
Lines.square(e.x, e.y, tilesize / 2f + e.ifract() * 3f);
|
||||
Lines.stroke(3f - e.fout() * 2f);
|
||||
Lines.square(e.x, e.y, tilesize / 2f + e.fout() * 3f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
dooropen = new Effect(10, e -> {
|
||||
Lines.stroke(e.fract() * 1.6f);
|
||||
Lines.square(e.x, e.y, tilesize / 2f + e.ifract() * 2f);
|
||||
Lines.stroke(e.fin() * 1.6f);
|
||||
Lines.square(e.x, e.y, tilesize / 2f + e.fout() * 2f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
doorclose= new Effect(10, e -> {
|
||||
Lines.stroke(e.fract() * 1.6f);
|
||||
Lines.square(e.x, e.y, tilesize / 2f + e.fract() * 2f);
|
||||
Lines.stroke(e.fin() * 1.6f);
|
||||
Lines.square(e.x, e.y, tilesize / 2f + e.fin() * 2f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
dooropenlarge = new Effect(10, e -> {
|
||||
Lines.stroke(e.fract() * 1.6f);
|
||||
Lines.square(e.x, e.y, tilesize + e.ifract() * 2f);
|
||||
Lines.stroke(e.fin() * 1.6f);
|
||||
Lines.square(e.x, e.y, tilesize + e.fout() * 2f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
doorcloselarge = new Effect(10, e -> {
|
||||
Lines.stroke(e.fract() * 1.6f);
|
||||
Lines.square(e.x, e.y, tilesize + e.fract() * 2f);
|
||||
Lines.stroke(e.fin() * 1.6f);
|
||||
Lines.square(e.x, e.y, tilesize + e.fin() * 2f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
purify = new Effect(10, e -> {
|
||||
Draw.color(Color.ROYAL, Color.GRAY, e.ifract());
|
||||
Draw.color(Color.ROYAL, Color.GRAY, e.fout());
|
||||
Lines.stroke(2f);
|
||||
Lines.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
|
||||
Lines.spikes(e.x, e.y, e.fout() * 4f, 2, 6);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
purifyoil = new Effect(10, e -> {
|
||||
Draw.color(Color.BLACK, Color.GRAY, e.ifract());
|
||||
Draw.color(Color.BLACK, Color.GRAY, e.fout());
|
||||
Lines.stroke(2f);
|
||||
Lines.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
|
||||
Lines.spikes(e.x, e.y, e.fout() * 4f, 2, 6);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
purifystone = new Effect(10, e -> {
|
||||
Draw.color(Color.ORANGE, Color.GRAY, e.ifract());
|
||||
Draw.color(Color.ORANGE, Color.GRAY, e.fout());
|
||||
Lines.stroke(2f);
|
||||
Lines.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
|
||||
Lines.spikes(e.x, e.y, e.fout() * 4f, 2, 6);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
generate = new Effect(11, e -> {
|
||||
Draw.color(Color.ORANGE, Color.YELLOW, e.ifract());
|
||||
Draw.color(Color.ORANGE, Color.YELLOW, e.fout());
|
||||
Lines.stroke(1f);
|
||||
Lines.spikes(e.x, e.y, e.ifract() * 5f, 2, 8);
|
||||
Lines.spikes(e.x, e.y, e.fout() * 5f, 2, 8);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
spark = new Effect(10, e -> {
|
||||
Lines.stroke(1f);
|
||||
Draw.color(Color.WHITE, Color.GRAY, e.ifract());
|
||||
Lines.spikes(e.x, e.y, e.ifract() * 5f, 2, 8);
|
||||
Draw.color(Color.WHITE, Color.GRAY, e.fout());
|
||||
Lines.spikes(e.x, e.y, e.fout() * 5f, 2, 8);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
sparkbig = new Effect(11, e -> {
|
||||
Lines.stroke(1f);
|
||||
Draw.color(lightRed, Color.GRAY, e.ifract());
|
||||
Lines.spikes(e.x, e.y, e.ifract() * 5f, 2.3f, 8);
|
||||
Draw.color(lightRed, Color.GRAY, e.fout());
|
||||
Lines.spikes(e.x, e.y, e.fout() * 5f, 2.3f, 8);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
smelt = new Effect(10, e -> {
|
||||
Lines.stroke(1f);
|
||||
Draw.color(Color.YELLOW, Color.RED, e.ifract());
|
||||
Lines.spikes(e.x, e.y, e.ifract() * 5f, 1f, 8);
|
||||
Draw.color(Color.YELLOW, Color.RED, e.fout());
|
||||
Lines.spikes(e.x, e.y, e.fout() * 5f, 1f, 8);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
breakBlock = new Effect(12, e -> {
|
||||
Lines.stroke(2f);
|
||||
Draw.color(Color.WHITE, Colors.get("break"), e.ifract());
|
||||
Lines.spikes(e.x, e.y, e.ifract() * 6f, 2, 5, 90);
|
||||
Draw.color(Color.WHITE, Colors.get("break"), e.fout());
|
||||
Lines.spikes(e.x, e.y, e.fout() * 6f, 2, 5, 90);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
hit = new Effect(10, e -> {
|
||||
Lines.stroke(1f);
|
||||
Draw.color(Color.WHITE, Color.ORANGE, e.ifract());
|
||||
Lines.spikes(e.x, e.y, e.ifract() * 3f, 2, 8);
|
||||
Draw.color(Color.WHITE, Color.ORANGE, e.fout());
|
||||
Lines.spikes(e.x, e.y, e.fout() * 3f, 2, 8);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
laserhit = new Effect(10, e -> {
|
||||
Lines.stroke(1f);
|
||||
Draw.color(Color.WHITE, Color.SKY, e.ifract());
|
||||
Lines.spikes(e.x, e.y, e.ifract() * 2f, 2, 6);
|
||||
Draw.color(Color.WHITE, Color.SKY, e.fout());
|
||||
Lines.spikes(e.x, e.y, e.fout() * 2f, 2, 6);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
shieldhit = new Effect(9, e -> {
|
||||
Lines.stroke(1f);
|
||||
Draw.color(Color.WHITE, Color.SKY, e.ifract());
|
||||
Lines.spikes(e.x, e.y, e.ifract() * 5f, 2, 6);
|
||||
Lines.stroke(4f*e.fract());
|
||||
Lines.circle(e.x, e.y, e.ifract()*14f);
|
||||
Draw.color(Color.WHITE, Color.SKY, e.fout());
|
||||
Lines.spikes(e.x, e.y, e.fout() * 5f, 2, 6);
|
||||
Lines.stroke(4f*e.fin());
|
||||
Lines.circle(e.x, e.y, e.fout()*14f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
laserShoot = new Effect(8, e -> {
|
||||
Draw.color(Color.WHITE, lightOrange, e.ifract());
|
||||
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 6f, 2f, 0.8f);
|
||||
Draw.color(Color.WHITE, lightOrange, e.fout());
|
||||
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fin(), 6f, 2f, 0.8f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
spreadShoot = new Effect(12, e -> {
|
||||
Draw.color(Color.WHITE, Color.PURPLE, e.ifract());
|
||||
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 9f, 3.5f, 0.8f);
|
||||
Draw.color(Color.WHITE, Color.PURPLE, e.fout());
|
||||
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fin(), 9f, 3.5f, 0.8f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
clusterShoot = new Effect(12, e -> {
|
||||
Draw.color(Color.WHITE, lightOrange, e.ifract());
|
||||
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 10f, 2.5f, 0.7f);
|
||||
Draw.color(Color.WHITE, lightOrange, e.fout());
|
||||
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fin(), 10f, 2.5f, 0.7f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
vulcanShoot = new Effect(8, e -> {
|
||||
Draw.color(lighterOrange, lightOrange, e.ifract());
|
||||
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 10f, 2f, 0.7f);
|
||||
Draw.color(lighterOrange, lightOrange, e.fout());
|
||||
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fin(), 10f, 2f, 0.7f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
shockShoot = new Effect(8, e -> {
|
||||
Draw.color(Color.WHITE, Color.ORANGE, e.ifract());
|
||||
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fract(), 14f, 4f, 0.8f);
|
||||
Draw.color(Color.WHITE, Color.ORANGE, e.fout());
|
||||
Shapes.lineShot(e.x, e.y, e.rotation, 3, e.fin(), 14f, 4f, 0.8f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
beamShoot = new Effect(8, e -> {
|
||||
Draw.color(beamLight, beam, e.ifract());
|
||||
Shapes.lineShot(e.x, e.y, e.rotation - 70, 3, e.fract(), 12f, 1f, 0.5f);
|
||||
Shapes.lineShot(e.x, e.y, e.rotation + 70, 3, e.fract(), 12f, 1f, 0.5f);
|
||||
Draw.color(beamLight, beam, e.fout());
|
||||
Shapes.lineShot(e.x, e.y, e.rotation - 70, 3, e.fin(), 12f, 1f, 0.5f);
|
||||
Shapes.lineShot(e.x, e.y, e.rotation + 70, 3, e.fin(), 12f, 1f, 0.5f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
beamhit = new Effect(8, e -> {
|
||||
Draw.color(beamLight, beam, e.ifract());
|
||||
Lines.stroke(e.fract()*3f+0.5f);
|
||||
Lines.circle(e.x, e.y, e.ifract()*8f);
|
||||
Lines.spikes(e.x, e.y, e.ifract()*6f, 2f, 4, 45);
|
||||
Draw.color(beamLight, beam, e.fout());
|
||||
Lines.stroke(e.fin()*3f+0.5f);
|
||||
Lines.circle(e.x, e.y, e.fout()*8f);
|
||||
Lines.spikes(e.x, e.y, e.fout()*6f, 2f, 4, 45);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
titanExplosion = new Effect(11, 48f, e -> {
|
||||
Lines.stroke(2f*e.fract()+0.5f);
|
||||
Draw.color(Color.WHITE, Color.DARK_GRAY, e.powfract());
|
||||
Lines.circle(e.x, e.y, 5f + e.powfract() * 8f);
|
||||
Lines.stroke(2f*e.fin()+0.5f);
|
||||
Draw.color(Color.WHITE, Color.DARK_GRAY, e.finpow());
|
||||
Lines.circle(e.x, e.y, 5f + e.finpow() * 8f);
|
||||
|
||||
Draw.color(e.ifract() < 0.5f ? whiteOrange : Color.DARK_GRAY);
|
||||
float rad = e.fract()*10f + 5f;
|
||||
Draw.color(e.fout() < 0.5f ? whiteOrange : Color.DARK_GRAY);
|
||||
float rad = e.fin()*10f + 5f;
|
||||
Angles.randLenVectors(e.id, 5, 9f, (x, y)->{
|
||||
Draw.rect("circle2", e.x + x, e.y + y, rad, rad);
|
||||
});
|
||||
|
|
@ -418,12 +418,12 @@ public class Fx{
|
|||
}),
|
||||
|
||||
explosion = new Effect(11, e -> {
|
||||
Lines.stroke(2f*e.fract()+0.5f);
|
||||
Draw.color(Color.WHITE, Color.DARK_GRAY, e.powfract());
|
||||
Lines.circle(e.x, e.y, 5f + e.powfract() * 6f);
|
||||
Lines.stroke(2f*e.fin()+0.5f);
|
||||
Draw.color(Color.WHITE, Color.DARK_GRAY, e.finpow());
|
||||
Lines.circle(e.x, e.y, 5f + e.finpow() * 6f);
|
||||
|
||||
Draw.color(e.ifract() < 0.5f ? Color.WHITE : Color.DARK_GRAY);
|
||||
float rad = e.fract()*10f + 5f;
|
||||
Draw.color(e.fout() < 0.5f ? Color.WHITE : Color.DARK_GRAY);
|
||||
float rad = e.fin()*10f + 5f;
|
||||
Angles.randLenVectors(e.id, 5, 8f, (x, y)->{
|
||||
Draw.rect("circle2", e.x + x, e.y + y, rad, rad);
|
||||
});
|
||||
|
|
@ -433,19 +433,19 @@ public class Fx{
|
|||
|
||||
|
||||
blockexplosion = new Effect(13, e -> {
|
||||
Angles.randLenVectors(e.id+1, 8, 5f + e.ifract()*11f, (x, y)->{
|
||||
float size = 2f+e.fract()*8f;
|
||||
Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.ifract());
|
||||
Angles.randLenVectors(e.id+1, 8, 5f + e.fout()*11f, (x, y)->{
|
||||
float size = 2f+e.fin()*8f;
|
||||
Draw.color(Color.LIGHT_GRAY, Color.DARK_GRAY, e.fout());
|
||||
Draw.rect("circle", e.x + x, e.y + y, size, size);
|
||||
Draw.reset();
|
||||
});
|
||||
|
||||
Lines.stroke(2f*e.fract()+0.4f);
|
||||
Draw.color(Color.WHITE, Color.ORANGE, e.powfract());
|
||||
Lines.circle(e.x, e.y, 2f + e.powfract() * 9f);
|
||||
Lines.stroke(2f*e.fin()+0.4f);
|
||||
Draw.color(Color.WHITE, Color.ORANGE, e.finpow());
|
||||
Lines.circle(e.x, e.y, 2f + e.finpow() * 9f);
|
||||
|
||||
Draw.color(e.ifract() < 0.5f ? Color.WHITE : Color.DARK_GRAY);
|
||||
float rad = e.fract()*10f + 2f;
|
||||
Draw.color(e.fout() < 0.5f ? Color.WHITE : Color.DARK_GRAY);
|
||||
float rad = e.fin()*10f + 2f;
|
||||
Angles.randLenVectors(e.id, 5, 8f, (x, y)->{
|
||||
Draw.rect("circle2", e.x + x, e.y + y, rad, rad);
|
||||
});
|
||||
|
|
@ -454,53 +454,53 @@ public class Fx{
|
|||
}),
|
||||
|
||||
clusterbomb = new Effect(10f, e -> {
|
||||
Draw.color(Color.WHITE, lightOrange, e.ifract());
|
||||
Lines.stroke(e.fract()*1.5f);
|
||||
Lines.poly(e.x, e.y, 4, e.fract()*8f);
|
||||
Lines.circle(e.x, e.y, e.ifract()*14f);
|
||||
Draw.color(Color.WHITE, lightOrange, e.fout());
|
||||
Lines.stroke(e.fin()*1.5f);
|
||||
Lines.poly(e.x, e.y, 4, e.fin()*8f);
|
||||
Lines.circle(e.x, e.y, e.fout()*14f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
coreexplosion = new Effect(13, e -> {
|
||||
Lines.stroke(3f-e.ifract()*2f);
|
||||
Draw.color(Color.ORANGE, Color.WHITE, e.ifract());
|
||||
Lines.spikes(e.x, e.y, 5f + e.ifract() * 40f, 6, 6);
|
||||
Lines.circle(e.x, e.y, 4f + e.ifract() * 40f);
|
||||
Lines.stroke(3f-e.fout()*2f);
|
||||
Draw.color(Color.ORANGE, Color.WHITE, e.fout());
|
||||
Lines.spikes(e.x, e.y, 5f + e.fout() * 40f, 6, 6);
|
||||
Lines.circle(e.x, e.y, 4f + e.fout() * 40f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
smoke = new Effect(100, e -> {
|
||||
Draw.color(Color.GRAY, new Color(0.3f, 0.3f, 0.3f, 1f), e.ifract());
|
||||
float size = 7f-e.ifract()*7f;
|
||||
Draw.color(Color.GRAY, new Color(0.3f, 0.3f, 0.3f, 1f), e.fout());
|
||||
float size = 7f-e.fout()*7f;
|
||||
Draw.rect("circle", e.x, e.y, size, size);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
railsmoke = new Effect(30, e -> {
|
||||
Draw.color(Color.LIGHT_GRAY, Color.WHITE, e.ifract());
|
||||
float size = e.fract()*4f;
|
||||
Draw.color(Color.LIGHT_GRAY, Color.WHITE, e.fout());
|
||||
float size = e.fin()*4f;
|
||||
Draw.rect("circle", e.x, e.y, size, size);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
chainsmoke = new Effect(30, e -> {
|
||||
Draw.color(lightGray);
|
||||
float size = e.fract()*4f;
|
||||
float size = e.fin()*4f;
|
||||
Draw.rect("circle", e.x, e.y, size, size);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
dashsmoke = new Effect(30, e -> {
|
||||
Draw.color(Color.CORAL, Color.GRAY, e.ifract());
|
||||
float size = e.fract()*4f;
|
||||
Draw.color(Color.CORAL, Color.GRAY, e.fout());
|
||||
float size = e.fin()*4f;
|
||||
Draw.rect("circle", e.x, e.y, size, size);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
spawn = new Effect(23, e -> {
|
||||
Lines.stroke(2f);
|
||||
Draw.color(Color.DARK_GRAY, Color.SCARLET, e.ifract());
|
||||
Lines.circle(e.x, e.y, 7f - e.ifract() * 6f);
|
||||
Draw.color(Color.DARK_GRAY, Color.SCARLET, e.fout());
|
||||
Lines.circle(e.x, e.y, 7f - e.fout() * 6f);
|
||||
Draw.reset();
|
||||
}),
|
||||
|
||||
|
|
@ -512,7 +512,7 @@ public class Fx{
|
|||
Draw.reset();
|
||||
}),
|
||||
transfer = new Effect(20, e -> {
|
||||
Draw.color(Color.SCARLET, Color.CLEAR, e.fract());
|
||||
Draw.color(Color.SCARLET, Color.CLEAR, e.fin());
|
||||
Lines.square(e.x, e.y, 4);
|
||||
Lines.lineAngle(e.x, e.y, e.rotation, 5f);
|
||||
Draw.reset();
|
||||
|
|
|
|||
|
|
@ -85,11 +85,11 @@ public enum PlaceMode{
|
|||
if(tile != null && control.input().validBreak(tilex, tiley)){
|
||||
if(tile.isLinked())
|
||||
tile = tile.getLinked();
|
||||
float fract = control.input().breaktime / tile.getBreakTime();
|
||||
float fin = control.input().breaktime / tile.getBreakTime();
|
||||
|
||||
if(android && control.input().breaktime > 0){
|
||||
Draw.color(Colors.get("breakStart"), Colors.get("break"), fract);
|
||||
Lines.poly(tile.drawx(), tile.drawy(), 25, 4 + (1f - fract) * 26);
|
||||
Draw.color(Colors.get("breakStart"), Colors.get("break"), fin);
|
||||
Lines.poly(tile.drawx(), tile.drawy(), 25, 4 + (1f - fin) * 26);
|
||||
}
|
||||
Draw.reset();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ public class Save12 extends SaveFileVersion {
|
|||
stream.writeFloat(Vars.player.x); //player x/y
|
||||
stream.writeFloat(Vars.player.y);
|
||||
|
||||
stream.writeInt(Vars.player.health); //player health
|
||||
stream.writeInt((int)Vars.player.health); //player health
|
||||
|
||||
stream.writeByte(control.upgrades().getWeapons().size - 1); //amount of weapons
|
||||
|
||||
|
|
@ -228,7 +228,7 @@ public class Save12 extends SaveFileVersion {
|
|||
stream.writeFloat(enemy.x); //x
|
||||
stream.writeFloat(enemy.y); //y
|
||||
stream.writeByte(enemy.tier); //tier
|
||||
stream.writeInt(enemy.health); //health
|
||||
stream.writeInt((int)enemy.health); //health
|
||||
}
|
||||
|
||||
//--MAP DATA--
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ public class Save13 extends SaveFileVersion {
|
|||
stream.writeFloat(Vars.player.x); //player x/y
|
||||
stream.writeFloat(Vars.player.y);
|
||||
|
||||
stream.writeInt(Vars.player.health); //player health
|
||||
stream.writeInt((int)Vars.player.health); //player health
|
||||
|
||||
stream.writeByte(control.upgrades().getWeapons().size - 1); //amount of weapons
|
||||
|
||||
|
|
@ -241,7 +241,7 @@ public class Save13 extends SaveFileVersion {
|
|||
stream.writeFloat(enemy.x); //x
|
||||
stream.writeFloat(enemy.y); //y
|
||||
stream.writeByte(enemy.tier); //tier
|
||||
stream.writeShort(enemy.health); //health
|
||||
stream.writeShort((short)enemy.health); //health
|
||||
}
|
||||
|
||||
//--MAP DATA--
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ public class Save14 extends SaveFileVersion{
|
|||
stream.writeFloat(Vars.player.x); //player x/y
|
||||
stream.writeFloat(Vars.player.y);
|
||||
|
||||
stream.writeInt(Vars.player.health); //player health
|
||||
stream.writeInt((int)Vars.player.health); //player health
|
||||
|
||||
stream.writeByte(control.upgrades().getWeapons().size - 1); //amount of weapons
|
||||
|
||||
|
|
@ -267,7 +267,7 @@ public class Save14 extends SaveFileVersion{
|
|||
stream.writeFloat(enemy.x); //x
|
||||
stream.writeFloat(enemy.y); //y
|
||||
stream.writeByte(enemy.tier); //tier
|
||||
stream.writeShort(enemy.health); //health
|
||||
stream.writeShort((short)enemy.health); //health
|
||||
}
|
||||
|
||||
//--MAP DATA--
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ public class Save15 extends SaveFileVersion {
|
|||
stream.writeFloat(player.x); //player x/y
|
||||
stream.writeFloat(player.y);
|
||||
|
||||
stream.writeInt(player.health); //player health
|
||||
stream.writeInt((int)player.health); //player health
|
||||
|
||||
stream.writeByte(control.upgrades().getWeapons().size - 1); //amount of weapons
|
||||
|
||||
|
|
@ -292,7 +292,7 @@ public class Save15 extends SaveFileVersion {
|
|||
stream.writeFloat(enemy.x); //x
|
||||
stream.writeFloat(enemy.y); //y
|
||||
stream.writeByte(enemy.tier); //tier
|
||||
stream.writeShort(enemy.health); //health
|
||||
stream.writeShort((short)enemy.health); //health
|
||||
}
|
||||
|
||||
//--MAP DATA--
|
||||
|
|
|
|||
|
|
@ -63,10 +63,10 @@ public class ItemPowerGenerator extends Generator{
|
|||
PowerEntity entity = tile.entity();
|
||||
|
||||
float maxPower = Math.min(powerCapacity - entity.power, powerOutput * Timers.delta());
|
||||
float mfract = maxPower/(powerOutput);
|
||||
float mfin = maxPower/(powerOutput);
|
||||
|
||||
if(entity.time > 0f){
|
||||
entity.time -= 1f/itemDuration*mfract;
|
||||
entity.time -= 1f/itemDuration*mfin;
|
||||
entity.power += maxPower;
|
||||
entity.time = Mathf.clamp(entity.time);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue