コード例 #1
0
 private void Awake()
 {
     Stat.resetAll();//Reset stats
     //Get object and childs from the scene
     touch     = GameObject.Find("Touch").GetComponent <ParticleSystem>();
     UIManager = GameObject.Find("ButtonActionController").GetComponent <BtActions>();
     arrow     = touch.gameObject.transform.Find("arrow");
     clockwise = touch.gameObject.transform.Find("clock");
     res       = new Vector3(Screen.width, Screen.height, 0);
     //get the current resolution
 }
コード例 #2
0
    void victory()
    {
        string sceneName = SceneManager.GetActiveScene().name;
        int    id        = int.Parse(sceneName.Substring(5));

        //Save the completion of the level id to a file
        SaveManager.addCompletedLevel(id);
        //Activate the victory pop up
        BtActions btA = GameObject.Find("ButtonActionController").GetComponent <BtActions>();

        btA.victory();
    }