// Update is called once per frame void Update() { // Update planet position transform.position = OOPDataManager.RotateAroundPoint(transform.position, Vector3.zero, Vector3.up, movementSpeed * Time.deltaTime);; // Update planet position reference OOPDataManager.UpdatePlanetPosition(ID, transform.position); }
private void Awake() { // Singleton Pattern // If instance is already instantiated and instance isn't equal to this instance destroy if (instance != null && instance != this) { Destroy(this); } // Otherwise set instance as self else { instance = this; } }