예제 #1
0
    void Start()
    {
        ui     = GameObject.FindGameObjectsWithTag("UILink")[0].GetComponent <UILink>();
        uiGame = new UIGame();
        uiGame.Init();

        oxygen        = ui.oxygenImage;
        testlist      = new List <int>();
        currentOxygen = maxOxygen;
    }
예제 #2
0
    void Awake()
    {
        if (instance != null)
        {
            GameObject.Destroy(gameObject);
            return;
        }


        SetupStates();

        gameUI.Init(this);
        instance = this;
    }
예제 #3
0
        public void Init()
        {
            if (!playerGao)
            {
                playerGao = Instantiate(playerPrefab);
                playerGao.transform.SetParent(GameObject.FindGameObjectWithTag("DontDestroyGo").transform);
            }
            if (!guiMgr)
            {
                guiMgr = Instantiate(guiMgrPrefab);
                guiMgr.transform.SetParent(GameObject.FindGameObjectWithTag("DontDestroyGo").transform);
            }

            player = playerGao.GetComponent <Player>();

            uiGame = guiMgr.GetComponent <UIGame>();
            uiGame.Init(player);
            uiGame.transform.GetChild(1).GetComponent <Compass>().Init(player);
        }
예제 #4
0
 public void init()
 {
     uigame = new UIGame();
     uigame.Init();
 }