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
}
}
↧