Ejemplo n.º 1
0
    void OnCollisionEnter2D(Collision2D collision)
    {
        EndGoal endGoal = collision.transform.GetComponent <EndGoal>();

        if (endGoal != null)
        {
            // Collided with end goal, activate it
            endGoal.Activate();
            rig.simulated = false;
            targetEndGoal = endGoal;
        }
    }
Ejemplo n.º 2
0
        void SetTitlesAndChoices(List <AssaySelector.MeasurementOption> filters, bool alltypes, EndGoal goal, string detector = "", string inspnum = "")
        {
            string upthehill = "Measurement Selection for Detector";
            string backwards = "Measurement Selection for All Detectors";
            string itwillbe  = "Select Measurement for Detector";
            string allright  = "Select Measurements to Save for Detector";

            AllMeas = alltypes;
            Goal    = goal;
            string title = "";

            if (Goal == EndGoal.Report)
            {
                title = upthehill;
            }
            else if (Goal == EndGoal.Summary)
            {
                title = backwards;
            }
            else if (Goal == EndGoal.Reanalysis)
            {
                title = itwillbe;
                listView1.MultiSelect = false;
            }
            else // if (Goal == EndGoal.Transfer)
            {
                title = allright;
            }
            if (!AllMeas && Goal != EndGoal.Reanalysis)
            {
                foreach (AssaySelector.MeasurementOption mo in filters)
                {
                    title += (mo.PrintName() + ",");
                }
                title.TrimEnd(',');
            }
            if (!string.IsNullOrEmpty(detector))
            {
                title += (" " + detector);
            }
            if (!string.IsNullOrEmpty(inspnum))
            {
                title += (", Inspection #" + inspnum);
            }
            Text = title;
        }
Ejemplo n.º 3
0
 public IDDMeasurementList(AssaySelector.MeasurementOption filter, bool alltypes, EndGoal goal, Detector detector = null)
 {
     InitializeComponent();
     System.Windows.Input.Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;
     try
     {
         InitSort();
         PrepNotepad();
         SetTitlesAndChoices(filter, alltypes, goal,
             detector == null ? string.Empty : detector.Id.DetectorId, string.Empty);
         mlist = N.App.DB.MeasurementsFor(detector == null ? string.Empty : detector.Id.DetectorId, filter);
         bGood = PrepList(filter, detector);
     } finally
     {
         System.Windows.Input.Mouse.OverrideCursor = null;
     }
     SummarySelections = null;
 }
Ejemplo n.º 4
0
        public void Init(List <INCCDB.IndexedResults> ilist,
                         AssaySelector.MeasurementOption filter,
                         EndGoal goal, bool lmonly, string inspnum = "", Detector detector = null)
        {
            LMOnly = lmonly;
            bool alltypes = filter.IsWildCard() && !lmonly;

            System.Windows.Input.Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;
            try
            {
                PrepNotepad();
                SetTitlesAndChoices(filter, alltypes, goal,
                                    detector == null ? string.Empty : detector.Id.DetectorId, string.Empty);
                mlist = N.App.DB.MeasurementsFor(ilist, LMOnly, skipMethods: false);
                bGood = PrepList(filter, detector);
            } finally
            {
                System.Windows.Input.Mouse.OverrideCursor = null;
            }
        }
Ejemplo n.º 5
0
 public override void Reset()
 {
     base.Reset();
     targetEndGoal = null;
     rig.simulated = true;
 }
Ejemplo n.º 6
0
 public IDDMeasurementList(List <AssaySelector.MeasurementOption> filters, bool alltypes, EndGoal goal, Detector detector = null, ItemId id = null)
 {
     InitializeComponent();
     System.Windows.Input.Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;
     try
     {
         InitSort();
         PrepNotepad();
         SetTitlesAndChoices(filters, alltypes, goal,
                             detector == null ? string.Empty : detector.Id.DetectorId, string.Empty);
         if (id == null)
         {
             foreach (AssaySelector.MeasurementOption mo in filters)
             {
                 mlist.AddRange(N.App.DB.MeasurementsFor(detector == null ? string.Empty : detector.Id.DetectorId, mo, ""));
             }
         }
         else
         {
             foreach (AssaySelector.MeasurementOption mo in filters)
             {
                 List <Measurement> meas = N.App.DB.MeasurementsFor(detector == null ? string.Empty : detector.Id.DetectorId, mo, id);
                 if (meas != null)
                 {
                     mlist.AddRange(meas);
                 }
             }
         }
         bGood            = PrepList(filters, detector);
         AllowMultiSelect = goal == EndGoal.GetSelection ? false : true;
     }
     finally
     {
         System.Windows.Input.Mouse.OverrideCursor = null;
     }
     SummarySelections = null;
 }
Ejemplo n.º 7
0
 void SetTitlesAndChoices(AssaySelector.MeasurementOption filter, bool alltypes, EndGoal goal, string detector = "", string inspnum = "")
 {
     string upthehill = "Measurement Selection for Detector";
     string backwards = "Measurement Selection for All Detectors";
     string itwillbe = "Select Measurement for Detector";
     string allright = "Select Measurements to Save for Detector";
     AllMeas = alltypes;
     Goal = goal;
     string title = "";
     if (Goal == EndGoal.Report)
         title = upthehill;
     else if (Goal == EndGoal.Summary)
         title = backwards;
     else if (Goal == EndGoal.Reanalysis)
     {
         title = itwillbe;
         listView1.MultiSelect = false;
     } else // if (Goal == EndGoal.Transfer)
         title = allright;
     if (!AllMeas && Goal != EndGoal.Reanalysis)
         title = (filter.PrintName() + " " + title);
     if (!string.IsNullOrEmpty(detector))
         title += (" " + detector);
     if (!string.IsNullOrEmpty(inspnum))
         title += (", Inspection #" + inspnum);
     Text = title;
 }
Ejemplo n.º 8
0
 public void Init(List<INCCDB.IndexedResults> ilist,
     AssaySelector.MeasurementOption filter,
     EndGoal goal, bool lmonly, string inspnum = "", Detector detector = null)
 {
     LMOnly = lmonly;
     bool alltypes = filter.IsWildCard() && !lmonly;
     System.Windows.Input.Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;
     try
     {
         PrepNotepad();
         SetTitlesAndChoices(filter, alltypes, goal,
             detector == null ? string.Empty : detector.Id.DetectorId, string.Empty);
         mlist = N.App.DB.MeasurementsFor(ilist, LMOnly, skipMethods: false);
         bGood = PrepList(filter, detector);
     } finally
     {
         System.Windows.Input.Mouse.OverrideCursor = null;
     }
 }
Ejemplo n.º 9
0
 public void SeekCameraToGoal(EndGoal obj, float speed)
 {
     float x = obj.transform.position.x;
     float y = obj.transform.position.y;
     transform.position = Vector3.SmoothDamp(transform.position, new Vector3(x, y - 32.27f, -10), ref velocity, speed);
 }
Ejemplo n.º 10
0
 void FollowCameraToGoal(EndGoal player, float speed)
 {
     CameraScript cam = (CameraScript)(GameObject.FindGameObjectWithTag("MainCamera").GetComponent<CameraScript>());
     cam.SeekCameraToGoal(player, speed);
 }
Ejemplo n.º 11
0
 public IDDMeasurementList(AssaySelector.MeasurementOption filter, bool alltypes, EndGoal goal, Detector detector = null)
 {
     InitializeComponent();
     System.Windows.Input.Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;
     try
     {
         InitSort();
         PrepNotepad();
         SetTitlesAndChoices(filter, alltypes, goal,
                             detector == null ? string.Empty : detector.Id.DetectorId, string.Empty);
         mlist = N.App.DB.MeasurementsFor(detector == null ? string.Empty : detector.Id.DetectorId, filter);
         bGood = PrepList(filter, detector);
     } finally
     {
         System.Windows.Input.Mouse.OverrideCursor = null;
     }
     SummarySelections = null;
 }
Ejemplo n.º 12
0
 private void Awake()
 {
     e = GetComponent <EndGoal>();
 }