Soulaha 9c9b8d1601 Pull request #19: GameLogic
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
2022-10-29 19:42:21 +00:00

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));
}
}