Esempio n. 1
0
 public void GameInitBase(DEFINE_GAMES.GameInfo gameInfo)
 {
     this.gameInfo      = gameInfo;
     this.gameStartTime = this.currentTime;
     this.isPlaying     = false;
     this.GameInit();
 }
Esempio n. 2
0
    public void Display(DEFINE_GAMES.GameInfo gameInfo, IDictionary <string, object> param = null)
    {
        this.btnPause.SetActive(true);
        BaseGameController gmCtrl = Util.InstantiateComponent <BaseGameController>(gameInfo.prefabPath, this.parentTransform);

        if (gmCtrl == null)
        {
            Debug.LogError(string.Format("nothing panel ::{0}", gameInfo.prefabPath));
            return;
        }
        StartCoroutine(DisplayNext(gmCtrl, gameInfo));
    }
Esempio n. 3
0
    private IEnumerator DisplayNext(BaseGameController gmCtrl, DEFINE_GAMES.GameInfo gameInfo)
    {
        this.isProcess = true;
        gmCtrl.GameInitBase(gameInfo);
        if (Mgrs.audioMgr != null)
        {
            Mgrs.audioMgr.PlayBGM(gmCtrl.bgmType);
        }
        this.lblGameTitle.text = gmCtrl.gameTitle;
        gmCtrl.gameObject.SetActive(false);
        yield return(StartCoroutine(StartTransitionOpen()));

        if (this.isGiveUp)
        {
            this.isProcess = false;
            yield break;
        }


        Mgrs.audioMgr.PlaySE(DEFINE_AUDIO.SE_TYPE.GAME_START);
        this.DestroyCurrentController();
        this.bgCamera.backgroundColor = this.speedColor;
        yield return(new WaitForSeconds(1f));

        if (this.isGiveUp)
        {
            this.isProcess = false;
            yield break;
        }
        this.SetStageInfo(gmCtrl);
        this.objStageInfo.SetActive(true);
        gmCtrl.gameObject.SetActive(true);
        yield return(StartCoroutine(StartTransitionClose()));

        if (this.isGiveUp)
        {
            this.isProcess = false;
            yield break;
        }
        gmCtrl.GameStartBase();
        this.currentGameCtrl = gmCtrl;
        this.isProcess       = false;
    }
Esempio n. 4
0
    public void GameNext(bool isFirst = false)
    {
        if (this.isProcess)
        {
            return;
        }
        if (!isFirst)
        {
            ScoreSaveData.instance.SetScore(this.gameId, this.gameLv);
            Mgrs.audioMgr.PlaySE(DEFINE_AUDIO.SE_TYPE.GAME_CLEAR);
        }
        this.gameLv++;
        Mgrs.sceneMgr.SetTimeScale(this.timeScale);
#if !DEBUG_ONE_GAME
        int gameIdx = GetNextGameIdx();
        this.currentGameInfo = this.targetGameList [gameIdx];
#endif
        this.Display(this.currentGameInfo);
    }
Esempio n. 5
0
 public void Init(DEFINE_GAMES.GameInfo gameInfo)
 {
     this.gameInfo     = gameInfo;
     this.lblName.text = gameInfo.title;
     GameManager.SetBestRecordLabel(this.lblBestRecord, gameInfo.id);
 }
Esempio n. 6
0
 public void StartGame(DEFINE_GAMES.GameInfo gameInfo)
 {
     this.StartGame(new DEFINE_GAMES.GameInfo[] { gameInfo });
 }