Beispiel #1
0
        private void drawMagic(Graphics gr, Entity target, MagicEvent ev)
        {
            setDummyOn(defPos(target.entityId));
            gr.Transform = dummy;
            int   framen = (int)(ev.progress / ev.magic.frameDuration) % ev.magic.frames.Count;
            Image frame  = ev.magic.frames[framen];

            gr.DrawImage(frame, -256, -256, 512, 512);
        }
Beispiel #2
0
 // Wrap the event in a protected virtual method
 // to enable derived classes to raise the event.
 protected virtual void OnRaiseSampleEvent()
 {
     // Raise the event by using the () operator.
     MagicEvent?.Invoke(this, new myClass(1996, "misha"));
 }