ok, I fixed up my code for it to work, monodevelop compiles it. then Unity gives me an error.
Assets/dimensionswitcher.cs(6,20): error CS1519: Unexpected symbol `=' in class, struct, or interface member declaration
this is my new code:
using UnityEngine;
using System.Collections;
public class dimensionswitcher : MonoBehaviour {
bool dimension1 = 0;
dimension1 = true
bool dimension2 = 1;
dimension2 = true
void Update () {
call waitswitch
StartCoroutine (waitswitch());
if dimension1 = true {
if dimension2 = true {`
if (Input.GetKeyDown ("z"))
transform.position = new Vector3 (transform.position.x, transform.position.y, dimension1);
if (Input.GetKeyDown ("x"))
transform.position = new Vector3 (transform.position.x, transform.position.y, dimension2);
}
}
}
}
IEnumerator waitswitch(){
dimension1 = false
dimension2 = false
yield return new WaitForSeconds (3.0f);
dimension1 = true
dimension2 = true
}
Trending Articles
More Pages to Explore .....