Example #1
0
    /// <summary>
    /// Sets the target for the current action.
    /// </summary>
    public bool SetTarget(Cell cell)
    {
        bool validTarget = SelectedAction.SetTarget(cell);

        if (validTarget)
        {
            OnTargetSelected?.Invoke(SelectedAction);
        }
        return(validTarget);
    }
 /// <summary>
 /// The event is triggered if a target (not necessarily the query target) has been selected.
 /// </summary>
 private void Fire_OnTargetSelected()
 {
     // Make sure someone is listening to event
     OnTargetSelected?.Invoke();
 }