コード例 #1
0
 protected override void OnSpawn()
 {
     base.OnSpawn();
     // Update the radius from CometDetector, but it is private :(
     try {
         interferenceRadius = (int)PPatchTools.GetFieldSafe(typeof(CometDetector.
                                                                   Instance), "INTERFERENCE_RADIUS", true).GetValue(null);
     } catch (Exception) {
         PUtil.LogWarning("Unable to determine space scanner radius, using default");
     }
 }