/// <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(); } }