Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Getting a "type expected" error on WaitForSeconds

$
0
0
Monodevelop is telling me "type expected" between the ( and 3 on the WaitForSeconds of the code. public class dimensionswitcher : MonoBehaviour { IEnumerator Wait(); yield WaitForSeconds(3); bool dimension1 = true; bool dimension2 = false; void Update () { //if player hits z they switch to dim2 and cant switch for 3 sec if (Input.GetKeyDown ("z")) if (dimension1 == true) dimension2 = true; dimension1 = false; transform.position = new Vector2 (transform.position.x, transform.position.y); Wait //same as before but switch to dim1 if (Input.GetKeyDown ("x")) if (dimension2 == true) dimension2 = false; dimension1 = true; transform.position = new Vector2 (transform.position.x, transform.position.y); Wait } }

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>