Exemplo n.º 1
0
    MeleUnitBlockingCondition GetMeleUnitBlockingCondition(System.Object srcContext, System.Object dstContext)
    {
        // set context to Inventory Item
        PartyPanelCell srcPartyPanelCell = (PartyPanelCell)srcContext;
        // set context to PartyPanelCell
        PartyPanelCell dstPartyPanelCell = (PartyPanelCell)dstContext;

        // get active mele unit blocking condition Cell targetUnitCell, Row targetUnitRow, Row activeMeleUnitRow
        return(dstPartyPanelCell.GetComponentInParent <PartyPanel>().GetMeleUnitBlockingCondition(srcPartyPanelCell, dstPartyPanelCell));
    }
    ValidationResult DoDiscardModifierInContextOf(System.Object srcContext, System.Object dstContext)
    {
        // verify if source or destination context do not match requirements of this limiter
        if (!DoesContextMatch(srcContext, dstContext))
        {
            // context is not in scope of this limiter - don't limit
            return(ValidationResult.Pass());
        }
        // set context to party unit
        PartyPanelCell dstPartyPanelCell = (PartyPanelCell)dstContext;

        // verify if destination party panel cell occupation status matches required
        if (dstPartyPanelCell.IsOccupied() == shouldBeOccupied)
        {
            // Required occupation status matches with current occupations status - dont' limit modifier
            return(ValidationResult.Pass());
        }
        // Required occupation status doesn't match with current occupations status - discard modifier
        return(ValidationResult.Discard(onDiscardMessage));
    }
Exemplo n.º 3
0
 void OnApplyAbilityFromUnitUIToUnitCell(PartyUnitUI activePartyUnitUI, PartyPanelCell partyPanelCell)
 {
     Debug.LogWarning(".. OnApplyAbilityFromUnitUIToUnitCell");
 }