2025-10-27 17:05:16 +00:00
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class SimpleRotateGoblin : MonoBehaviour
|
|
|
|
|
{
|
2025-10-31 20:33:41 +00:00
|
|
|
|
2025-10-27 17:05:16 +00:00
|
|
|
public bool srotX;
|
|
|
|
|
public float srotXSpeed = 50f;
|
|
|
|
|
public bool srotY;
|
|
|
|
|
public float srotYSpeed = 50f;
|
|
|
|
|
public bool srotZ;
|
|
|
|
|
public float srotZSpeed = 50f;
|
|
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
|
void Update()
|
|
|
|
|
{
|
|
|
|
|
if (srotX == true)
|
|
|
|
|
{
|
|
|
|
|
transform.Rotate(Vector3.left * Time.deltaTime * srotXSpeed);
|
|
|
|
|
}
|
|
|
|
|
if (srotY == true)
|
|
|
|
|
{
|
|
|
|
|
transform.Rotate(Vector3.up * Time.deltaTime * srotYSpeed);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (srotZ == true)
|
|
|
|
|
{
|
|
|
|
|
transform.Rotate(Vector3.back * Time.deltaTime * srotZSpeed);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-31 20:33:41 +00:00
|
|
|
|
2025-10-27 17:05:16 +00:00
|
|
|
}
|