Beispiel #1
0
        public void RefreshState()
        {
            Owner = actor.Owner;

            // PERF: Reuse collection to avoid allocations.
            TargetTypes.Clear();
            TargetTypes.UnionWith(actor.GetEnabledTargetTypes());

            if (health != null)
            {
                HP          = health.HP;
                DamageState = health.DamageState;
            }

            var tooltip = tooltips.FirstEnabledTraitOrDefault();

            if (tooltip != null)
            {
                TooltipInfo  = tooltip.TooltipInfo;
                TooltipOwner = tooltip.Owner;
            }
        }