public void ProcessHits() { float[] PressValues = Tunnel.GetPressValues(); RaycastHit[] Hits; Hits = Physics.RaycastAll(LaserPointer.transform.position, transform.forward, 100.0f); GameObject Obj; RaycastHit Hit; if (Hits.Length > 0) { EventLog now = new EventLog( PressValues[0], Ballistic, NewController.transform.position, NewController.transform.rotation.eulerAngles, Hits[0].point, State ); now.SetType(EventType); EventType = ActualTask.GetCircle().GetTarget().AddEvent(now); if (Contains(Hits, "Sphere", out Obj, out Hit)) { HandleSphereHit(); } else if (Contains(Hits, "TargetPanel", out Obj, out Hit)) { HandlePanelHit(); } } }
public static void SetEventType(EventLog.Type Type) { EventType = Type; }
private void ControllerOnClick(object sender, ClickedEventArgs e) { EventType = EventLog.Type.ClickEvent; }
private void ControllerPadClick(object sender, ClickedEventArgs e) { EventType = EventLog.Type.PadClick; }
private void ControllerOnRelease(object sender, ClickedEventArgs e) { EventType = EventLog.Type.Released; }