示例#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);