Beispiel #1
0
 public Animation(string name, int duration, TriggerDelegate trigger = null, FirstDelegate first = null, TickDelegate tick = null, FinalDelegate final = null)
 {
     Name     = name;
     Duration = duration;
     AnimationManager.Instance.Add(this);
     this.trigger = trigger;
     this.onFirst = first;
     onTick       = tick;
     onFinal      = final;
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            var del_arr = new RandomDelegate[] { Random_Num, Random_Num };

            FinalDelegate del = delegate(Delegate[] delegates)
            {
                var            result = 0;
                RandomDelegate temp;
                for (int i = 0; i < delegates.Length - 1; i++)
                {
                    temp    = (RandomDelegate)delegates[i];
                    result += temp();
                }
                return(result);
            };

            Console.WriteLine(del(del_arr));
        }
Beispiel #3
0
 public AttackAnimation(string name, int duration, TriggerDelegate trigger = null, FirstDelegate first = null, TickDelegate tick = null, FinalDelegate final = null)
     : base(name, duration, trigger, first, tick, final)
 {
 }