Merge in CEGJ/32bit_jam_conjure from GameLogic to Dev * commit '7e32d6c205e1d0a3dd65ae3f459a86dade0e0c9f': Full loop from main menu to levels to end scene Scene setup Can go from main menu to game and end game singleton game controller
28 lines
670 B
C#
28 lines
670 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Rotator : MonoBehaviour
|
|
{
|
|
|
|
[SerializeField]
|
|
private Vector3 rotSpeed;
|
|
private Vector3 EulerRot;
|
|
//[SerializeField]
|
|
//private List<Rigidbody> bodies;
|
|
private Rigidbody rb;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
//bodies.AddRange(GetComponentsInChildren<Rigidbody>());
|
|
rb = GetComponent<Rigidbody>();
|
|
EulerRot = rotSpeed;
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void FixedUpdate()
|
|
{
|
|
rb.MoveRotation(rb.rotation * Quaternion.Euler(EulerRot * Time.fixedDeltaTime));
|
|
}
|
|
}
|