Istix
❔ cs0670 unity 2d (very simple)
so basically, i was bored and decided to just make a "game" and yeah its weird. but basically i have a circle that spins infinitely that im trying to get to "if rotation = 310* stop" basically making a wheel of fortune or whatever. and my pc doenst have enough space to make a 180 frame photoshop animation (trust me, i would, i was really bored) and i just need to know what is wrong with the code, i keep getting cs0670 "field cannot have void type", lmk if u need more info. Code below (please dont judge i know, im bad at coding, i do it for school)
using System.Collections; using System.Collections.Generic; using UnityEngine; public class SpinGray : MonoBehaviour { public static void Stop() { transform.Rotate(new Vector3(0, 0, 320)); } // Start is called before the first frame update void Start() {
} // Update is called once per frame void Update() { transform.Rotate(new Vector3(0, 0, 120 * Time.deltaTime)); if (transform.Rotate(new Vector3(0,0,319))) { Stop; } } }
using System.Collections; using System.Collections.Generic; using UnityEngine; public class SpinGray : MonoBehaviour { public static void Stop() { transform.Rotate(new Vector3(0, 0, 320)); } // Start is called before the first frame update void Start() {
} // Update is called once per frame void Update() { transform.Rotate(new Vector3(0, 0, 120 * Time.deltaTime)); if (transform.Rotate(new Vector3(0,0,319))) { Stop; } } }
82 replies