r2mods/ilspy_dump/ror2_csproj/RoR2/ExplodeRigidbodiesOnStart.cs

22 lines
369 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using UnityEngine;
namespace RoR2;
public class ExplodeRigidbodiesOnStart : MonoBehaviour
{
public Rigidbody[] bodies;
public float force;
public float explosionRadius;
private void Start()
{
Vector3 position = base.transform.position;
for (int i = 0; i < bodies.Length; i++)
{
bodies[i].AddExplosionForce(force, position, explosionRadius);
}
}
}