示例#1
0
        private void EnsureDetector(string researchKey, Ob_Trigger_Location trigger)
        {
            var key = new ResearchStatefulKey(researchKey, trigger.StateStorageKey);

            if (_detectors.ContainsKey(key))
            {
                return;
            }
            var data = new DetectorData(key, trigger);

            _detectors.Add(key, data);
            var aabb = BoundingBoxD.CreateFromSphere(data.Detector);

            data.Handle = _detectorTree.AddProxy(ref aabb, data, 0);
        }
示例#2
0
 public DetectorData(ResearchStatefulKey key, Ob_Trigger_Location loc)
 {
     Key      = key;
     Detector = new BoundingSphereD(loc.Position, loc.Radius);
 }