コード例 #1
0
        public void ReloadThis()
        {
            SceneManager.LoadScene("MemoryGame");

            //Reconfigura algumas variaveis importantes
            ImportantVariables.Start();
        }
コード例 #2
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
            return;
        }

        DontDestroyOnLoad(gameObject);
    }
コード例 #3
0
 // Use this for initialization
 void Start()
 {
     rb           = GetComponent <Rigidbody2D> ();
     swordManager = Camera.main.GetComponent <ImportantVariables>();
 }