Beispiel #1
0
    void OnGUI()
    {
        if (GUILayout.Button("Show pop 1"))
        {
            UIManager.GetInstance().OpenUI("LuaTest1", (table) => { LuaHelper.CallFunctionWithSelf(table, "LuaTestView:Init"); },
                                           (table) => { LuaHelper.CallFunctionWithSelf(table, "LuaTestView:Refresh"); });
        }

        if (GUILayout.Button("Show pop 2"))
        {
            UIManager.GetInstance().OpenUI("LuaTest2", (table) => { LuaHelper.CallFunctionWithSelf(table, "LuaTestView:Init"); },
                                           (table) => { LuaHelper.CallFunctionWithSelf(table, "LuaTestView:Refresh"); });
        }

        if (GUILayout.Button("Show pop 3"))
        {
            UIManager.GetInstance().OpenUI("LuaTest3", (table) => { LuaHelper.CallFunctionWithSelf(table, "LuaTestView:Init"); },
                                           (table) => { LuaHelper.CallFunctionWithSelf(table, "LuaTestView:Refresh"); });
        }

        if (GUILayout.Button("Show pop 4"))
        {
            UIManager.GetInstance().OpenUI("LuaTest4", (table) => { LuaHelper.CallFunctionWithSelf(table, "LuaTestView:Init"); },
                                           (table) => { LuaHelper.CallFunctionWithSelf(table, "LuaTestView:Refresh"); });
        }

        if (GUILayout.Button("Show message"))
        {
            UIManager.GetInstance().ShowMessageBox("This is a message: " + Time.realtimeSinceStartup, () => { LogModule.DebugLog("Who clicked OK?"); },
                                                   () => { LogModule.DebugLog("I clicked cancel."); });
        }
    }
 public void UpdateAwardItemState(int nTurnID)
 {
     ActivenessAwardItem[] Item = m_ItemGrid.GetComponentsInChildren <ActivenessAwardItem>();
     for (int i = 0; i < Item.Length; ++i)
     {
         if (Item[i].TurnID == nTurnID)
         {
             Tab_ActivenessAward pAward = TableManager.GetActivenessAwardByID(nTurnID, 0);
             if (pAward == null)
             {
                 LogModule.DebugLog("ActivenessAward: ActivenessAward.txt can't find line " + nTurnID);
                 return;
             }
             AwardState awardState = AwardState.AWARD_CANNNTHAVE;
             bool       bFlag      = GameManager.gameManager.PlayerDataPool.AwardActivityData.GetActivenessAwardFlag(nTurnID);
             if (bFlag == false && Activeness > pAward.MiniActiveness)
             {
                 awardState = AwardState.AWARD_CANHAVE;
             }
             else if (bFlag == true)
             {
                 awardState = AwardState.AWARD_HAVEDONE;
             }
             else
             {
                 awardState = AwardState.AWARD_CANNNTHAVE;
             }
             Item[i].AwardButtonState = awardState;
             return;
         }
     }
 }
Beispiel #3
0
        //==================================
        private void  _onChangeFlyWingData(int oldId, int newId)
        {
            if (m_FlyWingDataDictionary.ContainsKey(oldId))
            {
                m_FlyWingDataDictionary.Remove(oldId);
                FlyWingData temFlyWingData = new FlyWingData();
                temFlyWingData.InitFlyWingData(newId);
                m_FlyWingDataDictionary.Add(newId, temFlyWingData);

                if (m_CurEquipFlyWingId == oldId)
                {
                    m_CurEquipFlyWingId = newId;
                }
                // 重新计算所有属性
                _onCaluAllPlayerProperty();

                if (FlyWingRoot.Instance())
                {
                    FlyWingRoot.Instance().UpdataFlyWingDataById(oldId, newId);
                }
            }
            else
            {
                LogModule.DebugLog("addFlyWingData falid ,Not have ~~", oldId);
            }
        }
Beispiel #4
0
    void OnLoadItem(GameObject achieveItem, object param)
    {
        if (null == achieveItem)
        {
            LogModule.DebugLog("load achieve item error");
            return;
        }

        int signItemCount = TableManager.GetAchieveNotice().Count;

        for (int i = 0; i < signItemCount; i++)
        {
            GameObject        newItem = Utils.BindObjToParent(achieveItem, ItemParent);
            Tab_AchieveNotice pLin    = TableManager.GetAchieveNoticeByID(i, 0);
            if (pLin != null && null != newItem)
            {
                Transform iconTransform = newItem.transform.FindChild("Icon");
                if (null != iconTransform && null != iconTransform.gameObject.GetComponent <UISprite>())
                {
                    iconTransform.gameObject.GetComponent <UISprite>().spriteName = pLin.Icon;
                }

                Transform nameTransform = newItem.transform.FindChild("Name");
                if (null != nameTransform && null != nameTransform.gameObject.GetComponent <UILabel>())
                {
                    nameTransform.gameObject.GetComponent <UILabel>().text = pLin.Name;
                }
            }
        }
        ItemParent.GetComponent <UIGrid>().repositionNow = true;
    }
 public void ChangeCardDone(bool isSuccess)
 {
     if (isSuccess)
     {
         LogModule.DebugLog("Change Card Done Success!");
     }
 }
Beispiel #6
0
    public static void OpenWindow_Circle(GameObject UIObj, int nRadius, string strText, string TextLocation,
                                         int nMotionType             = 0, bool bIsBoxEnable = false, bool bIsMaskEnable = false, bool bIsForever = false,
                                         OnShowGuide deleOnShowGuide = null, OnShowGuide afterShowGuide = null, bool isHasGuideFrame = false, bool bIsFocusAnim = true, Action onClickBlackCallback = null)
    {
        if (PlayerPreferenceData.NewPlayerGuideClose)
        {
            return;
        }
        if (null == UIObj)
        {
            LogModule.DebugLog(UIObj + "UIobj is null!!!");
            return;
        }
        Debug.LogWarning("FTE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
        GuideSpriteType sprType = GuideSpriteType.NoFrame;

        if (isHasGuideFrame)
        {
            sprType = GuideSpriteType.Circle;
        }
        //TextLocation = "center";
        m_CurPlayerGuideInfo.Init(UIObj, nRadius, nRadius, strText, TextLocation,
                                  nMotionType, bIsBoxEnable, bIsMaskEnable, bIsForever, bIsFocusAnim, sprType, deleOnShowGuide, afterShowGuide, 0f, 0f, onClickBlackCallback);
        //PlayerGuideInfo curInfo = new PlayerGuideInfo(UIObj, nRadius, nRadius, strText, TextLocation, nMotionType, bIsBoxEnable, bIsMaskEnable, bIsForever, GuideSpriteType.Circle);
        IsOpenFlag = true;

        UIManager.ShowUI(UIInfo.NewPlayerGuidRoot, OnOpenWindow);
    }
    void OnClick(Vector2 screenPos)
    {
        if (EditMode)
        {
            return;
        }

        if (_clickAnimationing)
        {
            return;
        }

        if (State == LodState.Lod0)
        {
            OnClickLod0(screenPos);
            EventManager.GetInstance().SendEvent(EventId.MapBlockSelected, screenPos);

#if UNITY_EDITOR
            Coord     c    = Layout.ScreenPos2Coord(MapCamera, screenPos);
            MapTileVO data = ProxyManager.GetInstance().Get <MapProxy>().GetTile(c);
            LogModule.DebugLog(string.Format("coord:{0},height:{1},type:{2},blockType:{3},camp{4}", data.coord, data.height, data.type, data.blockType, data.camp));
#endif
        }
        else if (State == LodState.Lod1)
        {
            OnClickLod1(screenPos);
        }
    }
Beispiel #8
0
    // 下载远程文件列表回调
    void OnDownloadRemoteResFileList(bool bSuccess)
    {
        if (bSuccess)
        {
            m_curUpdateStep = UpdateStep.CompareRes;

            // 远程文件列表请求成功,开始查找需要下载的资源
            LogModule.DebugLog("load file success: " + CacheVersionPath + "/" + ResFileListName);
            string localFileListName = LocalVersionPath + "/" + ResFileListName;

            LogModule.DebugLog(localFileListName);
            // 如果读取目录没有文件,将包体文件拷贝出
            if (!File.Exists(localFileListName))
            {
                m_versionFileDownloader = DownloadHelper.StartDownload(this, GetAppDataUrl(AppVersionFolder, ResFileListName), false, localFileListName, OnDownloadLocalResFileList);
            }
            else
            {
                OnDownloadLocalResFileList(true);
            }
        }
        else
        {
            // 下载远程文件列表失败,应该重新请求
            UpdateFinish(UpdateResult.GetFileListFail);
        }
    }
Beispiel #9
0
    /// <summary>
    /// 检查是否可以在密聊频道发送消息
    /// </summary>
    bool CheckIsCanSendTell()
    {
        //密聊频道检测一下当前是否有密聊对象
        if (CurChannelType != ChatInfoLogic.CHANNEL_TYPE.CHAT_TYPE_TELL)
        {
            return(true);
        }
        UInt64 tellGuid = GameManager.gameManager.PlayerDataPool.LastTellGUID;
        String tellName = GameManager.gameManager.PlayerDataPool.LastTellName;

        if (tellGuid == GlobeVar.INVALID_GUID || tellName == "")
        {
            Obj_MainPlayer _mainPlayer = Singleton <ObjManager> .GetInstance().MainPlayer;

            if (_mainPlayer == null)
            {
                LogModule.DebugLog("_mainPlayer is Null");
                return(false);
            }

            _mainPlayer.SendNoticMsg(false, "#{11166}");
            return(false);
        }

        return(true);
    }
Beispiel #10
0
    /// <summary>
    /// ɾ³ý×ʱ¼äδʹÓõÄÌõÄ¿
    /// </summary>
    private void RemoveLastUnUsedClip()
    {
        float fSmallestTime = 99999999.0f;
        int   smallestId    = -1;

        foreach (SoundClip clip in m_SoundClipMap.Values)
        {
            if (fSmallestTime > clip.m_LastActiveTime)
            {
                smallestId    = clip.m_uID;
                fSmallestTime = clip.m_LastActiveTime;
            }
        }

        LogModule.DebugLog("RemoveLastUnUsedClip( " + smallestId.ToString() + " )");  //ÒÔºó×¢Ê͵ô

        m_SoundClipMap.Remove(smallestId);

#if UNITY_WP8
        Tab_Sounds soundsTab = TableManager.GetSoundsByID(smallestId, 0);
        if (null != soundsTab)
        {
            BundleManager.ReleaseUnreferencedSoundBundle(BundleManager.GetBundleLoadUrl("", soundsTab.FullPathName + ".data"));
        }
#endif
    }
Beispiel #11
0
    // 创建坐骑
    public void InitMount(Obj_OtherPlayer PlayerObj, int nMountID)
    {
        if (PlayerObj == null)
        {
            return;
        }

        Tab_MountBase MountBase = TableManager.GetMountBaseByID(nMountID, 0);

        if (null == MountBase)
        {
            LogModule.DebugLog("MountBase.txt has not Line ID=" + nMountID);
            return;
        }
        Tab_CharMount MountTable = TableManager.GetCharMountByID(MountBase.ModelID, 0);

        if (MountTable == null)
        {
            LogModule.DebugLog("CharMount.txt has not Line ID=" + MountBase.ModelID);
            return;
        }
        GameObject Obj = PlayerObj.gameObject;

        if (Obj == null)
        {
            return;
        }

        //PlayerObj.MountID = nMountID;
        m_PlayerObj = PlayerObj;

        Singleton <ObjManager> .GetInstance().ReloadModel(Obj, MountTable.MountModel, Obj_Mount.OnAsycLoadMount, PlayerObj, MountTable.BindPoint);
    }
    public void SwitchToScene(SceneId sceneId, object param = null)
    {
        if (sceneId == CurrentSceneId)
        {
            LogModule.WarningLog("switch to current scene: " + sceneId);
        }
        LogModule.DebugLog("SceneMgr  SwitchToScene  sceneId:" + sceneId.ToString() + "  " + System.DateTime.Now.ToString());
        mParam = param;

        if (mCurScene != null)
        {
            mCurScene.OnWillExit();
            //App.EventMgr.Post(EventId.SceneWillExit, mCurScene.Id);
        }

        if (mSceneTypeDict.ContainsKey(sceneId))
        {
            mNextScene = Activator.CreateInstance(mSceneTypeDict[sceneId]) as SceneBase;
            if (mNextScene != null)
            {
                mNextScene.OnWillEnter(param);
            }
        }

        if (hdlSceneWillSwitch != null)
        {
            hdlSceneWillSwitch.Invoke(mCurrentSceneId, sceneId, param);
        }

        SceneManager.LoadScene(sceneId.ToString());
    }
        void SetCommonFlag(int nBits, bool bFlag)
        {
            if (nBits < 0 || nBits >= MAX_CHAR_COMMON_FLAG_NUM * 8 * sizeof(int))
            {
                LogModule.DebugLog("SetCommonFlag: Index out of Range!!!");
                return;
            }

            int nIndex = nBits / (sizeof(int) * 8);

            if (nIndex >= 0 && nIndex < MAX_CHAR_COMMON_FLAG_NUM)
            {
                //int nOldBits = nBits;
                nBits = nBits % (sizeof(int) * 8);// 0-31
                if (nBits >= 0 && nBits <= 31)
                {
                    int nDataValue = m_CommonFlag[nIndex];
                    if (bFlag != false)
                    {
                        nDataValue |= (1 << nBits);
                    }
                    else
                    {
                        nDataValue &= ~(1 << nBits);
                    }

                    m_CommonFlag[nIndex] = nDataValue;
                }

                // 更新后操作
                OnCommonFlagChange(nBits);
            }
        }
        void SetCommonData(int nIndex, int nValue)
        {
            if (nIndex < 0 || nIndex >= MAX_CHAR_COMMON_DATA_NUM)
            {
                LogModule.DebugLog("SetCommonData: Index out of Range!!!");
                return;
            }
            int nData = m_CommonData[nIndex];

            m_CommonData[nIndex] = nValue;

            // 特殊添加 其他 更改 加在 OnCommonDataChange()中
            if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_COPYSCENE_CANGJINGGE_SWEEP)
            {
                if (ActivityController.Instance() != null)
                {
                    ActivityController.Instance().UpdateTabTips();
                }
                if (FunctionButtonLogic.Instance())
                {
                    FunctionButtonLogic.Instance().UpdateActionButtonTip();
                }
                if (CangJingGeWindow.Instance() != null)
                {
                    CangJingGeWindow.Instance().UpdateInfo();
                    if (nData < nValue)//开始扫荡
                    {
                        CangJingGeWindow.Instance().StartSweep();
                    }
                }
            }
            // 更新 操作
            OnCommonDataChange(nIndex, nValue);
        }
Beispiel #15
0
    public static List <int> GetLayOutByMatrixLayout(string layOut)
    {
        List <int> layOuts = new List <int>();

        if (null == layOut)
        {
            return(layOuts);
        }
        LogModule.DebugLog(layOut);
        string[] tempStr = layOut.Trim("\"\"".ToCharArray()).Split(',');
        LogModule.DebugLog("length                ================== " + tempStr.Length);
        for (int i = 0; i < tempStr.Length; i++)
        {
            LogModule.DebugLog(tempStr[i]);
        }
        LogModule.DebugLog("last                         ======    " + tempStr[tempStr.Length - 1]);
        for (int i = 0; tempStr != null && i < tempStr.Length; i++)
        {
            for (int j = 0; j < tempStr[i].Length; j++)
            {
                string curStr = tempStr[i];
                int    nWayId = -1;
                int.TryParse(curStr[j].ToString(), out nWayId);
                layOuts.Add(nWayId);
            }
        }
        return(layOuts);
    }
Beispiel #16
0
    // 获取版本号回调
    void OnCheckVersion(bool bSuccess)
    {
        if (bSuccess)
        {
            LogModule.DebugLog("comparing version");

            // 比较版本号
            LogModule.DebugLog("version --local:" + m_localVersion.ToString() + " --remote:" + m_remoteVersion);
            if (m_remoteVersion > m_localVersion)
            {
                Utils.DeleteFolder(CacheVersionPath);
                LogModule.DebugLog("remote version is big than local, begin update");

                m_curUpdateStep = UpdateStep.GetFileList;

                // 下载文件列表
                m_versionFileDownloader = DownloadHelper.StartDownload(this, m_resServerUrl + "/" + ResFileListName, true, CacheVersionPath + "/" + ResFileListName, OnDownloadRemoteResFileList);
            }
            else
            {
                StartCoroutine(OnDownloadlevelIndexFile());
            }
        }
        else
        {
            // error 严重错误,可能网络不通,需要重新请求
            LogModule.ErrorLog("check verion fail");
            UpdateFinish(UpdateResult.GetVersionFail);
        }
    }
    static public void OnLog(string message, string stackTrace, LogType type)
    {
        switch (type)
        {
        case LogType.Exception:
        {
            string bugMsg = "{\n" +
                            "\"message\":" + "\"" + message.Replace("\n", "") + "\"" +
                            ",\n\"stacktrace\":" + "\"" + stackTrace.Replace("\n", "") + "\"" +
                            ",\n\"time\":" + "\"" + PlatformHelper.GetCurrentTime() + "\""
                            + "\n" + "\"" + "\n}";

            //PlatformHelper.UploadBug(butMsg);
            LogModule.ErrorLog(bugMsg);
            break;
        }

        case LogType.Log:
            LogModule.DebugLog(message);
            break;

        case LogType.Warning:
            LogModule.WarningLog(message);
            break;

        case LogType.Error:
            LogModule.ErrorLog(message);
            break;
        }
    }
Beispiel #18
0
    // 拷贝文件列表
    void GenerateLocalFileList()
    {
        try
        {
            LogModule.DebugLog("copy filelist");
            string localFileListName = LocalVersionPath + "/" + ResFileListName;
            //string cacheFileListName = CacheVersionPath + "/" + ResFileListName;

            if (!Utils.GenerateResFileList(localFileListName, m_dicLocalFiles))
            {
                LogModule.ErrorLog("generate version file fail!");
                UpdateFinish(UpdateResult.GenerateVersionFileFail);
            }

            //Utils.CheckTargetPath(localFileListName);
            //File.Copy(cacheFileListName, localFileListName, true);
        }
        catch (System.Exception ex)
        {
            LogModule.ErrorLog("generate version file fail!" + ex.ToString());
            UpdateFinish(UpdateResult.GenerateFileListFail);
            return;
        }

        GenerateResLevelFile();
    }
Beispiel #19
0
    // Update is called once per frame
    void Update()
    {
        if (!ProcessInput.IsProcessInput)
        {
            return;
        }

        if (Singleton <ObjManager> .Instance.MainPlayer && !Singleton <ObjManager> .Instance.MainPlayer.IsInModelStory &&
            !Singleton <ObjManager> .Instance.MainPlayer.QingGongState)
        {
#if !UNITY_EDITOR && (UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8)
            if (!Singleton <ObjManager> .Instance.MainPlayer.IsDie() && !UIManager.IsSubUIShow() && (NewPlayerGuidLogic.IsOpenFlag == false || NewPlayerGuidLogic.CurrentGuideID != 1))
            {
                if (Input.touchCount > 0)
                {
                    UpdateWithTouch();
                }
                else
                {
                    // 无触摸点 fingerID又不是-1 应对真机上使用摇杆同时按HOME键退出再进入的情况
                    if (m_FingerID != -1)
                    {
                        LogModule.DebugLog("iPhone HOME come back!");
                        m_FingerID = -1;
                        JoyStickEndMove();
                    }
                }
            }
#endif
        }
    }
Beispiel #20
0
    // Use this for initialization
    void Start()
    {
        Transform curTrans = transform;
        Transform parent   = null;

        while (null != curTrans)
        {
            if (curTrans.name == "Model")
            {
                Transform curParent = curTrans.parent;
                if (null == curParent)
                {
                    LogModule.DebugLog("model is error");
                }
                else
                {
                    parent = curParent;
                }

                break;
            }

            curTrans = curTrans.parent;
        }

        if (null == parent)
        {
            LogModule.DebugLog("model is error");
            return;
        }

        m_ModelParent = parent;
    }
Beispiel #21
0
    private IEnumerator RequestNotice()
    {
        WWW wwwNotice = new WWW("http://ydcabal.changyou.com/cabal3D/conf/notice/login/Notice_AppStore.txt");

        yield return(wwwNotice);

        if (!string.IsNullOrEmpty(wwwNotice.error))
        {
            LogModule.ErrorLog("request login notice error" + wwwNotice.error);
        }
        else
        {
            LogModule.DebugLog(wwwNotice.text);
            m_text = wwwNotice.text;
            BoxCollider curCollider = labelText.gameObject.GetComponent <BoxCollider>();
            if (null == curCollider)
            {
                LogModule.ErrorLog("label not contain collider");
                yield break;
            }



            m_bReceiveData = true;
            m_bRequesting  = false;
            DoShowNotice();
        }
    }
        public void PlaySceneMusic()
        {
            if (null == GameManager.gameManager.SoundManager)
            {
                return;
            }

            Tab_SceneClass tab = TableManager.GetSceneClassByID(GameManager.gameManager.RunningScene, 0);

            if (tab == null)
            {
                return;
            }

            if (tab.BGMusic < 0)
            {
                return;
            }

            Tab_Sounds soundsTab = TableManager.GetSoundsByID(tab.BGMusic, 0);

            if (soundsTab == null)
            {
                LogModule.DebugLog("sound name " + tab.BGMusic.ToString() + " is null");
                return;
            }

            GameManager.gameManager.SoundManager.PlayBGMusic(tab.BGMusic, soundsTab.FadeOutTime, soundsTab.FadeInTime);
        }
Beispiel #23
0
        //初始化动作接口,目前是硬代码,之后会根据配表之类的实现
        public void InitAnimation(string strChildName = "Model")
        {
            if (null == m_AnimLogic)
            {
                return;
            }

            //首先保存该ObjAction的路径
            m_AnimLogic.AnimResFilePath = m_AnimationFilePath;

            //由于目前Obj采用的都是Root作为根节点,而独立挂Model节点,所以动作组件采取搜索子节点方式
            Transform modelTransform = gameObject.transform.FindChild(strChildName);

            if (modelTransform)
            {
                m_Objanimation = modelTransform.gameObject.GetComponent <Animation>();
            }

            if (m_Objanimation)
            {
                m_AnimLogic.InitState(m_Objanimation.gameObject);
            }
            else
            {
                LogModule.DebugLog("The character you would like to control doesn't have animations. Moving her might look weird.");
            }
        }
Beispiel #24
0
 public void UpdateDistance(float deltaDistance)
 {
     if (deltaDistance != 0)
     {
         deltaDistance *= 0.5f;
         deltaDistance  = Mathf.Clamp(deltaDistance, -CameraDefine.m_fCameraDistanceChangeMaxSpeed, CameraDefine.m_fCameraDistanceChangeMaxSpeed);
         m_fDistance   += deltaDistance;
         if (m_fDistance > CameraDefine.m_fCameraDistanceMax)
         {
             m_fDistance = CameraDefine.m_fCameraDistanceMax;
         }
         if (m_fDistance < CameraDefine.m_fCameraDistanceMin)
         {
             m_fDistance = CameraDefine.m_fCameraDistanceMin;
         }
         // 根据distance计算pitch
         m_fPitch = (m_fDistance - CameraDefine.m_fCameraDistanceDefault) / (CameraDefine.m_fCameraDistanceDefault - CameraDefine.m_fCameraDistanceMin)
                    * (CameraDefine.m_fCameraPitchDefault - CameraDefine.m_fCameraPitchMin) + CameraDefine.m_fCameraPitchDefault;
         if (m_fPitch > CameraDefine.m_fCameraPitchMax)
         {
             m_fPitch = CameraDefine.m_fCameraPitchMax;
         }
         if (m_fPitch < CameraDefine.m_fCameraPitchMin)
         {
             m_fPitch = CameraDefine.m_fCameraPitchMin;
         }
         LogModule.DebugLog(m_fDistance.ToString());
         m_bDirty = true;
     }
 }
        /// <summary>
        /// 日志检测处理方法
        /// </summary>
        /// <param name="message"></param>
        /// <param name="stacktrace"></param>
        /// <param name="type"></param>
        public void OnLog(string message, string stacktrace, LogType type)
        {
            if (UnityGuiConsole.Instance != null)
            {
                UnityGuiConsole.Instance.LogCallback(message, stacktrace, type);
            }
            switch (type)
            {
            case LogType.Exception:
            {
                string butMsg = "{\n" +
                                "\"message\":" + "\"" + message.Replace("\n", "") + "\"" +
                                ",\n\"stacktrace\":" + "\"" + stacktrace.Replace("\n", "") + "\"" +
                                ",\n\"time\":" + "\"" + PlatformHelper.getcurrentTime() + "\""
                                + "\n" + "\"" + "\n}";

                //PlatformHelper.UploadBug(butMsg);
                LogModule.DebugLog(butMsg);
                break;
            }

            case  LogType.Log:
                LogModule.DebugLog(message);
                break;

            case LogType.Warning:
                LogModule.WarningLog(message);
                break;

            case LogType.Error:
                LogModule.ErrorLog(message);
                break;
            }
        }
Beispiel #26
0
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.H))
        {
            CreateObjFunction.CreateModelStoryObj(463, "JXZFastMove1", Test);
            LogModule.DebugLog("fffffffffff");
        }

        if (Input.GetKeyDown(KeyCode.K))
        {
            ObjSnare_Init_Data initData = new ObjSnare_Init_Data();
            initData.m_ServerID   = 10000000;
            initData.m_OwerGuid   = Singleton <ObjManager> .Instance.MainPlayer.GUID;
            initData.m_OwnerObjId = Singleton <ObjManager> .Instance.MainPlayer.ServerID;
            initData.m_fX         = 1;
            initData.m_fZ         = 5;
            initData.m_SnareID    = 1;
            CreateObjFunction.CreateModelSnareObj(initData);
        }

        if (Input.GetKeyDown(KeyCode.Y))
        {
            ObjYanHua_Init_Data initData = new ObjYanHua_Init_Data();
            initData.m_ServerID   = 10000000;
            initData.m_OwerGuid   = Singleton <ObjManager> .Instance.MainPlayer.GUID;
            initData.m_OwnerObjId = Singleton <ObjManager> .Instance.MainPlayer.ServerID;
            initData.m_fX         = 1;
            initData.m_fZ         = 1;
            initData.m_nYanHuaID  = 2;
            CreateObjFunction.CreateModelYanhuaObj(initData);
        }
    }
Beispiel #27
0
    public void ReceiveSendMarch(object parm)
    {
        LogModule.DebugLog("ReceiveSendMarch");
        CSendMarch tSendMarch = GameFacade.GetProxy <BattleProxy>().SendMarch;

        mSceneID = tSendMarch.sceneId;
    }
Beispiel #28
0
    public void ReceiveBattleInfor(object parm)
    {
        LogModule.DebugLog("ReceiveBattlerInfor");
        CBattleInfor tBattleInfor = GameFacade.GetProxy <BattleProxy>().BattleInfor;

        mCurrentCamp = (SquadCamp)tBattleInfor.camp;
        ServerBattleState tServerBattleState = (ServerBattleState)tBattleInfor.currentState;

        if (tServerBattleState == ServerBattleState.STATUS_SELECTTARGET ||
            tServerBattleState == ServerBattleState.STATUS_MARCH ||
            tServerBattleState == ServerBattleState.STATUS_COMBAT)
        {
            mBattleState = BattleState.Start;
        }
        else
        {
            mBattleState = BattleState.prepare;
        }
        if (mSceneID != tBattleInfor.sceneId)
        {
            return;
        }
        StartCoroutine(LoadUnitAssets(tBattleInfor));

        //Open Battle UI.
        MediatorManager.GetInstance().Add(new BattleUIController());
    }
Beispiel #29
0
 // 清除缓存
 public static void DoUnloadUnuseBundle()
 {
     LogModule.DebugLog("Resources.UnloadUnusedAssets");
     Resources.UnloadUnusedAssets();
     GC.Collect();
     m_cacheBundleSize     = 0;
     m_cacheBundleAddCount = 0;
 }
Beispiel #30
0
    public void GetBattlerInfor()
    {
        LogModule.DebugLog("GetBattlerInfor");
        CG_BATTLEINFOR battlerInforPacket = (CG_BATTLEINFOR)PacketDistributed.CreatePacket(MessageID.PACKET_CG_BATTLEINFOR);

        battlerInforPacket.SetSceneId(mSceneID);
        battlerInforPacket.SendPacket();
    }