Пример #1
0
        public GameEffectInstance StartInstance(params string[] parameters)
        {
            var instance = new GameEffectInstance(Name)
            {
                Parameters = new Dictionary <string, string>().Parse(parameters)
            };

            instance.CreationTime = DateTime.Now;
            return(StartInstance(instance));
        }
Пример #2
0
 public GameEffectInstance StartInstance(GameEffectInstance instance)
 {
     if (instance.Parameters.ContainsKey("Overwrite"))
     {
         throw new NotImplementedException();
     }
     else
     {
         GameEffect.AllInstances.Add(instance);
     }
     OnStart.Raise(instance);
     return(instance);
 }
Пример #3
0
 public GameEffectInstance EndInstance(GameEffectInstance inst)
 {
     GameEffect.AllInstances.Remove(inst);
     OnEnd.Raise(inst);
     return(inst);
 }
Пример #4
0
 public GameEffectInstance ChangeInstance(GameEffectInstance instance, Action <GameEffectInstance> changeToMake)
 {
     changeToMake?.Invoke(instance);
     OnChange.Raise(instance);
     return(instance);
 }
Пример #5
0
 public GameEffectInstance ChangeInstance(GameEffectInstance instance, params string[] parameters)
 {
     instance.Parameters = instance.Parameters.Parse(parameters);
     OnChange.Raise(instance);
     return(instance);
 }
Пример #6
0
 public void AnnounceEnd(GameEffectInstance instance)
 {
     OnEnd.Raise(instance);
 }
Пример #7
0
 public void AnnounceChange(GameEffectInstance instance)
 {
     OnChange.Raise(instance);
 }
Пример #8
0
 public void AnnounceStart(GameEffectInstance instance)
 {
     OnStart.Raise(instance);
 }
Пример #9
0
 public abstract void OnReceiving2(GameEffectInstance instance);