예제 #1
0
        public void AddItem(ItemDTO itemDTO)
        {
            ItemItem itemConfig = GetConfig(itemDTO.itemId);
            bool     result     = m_ItemStrategyMap[itemConfig.showtype].AddItem(itemDTO);

            itemDTO.result = result;
            itemDTO.after  = m_ItemStrategyMap[itemConfig.showtype].GetItem(itemDTO.itemId);

            Global.gApp.gSystemMgr.GetNpcMgr().NpcQuestChange(FilterTypeConstVal.GET_ITEM, itemDTO.itemId, itemDTO.num);
            Global.gApp.gSystemMgr.GetNpcMgr().NpcQuestChange(FilterTypeConstVal.GET_ITEM_BY_TYPE, itemConfig.showtype, itemDTO.num);

            if (itemConfig.showtype == ItemTypeConstVal.NPC)
            {
                Global.gApp.gSystemMgr.GetNpcMgr().Fresh(false);
                Global.gApp.gSystemMgr.GetNpcMgr().ResetNpcAtkLevel();
            }

            ELKLog4Item elkLog = new ELKLog4Item(BehaviorTypeConstVal.LOG_ADD_ITEM, itemDTO);

            ELKLogMgr.GetInstance().MakeELKLog4Destroy(elkLog);
            ELKLogMgr.GetInstance().SendELKLog4Item(elkLog);

            //infoc 日志
            //InfoCLogUtil.instance.SendPropGainLog(itemDTO);
        }
예제 #2
0
 public void GameLose(int passId, int reviveTimes, int duration)
 {
     if (m_Data.passMaxPass)
     {
         // 表示有新关卡
         PassItem passItem = GetNextPassItem();
         if (passItem != null)
         {
             m_Data.passMaxPass = false;
             SaveData();
         }
     }
     if (m_Data.curPassId == passId)
     {
         //ELK 日志打点 游戏失败
         ELKLogMgr.GetInstance().SendELKLog4Pass(ELKLogMgr.PASS_FAIL, reviveTimes, duration);
     }
 }
예제 #3
0
        public void ReduceItem(ItemDTO itemDTO)
        {
            ItemItem itemConfig = GetConfig(itemDTO.itemId);
            bool     result     = m_ItemStrategyMap[itemConfig.showtype].ReduceItem(itemDTO);

            itemDTO.num    = Math.Abs(itemDTO.num);
            itemDTO.result = result;
            itemDTO.after  = m_ItemStrategyMap[itemConfig.showtype].GetItem(itemDTO.itemId);
            if (result)
            {
                ELKLog4Item elkLog = new ELKLog4Item(BehaviorTypeConstVal.LOG_REDUCE_ITEM, itemDTO);
                ELKLogMgr.GetInstance().MakeELKLog4Destroy(elkLog);
                ELKLogMgr.GetInstance().SendELKLog4Item(elkLog);


                //infoc 日志
                //InfoCLogUtil.instance.SendPropUseLog(itemDTO);
            }
        }
예제 #4
0
        public override void OnDestroy()
        {
            if (!m_Ended)
            {
                FightResultManager.instance.SetFightState(FightResultManager.FightState.QUIT);
                //ELK 日志打点 主动退出
                int revive = m_MainPlayer.GetComponent <Player>().GetPlayerData().GetReviveTimes();
                ELKLogMgr.GetInstance().SendELKLog4Pass(ELKLogMgr.PASS_QUIT, revive, (int)m_CurTime);
            }
            //记录次数
            Global.gApp.gSystemMgr.GetPassMgr().PassTimesChange(m_PassData.id);
            //Debug.Log("passId = " + m_PassData.id + ", m_ModeEnum = " + (int)m_ModeEnum);

            Debug.Log("m_Ended=" + m_Ended);
            //infoc 日志
            //InfoCLogUtil.instance.SendStageLog(m_PassData.id, (int)m_CurTime, 0f, m_MainPlayer.GetComponent<Player>().GetPlayerData().GetHitHp(), (int)m_ModeEnum);
            //af 日志
            AfLog(m_PassData.id);

            //重置暂存数据
            FightResultManager.instance.SetFightState(FightResultManager.FightState.FAIL);
            FightResultManager.instance.SetRetryType(FightResultManager.RetryType.NONE);
            FightResultManager.instance.SetCoin(0);
            FightResultManager.instance.SetRewardType(FightResultManager.RewardType.NONE);

            base.OnDestroy();
            m_MapGo.SetActive(false);
            if (m_BornNode != null)
            {
                Object.Destroy(m_BornNode);
            }
            m_TaskModeMgr.Destroy();
            m_PropMgr.Destroy();
            m_WaveMgr.Destroy();
            m_PlayerMgr.Destroy();
            //m_GameWinCondition.Destroy();
            //m_GamePlay.Destroy();
            Object.Destroy(m_MapGo);
            DestroyBullet();
            Global.gApp.gUiMgr.ClosePanel(Wndid.FightPanel);
        }
예제 #5
0
        private void OnDestroy()
        {
            ClearSingletons();

            //Debug.Log("gApp != null  ====  " + (gApp != null));
            //Debug.Log("gApp != null && gApp.gSystemMgr != null  ====  " + (gApp != null && gApp.gSystemMgr != null));
            //Debug.Log("gApp != null && gApp.gSystemMgr != null && gApp.gSystemMgr.GetMiscMgr().m_DeleteData == 0  ====  " + (gApp != null && gApp.gSystemMgr != null && gApp.gSystemMgr.GetMiscMgr().m_DeleteData == 0));
            if (gApp != null && gApp.gSystemMgr != null && gApp.gSystemMgr.GetMiscMgr().m_DeleteData == 0)
            {
                gApp.gSystemMgr.GetMiscMgr().FreshMicInfo();
                ELKLogMgr.GetInstance().SendELKLog4Destroy();
            }

            //SDK
            ////SDKDSAnalyticsManager.stopTrack();

#if (UNITY_EDITOR)
            if (gApp != null)
            {
                gApp.gGameData = null;
            }
            Resources.UnloadUnusedAssets();
#endif
        }
예제 #6
0
        public void GameSucess(int passId, int reviveTimes, int duration)
        {
            GameWinForBranchInfo(passId);
            if (m_Data.curPassId == passId)
            {
                //ELK 日志打点 游戏成功
                ELKLogMgr.GetInstance().SendELKLog4Pass(ELKLogMgr.PASS_SUCCESS, reviveTimes, duration);

                PassItem passItem   = GetCurPassItem();
                int      nextPassId = passItem.nextID;
                if (nextPassId > Global.gApp.gGameData.m_MaxNormalId)
                {
                    nextPassId         = Global.gApp.gGameData.m_MaxNormalId;
                    m_Data.passMaxPass = true;
                }
                else
                {
                    m_Data.passMaxPass   = false;
                    m_Data.hasOpenTankUi = false;
                }
                SetCurPassId(nextPassId);
            }
            else
            {
                if (m_Data.passMaxPass)
                {
                    //表示有新关卡
                    PassItem passItem = GetNextPassItem();
                    if (passItem != null)
                    {
                        m_Data.passMaxPass = false;
                        SaveData();
                    }
                }
            }
        }