argh
This commit is contained in:
@@ -1518,14 +1518,14 @@ public class Blocks implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Bulletc b){
|
||||
public void init(Bullet b){
|
||||
for(int i = 0; i < rays; i++){
|
||||
Damage.collideLine(b, b.team(), hitEffect, b.x(), b.y(), b.rotation(), rayLength - Math.abs(i - (rays / 2)) * 20f);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Bulletc b){
|
||||
public void draw(Bullet b){
|
||||
super.draw(b);
|
||||
Draw.color(Color.white, Pal.lancerLaser, b.fin());
|
||||
//Draw.alpha(b.fout());
|
||||
|
||||
@@ -390,19 +390,19 @@ public class Bullets implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Bulletc b){
|
||||
public void init(Bullet b){
|
||||
b.vel().setLength(0.6f + Mathf.random(2f));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Bulletc b){
|
||||
public void draw(Bullet b){
|
||||
Draw.color(Pal.lightFlame, Pal.darkFlame, Color.gray, b.fin());
|
||||
Fill.circle(b.x(), b.y(), 3f * b.fout());
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Bulletc b){
|
||||
public void update(Bullet b){
|
||||
if(Mathf.chance(0.04 * Time.delta())){
|
||||
Tile tile = world.tileWorld(b.x(), b.y());
|
||||
if(tile != null){
|
||||
@@ -442,7 +442,7 @@ public class Bullets implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Bulletc b){
|
||||
public void draw(Bullet b){
|
||||
}
|
||||
};
|
||||
|
||||
@@ -462,7 +462,7 @@ public class Bullets implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Bulletc b){
|
||||
public void draw(Bullet b){
|
||||
}
|
||||
};
|
||||
|
||||
@@ -549,7 +549,7 @@ public class Bullets implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hit(Bulletc b, float x, float y){
|
||||
public void hit(Bullet b, float x, float y){
|
||||
super.hit(b, x, y);
|
||||
|
||||
for(int i = 0; i < 3; i++){
|
||||
|
||||
@@ -26,31 +26,31 @@ public class Fx{
|
||||
none = new Effect(0, 0f, e -> {}),
|
||||
|
||||
unitSpawn = new Effect(30f, e -> {
|
||||
if(!(e.data instanceof Unitc)) return;
|
||||
if(!(e.data instanceof Unit)) return;
|
||||
|
||||
alpha(e.fin());
|
||||
|
||||
float scl = 1f + e.fout() * 2f;
|
||||
|
||||
Unitc unit = (Unitc)e.data;
|
||||
Unit unit = e.data();
|
||||
rect(unit.type().region, e.x, e.y,
|
||||
unit.type().region.getWidth() * Draw.scl * scl, unit.type().region.getHeight() * Draw.scl * scl, 180f);
|
||||
|
||||
}),
|
||||
|
||||
unitControl = new Effect(30f, e -> {
|
||||
if(!(e.data instanceof Unitc)) return;
|
||||
if(!(e.data instanceof Unit)) return;
|
||||
|
||||
Unitc select = (Unitc)e.data;
|
||||
Unit select = e.data();
|
||||
|
||||
mixcol(Pal.accent, 1f);
|
||||
alpha(e.fout());
|
||||
rect(select.type().icon(Cicon.full), select.x(), select.y(), select.rotation() - 90f);
|
||||
rect(select.type().icon(Cicon.full), select.x, select.y, select.rotation - 90f);
|
||||
alpha(1f);
|
||||
Lines.stroke(e.fslope() * 1f);
|
||||
Lines.square(select.x(), select.y(), e.fout() * select.hitSize() * 2f, 45);
|
||||
Lines.square(select.x, select.y, e.fout() * select.hitSize * 2f, 45);
|
||||
Lines.stroke(e.fslope() * 2f);
|
||||
Lines.square(select.x(), select.y(), e.fout() * select.hitSize() * 3f, 45f);
|
||||
Lines.square(select.x, select.y, e.fout() * select.hitSize * 3f, 45f);
|
||||
reset();
|
||||
}),
|
||||
|
||||
@@ -1256,7 +1256,7 @@ public class Fx{
|
||||
unitShieldBreak = new Effect(35, e -> {
|
||||
if(!(e.data instanceof Unitc)) return;
|
||||
|
||||
Unitc unit = e.data();
|
||||
Unit unit = e.data();
|
||||
|
||||
float radius = unit.hitSize() * 1.3f;
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ public class UnitTypes implements ContentList{
|
||||
@Override
|
||||
public void update(Unitc player){
|
||||
|
||||
if(player.timer().get(Playerc.timerAbility, healReload)){
|
||||
if(player.timer().get(Player.timerAbility, healReload)){
|
||||
wasHealed = false;
|
||||
|
||||
Units.nearby(player.team(), player.x, player.y, healRange, unit -> {
|
||||
@@ -707,8 +707,8 @@ public class UnitTypes implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Playerc player){
|
||||
if(player.timer.get(Playerc.timerAbility, healReload)){
|
||||
public void update(Player player){
|
||||
if(player.timer.get(Player.timerAbility, healReload)){
|
||||
if(indexer.eachBlock(player, healRange, other -> other.entity.damaged(), other -> {
|
||||
other.entity.heal(other.entity.maxHealth() * healPercent / 100f);
|
||||
Fx.healBlockFull.at(other.drawx(), other.drawy(), other.block().size, Pal.heal);
|
||||
@@ -782,9 +782,9 @@ public class UnitTypes implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Playerc player){
|
||||
public void update(Player player){
|
||||
|
||||
if(player.timer.get(Playerc.timerAbility, healReload)){
|
||||
if(player.timer.get(Player.timerAbility, healReload)){
|
||||
wasHealed = false;
|
||||
|
||||
Units.nearby(player.team(), player.x, player.y, healRange, unit -> {
|
||||
@@ -834,12 +834,12 @@ public class UnitTypes implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getRotationAlpha(Playerc player){
|
||||
public float getRotationAlpha(Player player){
|
||||
return 0.6f - player.shootHeat * 0.3f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float spreadX(Playerc player){
|
||||
public float spreadX(Player player){
|
||||
return player.shootHeat * 2f;
|
||||
}
|
||||
|
||||
@@ -850,18 +850,18 @@ public class UnitTypes implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Playerc player){
|
||||
public void update(Player player){
|
||||
float scl = 1f - player.shootHeat / 2f*Time.delta();
|
||||
player.vel().scl(scl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getExtraArmor(Playerc player){
|
||||
public float getExtraArmor(Player player){
|
||||
return player.shootHeat * 30f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Playerc player){
|
||||
public void draw(Player player){
|
||||
if(player.shootHeat <= 0.01f) return;
|
||||
|
||||
Shaders.build.progress = player.shootHeat;
|
||||
@@ -901,10 +901,10 @@ public class UnitTypes implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Playerc player){
|
||||
public void update(Player player){
|
||||
super.update(player);
|
||||
|
||||
if(player.timer.get(Playerc.timerAbility, effectReload)){
|
||||
if(player.timer.get(Player.timerAbility, effectReload)){
|
||||
|
||||
Units.nearby(player.team(), player.x, player.y, effectRange, unit -> {
|
||||
//unit.applyEffect(StatusEffects.overdrive, effectDuration);
|
||||
@@ -955,12 +955,12 @@ public class UnitTypes implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getRotationAlpha(Playerc player){
|
||||
public float getRotationAlpha(Player player){
|
||||
return 0.5f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Playerc player){
|
||||
public void update(Player player){
|
||||
float scl = scld(player);
|
||||
if(Mathf.chanceDelta((0.15 * scl))){
|
||||
Fx.hitLancer.at(Pal.lancerLaser, player.x, player.y);
|
||||
@@ -970,7 +970,7 @@ public class UnitTypes implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(Playerc player){
|
||||
public void draw(Player player){
|
||||
float scl = scld(player);
|
||||
if(scl < 0.01f) return;
|
||||
Draw.color(Pal.lancerLaser);
|
||||
@@ -980,7 +980,7 @@ public class UnitTypes implements ContentList{
|
||||
Draw.blend();
|
||||
}
|
||||
|
||||
float scld(Playerc player){
|
||||
float scld(Player player){
|
||||
return Mathf.clamp((player.vel().len() - minV) / (maxV - minV));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@ public class Weathers implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawOver(Weatherc state){
|
||||
public void drawOver(WeatherState state){
|
||||
rand.setSeed(0);
|
||||
Tmp.r1.setCentered(Core.camera.position.x, Core.camera.position.y, Core.graphics.getWidth() / renderer.minScale(), Core.graphics.getHeight() / renderer.minScale());
|
||||
Tmp.r1.grow(padding);
|
||||
@@ -78,7 +78,7 @@ public class Weathers implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawOver(Weatherc state){
|
||||
public void drawOver(WeatherState state){
|
||||
Tmp.r1.setCentered(Core.camera.position.x, Core.camera.position.y, Core.graphics.getWidth() / renderer.minScale(), Core.graphics.getHeight() / renderer.minScale());
|
||||
Tmp.r1.grow(padding);
|
||||
Core.camera.bounds(Tmp.r2);
|
||||
@@ -110,7 +110,7 @@ public class Weathers implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawUnder(Weatherc state){
|
||||
public void drawUnder(WeatherState state){
|
||||
Tmp.r1.setCentered(Core.camera.position.x, Core.camera.position.y, Core.graphics.getWidth() / renderer.minScale(), Core.graphics.getHeight() / renderer.minScale());
|
||||
Tmp.r1.grow(padding);
|
||||
Core.camera.bounds(Tmp.r2);
|
||||
@@ -170,15 +170,15 @@ public class Weathers implements ContentList{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Weatherc state){
|
||||
public void update(WeatherState state){
|
||||
|
||||
for(Unitc unit : Groups.unit){
|
||||
for(Unit unit : Groups.unit){
|
||||
unit.impulse(force.x * state.intensity(), force.y * state.intensity());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawOver(Weatherc state){
|
||||
public void drawOver(WeatherState state){
|
||||
rand.setSeed(0);
|
||||
Tmp.r1.setCentered(Core.camera.position.x, Core.camera.position.y, Core.graphics.getWidth() / renderer.minScale(), Core.graphics.getHeight() / renderer.minScale());
|
||||
Tmp.r1.grow(padding);
|
||||
|
||||
Reference in New Issue
Block a user