Upload from upload_mods.ps1

This commit is contained in:
Nathaniel Cosford
2025-06-04 16:13:32 +09:30
commit 7345f42201
470 changed files with 51966 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
using UnityEngine;
public class FPSRandomRotateAngle : MonoBehaviour
{
public bool RotateX;
public bool RotateY;
public bool RotateZ = true;
private Transform t;
// Use this for initialization
void Awake()
{
t = transform;
}
// Update is called once per frame
void OnEnable()
{
var rotateVector = Vector3.zero;
if (RotateX)
rotateVector.x = Random.Range(0, 360);
if (RotateY)
rotateVector.y = Random.Range(0, 360);
if (RotateZ)
rotateVector.z = Random.Range(0, 360);
t.Rotate(rotateVector);
}
}