Example #1
0
    // Use this for initialization
    void Awake()
    {
        if (SceneManager.GetActiveScene().name == "World Map")
        {
            wm = GameObject.Find("WorldMapManager").GetComponent <worldMapManager>();
        }

        ui_card1 = GameObject.Find("Canvas/Card1").GetComponent <Image>();
        //// Timer Settings
        //time -= Time.deltaTime;
        //timerText.text = time.ToString("f0");

        //Check if instance already exists
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }
        DontDestroyOnLoad(gameObject);
        //Call the InitGame function to initialize the first level
        // InitGame();
    }
Example #2
0
 // Use this for initialization
 void Start()
 {
     wm = GameObject.Find("WorldMapManager").GetComponent <worldMapManager>();
 }