示例#1
0
 /// <summary>
 /// Triggered when this units kills another with a ability it owns.
 /// </summary>
 /// <param name="unit"></param>
 public void KilledA(Unit unit)
 {
     // FIXME - Placeholder for experience.
     string experienceGainText = "+" + "50" + " XP";
     StatusText statusText = new StatusText(this, StatusText.StatusType.Damage, experienceGainText);
     statusTextList.Add(statusText);
 }
示例#2
0
        public void Affect(Unit originatingUnit, string type, int amount)
        {
            CurrentHealth -= amount;

            // Play white flash effect
            UnitEffect hitEffect = new UnitEffect(this, "ForceWhite", UnitEffect.EffectType.Flashing);
            hitEffect.Activate();
            unitEffectList.Add(hitEffect);

            // Handle damage.
            if (amount > 0)
            {
                StatusText statusText = new StatusText(this, StatusText.StatusType.Damage, amount.ToString());
                statusTextList.Add(statusText);
                lastHitBy = originatingUnit;
            }
        }