public VehicleAbilityType(
     int abilityIndex,
     AbilityTargetingType targetingType = AbilityTargetingType.Vehicle,
     bool ignoreLosToTarget             = false,
     string useWhenExpression           = "true")
 {
     ButtonIndex       = abilityIndex;
     TargetingType     = targetingType;
     IgnoreLoSToTarget = ignoreLosToTarget;
     useWhenExpression = string.IsNullOrEmpty(useWhenExpression) ? "true" : useWhenExpression;
     UseWhen           = DelayCompiledExpression.Condition(useWhenExpression);
 }
Esempio n. 2
0
    public void SelectableEventHandler(AbilityTargetingType abilityTargetingType)
    {
        inTargettingMode = !inTargettingMode;

        if (inTargettingMode == true)
        {
            if (abilityTargetingType == AbilityTargetingType.Individual)
            {
                isTargettable = true;
                isSelected    = false;
            }
            else if (abilityTargetingType == AbilityTargetingType.Group)
            {
                isSelected = true;
            }
        }
        else
        {
            isTargettable = false;
            isSelected    = false;
        }
    }