Exemplo n.º 1
0
    void InitGame()
    {
        //bool tempRotate = false;
        //if (lastSelectStageId == 302 || lastSelectStageId == 303 || lastSelectStageId == 306)
        //    tempRotate = true;

        SetupMainCamera(true, GAME_MODE.SINGLE, false);

        // 게임시작시 필요한 플레이어 정보들을 준비하도록 한다.
        //if (!TutorialMgr.TutorialActive)
        //    NetData.instance.SetSyncData( 0, DataManager.GetEquipedUnits());

        // GameInfoBase 생성
        GameInfoBase infoBase = ResourceMgr.InstAndGetComponent <GameInfoBase>("GameInfo/SingleGameInfo");

        (infoBase as SingleGameInfo).StageId = lastSelectStageId;
        //(infoBase as SingleGameInfo).playStageInfo = _LowDataMgr.instance.GetStageInfo(lastSelectStageId);
        (infoBase as SingleGameInfo).verifyToken = verifyToken;

        IsFirstReward = false;


        if (SceneManager.instance.testData.bSingleSceneTestStart)
        {
            Time.timeScale = 5f;
        }
        if (SceneManager.instance.testData.bQuestTestStart)
        {
            Time.timeScale = 5f;
        }
    }
Exemplo n.º 2
0
    private void RpcInvokeGame(string json)
    {
        if (!isLocalPlayer)
        {
            return;
        }
        GameInfoBase gameToInvoke = GameInfoBase.FromJson(json);

        Debug.Log((gameToInvoke as GameInfoExtended).title);
        client.clientState.currentGame = (gameToInvoke as GameInfoExtended);
        client.sceneManagement.LoadGameScreen(gameToInvoke.gameType);
    }
    void InitGame()
    {
        //SceneManager.GameMode = GAME_MODE.INFINITE;

        SetupMainCamera(true);

        // GameInfoBase 생성
        GameInfoBase infoBase = ResourceMgr.InstAndGetComponent <GameInfoBase>("GameInfo/SpecialGameInfo");

        (infoBase as SpecialGameInfo).StageId = lastSelectStageId;
        //(infoBase as GoldGameInfo).playStageInfo = _LowDataMgr.instance.GetStageInfo(lastSelectStageId);
    }
    void InitGame()
    {
        //SceneManager.GameMode = GAME_MODE.ARENA;
        //G_GameInfo.GameMode = GAME_MODE.ARENA;

        SetupMainCamera(true, GAME_MODE.ARENA);

        // GameInfoBase 생성
        GameInfoBase infoBase = ResourceMgr.InstAndGetComponent <GameInfoBase>("GameInfo/ArenaGameInfo");

        (infoBase as ArenaGameInfo).StageId = lastSelectStageId;
        //(infoBase as ArenaGameInfo).playStageInfo = _LowDataMgr.instance.GetLowDataDogFight(lastSelectStageId);
        (infoBase as ArenaGameInfo).RoomNo = selectedRoomNo;
    }
Exemplo n.º 5
0
    private void RpcStartHacked()
    {
        if (!isLocalPlayer)
        {
            return;
        }
        Debug.Log(hackedGameJson);
        GameInfoBase gameToInvoke = GameInfoBase.FromJson(hackedGameJson);

        Debug.Log((gameToInvoke as GameInfoExtended).title);
        client.clientState.currentGame = (gameToInvoke as GameInfoExtended);
        client.clientState.moneyMaker  = true;
        client.sceneManagement.LoadGameScreen(gameToInvoke.gameType);
    }
Exemplo n.º 6
0
    /*
     * public void SetStageNum(uint stageid)
     * {
     *  StageName = LowDataMgr.GetStage(stageid).stageName;
     *  StageMapName = LowDataMgr.GetStage(stageid).mapName;
     *  stageId = stageid;
     * }
     */
    void InitGame()
    {
        //SceneManager.GameMode = GAME_MODE.INFINITE;

        SetupMainCamera(true, GAME_MODE.TOWER);

        // GameInfoBase 생성
        GameInfoBase infoBase = ResourceMgr.InstAndGetComponent <GameInfoBase>("GameInfo/TowerGameInfo");

        (infoBase as TowerGameInfo).StageId = lastSelectStageId;
        //(infoBase as TowerGameInfo).playStageInfo = _LowDataMgr.instance.GetStageInfo(lastSelectStageId);

        CameraManager.instance.mainCamera.backgroundColor = new Color(0, 0, 0, 1);
    }
Exemplo n.º 7
0
    /*
     * public void SetStageNum(uint stageid)
     * {
     *  StageName = LowDataMgr.GetStage(stageid).stageName;
     *  StageMapName = LowDataMgr.GetStage(stageid).mapName;
     *  stageId = stageid;
     * }
     */
    void InitGame()
    {
        //SceneManager.GameMode = GAME_MODE.SINGLE;

        SetupMainCamera(true);

        // 게임시작시 필요한 플레이어 정보들을 준비하도록 한다.
        //if (!TutorialMgr.TutorialActive)
        //    NetData.instance.SetSyncData( 0, DataManager.GetEquipedUnits());

        // GameInfoBase 생성
        GameInfoBase infoBase = ResourceMgr.InstAndGetComponent <GameInfoBase>("GameInfo/RaidGameInfo");

        (infoBase as RaidGameInfo).StageId = lastSelectStageId;
        //(infoBase as SingleGameInfo).playStageInfo = _LowDataMgr.instance.GetStageInfo(lastSelectStageId);
        (infoBase as RaidGameInfo).verifyToken = verifyToken;
    }
Exemplo n.º 8
0
    //public static void StateStart()
    //{
    //    StateActive = true;
    //    NetworkClient.instance.SendPMsgBattleMapEnterMapReadyC();
    //}

    void InitGame()
    {
        //SceneManager.GameMode = GAME_MODE.FREEFIGHT;   //<-- 지금은 사용 않하는 듯 함
        SetupMainCamera(true, GAME_MODE.FREEFIGHT);

        // GameInfoBase 생성
        GameInfoBase infoBase = ResourceMgr.InstAndGetComponent <GameInfoBase>("GameInfo/FreeFightGameInfo");

        //G_GameInfo.GameMode = GAME_MODE.FREEFIGHT;
        (infoBase as FreeFightGameInfo).StageId = lastSelectStageId;
        //(infoBase as FreeFightGameInfo).playStageInfo = _LowDataMgr.instance.GetLowDataDogFight(lastSelectStageId);
        (infoBase as FreeFightGameInfo).RoomNo = selectedRoomNo;

        if (Application.loadedLevelName.Contains("Colosseum"))
        {
            CameraManager.instance.RtsCamera.Rotation = -150f;
        }
    }
    void InitGame(string loadSceneName)
    {
        GAME_MODE mode = GAME_MODE.SINGLE;

        if (StageName.Contains("tower"))
        {
            mode = GAME_MODE.TOWER;
        }
        else if (StageName.Contains("PPVP"))
        {
            mode = GAME_MODE.ARENA;
        }
        else if (StageName.Contains("battle_field"))
        {
            mode = GAME_MODE.FREEFIGHT;
        }

        SetupMainCamera(true, mode, false);
        //SetupMainCamera( true );

        // GameInfoBase 생성
        GameInfoBase infoBase = ResourceMgr.InstAndGetComponent <GameInfoBase>("GameInfo/TutorialGameInfo");

        if (IsTutorial)
        {
            infoBase.AutoMode = false;
        }

        if (loadSceneName.Equals("1zone"))
        {
            CameraManager.instance.RtsCamera.MaxDistance = 50f;
            CameraManager.instance.RtsCamera.Tilt        = 23f;
            CameraManager.instance.RtsCamera.Rotation    = 167f;
            CameraManager.instance.RtsCamera.Distance    = 13;
        }
    }
Exemplo n.º 10
0
    private void UnPackGames(JSonPack packs, JSonPack games, int[] unblockedPacks)
    {
        List <int> unblocked = new List <int>(unblockedPacks);

        clientState.gamePacks = new List <GamePack>();
        foreach (var gamePackJson in packs.values)
        {
            GamePack gamePack = ScriptableObject.CreateInstance <GamePack>();
            JsonUtility.FromJsonOverwrite(gamePackJson, gamePack);
            foreach (var gameIDPair in gamePack.gameIDPairs)
            {
                gameIDPair.gameInfo = GameInfoBase.FromJson(games.GetJsonOfId(gameIDPair.id));
            }
            gamePack.blocked = gamePack.startBlocked;
            if (unblocked.Contains(gamePack.id))
            {
                gamePack.blocked = false;
            }
            clientState.gamePacks.Add(gamePack);
            Debug.Log("GamePack " + clientState.gamePacks[clientState.gamePacks.Count - 1].id);
        }
        gamesLoaded = true;
        CmdGetLoginState();
    }
    IEnumerator initTestScene()
    {
        bool bLoadDone = false;

        _LowDataMgr.instance.LoadLowDataAllData((ratio, desc) => {
            if (ratio == 1f)
            {
                bLoadDone = true;
            }
            else
            {
                //yield return null;
                Debug.Log(" load data :" + (ratio * 100));
            }
        });

        //_LowDataMgr.instance.LoadLowDataForTest ();

        while (!bLoadDone)
        {
            yield return(null);
        }

        //yield return new WaitForSeconds (1f);

        //마지막으로 선택한 스테이지 아이디 저장

        /*
         * SingleGameState.lastSelectStageId = 110;//210;
         * SingleGameState.CurStageName = "1-10";//"2-10";
         * SingleGameState.verifyToken = 0;
         * SingleGameState.StageQuestList = new System.Collections.Generic.List<NetData.StageClearData>();
         *
         * for(int i=0;i<3;i++){
         *      NetData.StageClearData d = new NetData.StageClearData(ClearQuestType.NO_DIE_PARTNER, 0);
         *
         *      if (i==0){
         *              d.Type = ClearQuestType.NO_DIE_PARTNER;
         *              d.Value = 0;
         *              d.CurValueCount = 0;
         *              d.IsClear = true;
         *      }
         *      else if (i==1){
         *              d.Type = ClearQuestType.TIME_LIMIT;
         *              d.Value = 240;
         *              d.CurValueCount = 0;
         *              d.IsClear = true;
         *      }
         *      else if (i==2){
         *              d.Type = ClearQuestType.HP_PERCENT;
         *              d.Value = 50;
         *              d.CurValueCount = 0;
         *              d.IsClear = true;
         *      }
         *
         *      SingleGameState.StageQuestList.Add(d);
         * }
         */
        /////////////////

        //public void SetPlayCharInfo(
        //ulong charIdx, uint level, uint viplv, ulong exp, ulong attend, string lastAttend, string charName, uint userCharIndex, uint BaseAttack ,
        // uint guildId, ulong contri, bool isHideCostume)
        ulong  charIdx       = 10000007240729082;
        uint   level         = 73;
        uint   viplv         = 0;
        ulong  exp           = 84260;
        ulong  attent        = 0;
        string lastAttend    = "";
        string charName      = "kyh";
        uint   userCharIndex = 11000;
        uint   BaseAttack    = 10686;
        uint   guildId       = 30;
        ulong  contri        = 0;
        bool   isHideCos     = false;


        NetData.instance.GetUserInfo().SetPlayCharInfo(charIdx, level, viplv, exp, attent, lastAttend, charName, userCharIndex, BaseAttack, guildId, contri, isHideCos);
        NetData.instance.GetUserInfo().SetPlayCharAsset(1000, 1000, 164, 0, 0, 1140, 0, 0, 0);
        NetData.instance.MakePlayerSyncData(false);
        GameInfoBase infoBase = ResourceMgr.InstAndGetComponent <GameInfoBase>("GameInfo/TowerGameInfo");

        TowerGameState.IsMapLoad            = true;
        lastSelectStageId                   = 10003;
        (infoBase as TowerGameInfo).StageId = lastSelectStageId;

        //yield return new WaitForSeconds (2.0f);

        //GameObject.Find ("UNIT_0").transform.localPosition = new Vector3 (-48.3f, 0.2f, 65.19f);
        //GameObject.Find ("UNIT_0").transform.localPosition = new Vector3 (-12.7f, 0.2f, -59.91f);

        //		GameObject regenObj = GameObject.Find ("CutSceneTestManager").GetComponent<CutSceneTestManager> ().unit_regen_pos;
        //		BoxCollider col = regenObj.GetComponent<BoxCollider> ();
        //		Vector3 colliderPos = regenObj.transform.TransformPoint (col.center);
        //
        //		GameObject.Find ("UNIT_0").transform.position = colliderPos;

        yield return(null);
    }
Exemplo n.º 12
0
 public static void ResetGameInfo()
 {
     _GameInfo     = null;
     _MyController = null;
 }