예제 #1
0
        public override void Awake()
        {
            base.Awake();

            var t = mDMono.transform;

            m_FloatingManager = t.GetMonoILRComponent <FloatingCombatPowerManager>("FloatingText");
            m_DelayTime       = 0.75f;
            m_DataQueueSize   = 20;
            m_CoroutineNum    = 0;

            m_instance  = this;
            m_DataQueue = new EB.Collections.Queue <object>(m_DataQueueSize);
        }
예제 #2
0
        public static void ShowMessage(eMessageUIType type, string content, MessageTemplate.OnClose callback = null)
        {
            switch (type)
            {
            case eMessageUIType.MessageDialogue_1:
                if (SceneLogic.SceneState == SceneLogic.eSceneState.SceneLoop)
                {
                    MessageDialog.HideCurrent();
                    MessageDialog.Show(EB.Localizer.GetString(MessageTemplate.Title), content, EB.Localizer.GetString(MessageTemplate.OkBtn), null, true, true, true, delegate(int result)
                    {
                        if (callback != null)
                        {
                            callback(result);
                        }
                    });
                }
                break;

            case eMessageUIType.MessageDialogue_2:
                if (SceneLogic.SceneState == SceneLogic.eSceneState.SceneLoop)
                {
                    MessageDialog.HideCurrent();
                    MessageDialog.Show(EB.Localizer.GetString(MessageTemplate.Title), content, EB.Localizer.GetString(MessageTemplate.OkBtn), EB.Localizer.GetString(MessageTemplate.CancelBtn), true, false, true, delegate(int result)
                    {
                        if (callback != null)
                        {
                            callback(result);
                        }
                    });
                }
                break;

            case eMessageUIType.MessageDialogue_3:
                if (SceneLogic.SceneState == SceneLogic.eSceneState.SceneLoop)
                {
                    MessageDialog.HideCurrent();
                    MessageDialog.Show(EB.Localizer.GetString(MessageTemplate.Title), content, EB.Localizer.GetString(MessageTemplate.OkBtn), null, false, true, false, delegate(int result)
                    {
                        if (callback != null)
                        {
                            callback(result);
                        }
                    });
                }
                break;

            case eMessageUIType.MessageDialogue_4:
                if (SceneLogic.SceneState == SceneLogic.eSceneState.SceneLoop)
                {
                    MessageDialog.HideCurrent();
                    MessageDialog.Show(EB.Localizer.GetString(MessageTemplate.Title), content, EB.Localizer.GetString(MessageTemplate.OkBtn), EB.Localizer.GetString(MessageTemplate.CancelBtn), false, false, false, delegate(int result)
                    {
                        if (callback != null)
                        {
                            callback(result);
                        }
                    });
                }
                break;

            case eMessageUIType.FloatingText:
                FloatingUITextManager.ShowFloatingText(content);
                break;

            case eMessageUIType.CombatPowerText:
                FloatingCombatPowerTextManager.ShowFloatingText(content);
                break;

            case eMessageUIType.CenterRollingMessage:
                if (null != UIBroadCastMessageController.Instance)
                {
                    UIBroadCastMessageController.Instance.PutOneMessage(content);
                }
                break;

            case eMessageUIType.IMPrivateMessage:
                SparxHub.Instance.ChatManager.HandleSystemMessage(content);
                break;

            case eMessageUIType.IMPublicMessage:
                SparxHub.Instance.ChatManager.HandlePublicMessage(content);
                break;

            case eMessageUIType.IMAllianceMessage:
                SparxHub.Instance.ChatManager.HandleAllianceMessage(content);;
                break;

            case eMessageUIType.IMTeamMessage:
                SparxHub.Instance.ChatManager.HandleTeamMessage(content);
                break;

            case eMessageUIType.IMSystemMessage:
                SparxHub.Instance.ChatManager.HandleSystemMessage(content);
                break;

            default:
                EB.Debug.LogWarning("MessageTemplate type is elegal for {0}", type);
                break;
            }
        }
예제 #3
0
 public override void OnDestroy()
 {
     m_instance = null;
 }