예제 #1
0
 //Awake is always called before any Start functions
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     DontDestroyOnLoad(gameObject);
     Init();
     //GameManagerSetup();
 }
예제 #2
0
        public override void SetGameManager()
        {
            GameManager3D gameManager = GameManager3D.instance;

            //gameManager.GameManagerSetup();
            gameManager.uIManager.Timer_txt       = TimerTxt;
            gameManager.uIManager.Day_txt         = DayNumTxt;
            gameManager.uIManager.WeekDay_txt     = DayNameTxt;
            gameManager.uIManager.Month_txt       = MonthTxt;
            gameManager.uIManager.ShopMenuPanel   = ShopMenuPanel;
            gameManager.uIManager.ShopMenuContent = ShopMenuContent;
            gameManager.uIManager.ShopItemPref    = ShopMenuItemPref;
            gameManager.uIManager.InventoryPanel  = InventoryPanel;
            gameManager.levelManager.EndLevel_L   = EndLevel_L.position.x;
            gameManager.levelManager.EndLevel_R   = EndLevel_R.position.x;
            gameManager.levelManager.NextLevel_L  = (int)EndLevel_L.position.y;
            gameManager.levelManager.NextLevel_R  = (int)EndLevel_R.position.y;
            gameManager.skyManager.SkyBar         = Skybar;
            gameManager.InitManagers();
            OnLoaded();
        }
예제 #3
0
        public override void SetGameManager()
        {
            GameManager3D gameManager = GameManager3D.instance;

            gameManager.uIManager.Timer_txt       = TimerTxt;
            gameManager.uIManager.Day_txt         = DayNumTxt;
            gameManager.uIManager.WeekDay_txt     = DayNameTxt;
            gameManager.uIManager.Month_txt       = MonthTxt;
            gameManager.uIManager.ShopMenuPanel   = ShopMenuPanel;
            gameManager.uIManager.ShopMenuContent = ShopMenuContent;
            gameManager.uIManager.ShopItemPref    = ShopMenuItemPref;
            gameManager.uIManager.InventoryPanel  = InventoryPanel;
            gameManager.levelManager.EndLevel_L   = EndLevel_L.position.x;
            gameManager.levelManager.EndLevel_R   = EndLevel_R.position.x;
            gameManager.levelManager.NextLevel_L  = (int)EndLevel_L.position.y;
            gameManager.levelManager.NextLevel_R  = (int)EndLevel_R.position.y;
            gameManager.skyManager.SkyBar         = Skybar;
            gameManager.timeManager.UpdateTime1h?.Invoke();
            gameManager.timeManager.UpdateTime3h?.Invoke();
            gameManager.dayManager.ReturnCurrentDayMonth?.Invoke();
            OnLoaded();
        }