Beispiel #1
0
    private void ShowRecord()
    {
        EditorGUILayout.BeginVertical(GUI.skin.box);
        FightRecordManager.bAutoSaveRecord = EditorGUILayout.Toggle("是否自动保存游戏录像", FightRecordManager.bAutoSaveRecord);

        if (GUILayout.Button("结束录制"))
        {
            FightRecordManager.EndRecord(true, false);
        }

        EditorGUILayout.EndVertical();
    }
Beispiel #2
0
    protected override void OnDestroy()
    {
        base.OnDestroy();

        m_player = null;

        FightRecordManager.EndRecord(false, false);

        for (var i = 0; i < m_stateHandlers.Length; ++i)
        {
            m_stateHandlers[i] = null;
        }
    }
 private void _Packet(ScSyncResult msg)
 {
     if (msg.result == 1)
     {
         if (Level.current.isPvP)
         {
             FightStatistic.AddPvpAsyncFightTimes();
         }
         else if (Level.current.isPvE)
         {
             FightStatistic.AddPveAsyncFightTimes();
         }
         FightRecordManager.EndRecord(true, true, msg.roomId.ToString());
     }
 }
Beispiel #4
0
    void _Packet(ScRoomOver p)
    {
        // Clear team data if battle ended
        ResetTeamData();

        FightRecordManager.Record(p);

        FightRecordManager.EndRecord(false, false);
        #region NetStat statistic
#if NETSTAT
        var r = modulePVP.useGameSession ? session.receiver : modulePVP.receiver;
        if (r != null)
        {
            r.pauseNetStatistic = true;
        }
#endif
        #endregion
    }
Beispiel #5
0
    void _Packet(ScChaseTaskOver roleOver)
    {
        FightRecordManager.Set(roleOver);
        FightRecordManager.EndRecord(false, false);
        if (roleOver.result == 0)
        {
            TaskInfo info = moduleChase.lastStartChase == null ? null : moduleChase.lastStartChase.taskConfigInfo;
            SetPVESettlement(roleOver.reward, info, roleOver.overStar, roleOver.friendPoint, roleOver.npcPoint);
            //change cache data
            moduleChase.OnChaseTaskFinish(roleOver.overStar);
        }
        else if (roleOver.result != 0)
        {
            moduleGlobal.ShowMessage(ConfigText.GetDefalutString(402, roleOver.result));
        }

        DispatchModuleEvent(EventGameOverSettlement, settlementReward);

        ObjectManager.enableUpdate = true;
    }
Beispiel #6
0
    void _Packet(ScTeamStartLoading p)
    {
        EventManager.RemoveEventListener(Events.SCENE_LOAD_PROGRESS, OnLoadingProgress);
        EventManager.AddEventListener(Events.SCENE_LOAD_PROGRESS, OnLoadingProgress);

        Logger.LogInfo("Team room start loading! Stage: [{0}]", p.stage);
        if (p.members.Length == 1)
        {
            FightRecordManager.EndRecord(false, false);
        }
        FightRecordManager.Set(p);

        loading        = true;
        m_loadingType  = EnumPVELoadingType.Initialize;
        m_progress     = 0;
        m_lastProgress = 0;

        mode      = (TeamMode)p.type;
        stage     = p.stage;
        timeLimit = p.timeLimit;
        allowQuit = p.allowQuit;

        p.members.CopyTo(ref m_members);
        onlineMembers.Clear();
        onlineMembers.AddRange(m_members);

        FightRecordManager.RecordLog <LogInt>(log =>
        {
            log.tag   = (byte)TagType.onlineMembersCount;
            log.value = onlineMembers?.Count ?? 0;
        });

        m_playerIndex = m_members.FindIndex(mi => mi.roleId == modulePlayer.id_);

        Logger.LogDetail("Player roomIndex: {0}", m_playerIndex);

        DispatchModuleEvent(EventLoadingStart);

        modulePVE.StartTeamLevel(p);
        loading = true;
    }