// Use this for initialization void Start() { if (sceneManager != null) { manager = GameObject.Find("sceneManager").GetComponent("scriptSceneManager") as scriptSceneManager; } EnemyMoveSpeed *= 100; EnemyMoveSpeedReference = EnemyMoveSpeed; int dir = Random.Range(1, 4); switch (dir) { case 1: direction = Vector3.left; break; case 2: direction = Vector3.up; break; case 3: direction = Vector3.right; break; case 4: direction = Vector3.down; break; } }
// Use this for initialization void Start() { if (sceneManager != null) { manager = GameObject.Find("sceneManager").GetComponent("scriptSceneManager") as scriptSceneManager; } RotationSpeedX *= 100; RotationSpeedY *= 100; RotationSpeedZ *= 100; }
// Use this for initialization void Start () { if (sceneManager != null) { manager = GameObject.Find ("sceneManager").GetComponent ("scriptSceneManager") as scriptSceneManager; } }
// Use this for initialization void Start() { manager = GameObject.Find("sceneManager").GetComponent("scriptSceneManager") as scriptSceneManager; RotationSpeedX *= 100; RotationSpeedY *= 100; RotationSpeedZ *= 100; MoveSpeed *= 10; // Left if (transform.position.x < renderer.bounds.size.x / 2) { // Top if (transform.position.y < renderer.bounds.size.y / 2) { if (Random.Range(0, 2) == 0) { //Debug.Log("TOP LEFT - 0 - RIGHT"); direction = Vector3.right; } else { //Debug.Log("TOP LEFT - 1 - DOWN"); direction = Vector3.down; } } else { if (Random.Range(0, 2) == 0) { //Debug.Log("BOTTOM LEFT - 0 - RIGHT"); direction = Vector3.right; } else { //Debug.Log("BOTTOM LEFT - 1 - UP"); direction = Vector3.up; } } } else { if (transform.position.y < renderer.bounds.size.y / 2) { if (Random.Range(0, 2) == 0) { //Debug.Log("TOP RIGHT - 0 - LEFT"); direction = Vector3.left; } else { //Debug.Log("TOP RIGHT - 1 - DOWN"); direction = Vector3.down; } } else { if (Random.Range(0, 2) == 0) { //Debug.Log("BOTTOM RIGHT - 0 - LEFT"); direction = Vector3.left; } else { //Debug.Log("BOTTOM RIGHT - 1 - UP"); direction = Vector3.up; } } } cube = GameObject.Find("Cube"); }
// Use this for initialization void Start() { manager = GameObject.Find("sceneManager").GetComponent("scriptSceneManager") as scriptSceneManager; StartLevel(); }