r2mods/ilspy_dump/ror2_csproj/SetRandomRotation.cs

36 lines
641 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using UnityEngine;
public class SetRandomRotation : MonoBehaviour
{
public bool setRandomXRotation;
public bool setRandomYRotation;
public bool setRandomZRotation;
private void Start()
{
Vector3 localEulerAngles = base.transform.localEulerAngles;
if (setRandomXRotation)
{
float x = Random.Range(0f, 359f);
localEulerAngles.x = x;
}
if (setRandomYRotation)
{
float y = Random.Range(0f, 359f);
localEulerAngles.y = y;
}
if (setRandomZRotation)
{
float z = Random.Range(0f, 359f);
localEulerAngles.z = z;
}
base.transform.localEulerAngles = localEulerAngles;
}
private void Update()
{
}
}