23 public string sound =
"explode";
36 Vector2 position =
rb.position;
39 ParticleSystem p = Object.Instantiate(
particle);
40 p.transform.position = position;
41 TweenUtil.Delay(5f, delegate
43 if ((
bool)p && (
bool)p.gameObject)
45 Object.DestroyImmediate(p.gameObject);
49 RaycastHit2D[] array = Physics2D.CircleCastAll(position,
radius, Vector3.forward);
50 foreach (RaycastHit2D raycastHit2D
in array)
52 Rigidbody2D component = raycastHit2D.collider.GetComponent<Rigidbody2D>();
55 Vector2 vector = component.position - position;
56 component.AddForce(vector *
force * (1f + component.mass *
massPower), ForceMode2D.Impulse);
85 base.gameObject.SetActive(value:
false);
static SoundManager Sound
override void OnFixedUpdate()