Beispiel #1
0
 public void LoadVertical(PerspectiveInitializer.ThemeState themeState)
 {
     transform.localRotation = Quaternion.Euler(transform.localRotation.x, transform.localRotation.y, -90);
     GetComponent<Rigidbody2D>().velocity = new Vector2(0, 0);
     GetComponent<Rigidbody2D>().gravityScale = 0;
     GetComponent<BoxCollider2D>().offset = new Vector2(-0.002533523f, 0.0006544814f);
     GetComponent<BoxCollider2D>().size = new Vector2(1.085341f, 1.980819f);
     GetComponent<Rigidbody2D>().transform.localPosition = new Vector3(2.66f, 3.1f, GetComponent<Rigidbody2D>().transform.localPosition.z);
     GetComponent<SpriteRenderer>().sprite = Resources.Load("Images/character-falling-v1") as Sprite;
     GetComponent<Animator>().runtimeAnimatorController = Resources.Load<RuntimeAnimatorController>("Animations/Main Character 2");
 }
Beispiel #2
0
 public void LoadHorizontal(PerspectiveInitializer.ThemeState themeState)
 {
     transform.localRotation = Quaternion.Euler(transform.localRotation.x, transform.localRotation.y, 0);
     GetComponent<Rigidbody2D>().gravityScale = 1;
     GetComponent<BoxCollider2D>().size = new Vector2(1.708464f, 3.398826f);
     GetComponent<BoxCollider2D>().offset = new Vector2(0.134553f, -0.07604933f);
     GetComponent<BoxCollider2D>().size = new Vector2(0.8542318f, 1.699413f);
     GetComponent<Rigidbody2D>().transform.localPosition = new Vector3(-3.459f, 6f, GetComponent<Rigidbody2D>().transform.localPosition.z);
     GetComponent<SpriteRenderer>().sprite = Resources.Load("Images/character-v2") as Sprite;
     GetComponent<Animator>().runtimeAnimatorController = Resources.Load<RuntimeAnimatorController>("Animations/Main Character");
 }
Beispiel #3
0
    public void LoadHorizontal(PerspectiveInitializer.ThemeState themeState)
    {
        if (orientation != 0)
        {
            orientation = 0;

            TimeText.transform.localRotation = Quaternion.Euler(0, 0, 0);
            TimeText.transform.localPosition = new Vector3(-239, 180, TimeText.transform.localPosition.z);

            DistanceText.transform.localRotation = Quaternion.Euler(0, 0, 0);
            DistanceText.transform.localPosition = new Vector3(-100, 180, DistanceText.transform.localPosition.z);

            AdditionalDistanceText.transform.localRotation = Quaternion.Euler(0, 0, 0);
            AdditionalDistanceText.transform.localPosition = new Vector3(-100, 156, AdditionalDistanceText.transform.localPosition.z);

            GameObject muteButton = GameObject.Find("MuteButton");
            GameObject pauseButton = GameObject.Find("PauseButton");
            float oldY = muteButton.transform.localPosition.y;
            muteButton.transform.localPosition = new Vector3(muteButton.transform.localPosition.x, oldY * -1, muteButton.transform.localPosition.z);
            pauseButton.transform.localPosition = new Vector3(muteButton.transform.localPosition.x - 40, oldY * -1, pauseButton.transform.localPosition.z);
            muteButton.transform.rotation = Quaternion.Euler(0, 0, 0);
            pauseButton.transform.rotation = Quaternion.Euler(0, 0, 0);
        }
    }
 public static void FinalizeObject()
 {
     s_Instance = null;
 }
 void Awake()
 {
     s_Instance = this;
 }
Beispiel #6
0
    public void LoadVertical(PerspectiveInitializer.ThemeState themeState)
    {
        if (orientation != 1)
        {
            orientation = 1;

            TimeText.transform.localRotation = Quaternion.Euler(0, 0, -90);
            TimeText.transform.localPosition = new Vector3(-300, 110, TimeText.transform.localPosition.z);

            DistanceText.transform.localRotation = Quaternion.Euler(0, 0, -90);
            DistanceText.transform.localPosition = new Vector3(-300, -40, DistanceText.transform.localPosition.z);

            AdditionalDistanceText.transform.localRotation = Quaternion.Euler(0, 0, -90);
            AdditionalDistanceText.transform.localPosition = new Vector3(-260, -40, AdditionalDistanceText.transform.localPosition.z);

            GameObject muteButton = GameObject.Find("MuteButton");
            GameObject pauseButton = GameObject.Find("PauseButton");
            muteButton.transform.localPosition = new Vector3(muteButton.transform.localPosition.x, muteButton.transform.localPosition.y * -1, muteButton.transform.localPosition.z);
            pauseButton.transform.localPosition = new Vector3(muteButton.transform.localPosition.x, (pauseButton.transform.localPosition.y * -1) + 40, pauseButton.transform.localPosition.z);
            muteButton.transform.rotation = Quaternion.Euler(0, 0, 270);
            pauseButton.transform.rotation = Quaternion.Euler(0, 0, 270);
        }
    }