Ejemplo n.º 1
0
        private void RefreshBuffItems(object sender, GameEventArgs e)
        {
            RefreshBuffEventArgs ne    = e as RefreshBuffEventArgs;
            ActorBase            actor = ne.Actor;

            if (actor == null)
            {
                return;
            }
            if (actor.IsDead)
            {
                return;
            }

            Map <int, BuffBase> buffs = actor.ActorBuff.GetAllBuff();
            int index = 0;

            for (buffs.Begin(); buffs.Next();)
            {
                if (index > m_BuffItems.Length - 1)
                {
                    break;
                }

                BuffTip buffTip = m_BuffItems[index];
                buffTip.ShowBuff(buffs.Value);
                index++;
            }

            for (int i = index; i < m_BuffItems.Length; i++)
            {
                BuffTip buffTip = m_BuffItems[index];
                buffTip.HideBuff();
            }
        }
Ejemplo n.º 2
0
        public override void UpdateCurAttribute(bool init = false)
        {
            base.UpdateCurAttribute(init);

            if (BattleState)
            {
                RefreshBuffEventArgs args = ReferencePool.Acquire <RefreshBuffEventArgs>().Fill(this);
                GameEntry.Event.Fire(this, args);
            }
        }
Ejemplo n.º 3
0
        public override void Step()
        {
            base.Step();

            if (!IsDead && BattleState)
            {
                RefreshBuffEventArgs args = ReferencePool.Acquire <RefreshBuffEventArgs>().Fill(this);
                GameEntry.Event.Fire(this, args);
            }
        }