12 public override void OnPlay()
14 this.sr.enabled =
true;
15 this.aniExplosion.SetActive(
false);
16 this.destV = this.fromV;
17 this.fromV += this.startPos + this.startPos.Random() * 0.2f;
18 base.transform.position = this.fromV;
19 this.moveTween = base.transform.DOMove(this.destV, this.time,
false).SetEase(Ease.Linear).SetDelay(this.startDelay).OnComplete(delegate
21 this.sr.enabled =
false;
22 this.aniExplosion.SetActive(
true);
23 this.destPos.Animate(AnimeID.Dig,
true);
24 Action onComplete = this.onComplete;
25 if (onComplete !=
null)
29 EMono.Sound.Play(
"explode", this.destV, 1f);
30 Shaker.ShakeCam(
"meteor", 1f);
35 public static void Create(
Point center,
int radius,
int count, Action<int, Point> onComplete)
37 List<Point> list =
new List<Point>();
38 for (
int i = 0; i < count; i++)
40 Point p = center.Copy();
42 effect.startDelay = Rand.Range(0f, 0.5f);
48 Point randomSurface =
EMono._map.GetRandomSurface(center.x, center.z, radius,
true,
false);
49 foreach (
Point obj
in list)
51 randomSurface.Equals(obj);
54 list.Add(randomSurface);
58 effect.onComplete = delegate()
62 effect.Play(p, 0f,
null,
null);
67 public Animator aniExplosion;
70 public Vector3 startPos;