WIP T3 tank
This commit is contained in:
BIN
core/assets-raw/sprites/units/precept-cell.png
Normal file
BIN
core/assets-raw/sprites/units/precept-cell.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 319 B |
BIN
core/assets-raw/sprites/units/precept-treads.png
Normal file
BIN
core/assets-raw/sprites/units/precept-treads.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 483 B |
BIN
core/assets-raw/sprites/units/precept-weapon-cell.png
Normal file
BIN
core/assets-raw/sprites/units/precept-weapon-cell.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 696 B |
BIN
core/assets-raw/sprites/units/precept-weapon.png
Normal file
BIN
core/assets-raw/sprites/units/precept-weapon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
BIN
core/assets-raw/sprites/units/precept.png
Normal file
BIN
core/assets-raw/sprites/units/precept.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@@ -557,3 +557,4 @@
|
|||||||
63135=unit-repair-tower|block-unit-repair-tower-ui
|
63135=unit-repair-tower|block-unit-repair-tower-ui
|
||||||
63134=merui|unit-merui-ui
|
63134=merui|unit-merui-ui
|
||||||
63133=osc|unit-osc-ui
|
63133=osc|unit-osc-ui
|
||||||
|
63132=precept|unit-precept-ui
|
||||||
|
|||||||
Binary file not shown.
@@ -80,7 +80,7 @@ public class UnitTypes{
|
|||||||
public static @EntityDef({Unitc.class, BuildingTetherc.class, Payloadc.class}) UnitType manifold, assemblyDrone, effectDrone;
|
public static @EntityDef({Unitc.class, BuildingTetherc.class, Payloadc.class}) UnitType manifold, assemblyDrone, effectDrone;
|
||||||
|
|
||||||
//tank
|
//tank
|
||||||
public static @EntityDef({Unitc.class, Tankc.class}) UnitType stell, locus, vanquish, conquer;
|
public static @EntityDef({Unitc.class, Tankc.class}) UnitType stell, locus, precept, vanquish, conquer;
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
@@ -2585,6 +2585,52 @@ public class UnitTypes{
|
|||||||
}});
|
}});
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
precept = new TankUnitType("precept"){{
|
||||||
|
hitSize = 26f;
|
||||||
|
treadPullOffset = 5;
|
||||||
|
speed = 0.64f;
|
||||||
|
rotateSpeed = 2f;
|
||||||
|
health = 2100;
|
||||||
|
armor = 8f;
|
||||||
|
itemCapacity = 0;
|
||||||
|
treadRects = new Rect[]{new Rect(16, 38, 30, 75), new Rect(44, 7, 17, 60)};
|
||||||
|
researchCostMultiplier = 0f;
|
||||||
|
|
||||||
|
weapons.add(new Weapon("precept-weapon"){{
|
||||||
|
layerOffset = 0.0001f;
|
||||||
|
reload = 30f;
|
||||||
|
shootY = 18f;
|
||||||
|
recoil = 1f;
|
||||||
|
rotate = true;
|
||||||
|
rotateSpeed = 1.3f;
|
||||||
|
mirror = false;
|
||||||
|
shootCone = 2f;
|
||||||
|
x = 0f;
|
||||||
|
y = -1f;
|
||||||
|
heatColor = Color.valueOf("f9350f");
|
||||||
|
cooldownTime = 30f;
|
||||||
|
bullet = new BasicBulletType(8f, 130){{
|
||||||
|
sprite = "missile-large";
|
||||||
|
width = 9.5f;
|
||||||
|
height = 15f;
|
||||||
|
lifetime = 30f;
|
||||||
|
hitSize = 6f;
|
||||||
|
shootEffect = Fx.shootTitan;
|
||||||
|
smokeEffect = Fx.shootSmokeTitan;
|
||||||
|
pierceCap = 2;
|
||||||
|
pierce = true;
|
||||||
|
pierceBuilding = true;
|
||||||
|
hitColor = backColor = trailColor = Color.valueOf("feb380");
|
||||||
|
frontColor = Color.white;
|
||||||
|
trailWidth = 3.1f;
|
||||||
|
trailLength = 8;
|
||||||
|
hitEffect = despawnEffect = Fx.blastExplosion;
|
||||||
|
splashDamageRadius = 20f;
|
||||||
|
splashDamage = 50f;
|
||||||
|
}};
|
||||||
|
}});
|
||||||
|
}};
|
||||||
|
|
||||||
vanquish = new TankUnitType("vanquish"){{
|
vanquish = new TankUnitType("vanquish"){{
|
||||||
hitSize = 28f;
|
hitSize = 28f;
|
||||||
treadPullOffset = 4;
|
treadPullOffset = 4;
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ public class BlockRenderer{
|
|||||||
procLinks.clear();
|
procLinks.clear();
|
||||||
procLights.clear();
|
procLights.clear();
|
||||||
|
|
||||||
var bounds = camera.bounds(Tmp.r3).grow(tilesize);
|
var bounds = camera.bounds(Tmp.r3).grow(tilesize * 2f);
|
||||||
|
|
||||||
//draw floor lights
|
//draw floor lights
|
||||||
floorTree.intersect(bounds, tile -> lightview.add(tile));
|
floorTree.intersect(bounds, tile -> lightview.add(tile));
|
||||||
|
|||||||
@@ -362,17 +362,26 @@ public class UnitType extends UnlockableContent{
|
|||||||
/** how much of a top part of a tread sprite is "cut off" relative to the pattern; this is corrected for */
|
/** how much of a top part of a tread sprite is "cut off" relative to the pattern; this is corrected for */
|
||||||
public int treadPullOffset = 0;
|
public int treadPullOffset = 0;
|
||||||
|
|
||||||
//SEGMENTED / CRAWL UNITS
|
//SEGMENTED / CRAWL UNITS (this is WIP content!)
|
||||||
|
|
||||||
//for crawlers
|
/** number of independent segments */
|
||||||
public int segments = 0;
|
public int segments = 0;
|
||||||
public float segmentSpacing = 2f, segmentScl = 4f, segmentPhase = 5f, segmentRotSpeed = 1f, segmentMaxRot = 30f;
|
/** magnitude of sine offset between segments */
|
||||||
|
public float segmentMag = 2f,
|
||||||
|
/** scale of sine offset between segments */
|
||||||
|
segmentScl = 4f,
|
||||||
|
/** index multiplier of sine offset between segments */
|
||||||
|
segmentPhase = 5f,
|
||||||
|
/** how fast each segment moves towards the next one */
|
||||||
|
segmentRotSpeed = 1f,
|
||||||
|
/** maximum difference between segment angles */
|
||||||
|
segmentMaxRot = 30f,
|
||||||
/** speed multiplier this unit will have when crawlSlowdownFrac is met. */
|
/** speed multiplier this unit will have when crawlSlowdownFrac is met. */
|
||||||
public float crawlSlowdown = 0.5f;
|
crawlSlowdown = 0.5f,
|
||||||
/** damage dealt to blocks under this tank/crawler every frame. */
|
/** damage dealt to blocks under this tank/crawler every frame. */
|
||||||
public float crushDamage = 0f;
|
crushDamage = 0f,
|
||||||
/** the fraction of solids under this block necessary for it to reach crawlSlowdown. */
|
/** the fraction of solids under this block necessary for it to reach crawlSlowdown. */
|
||||||
public float crawlSlowdownFrac = 0.55f;
|
crawlSlowdownFrac = 0.55f;
|
||||||
|
|
||||||
//MISSILE UNITS
|
//MISSILE UNITS
|
||||||
|
|
||||||
@@ -1377,6 +1386,7 @@ public class UnitType extends UnlockableContent{
|
|||||||
Draw.reset();
|
Draw.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO
|
||||||
public void drawCrawl(Crawlc crawl){
|
public void drawCrawl(Crawlc crawl){
|
||||||
Unit unit = (Unit)crawl;
|
Unit unit = (Unit)crawl;
|
||||||
applyColor(unit);
|
applyColor(unit);
|
||||||
@@ -1386,20 +1396,18 @@ public class UnitType extends UnlockableContent{
|
|||||||
TextureRegion[] regions = p == 0 ? segmentOutlineRegions : segmentRegions;
|
TextureRegion[] regions = p == 0 ? segmentOutlineRegions : segmentRegions;
|
||||||
|
|
||||||
for(int i = 0; i < segments; i++){
|
for(int i = 0; i < segments; i++){
|
||||||
float trns = Mathf.sin(crawl.crawlTime() + i * segmentPhase, segmentScl, segmentSpacing);
|
float trns = Mathf.sin(crawl.crawlTime() + i * segmentPhase, segmentScl, segmentMag);
|
||||||
|
|
||||||
//at segment 0, rotation = segmentRot, but at the last segment it is rotation
|
//at segment 0, rotation = segmentRot, but at the last segment it is rotation
|
||||||
float rot = Mathf.slerp(crawl.segmentRot(), unit.rotation, i / (float)(segments - 1));
|
float rot = Mathf.slerp(crawl.segmentRot(), unit.rotation, i / (float)(segments - 1));
|
||||||
float tx = Angles.trnsx(rot, trns), ty = Angles.trnsy(rot, trns);
|
float tx = Angles.trnsx(rot, trns), ty = Angles.trnsy(rot, trns);
|
||||||
|
|
||||||
|
|
||||||
//shadow
|
//shadow
|
||||||
Draw.color(0f, 0f, 0f, 0.2f);
|
Draw.color(0f, 0f, 0f, 0.2f);
|
||||||
//Draw.rect(regions[i], unit.x + tx + 2f, unit.y + ty - 2f, rot - 90);
|
//Draw.rect(regions[i], unit.x + tx + 2f, unit.y + ty - 2f, rot - 90);
|
||||||
|
|
||||||
applyColor(unit);
|
applyColor(unit);
|
||||||
|
|
||||||
|
|
||||||
//TODO merge outlines?
|
//TODO merge outlines?
|
||||||
Draw.rect(regions[i], unit.x + tx, unit.y + ty, rot - 90);
|
Draw.rect(regions[i], unit.x + tx, unit.y + ty, rot - 90);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,4 +25,4 @@ org.gradle.caching=true
|
|||||||
#used for slow jitpack builds; TODO see if this actually works
|
#used for slow jitpack builds; TODO see if this actually works
|
||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
archash=7f36a32bec
|
archash=9ae34c37ed
|
||||||
|
|||||||
Reference in New Issue
Block a user