Esempio n. 1
0
    private void Start()
    {
        //transition holds all our panels for transitioning
        transition = PanelTransitionManager.Instance;

        //set our upgrade panel inactive when game starts
        transition.upgradePanel.SetActive(false);
    }
 void Start()
 {
     //set the fps of platform
     if (Application.platform == RuntimePlatform.Android)
     {
         Application.targetFrameRate = 60;
         Screen.orientation          = ScreenOrientation.LandscapeLeft;
     }
     transition = PanelTransitionManager.Instance;
     SoundManager.Instance.PlayMainAudio(SoundManager.Instance.mainBG);
 }
 private void Awake()
 {
     //Our singleton pattern
     if (instance != null && instance != this)
     {
         // destroy the gameobject if an instance of this exist already
         Destroy(gameObject);
     }
     else
     {
         //Set our instance to this object/instance
         instance = this;
     }
 }
Esempio n. 4
0
 void Start()
 {
     cam        = Camera.main;
     transition = PanelTransitionManager.Instance;
 }
Esempio n. 5
0
    private void Start()
    {
        transition = PanelTransitionManager.Instance;

        #region Math settings initialization

        //Below checks if each math setting has been selected or not, then it sets the button color accordingly

        if (PlayerPrefs.GetInt("Addition", 1) == 0)
        {
            addition = false;
            Color temp = additionButton.color;
            temp.a = 0;
            additionButton.color = temp;
            PlayerPrefs.SetInt("Addition", 0);
        }

        if (PlayerPrefs.GetInt("Subtraction", 1) == 0)
        {
            subtraction = false;
            Color temp = subtractionButton.color;
            temp.a = 0;
            subtractionButton.color = temp;
            PlayerPrefs.SetInt("Subtraction", 0);
        }

        if (PlayerPrefs.GetInt("Multiplication", 1) == 0)
        {
            multiplication = false;
            Color temp = multiplicationButton.color;
            temp.a = 0;
            multiplicationButton.color = temp;
            PlayerPrefs.SetInt("Multiplication", 0);
        }

        if (PlayerPrefs.GetInt("Division", 1) == 0)
        {
            division = false;
            Color temp = divisionButton.color;
            temp.a = 0;
            divisionButton.color = temp;
            PlayerPrefs.SetInt("Division", 0);
        }

        if (PlayerPrefs.GetInt("TwoOp", 1) == 0)
        {
            twoOp = false;
            Color temp = twoOPButton.color;
            temp.a            = 0f;
            twoOPButton.color = temp;
            PlayerPrefs.SetInt("TwoOp", 0);
        }
        if (PlayerPrefs.GetInt("Parentheses", 1) == 0)
        {
            parentheses = false;
            Color temp = parenthesesButton.color;
            temp.a = 0f;
            parenthesesButton.color = temp;
            PlayerPrefs.SetInt("Parentheses", 0);
        }
        #endregion

        GameManager.OnGameStart += Initialize;
    }