示例#1
0
 public void InitInteractable(ICombatUnit parent)
 {
     ParentCombatUnit = parent;
 }
示例#2
0
 private void OnUnitDied(ICombatUnit unit)
 {
     UnityEngine.Debug.Log(unit.GetName() + " died");
     OnCombatUnitDied?.Invoke(unit);
 }
示例#3
0
 public AbilityDamageAction(string name, ICombatUnit caster, DamageInfo damageInfo)
     : base(name, caster)
 {
     DamageInfo = damageInfo;
 }
示例#4
0
 private void OnTargetEntered(ICombatUnit unit)
 {
     Trigger();
 }
示例#5
0
 public AbilityModifierBase(string name, ICombatUnit caster)
     : base(name, caster)
 {
     Events = new List <AbilityEventBase>();
 }
示例#6
0
    private void OnDealtDamage(DamageInfo damageInfo, ICombatUnit other)
    {
        Unbind();

        Trigger();
    }
示例#7
0
 public void DealtDamage(DamageInfo damageInfo, ICombatUnit other)
 {
     FireOnDealtDamage(damageInfo, other);
 }
 public EventConditionBase(ICombatUnit caster)
 {
     Caster = caster;
 }
示例#9
0
 public static TFlag GetFlag <TFlag>(this ICombatUnit unit)
     where TFlag : CombatUnitFlagBase
 {
     return((TFlag)unit.Flags.SingleOrDefault(val => val is TFlag));
 }
示例#10
0
    public DamageInfo DealDamage(DamageInfo damageInfo, ICombatUnit other)
    {
        damageInfo = ((IDealDamageDecorator)this).Decorate(damageInfo);

        return(damageInfo);
    }
示例#11
0
 public AbilityHealAction(string name, ICombatUnit caster, float healthAmount)
     : base(name, caster)
 {
     HealtAmount = healthAmount;
 }
示例#12
0
    void HealTarget(ICombatUnit combatUnit)
    {
        ((IHealthOwnerCombatUnit)combatUnit).Heal(HealtAmount);

        FireOnActionEnded();
    }
示例#13
0
 public GameBuffManager(ICombatUnit unit)
 {
     m_owner = unit;
 }
示例#14
0
 public AbilityThinkerModifier(string name, ICombatUnit caster, float duration, float thinkInterval)
     : base(name, caster)
 {
     Duration      = duration;
     ThinkInterval = thinkInterval;
 }
示例#15
0
 public abstract void Attack(ICombatUnit target, System.Action onAttackEnded);
 public abstract bool IsSatisfied(ICombatUnit target);
 public ImmuneDamageStateDecorator(ICombatUnit parentUnit, params DamageType[] damageTypeArr)
     : base(parentUnit)
 {
     ImmuneDamageTypes = damageTypeArr.ToList();
 }
 public TargetSelectorBase(ICombatUnit caster, AbilityActionBase parentAction)
 {
     _caster       = caster;
     _parentAciton = parentAction;
 }
示例#19
0
    public CombatUnitStateDecoratorBase(ICombatUnit parentUnit)
    {
        ParentUnit = parentUnit;

        Conditions = new List <StateDecoratorConditionBase>();
    }
示例#20
0
 public void SetAttackableTiles(ICombatUnit unit, Tile tile)
 {
     if (unit is AirCombatUnit)
     {
         AirCombatUnit airUnit = (AirCombatUnit)unit;
         unit.AttackableTiles = GetAirAttackableTiles(airUnit, tile);
     }
     else if (unit is SeaCombatUnit)
     {
         SeaCombatUnit seaUnit = (SeaCombatUnit)unit;
         unit.AttackableTiles = GetSeaAttackableTiles(seaUnit, tile);
     }
     else if (unit is LandCombatUnit)
     {
         LandCombatUnit landUnit = (LandCombatUnit)unit;
         unit.AttackableTiles = GetLandAttackableTiles(landUnit, tile);
     }
 }
 public SelectOtherTargetSelector(ICombatUnit caster, AbilityActionBase parentAction)
     : base(caster, parentAction)
 {
 }
示例#22
0
 public AbilityCreateThinkerAction(string name, ICombatUnit caster, AbilityThinkerModifier thinker)
     : base(name, caster)
 {
     Thinker = thinker;
 }
 public ResistanceDamageStateDecorator(ICombatUnit parentUnit, params ResistanceInfo[] resistanceArr)
     : base(parentUnit)
 {
     ResistanceInfoList = resistanceArr.ToList();
 }
示例#24
0
    public AbilityActionBase(string name, ICombatUnit caster)
    {
        Caster = caster;

        Conditions = new List <EventConditionBase>();
    }
示例#25
0
 public ElementalCondition(ICombatUnit caster, bool doesInclude, params ElementalType[] elementalTypes)
     : base(caster)
 {
     DoesInclude    = doesInclude;
     ElementalTypes = elementalTypes.ToList();
 }