@@ -36,8 +36,12 @@ public class ArcBulletType extends BulletType{
36
36
public boolean bloomTrail = true ;
37
37
38
38
public boolean drawZone = false ;
39
- public float zoneLayer = Layer .bullet - 1f ;
40
- public float targetRadius = 1f , zoneRadius = 3f * 8f , shrinkRad = -1f ;
39
+ public float zoneLayer = Layer .bullet ;
40
+ public float targetRadius = 12f , zoneRadius = 3f * 8f ;
41
+ public float shortSpikeWidth = -1f , shortSpike = -1f ;
42
+ public float longSpikeWidth = -1f , longSpike = -1f ;
43
+ public float spokeWidth = 2f , spokeLength = 8f ;
44
+ public float spikeSpin = 0.5f ;
41
45
public float zoneLifeOffset = 0f ;
42
46
public Color zoneColor = Color .red , targetColor = Color .red ;
43
47
@@ -75,6 +79,11 @@ public void initDrawSize(float range){
75
79
76
80
@ Override
77
81
public void init (){
82
+ if (longSpike < 0 ) longSpike = zoneRadius / 2f ;
83
+ if (shortSpike < 0 ) shortSpike = longSpike / 2f ;
84
+ if (shortSpikeWidth < 0 ) shortSpikeWidth = shortSpike / 2f ;
85
+ if (longSpikeWidth < 0 ) longSpikeWidth = shortSpikeWidth ;
86
+
78
87
if (fragBullet instanceof ArcBulletType a ){
79
88
a .isInheritive = true ;
80
89
a .zoneLifeOffset = a .zoneLifeOffset * a .lifetimeScl + lifetimeScl ;
@@ -260,20 +269,31 @@ public void drawTrail(Bullet b){
260
269
}
261
270
262
271
public void drawTargetZone (Bullet b ){
263
- Draw .z (zoneLayer - 0.01f );
272
+ Draw .z (zoneLayer );
273
+ Draw .color (zoneColor );
274
+ float x = b .aimX , y = b .aimY ;
275
+ float ang = Mathf .randomSeed (b .id , 360 ) + b .time * spikeSpin ;
264
276
if (drawZone && zoneRadius > 0f ){
265
- Draw .color (zoneColor , 0.25f + 0.25f * Mathf .absin (16f , 1f ));
266
- Fill .circle (b .aimX , b .aimY , zoneRadius );
267
- Draw .color (zoneColor , 0.5f );
268
- float fin = zoneLifeOffset + b .fin () * (1f - zoneLifeOffset );
269
- float subRad = fin * (zoneRadius + shrinkRad ),
270
- inRad = Math .max (0 , zoneRadius - subRad ),
271
- outRad = Math .min (zoneRadius , zoneRadius + shrinkRad - subRad );
277
+ PMDrawf .ring (x , y , zoneRadius , zoneRadius + 2f );
278
+ for (int i = 0 ; i < 4 ; i ++){
279
+ float a = ang + 90 * i ;
280
+ Drawf .tri (x + Angles .trnsx (a , zoneRadius ), y + Angles .trnsy (a , zoneRadius ), shortSpikeWidth , shortSpike , a + 180 );
281
+ }
282
+ for (int i = 0 ; i < 4 ; i ++){
283
+ float a = ang + 45 + 90 * i ;
284
+ Drawf .tri (x + Angles .trnsx (a , zoneRadius ), y + Angles .trnsy (a , zoneRadius ), longSpikeWidth , longSpike , a + 180 );
285
+ }
286
+ }
287
+
288
+ float fin = zoneLifeOffset + b .fin () * (1f - zoneLifeOffset );
289
+ PMDrawf .progressRing (x , y , zoneRadius + 4f , zoneRadius + 8f , fin );
272
290
273
- PMDrawf .ring (b .aimX , b .aimY , inRad , outRad );
291
+ PMDrawf .ring (x , y , targetRadius , targetRadius + 2f );
292
+ Lines .stroke (spokeWidth );
293
+ for (int i = 0 ; i < 4 ; i ++){
294
+ float a = -ang + 90 * i ;
295
+ Lines .lineAngleCenter (x + Angles .trnsx (a , targetRadius ), y + Angles .trnsy (a , targetRadius ), a , spokeLength , false );
274
296
}
275
- Draw .z (zoneLayer );
276
- PMDrawf .target (b .aimX , b .aimY , Time .time * 1.5f + Mathf .randomSeed (b .id , 360f ), targetRadius , targetColor != null ? targetColor : b .team .color , b .team .color , 1f );
277
297
}
278
298
279
299
@ Override
0 commit comments