Fixed build errors
This commit is contained in:
@@ -27,7 +27,7 @@ allprojects {
|
|||||||
gdxVersion = '1.9.8'
|
gdxVersion = '1.9.8'
|
||||||
roboVMVersion = '2.3.0'
|
roboVMVersion = '2.3.0'
|
||||||
aiVersion = '1.8.1'
|
aiVersion = '1.8.1'
|
||||||
uCoreVersion = 'dd5eb72'
|
uCoreVersion = '88326fc'
|
||||||
|
|
||||||
getVersionString = {
|
getVersionString = {
|
||||||
String buildVersion = getBuildVersion()
|
String buildVersion = getBuildVersion()
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ public class AmmoType {
|
|||||||
public final float quantityMultiplier;
|
public final float quantityMultiplier;
|
||||||
/**Reload speed multiplier.*/
|
/**Reload speed multiplier.*/
|
||||||
public float speedMultiplier = 1f;
|
public float speedMultiplier = 1f;
|
||||||
|
/**Bullet recoil strength.*/
|
||||||
|
public float recoil = 0f;
|
||||||
/**Effect created when shooting.*/
|
/**Effect created when shooting.*/
|
||||||
public Effect shootEffect = Fx.none;
|
public Effect shootEffect = Fx.none;
|
||||||
/**Extra smoke effect created when shooting.*/
|
/**Extra smoke effect created when shooting.*/
|
||||||
|
|||||||
@@ -94,10 +94,15 @@ public class Weapon extends Upgrade{
|
|||||||
|
|
||||||
void shootInternal(Player p, float x, float y, float rotation, boolean left){
|
void shootInternal(Player p, float x, float y, float rotation, boolean left){
|
||||||
Angles.shotgun(shots, spacing, rotation, f -> bullet(p, x, y, f + Mathf.range(inaccuracy)));
|
Angles.shotgun(shots, spacing, rotation, f -> bullet(p, x, y, f + Mathf.range(inaccuracy)));
|
||||||
tr.trns(rotation, 3f);
|
|
||||||
|
|
||||||
AmmoType type = p.inventory.getAmmo();
|
AmmoType type = p.inventory.getAmmo();
|
||||||
|
|
||||||
|
tr.trns(rotation + 180f, type.recoil);
|
||||||
|
|
||||||
|
p.velocity.add(tr);
|
||||||
|
|
||||||
|
tr.trns(rotation, 3f);
|
||||||
|
|
||||||
Effects.shake(shake, shake, x, y);
|
Effects.shake(shake, shake, x, y);
|
||||||
Effects.effect(ejectEffect, x, y, rotation * -Mathf.sign(left));
|
Effects.effect(ejectEffect, x, y, rotation * -Mathf.sign(left));
|
||||||
Effects.effect(type.shootEffect, x + tr.x, y + tr.y, rotation, p);
|
Effects.effect(type.shootEffect, x + tr.x, y + tr.y, rotation, p);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package io.anuke.mindustry.world.blocks.types.units;
|
package io.anuke.mindustry.world.blocks.types.units;
|
||||||
|
|
||||||
import com.badlogic.gdx.math.Rectangle;
|
import com.badlogic.gdx.math.Rectangle;
|
||||||
|
import com.badlogic.gdx.math.Vector2;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.entities.Unit;
|
import io.anuke.mindustry.entities.Unit;
|
||||||
import io.anuke.mindustry.entities.Units;
|
import io.anuke.mindustry.entities.Units;
|
||||||
@@ -10,6 +11,7 @@ import io.anuke.mindustry.world.Block;
|
|||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
import io.anuke.mindustry.world.flags.BlockFlag;
|
import io.anuke.mindustry.world.flags.BlockFlag;
|
||||||
import io.anuke.ucore.core.Timers;
|
import io.anuke.ucore.core.Timers;
|
||||||
|
import io.anuke.ucore.graphics.Draw;
|
||||||
import io.anuke.ucore.graphics.Shapes;
|
import io.anuke.ucore.graphics.Shapes;
|
||||||
import io.anuke.ucore.util.Angles;
|
import io.anuke.ucore.util.Angles;
|
||||||
import io.anuke.ucore.util.EnumSet;
|
import io.anuke.ucore.util.EnumSet;
|
||||||
@@ -40,13 +42,28 @@ public class ResupplyPoint extends Block{
|
|||||||
public void drawLayer(Tile tile) {
|
public void drawLayer(Tile tile) {
|
||||||
ResupplyPointEntity entity = tile.entity();
|
ResupplyPointEntity entity = tile.entity();
|
||||||
|
|
||||||
if(entity.target != null){
|
if(entity.strength > 0f){
|
||||||
float ang = entity.angleTo(entity.target);
|
float ang = entity.angleTo(entity.lastx, entity.lasty);
|
||||||
float len = 5f;
|
float len = 5f;
|
||||||
|
float x1 = tile.drawx() + Angles.trnsx(ang, len), y1 = tile.drawy() + Angles.trnsy(ang, len);
|
||||||
|
float dstTo = Vector2.dst(x1, y1, entity.lastx, entity.lasty);
|
||||||
|
float space = 4f;
|
||||||
|
|
||||||
|
float xf = entity.lastx - x1, yf = entity.lasty - y1;
|
||||||
|
|
||||||
Shapes.laser("transfer", "transfer-end",
|
Shapes.laser("transfer", "transfer-end",
|
||||||
tile.drawx() + Angles.trnsx(ang, len), tile.drawy() + Angles.trnsy(ang, len),
|
x1, y1, entity.lastx, entity.lasty, entity.strength);
|
||||||
entity.target.x, entity.target.y, entity.strength);
|
|
||||||
|
Draw.color("accent");
|
||||||
|
for(int i = 0; i < dstTo/space - 1; i ++){
|
||||||
|
float fract = (i * space) / dstTo + (Timers.time()/4f) % (1f/(dstTo/space));
|
||||||
|
Draw.alpha(fract);
|
||||||
|
Draw.rect("transfer-arrow", x1 + fract*xf, y1 + fract*yf,
|
||||||
|
8, 8*entity.strength, ang);
|
||||||
|
}
|
||||||
|
|
||||||
|
Draw.color();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,6 +93,8 @@ public class ResupplyPoint extends Block{
|
|||||||
|
|
||||||
if(entity.target != null && entity.power.amount >= powerUse){
|
if(entity.target != null && entity.power.amount >= powerUse){
|
||||||
entity.power.amount -= powerUse;
|
entity.power.amount -= powerUse;
|
||||||
|
entity.lastx = entity.x;
|
||||||
|
entity.lasty = entity.y;
|
||||||
entity.strength = Mathf.lerpDelta(entity.strength, 1f, 0.07f * Timers.delta());
|
entity.strength = Mathf.lerpDelta(entity.strength, 1f, 0.07f * Timers.delta());
|
||||||
}else{
|
}else{
|
||||||
entity.strength = Mathf.lerpDelta(entity.strength, 0f, 0.05f * Timers.delta());
|
entity.strength = Mathf.lerpDelta(entity.strength, 0f, 0.05f * Timers.delta());
|
||||||
@@ -113,6 +132,6 @@ public class ResupplyPoint extends Block{
|
|||||||
|
|
||||||
public class ResupplyPointEntity extends TileEntity{
|
public class ResupplyPointEntity extends TileEntity{
|
||||||
public Unit target;
|
public Unit target;
|
||||||
public float strength, rotation = 90;
|
public float strength, rotation = 90, lastx, lasty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,5 @@
|
|||||||
#Sat Apr 28 09:57:33 EDT 2018
|
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-bin.zip
|
||||||
|
|||||||
Reference in New Issue
Block a user