예제 #1
0
    void HandleOnCardChangeZone(NWCard card, NWZone fromZone, NWZone toZone)
    {
        ZoneControllerAbstract fromZoneController = _zonesIngames[fromZone];
        ZoneControllerAbstract toZoneController = _zonesIngames[toZone];
        CardController cardController = _cardsInGame[card];

        if (fromZoneController != null && toZoneController != null && card != null)
        {
            fromZoneController.RemoveCardFromZone(cardController);
            toZoneController.AddCardToZone(cardController);
        }
    }
예제 #2
0
 private void CardChangeZoneHandler(NWCard card, NWZone fromZone, NWZone toZone)
 {
     if (Type == NWAbilityType.Triggered)
     {
         switch (Trigger.Type)
         {
         case NWTriggerType.EnterZone:
         {
             if (Trigger.ToZone == toZone.Type && Trigger.Target.IsCardMatchTarget(_parentCard, card))
             {
                 ResolveAbilityEvent();
             }
             break;
         }
         default:
         {
             break;
         }
         }
     }
 }
예제 #3
0
    public virtual void SetZone(NWZone zone, INWPlayer player)
    {
        _cardsInZone = new List<CardController>();
        _zoneData = zone;
        _zoneType = zone.Type;
        _player = player;

        InitializeZoneController();
    }
예제 #4
0
 void HandleOnCardChangeZone(NWCard card, NWZone fromZone, NWZone toZone)
 {
     fromZone.RemoveCardFromZone(card);
     toZone.AddCard(card);
 }
예제 #5
0
 private void ZoneUpdated(NWZone zone)
 {
     if (OnZoneUpdated != null)
     {
         OnZoneUpdated(zone);
     }
 }
예제 #6
0
 private void CardChangeZone(NWCard card, NWZone fromZone, NWZone toZone)
 {
     if (OnCardChangeZone != null)
     {
         OnCardChangeZone(card, fromZone, toZone);
     }
 }
예제 #7
0
 public static NWEvent CardChangeZone(NWCard card, NWZone fromZone, NWZone toZone)
 {
     Hashtable data = new Hashtable();
     data.Add((int)eEventField.Card , card.CardUniqueID);
     data.Add((int)eEventField.FromZone, fromZone.ZoneID);
     data.Add((int)eEventField.ToZone, toZone.ZoneID);
     NWEvent eventObject = new NWEvent(NWEventType.CardChangeZone, data);
     return eventObject;
 }
예제 #8
0
 public static NWEvent ZoneUpdated(NWZone zone)
 {
     Hashtable data = new Hashtable();
     data.Add((int)eEventField.Zone, zone.ZoneID);
     NWEvent eventObject = new NWEvent(NWEventType.ZoneUpdated, data);
     return eventObject;
 }