Scenes: Allow any landscape orientation

parent 3b3ff1e5
...@@ -24,7 +24,9 @@ namespace Assets.Scripts ...@@ -24,7 +24,9 @@ namespace Assets.Scripts
{ {
size = BG.GetComponent<SpriteRenderer>().sprite.bounds.size; size = BG.GetComponent<SpriteRenderer>().sprite.bounds.size;
tra = BG.GetComponent<Transform>(); tra = BG.GetComponent<Transform>();
Screen.orientation = ScreenOrientation.LandscapeLeft; Screen.autorotateToLandscapeRight = true;
Screen.autorotateToLandscapeLeft = true;
Screen.orientation = ScreenOrientation.AutoRotation;
} }
void Update() void Update()
......
...@@ -19,7 +19,10 @@ public class GameOver : MonoBehaviour ...@@ -19,7 +19,10 @@ public class GameOver : MonoBehaviour
public Button buttonPlay; public Button buttonPlay;
void Start() void Start()
{ {
Screen.autorotateToLandscapeRight = true;
Screen.autorotateToLandscapeLeft = true;
Screen.orientation = ScreenOrientation.AutoRotation;
} }
void Update () void Update ()
......
...@@ -16,6 +16,9 @@ public class HighScores : MonoBehaviour { ...@@ -16,6 +16,9 @@ public class HighScores : MonoBehaviour {
// Use this for initialization // Use this for initialization
void Start () { void Start () {
Screen.autorotateToLandscapeRight = true;
Screen.autorotateToLandscapeLeft = true;
Screen.orientation = ScreenOrientation.AutoRotation;
ScoreText.text = ""; ScoreText.text = "";
Server = gameObject.GetComponent(typeof(Server)) as Server; Server = gameObject.GetComponent(typeof(Server)) as Server;
} }
......
...@@ -7,7 +7,9 @@ public class Menu : MonoBehaviour { ...@@ -7,7 +7,9 @@ public class Menu : MonoBehaviour {
// Use this for initialization // Use this for initialization
void Start () { void Start () {
Screen.autorotateToLandscapeRight = true;
Screen.autorotateToLandscapeLeft = true;
Screen.orientation = ScreenOrientation.AutoRotation;
} }
// Update is called once per frame // Update is called once per frame
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment