using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class EnvironmentRotator : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private RotationController m_ship;
|
|
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
if (m_ship != null)
|
|
transform.RotateAround(m_ship.Position, m_ship.RotationAxis, m_ship.EnvironmentRotationPeriod * Time.deltaTime);
|
|
}
|
|
|
|
private void Reset()
|
|
{
|
|
m_ship = FindObjectOfType<RotationController>();
|
|
}
|
|
|
|
}
|