Example #1
0
            public void updateHeroVoiceState(Player curPlayer)
            {
                if (((curPlayer != null) && (curPlayer.Captain != 0)) && (curPlayer.Captain.handle.ValueComponent.mActorValue != null))
                {
                    Player hostPlayer = Singleton <GamePlayerCenter> .instance.GetHostPlayer();

                    if (hostPlayer != null)
                    {
                        bool bActive = Singleton <GamePlayerCenter> .instance.IsAtSameCamp(hostPlayer.PlayerId, curPlayer.PlayerId);

                        this.voiceIconsNode.CustomSetActive(bActive);
                        if (bActive)
                        {
                            if (curPlayer.Computer && !Singleton <BattleLogic> .GetInstance().GetCurLvelContext().m_isWarmBattle)
                            {
                                this.voiceIconsNode.CustomSetActive(false);
                            }
                            if (hostPlayer.PlayerUId == curPlayer.PlayerUId)
                            {
                                this._updateVoiceIcon(this.voiceIconsNode, MonoSingleton <VoiceSys> .instance.curVoiceState);
                            }
                            else
                            {
                                CS_VOICESTATE_TYPE cs_voicestate_type = MonoSingleton <VoiceSys> .GetInstance().TryGetVoiceState(curPlayer.PlayerUId);

                                this._updateVoiceIcon(this.voiceIconsNode, cs_voicestate_type);
                            }
                        }
                    }
                }
            }
Example #2
0
    public static string Profile10000()
    {
        MonoSingleton <ConsoleWindow> .instance.isVisible = false;
        MonoSingleton <SProfiler> .GetInstance().StartProfileNFrames(10000, 0u);

        return(CheatCommandBase.Done);
    }
        public void CollectFloatDigitInSingleFrame(PoolObjHandle <ActorRoot> attacker, PoolObjHandle <ActorRoot> target, DIGIT_TYPE digitType, int value)
        {
            if (MonoSingleton <Reconnection> .GetInstance().isProcessingRelayRecover)
            {
                return;
            }
            if (this.m_floatDigitInfoList == null)
            {
                this.m_floatDigitInfoList = new List <FloatDigitInfo>();
            }
            FloatDigitInfo floatDigitInfo;

            for (int i = 0; i < this.m_floatDigitInfoList.get_Count(); i++)
            {
                floatDigitInfo = this.m_floatDigitInfoList.get_Item(i);
                if (floatDigitInfo.m_attacker == attacker && floatDigitInfo.m_target == target && (floatDigitInfo.m_digitType == digitType || this.CanMergeToCritText(ref floatDigitInfo.m_digitType, digitType)))
                {
                    floatDigitInfo.m_value += value;
                    this.m_floatDigitInfoList.set_Item(i, floatDigitInfo);
                    return;
                }
            }
            floatDigitInfo = new FloatDigitInfo(attacker, target, digitType, value);
            this.m_floatDigitInfoList.Add(floatDigitInfo);
        }
 public void PandroaUpdateBtn()
 {
     if (this._uiForm)
     {
         MonoSingleton <PandroaSys> .GetInstance().ShowActiveActBoxBtn(this._uiForm);
     }
 }
Example #5
0
        private void On_Guild_Guild_Select(CUIEvent uiEvent)
        {
            int       selectedIndex    = uiEvent.m_srcWidget.GetComponent <CUIListScript>().GetSelectedIndex();
            GuildInfo guildInfoByIndex = this.m_Model.GetGuildInfoByIndex(selectedIndex);

            if (guildInfoByIndex != null)
            {
                CUIHttpImageScript component = this.m_form.GetWidget(34).GetComponent <CUIHttpImageScript>();
                component.SetImageUrl(CGuildHelper.GetHeadUrl(guildInfoByIndex.chairman.stBriefInfo.szHeadUrl));
                MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(this.m_form.GetWidget(41).GetComponent <Image>(), CGuildHelper.GetNobeLevel(guildInfoByIndex.chairman.stBriefInfo.uulUid, guildInfoByIndex.chairman.stBriefInfo.stVip.level), false);

                MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(this.m_form.GetWidget(40).GetComponent <Image>(), CGuildHelper.GetNobeHeadIconId(guildInfoByIndex.chairman.stBriefInfo.uulUid, guildInfoByIndex.chairman.stBriefInfo.stVip.headIconId));

                this.m_form.GetWidget(10).GetComponent <Text>().text = guildInfoByIndex.briefInfo.sBulletin;
                this.m_form.GetWidget(11).GetComponent <Text>().text = guildInfoByIndex.chairman.stBriefInfo.sName;
                this.m_form.GetWidget(39).GetComponent <Text>().text = Singleton <CTextManager> .GetInstance().GetText("Common_Level_Format", new string[]
                {
                    guildInfoByIndex.chairman.stBriefInfo.dwLevel.ToString()
                });

                Image component2 = this.m_form.GetWidget(46).GetComponent <Image>();
                Text  component3 = this.m_form.GetWidget(47).GetComponent <Text>();
                Text  component4 = this.m_form.GetWidget(48).GetComponent <Text>();
                component2.SetSprite(CGuildHelper.GetGradeIconPathByRankpointScore(guildInfoByIndex.RankInfo.totalRankPoint), this.m_form, true, false, false, false);
                component3.text = CGuildHelper.GetGradeName(guildInfoByIndex.RankInfo.totalRankPoint);
                component4.text = Singleton <CTextManager> .GetInstance().GetText("Guild_Profit_Desc", new string[]
                {
                    CGuildHelper.GetCoinProfitPercentage((int)guildInfoByIndex.briefInfo.bLevel).ToString()
                });
            }
        }
Example #6
0
        protected void InitBaseSys()
        {
            Singleton <CTimerManager> .CreateInstance();

            Singleton <CResourceManager> .CreateInstance();

            Singleton <ResourceLoader> .GetInstance();

            Singleton <CGameObjectPool> .CreateInstance();

            Singleton <CSoundManager> .CreateInstance();

            Singleton <CUIEventManager> .CreateInstance();

            Singleton <CUIManager> .CreateInstance();

            MonoSingleton <CVersionUpdateSystem> .GetInstance();

            Singleton <CCheatSystem> .CreateInstance();

            Singleton <GameStateCtrl> .CreateInstance();

            OutlineFilter.EnableSurfaceShaderOutline(false);
            DynamicShadow.InitDefaultGlobalVariables();
        }
Example #7
0
    public float GetLength(string soundType, string name)
    {
        AudioClip clip = null;

        if (m_seSoundClips.TryGetValue(name, out clip))
        {
            return(clip.length);
        }
        else
        {
            string path = "";
            if (soundType == SoundType.BGM)
            {
                path = "Sound/BGM/" + name;
            }
            else if (soundType == SoundType.SE_UI)
            {
                path = "Sound/UI/" + name;
            }
            else
            {
                path = "Sound/SE/" + MonoSingleton <GameLoader> .GetInstance().CurSceneName + "/" + name;
            }
            ResourceBase resourceBase = Singleton <ResourceManager> .GetInstance().GetResource(path, typeof(AudioClip), enResourceType.Sound, false, false);

            return((resourceBase.content as AudioClip).length);
        }
    }
Example #8
0
    public void ShareQQBox(string actID, string boxID, string title, string desc)
    {
        Singleton <ApolloHelper> .GetInstance().m_bShareQQBox = false;

        if (!MonoSingleton <ShareSys> .GetInstance().IsInstallPlatform())
        {
            return;
        }
        Texture2D texture2D = Resources.Load("Share/120", typeof(Texture2D)) as Texture2D;

        byte[] array = texture2D.EncodeToPNG();
        if (array != null)
        {
            int num = array.Length;
        }
        IApolloSnsService apolloSnsService = IApollo.get_Instance().GetService(1) as IApolloSnsService;

        if (Singleton <ApolloHelper> .GetInstance().CurPlatform == 2)
        {
            this.m_bShareQQBox = true;
            string text  = string.Format("http://gamecenter.qq.com/giftbox/release/index/grap.html?actid={0}&_wv=1031&boxid={1}&appid={2}", actID, boxID, ApolloConfig.appID);
            string text2 = "http://image.smoba.qq.com/yywj/share_pic/120.png";
            apolloSnsService.SendToQQ(2, title, desc, text, text2);
        }
    }
        private void RequestUseSkillSelectMode(uint objID)
        {
            Skill skill = (this.NextSkillObj != null) ? this.NextSkillObj : this.SkillObj;

            if (objID == 0u || skill == null || skill.cfgData == null || !this.IsEnableSkillSlot())
            {
                MonoSingleton <CameraSystem> .GetInstance().SetFocusActor(this.Actor);

                return;
            }
            PoolObjHandle <ActorRoot> actor = Singleton <GameObjMgr> .GetInstance().GetActor(objID);

            if (!actor || actor.handle.ActorControl.IsDeadState)
            {
                MonoSingleton <CameraSystem> .GetInstance().SetFocusActor(this.Actor);

                return;
            }
            if (Singleton <SkillDetectionControl> .GetInstance().Detection((SkillUseRule)skill.cfgData.bSkillUseRule, this))
            {
                FrameCommand <UseObjectiveSkillCommand> frameCommand = FrameCommandFactory.CreateCSSyncFrameCommand <UseObjectiveSkillCommand>();
                frameCommand.cmdData.ObjectID = objID;
                frameCommand.cmdData.SlotType = this.SlotType;
                frameCommand.Send();
            }
            else
            {
                MonoSingleton <CameraSystem> .GetInstance().SetFocusActor(this.Actor);
            }
        }
Example #10
0
 public void GetNoticeData(int type, string scene)
 {
     try
     {
         INotice          notice           = IApollo.get_Instance().GetService(5) as INotice;
         ApolloNoticeInfo apolloNoticeInfo = new ApolloNoticeInfo();
         notice.GetNoticeData(type, scene, ref apolloNoticeInfo);
         for (int i = 0; i < apolloNoticeInfo.get_DataList().get_Count(); i++)
         {
             ApolloNoticeData apolloNoticeData = apolloNoticeInfo.get_DataList().get_Item(i);
         }
         NoticeSys.NOTICE_STATE noticeState = NoticeSys.NOTICE_STATE.LOGIN_Before;
         if (scene == "1")
         {
             noticeState = NoticeSys.NOTICE_STATE.LOGIN_Before;
         }
         else if (scene == "2")
         {
             noticeState = NoticeSys.NOTICE_STATE.LOGIN_After;
         }
         MonoSingleton <NoticeSys> .GetInstance().OnOpenForm(apolloNoticeInfo, noticeState);
     }
     catch (Exception ex)
     {
         DebugHelper.Assert(false, "Error In GetNoticeData, {0}", new object[]
         {
             ex.get_Message()
         });
     }
 }
Example #11
0
    public void ShareSendHeart(string openId, string title, string desc, string extInfo)
    {
        Singleton <ApolloHelper> .GetInstance().m_bShareQQBox = false;

        if (!MonoSingleton <ShareSys> .GetInstance().IsInstallPlatform())
        {
            return;
        }
        Texture2D texture2D = Resources.Load("Share/120", typeof(Texture2D)) as Texture2D;

        byte[] array = texture2D.EncodeToPNG();
        if (array != null)
        {
            int num = array.Length;
        }
        IApolloSnsService apolloSnsService = IApollo.get_Instance().GetService(1) as IApolloSnsService;

        MonoSingleton <ShareSys> .get_instance().OnShareCallBack();

        if (Singleton <ApolloHelper> .GetInstance().CurPlatform == 2)
        {
            ApolloAccountInfo accountInfo = this.GetAccountInfo(false);
            if (accountInfo != null)
            {
                string text  = "http://gamecenter.qq.com/gcjump?appid=1104466820&pf=invite&from=androidqq&plat=qq&originuin=" + accountInfo.get_OpenId() + "&ADTAG=gameobj.msg_heart";
                string text2 = "http://image.smoba.qq.com/yywj/share_pic/120.png";
                apolloSnsService.SendToQQGameFriend(1, openId, title, desc, text, text2, title, "MSG_HEART_SEND", extInfo);
            }
        }
        else
        {
            apolloSnsService.SendToWXGameFriend(openId, title, desc, "9Wste6_dDgZtoVmC6CQTh0jj29kGEp0jrVSYrGWvtZLvSTDN9fUb-_sNjacaGITt", "messageExt", "MSG_heart_send", extInfo);
        }
    }
Example #12
0
    public bool PayQQVip(string serviceCode, string serviceName, int serviceType)
    {
        if (!ApolloConfig.payEnabled)
        {
            return(false);
        }
        if (!this.InitPay())
        {
            return(false);
        }
        this.m_bPayQQVIP = true;
        ApolloAccountInfo accountInfo   = this.GetAccountInfo(false);
        Pay4MonthInfo     pay4MonthInfo = new Pay4MonthInfo();
        string            zoneId        = MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString();

        pay4MonthInfo.serviceCode     = serviceCode;
        pay4MonthInfo.serviceName     = serviceName;
        pay4MonthInfo.serviceType     = serviceType;
        pay4MonthInfo.autoPay         = 0;
        pay4MonthInfo.remark          = "aid=mvip.youxi.inside.yxzj_1104466820";
        pay4MonthInfo.coinIcon        = 2130837505;
        pay4MonthInfo.offerId         = ApolloConfig.offerID;
        pay4MonthInfo.unit            = "ge";
        pay4MonthInfo.zoneId          = zoneId;
        pay4MonthInfo.valueChangeable = 0;
        pay4MonthInfo.saveValue       = "1";
        if (!this.payService.Pay(pay4MonthInfo))
        {
            Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Pay_Failed);

            return(false);
        }
        return(true);
    }
Example #13
0
    public bool Pay(string quantity, string productId = "")
    {
        if (!ApolloConfig.payEnabled)
        {
            return(false);
        }
        if (!this.InitPay())
        {
            return(false);
        }
        ApolloAccountInfo accountInfo = this.GetAccountInfo(false);
        PayInfo           payInfo     = new PayInfo();
        string            zoneId      = MonoSingleton <TdirMgr> .GetInstance().SelectedTdir.logicWorldID.ToString();

        payInfo.coinIcon        = 2130837505;
        payInfo.offerId         = ApolloConfig.offerID;
        payInfo.unit            = "ge";
        payInfo.zoneId          = zoneId;
        payInfo.valueChangeable = 0;
        payInfo.saveValue       = quantity;
        if (!this.payService.Pay(payInfo))
        {
            Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Pay_Failed);

            return(false);
        }
        return(true);
    }
Example #14
0
    public void ShareRedBox(int shareType, string url, string title, string desc)
    {
        if (!MonoSingleton <ShareSys> .GetInstance().IsInstallPlatform())
        {
            return;
        }
        Texture2D texture2D = Resources.Load("Share/redbox", typeof(Texture2D)) as Texture2D;

        byte[] array = texture2D.EncodeToPNG();
        int    num   = 0;

        if (array != null)
        {
            num = array.Length;
        }
        IApolloSnsService apolloSnsService = IApollo.get_Instance().GetService(1) as IApolloSnsService;

        if (Singleton <ApolloHelper> .GetInstance().CurPlatform == 2)
        {
            string text = "http://image.smoba.qq.com/yywj/share_pic/redbox.png";
            apolloSnsService.SendToQQ(shareType, title, desc, url, text);
        }
        else if (Singleton <ApolloHelper> .GetInstance().CurPlatform == 1)
        {
            apolloSnsService.SendToWeixinWithUrl(shareType, title, desc, url, "MSG_INVITE", array, num, "message Ext");
        }
    }
Example #15
0
        private bool Init(Action _action)
        {
            this.srcActor    = _action.GetActorHandle(this.sourceId);
            this.targetActor = _action.GetActorHandle(this.targetId);
            if ((this.srcActor == 0) || (this.targetActor == 0))
            {
                return(false);
            }
            Vector3    pos    = (Vector3)IntMath.Transform(this.bindPosOffset, this.srcActor.handle.forward, (VInt3)this.srcActor.handle.gameObject.transform.position);
            Quaternion rot    = Quaternion.LookRotation((Vector3)this.targetActor.handle.forward);
            bool       isInit = false;

            this.beamObject = MonoSingleton <SceneMgr> .GetInstance().GetPooledGameObjLOD(this.resourceName, true, SceneObjType.ActionRes, pos, rot, out isInit);

            if (this.beamObject == null)
            {
                return(false);
            }
            this.lineRenderer = this.beamObject.gameObject.GetComponentInChildren <LineRenderer>();
            if (this.lineRenderer == null)
            {
                return(false);
            }
            this.lineRenderer.SetWidth(this.beamWidth, this.beamWidth);
            return(true);
        }
        private void On_Burn_OpenForm(CUIEvent uievent)
        {
            if (Singleton <CFunctionUnlockSys> .instance.FucIsUnlock(RES_SPECIALFUNCUNLOCK_TYPE.RES_SPECIALFUNCUNLOCKTYPE_LIUGUOYUANZHENG))
            {
                if (Singleton <CMatchingSystem> .GetInstance().IsInMatching)
                {
                    Singleton <CUIManager> .GetInstance().OpenTips("PVP_Matching", true, 1f, null, new object[0]);
                }
                else
                {
                    MonoSingleton <NewbieGuideManager> .GetInstance().SetNewbieBit(0x10, true);

                    if (this.model._data == null)
                    {
                        BurnExpeditionNetCore.Send_Get_BURNING_PROGRESS_REQ();
                    }
                    if (this.view != null)
                    {
                        this.view.OpenForm();
                    }
                }
            }
            else
            {
                ResSpecialFucUnlock dataByKey = GameDataMgr.specialFunUnlockDatabin.GetDataByKey((uint)4);
                Singleton <CUIManager> .instance.OpenTips(Utility.UTF8Convert(dataByKey.szLockedTip), false, 1f, null, new object[0]);
            }
        }
Example #17
0
        public void OnHitEffect(OrganWrapper InWrapper)
        {
            COM_PLAYERCAMP actorCamp = InWrapper.actor.TheActorMeta.ActorCamp;

            GameObject[] objArray1 = new GameObject[] { InWrapper.actor.gameObject };
            MonoSingleton <ActionManager> .GetInstance().PlayAction((actorCamp != COM_PLAYERCAMP.COM_PLAYERCAMP_1) ? "Prefab_Characters/Prefab_Organ/Tower/TowerDamage_Blue" : "Prefab_Characters/Prefab_Organ/Tower/TowerDamage_Red", true, false, objArray1);
        }
Example #18
0
        private bool Init(Action _action)
        {
            this.srcActor    = _action.GetActorHandle(this.sourceId);
            this.targetActor = _action.GetActorHandle(this.targetId);
            if (!this.srcActor || !this.targetActor)
            {
                return(false);
            }
            Vector3    srcPosition = this.GetSrcPosition();
            Quaternion rot         = Quaternion.LookRotation((Vector3)this.targetActor.get_handle().forward);
            bool       flag        = false;

            this.beamObject = MonoSingleton <SceneMgr> .GetInstance().GetPooledGameObjLOD(this.resourceName, true, SceneObjType.ActionRes, srcPosition, rot, out flag);

            if (this.beamObject == null)
            {
                return(false);
            }
            this.lineRenderer = this.beamObject.gameObject.GetComponentInChildren <LineRenderer>();
            if (this.lineRenderer == null)
            {
                return(false);
            }
            this.lineRenderer.SetWidth(this.beamWidth, this.beamWidth);
            return(true);
        }
Example #19
0
 public override void Process(Action _action, Track _track)
 {
     base.Process(_action, _track);
     if (this.NewbieTriggerType > 0)
     {
         if (this.bCurrentGuideOver)
         {
             if (this.bWeakGuide)
             {
                 MonoSingleton <NewbieGuideManager> .GetInstance().ForceCompleteWeakGuide();
             }
             else
             {
                 MonoSingleton <NewbieGuideManager> .GetInstance().ForceCompleteNewbieGuide();
             }
         }
         else if (this.bWeakGuide)
         {
             MonoSingleton <NewbieGuideManager> .GetInstance().CheckWeakGuideTrigger((NewbieGuideWeakGuideType)this.NewbieTriggerType, new uint[0]);
         }
         else
         {
             MonoSingleton <NewbieGuideManager> .GetInstance().CheckTriggerTime((NewbieGuideTriggerTimeType)this.NewbieTriggerType, new uint[0]);
         }
     }
 }
Example #20
0
        private void OpenSymbolForm()
        {
            MonoSingleton <NewbieGuideManager> .GetInstance().SetNewbieBit(14, true, false);

            CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CSymbolSystem.s_symbolFormPath, false, true);

            if (cUIFormScript != null)
            {
                string text = Singleton <CTextManager> .GetInstance().GetText("Symbol_Sheet_Symbol");

                string text2 = Singleton <CTextManager> .GetInstance().GetText("SymbolRcmd_Tab");

                string text3 = Singleton <CTextManager> .GetInstance().GetText("Symbol_Sheet_Make");

                string[] titleList = new string[]
                {
                    text,
                    text2,
                    text3
                };
                GameObject widget = cUIFormScript.GetWidget(0);
                CUICommonSystem.InitMenuPanel(widget, titleList, (int)this.m_selectMenuType, true);
                CUIListScript component = widget.GetComponent <CUIListScript>();
                Singleton <CUINewFlagSystem> .GetInstance().AddNewFlag(component.GetElemenet(1).gameObject, enNewFlagKey.New_BtnSymbolFlagKey_V1, enNewFlagPos.enTopRight, 1f, 0f, 0f, enNewFlagType.enNewFlag);
            }
        }
Example #21
0
        private void onReconnectGame(CSPkg msg)
        {
            switch (msg.stPkgData.stReconnGameNtf.bState)
            {
            case 1:
                this.HeroSelectReconectBanStep(msg.stPkgData.stReconnGameNtf.stStateData.stBanInfo);
                Singleton <CUIManager> .GetInstance().CloseSendMsgAlert();

                break;

            case 2:
                this.HeroSelectReconectPickStep(msg.stPkgData.stReconnGameNtf.stStateData.stPickInfo);
                Singleton <CUIManager> .GetInstance().CloseSendMsgAlert();

                break;

            case 3:
                this.HeroSelectReconectSwapStep(msg.stPkgData.stReconnGameNtf.stStateData.stAdjustInfo);
                Singleton <CUIManager> .GetInstance().CloseSendMsgAlert();

                break;

            case 4:
            {
                if (Singleton <LobbyLogic> .instance.inMultiGame)
                {
                    return;
                }
                Singleton <LobbyLogic> .instance.inMultiGame = true;
                Singleton <LobbyLogic> .instance.inMultiRoom = true;
                SCPKG_MULTGAME_BEGINLOAD stBeginLoad = msg.stPkgData.stReconnGameNtf.stStateData.stLoadingInfo.stBeginLoad;
                Singleton <GameBuilder> .instance.StartGame(new MultiGameContext(stBeginLoad));

                Singleton <CUIManager> .GetInstance().CloseSendMsgAlert();

                break;
            }

            case 5:
                this.g_fBeginReconnectTime = Time.time;
                Singleton <LobbyLogic> .GetInstance().inMultiRoom = true;

                Singleton <LobbyLogic> .GetInstance().reconnGameInfo = msg.stPkgData.stReconnGameNtf.stStateData.stGamingInfo;

                MonoSingleton <VoiceSys> .instance.SyncReconnectData(Singleton <LobbyLogic> .GetInstance().reconnGameInfo);

                MonoSingleton <Reconnection> .GetInstance().RequestRelaySyncCacheFrames(false);

                break;

            case 6:
                MonoSingleton <Reconnection> .GetInstance().ExitMultiGame();

                break;

            default:
                DebugHelper.Assert(false);
                break;
            }
        }
        public override void Process(Action _action, Track _track)
        {
            base.Process(_action, _track);
            switch (this.triggerTimeType)
            {
            case eNewbieEuipTimeType.BuyFirstEquip:
                MonoSingleton <NewbieGuideManager> .GetInstance().CheckTriggerTime(NewbieGuideTriggerTimeType.onBuyFirstEquip, new uint[0]);

                break;

            case eNewbieEuipTimeType.HasEnoughMoneyBuyEquip:
                MonoSingleton <NewbieGuideManager> .GetInstance().CheckTriggerTime(NewbieGuideTriggerTimeType.onHasEnoughMoneyButEquip, new uint[0]);

                break;

            case eNewbieEuipTimeType.HideEquipPanel:
                Singleton <CBattleGuideManager> .GetInstance().ShowBuyEuipPanel(!this.bHide);

                break;

            case eNewbieEuipTimeType.EquipShopIntroduce:
                MonoSingleton <NewbieGuideManager> .GetInstance().CheckTriggerTime(NewbieGuideTriggerTimeType.onEuipShopGuide, new uint[0]);

                break;
            }
        }
        private void ProcessIDIPTable()
        {
            if (this._uiForm == null)
            {
                return;
            }
            Transform transform = this._uiForm.gameObject.transform.Find("Panel/Panle_Activity");

            if (transform)
            {
                transform.gameObject.CustomSetActive(false);
            }
            Transform transform2 = this._uiForm.gameObject.transform.Find("Panel/Panle_Pandora");

            if (transform2)
            {
                transform2.gameObject.CustomSetActive(false);
            }
            Transform transform3 = this._uiForm.gameObject.transform.Find("Panel/Panle_IDIP");

            if (transform3)
            {
                transform3.gameObject.CustomSetActive(true);
            }
            MonoSingleton <IDIPSys> .GetInstance().OnOpenIDIPForm(this._uiForm);

            CMiShuSystem.SendUIClickToServer(enUIClickReprotID.rp_OpenGongGao);
        }
 private void OnTimeUp(int delt)
 {
     this.eventScript.onClick = (CUIEventScript.OnUIEventHandler)Delegate.Remove(this.eventScript.onClick, new CUIEventScript.OnUIEventHandler(this.ClickHandler));
     this.info.CustomSetActive(false);
     this.highlighter.CustomSetActive(false);
     MonoSingleton <NewbieGuideManager> .GetInstance().StopCurrentGuide();
 }
Example #25
0
    public static string Profile()
    {
        MonoSingleton <ConsoleWindow> .instance.isVisible = false;
        MonoSingleton <SProfiler> .GetInstance().ToggleVisible();

        return(CheatCommandBase.Done);
    }
        private void CreateParticle(string _resName, ref PoolObjHandle <ActorRoot> _origin, ref PoolObjHandle <ActorRoot> _target)
        {
            if (!_target)
            {
                return;
            }
            string resourceName = SkinResourceHelper.GetResourceName(ref _origin, _resName, true);

            this.particleObj = MonoSingleton <SceneMgr> .GetInstance().GetPooledGameObjLOD(resourceName, true, SceneObjType.ActionRes, _target.get_handle().myTransform.position);

            if (this.particleObj == null)
            {
                this.particleObj = MonoSingleton <SceneMgr> .GetInstance().GetPooledGameObjLOD(_resName, true, SceneObjType.ActionRes, _target.get_handle().myTransform.position);
            }
            if (this.particleObj != null)
            {
                string text = "Particles";
                if (_target.get_handle().gameObject.layer == LayerMask.NameToLayer("Hide"))
                {
                    text = "Hide";
                }
                MMGame_Math.SetLayer(this.particleObj, text, false);
                this.particleObj.transform.SetParent(_target.get_handle().myTransform);
                ParticleSystem component = this.particleObj.GetComponent <ParticleSystem>();
                if (component != null)
                {
                    component.Play(true);
                }
            }
        }
Example #27
0
    public static string LockFPS()
    {
        GameFramework instance = MonoSingleton <GameFramework> .GetInstance();

        instance.LockFPS_SGame = !instance.LockFPS_SGame;
        return(instance.LockFPS_SGame ? "SGAME" : "UNITY");
    }
Example #28
0
        public virtual void Create(string _prefabName, Vector3 _offset)
        {
            if (!this.actorPtr || this.parentObj == null || this.parentObj.transform == null)
            {
                return;
            }
            this.offset         = _offset;
            this.offsetDistance = Vector3.Distance(new Vector3(0f, 0f, 0f), this.offset);
            this.deltaTime      = 0;
            Vector3 pos = this.parentObj.transform.localToWorldMatrix.MultiplyPoint(this.offset);

            this.meshObj = MonoSingleton <SceneMgr> .GetInstance().GetPooledGameObjLOD(_prefabName, false, SceneObjType.ActionRes, pos, this.parentObj.transform.rotation);

            if (this.meshObj != null)
            {
                this.animSet = this.meshObj.GetComponent <Animation>();
                if (this.animSet != null)
                {
                    this.animSet.Play("Idle");
                }
                this.petTrans    = this.meshObj.transform;
                this.parentTrans = this.parentObj.transform;
                this.bActive     = true;
                this.curState    = PetState.Idle;
                return;
            }
            this.bActive = false;
        }
Example #29
0
        private void ShowRewardForm(CUIEvent uiEvent)
        {
            Singleton <CUIManager> .GetInstance().CloseForm(PATH_STAR);

            if (this.m_SettleData != null)
            {
                if (this.m_SettleData.stReward != null)
                {
                    COMDT_REWARD_DETAIL          stReward = this.m_SettleData.stReward;
                    ListView <COMDT_REWARD_INFO> view     = new ListView <COMDT_REWARD_INFO>();
                    for (int i = 0; i < stReward.bNum; i++)
                    {
                        COMDT_REWARD_INFO comdt_reward_info = stReward.astRewardDetail[i];
                        if (comdt_reward_info.bType == 6)
                        {
                            view.Add(comdt_reward_info);
                        }
                    }
                    if ((view.Count > 0) && (view[0].bType == 6))
                    {
                        CSymbolItem       useable   = (CSymbolItem)CUseableManager.CreateUseable(COM_ITEM_TYPE.COM_OBJTYPE_ITEMSYMBOL, 0L, view[0].stRewardInfo.stSymbol.dwSymbolID, (int)view[0].stRewardInfo.stSymbol.dwCnt, 0);
                        CUseableContainer container = new CUseableContainer(enCONTAINER_TYPE.ITEM);
                        container.Add(useable);
                        CUICommonSystem.ShowSymbol(container, enUIEventID.Settle_ClickItemDetailEnd);
                        MonoSingleton <NewbieGuideManager> .GetInstance().CheckTriggerTime(NewbieGuideTriggerTimeType.getSymbolReward, new uint[0]);

                        return;
                    }
                }
                this.ShowPveExp();
            }
        }
        public static void InitRelayConnnecting(COMDT_TGWINFO inRelayTgw)
        {
            if (inRelayTgw.dwVipCnt > 0u)
            {
                string text;
                if (MonoSingleton <CTongCaiSys> .GetInstance().IsCanUseTongCai())
                {
                    text = ApolloConfig.loginOnlyIpOrUrl;
                }
                else if (inRelayTgw.szRelayUrl.Length > 0 && inRelayTgw.szRelayUrl[0] != 0)
                {
                    text = StringHelper.UTF8BytesToString(ref inRelayTgw.szRelayUrl);
                }
                else
                {
                    text = ApolloConfig.loginOnlyIpOrUrl;
                }
                MonoSingleton <GSDKsys> .GetInstance().DetermineWhichSpeed();

                Singleton <ReconnectIpSelect> .instance.SetRelayTgw(inRelayTgw);

                NetworkModule.LookUpDNSOfServerAndConfigNetAcc(text, (int)inRelayTgw.wEchoPort);
                ConnectorParam connectorParam = new ConnectorParam();
                connectorParam.bIsUDP = (inRelayTgw.bIsUDP > 0);
                connectorParam.ip     = text;
                connectorParam.SetVPort(inRelayTgw.wVPort);
                NetworkAccelerator.ClearUDPCache();
                NetworkAccelerator.SetEchoPort((int)inRelayTgw.wEchoPort);
                NetworkAccelerator.SetConnectIP(text, inRelayTgw.wVPort);
                ApolloConfig.echoPort = inRelayTgw.wEchoPort;
                Singleton <NetworkModule> .GetInstance().InitGameServerConnect(connectorParam);

                MonoSingleton <GSDKsys> .GetInstance().StartSpeed(text, (int)inRelayTgw.wVPort);
            }
        }