@@ -111,6 +111,7 @@ public class AcceleratorBuild extends Building implements LaunchAnimator{
111
111
public float progress ;
112
112
public float time , launchHeat ;
113
113
public boolean launching ;
114
+ public float launchTime ;
114
115
115
116
protected float cloudSeed ;
116
117
@@ -156,7 +157,18 @@ public void draw(){
156
157
{
157
158
if (launching ){
158
159
Draw .reset ();
160
+
161
+ Draw .blend (Blending .additive );
162
+ Fill .light (x , y , 15 , launchBlock .size * tilesize * 1f , Tmp .c2 .set (Pal .accent ).a (launchTime / chargeDuration ), Tmp .c1 .set (Pal .accent ).a (0f ));
163
+ Draw .blend ();
164
+
165
+ Draw .rect (launchBlock .fullIcon , x , y );
166
+
167
+ Draw .z (Layer .bullet );
168
+ Draw .mixcol (Pal .accent , Mathf .clamp (launchTime / chargeDuration ));
169
+ Draw .color (1f , 1f , 1f , Interp .pow2In .apply (Mathf .clamp (launchTime / chargeDuration * 0.7f )));
159
170
Draw .rect (launchBlock .fullIcon , x , y );
171
+ Draw .reset ();
160
172
}else {
161
173
Drawf .shadow (x , y , launchBlock .size * tilesize * 2f , progress );
162
174
Draw .draw (Layer .blockBuilding , () -> {
@@ -175,7 +187,6 @@ public void draw(){
175
187
});
176
188
}
177
189
178
-
179
190
Draw .reset ();
180
191
}
181
192
@@ -366,13 +377,15 @@ public void beginLaunch(boolean launching){
366
377
@ Override
367
378
public void endLaunch (){
368
379
launching = false ;
380
+ launchTime = 0f ;
369
381
}
370
382
371
383
@ Override
372
384
public float zoomLaunch (){
373
385
float rawTime = launchDuration () - renderer .getLandTime ();
386
+ float shake = rawTime < chargeDuration ? Interp .pow10In .apply (Mathf .clamp (rawTime /chargeDuration )) : 0f ;
374
387
375
- Core .camera .position .set (this );
388
+ Core .camera .position .set (x , y ). add ( Tmp . v1 . setToRandomDirection (). scl ( shake * 2f ) );
376
389
377
390
if (rawTime < chargeDuration ){
378
391
float fin = rawTime / chargeDuration ;
@@ -389,6 +402,7 @@ public float zoomLaunch(){
389
402
@ Override
390
403
public void updateLaunch (){
391
404
float in = renderer .getLandTimeIn () * launchDuration ();
405
+ launchTime = launchDuration () - in ;
392
406
float tsize = Mathf .sample (CoreBlock .thrusterSizes , (in + 35f ) / launchDuration ());
393
407
394
408
float rawFin = renderer .getLandTimeIn ();
0 commit comments