Inheritance: System.EventArgs
Example #1
0
 // called by engine
 static void RaiseGlobalProcess(int type, Critter cr, Item car,
                                ref float x, ref float y, ref float to_x, ref float to_y, ref float speed,
                                ref uint encounter_descriptor, ref bool wait_for_answer)
 {
     if (GlobalProcess != null)
     {
         var e = new GlobalProcessEventArgs((GlobalProcessType)type, cr, car)
         {
             X     = x, Y = y,
             ToX   = to_x, ToY = to_y,
             Speed = speed,
             EncounterDescriptor = encounter_descriptor,
             WaitForAnswer       = wait_for_answer
         };
         GlobalProcess(null, e);
         // extract values
         x     = e.X;
         y     = e.Y;
         to_x  = e.ToX;
         to_y  = e.ToY;
         speed = e.Speed;
         encounter_descriptor = (uint)e.EncounterDescriptor;
         wait_for_answer      = e.WaitForAnswer;
     }
 }
Example #2
0
 // called by engine
 static void RaiseGlobalProcess(int type, Critter cr, Item car,
     ref float x, ref float y, ref float to_x, ref float to_y, ref float speed,
     ref uint encounter_descriptor, ref bool wait_for_answer)
 {
     if (GlobalProcess != null) {
         var e = new GlobalProcessEventArgs((GlobalProcessType)type, cr, car)
         {
             X = x, Y = y,
             ToX = to_x, ToY = to_y,
             Speed = speed,
             EncounterDescriptor = encounter_descriptor,
             WaitForAnswer = wait_for_answer
         };
         GlobalProcess(null, e);
         // extract values
         x = e.X;
         y = e.Y;
         to_x = e.ToX;
         to_y = e.ToY;
         speed = e.Speed;
         encounter_descriptor = (uint)e.EncounterDescriptor;
         wait_for_answer = e.WaitForAnswer;
     }
 }