Fixed OpenGL vertex arrays / Fixed bullet shrink crop

This commit is contained in:
Anuken
2022-05-10 13:12:12 -04:00
parent 9ac75df34e
commit 3dd17474c5
10 changed files with 22 additions and 12 deletions

View File

@@ -89,7 +89,7 @@ public class UnitTypes{
//region neoplasm
public static @EntityDef({Unitc.class, Crawlc.class}) UnitType scuttler;
public static @EntityDef({Unitc.class, Crawlc.class}) UnitType latum;
//endregion
@@ -3909,9 +3909,9 @@ public class UnitTypes{
//region erekir - neoplasm
if(false)
scuttler = new NeoplasmUnitType("scuttler"){{
latum = new NeoplasmUnitType("latum"){{
health = 20000;
armor = 17;
armor = 12;
hitSize = 48f;
omniMovement = false;
rotateSpeed = 1.7f;
@@ -3919,7 +3919,10 @@ public class UnitTypes{
drawCell = false;
segments = 4;
drawBody = false;
hidden = true;
crushDamage = 2f;
aiController = HugAI::new;
targetAir = false;
segmentScl = 4f;
segmentPhase = 5f;

View File

@@ -1462,7 +1462,7 @@ public class UnitType extends UnlockableContent{
if(healFlash){
Tmp.c1.set(Color.white).lerp(healColor, Mathf.clamp(unit.healTime - unit.hitTime));
}
Draw.mixcol(Tmp.c1, Math.max(unit.hitTime, Mathf.clamp(unit.healTime)));
Draw.mixcol(Tmp.c1, Math.max(unit.hitTime, !healFlash ? 0f : Mathf.clamp(unit.healTime)));
if(unit.drownTime > 0 && unit.lastDrownFloor != null){
Draw.mixcol(Tmp.c1.set(unit.lastDrownFloor.mapColor).mul(0.83f), unit.drownTime * 0.9f);

View File

@@ -4,6 +4,7 @@ import mindustry.content.*;
import mindustry.entities.abilities.*;
import mindustry.graphics.*;
import mindustry.type.*;
import mindustry.world.meta.*;
/** This is just a preset. Contains no new behavior. */
public class NeoplasmUnitType extends UnitType{
@@ -13,10 +14,11 @@ public class NeoplasmUnitType extends UnitType{
outlineColor = Pal.neoplasmOutline;
immunities.addAll(StatusEffects.burning, StatusEffects.melting);
envDisabled = Env.none;
abilities.add(new RegenAbility(){{
//fully regen in 30 seconds
percentAmount = 1f / (30f * 60f) * 100f;
//fully regen in 70 seconds
percentAmount = 1f / (70f * 60f) * 100f;
}});
abilities.add(new LiquidExplodeAbility(){{
@@ -29,7 +31,9 @@ public class NeoplasmUnitType extends UnitType{
}});
//green flashing is unnecessary since they always regen
healFlash = false;
healFlash = true;
healColor = Pal.neoplasm1;
//TODO
//- liquid regen ability