Ejemplo n.º 1
0
 /// <summary>
 /// output some text, show/hide a dialogue, and change the color of the region
 /// </summary>
 void doSomething(TriggerRegion region, RigidBody otherBody, TriggerReportFlags flags, CollisionReportInfo info)
 {
     if (flags.HasFlag(TriggerReportFlags.Enter)) {
         Console.WriteLine(otherBody.GetName() + " has entered trigger area \"" + region.Name + "\"");
         // cycle through the balloon colors
         region.CycleToNextColor();
     }
     else {
         Console.WriteLine(otherBody.GetName() + " has left trigger area \"" + region.Name + "\"");
         region.CycleToNextColor();
     }
 }
Ejemplo n.º 2
0
 public static bool IsLeaveFlag(TriggerReportFlags flag)
 {
     return flag.HasFlag(TriggerReportFlags.Leave);
 }
Ejemplo n.º 3
0
 public static bool IsEnterFlag(TriggerReportFlags flag)
 {
     return flag.HasFlag(TriggerReportFlags.Enter);
 }