Beispiel #1
0
 public void ShowFightPowerChangeTips(bool value, int newPower, int prePower)
 {
     DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.TipsPanel, panelShowAction: (pb) =>
     {
         if (null != pb && pb is TipsPanel)
         {
             TipsPanel panel = pb as TipsPanel;
             if (panel != null)
             {
                 msg = new FightPowerMsg()
                 {
                     time = UnityEngine.Time.realtimeSinceStartup,
                     cd   = 1.5f,
                 };
                 panel.ShowFightPowerChangeTips(value, newPower, prePower);
             }
         }
     });
 }
Beispiel #2
0
    public void Process(float deltaTime)
    {
        if (msg == null)
        {
            return;
        }
        if (msg != null)
        {
            msg.cd -= deltaTime;
        }
        if (!DataManager.IsFrameCountRemainderEq0())
        {
            //限制调用次数
            return;
        }

        if (msg.cd <= 0)
        {
            DataManager.Manager <UIPanelManager>().SendMsg(PanelID.TipsPanel, UIMsgID.eFightPowerChange, null);
            msg = null;
        }
    }