Sprite cleanup / Bullets

This commit is contained in:
Anuken
2020-02-08 14:48:04 -05:00
parent f46be924b9
commit 8814dbe29a
33 changed files with 578 additions and 538 deletions

View File

@@ -10,7 +10,7 @@ import mindustry.world.blocks.*;
import static mindustry.Vars.net;
@Component
abstract class FlyingComp implements Posc, Velc, Healthc{
abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{
transient float x, y;
transient Vec2 vel;
@@ -34,8 +34,8 @@ abstract class FlyingComp implements Posc, Velc, Healthc{
public void update(){
Floor floor = floorOn();
if(isGrounded() && floor.isLiquid && !vel.isZero(0.01f)){
if((splashTimer += vel.len()) >= 7f){
if(isGrounded() && floor.isLiquid){
if((splashTimer += Mathf.dst(deltaX(), deltaY())) >= 7f){
floor.walkEffect.at(x, y, 0, floor.color);
splashTimer = 0f;
}