示例#1
0
    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();
            }
        }
    }