예제 #1
0
        public void Draw(GameTime GameTime, SpriteBatch SpriteBatch)
        {
            DamageFloatingTextList.ForEach((x) =>
            {
                x.SpriteNumericField.Draw(GameTime, SpriteBatch);
#if DEBUG
                DebugLine dL = new DebugLine(Color.Red);
                dL.Update(Cursor.Instance.CurrentFlipbook.Position, x.SpriteNumericField.Position);
                dL.Draw(SpriteBatch);
#endif
            });
        }
예제 #2
0
        public void Update(GameTime GameTime)
        {
            DamageFloatingTextList.ForEach((x) =>
            {
                x.Update(GameTime);

                if (x.IsExpired)
                {
                    UnusedFloatingTextList.Add(x);
                }
            });

            UnusedFloatingTextList.ForEach((x) => DamageFloatingTextList.Remove(x));
            UnusedFloatingTextList.Clear();
        }
예제 #3
0
        public void AddDamage(Actor Owner, int Value)
        {
            for (int i = 0; i < DamageFloatingTextList.Count; i++)
            {
                if (DamageFloatingTextList[i].Owner == Owner)
                {
                    DamageFloatingTextList[i].AddValue(Value);
                    return;
                }
            }

            DamageFloatingText floatingText = new DamageFloatingText(Owner);

            floatingText.AddValue(Value);
            DamageFloatingTextList.Add(floatingText);
        }