Exemplo n.º 1
0
 public virtual void OverrideWith(TimedEvent other)
 {
     TurnStart  = other.TurnStart;
     TurnEnd    = other.TurnEnd;
     Id         = other.Id;
     StrategyId = other.StrategyId;
     Type       = other.Type;
     EventType  = other.EventType;
     PlayerId   = other.PlayerId;
 }
 public void AddOrModifyEvent(TimedEvent newEvent)
 {
     lock (Events)
     {
         TimedEvent eventToOverride = GetEvent(newEvent.StrategyId, newEvent.Id);
         if (eventToOverride == null)
         {
             Events.Add(newEvent);
         }
         else if (newEvent.GetType() == typeof(RevokeEvent))
         {
             Events.Remove(eventToOverride);
         }
         else
         {
             eventToOverride.OverrideWith(newEvent);
         }
     }
 }
Exemplo n.º 3
0
 public override void OverrideWith(TimedEvent other)
 {
     OverrideWith((TimedArea)other);
 }
Exemplo n.º 4
0
 public override void OverrideWith(TimedEvent other)
 {
     base.OverrideWith(other);
 }
Exemplo n.º 5
0
 public override void OverrideWith(TimedEvent other)
 {
     OverrideWith((TimedPosition)other);
 }
 public void Remove(TimedEvent eventToRevoke)
 {
     lock (Events)
         Events.Remove(eventToRevoke);
 }