예제 #1
0
 protected void Start()
 {
     wanderer = new MpWanderer( transform, Mass, MovesVertically );
     wanderer.MaxSpeed = MaxSpeed;
     wanderer.MaxForce = MaxForce;
     wanderer.MaxDistance = MaxDistance;
     wanderer.Tether = Tether;
     wanderer.Radius = Radius;
 }
예제 #2
0
		public override void Open()
		{
			// create the wanderer, saving a pointer to it
            _wanderer = new MpWanderer(Annotations);
			_allMp.Add(_wanderer);

			// create the specified number of pursuers, save pointers to them
			const int PURSUER_COUNT = 30;
			for (int i = 0; i < PURSUER_COUNT; i++)
                _allMp.Add(new MpPursuer(_wanderer, Annotations));
			//pBegin = allMP.begin() + 1;  // iterator pointing to first pursuer
			//pEnd = allMP.end();          // iterator pointing to last pursuer

			// initialize camera
			Demo.SelectedVehicle = _wanderer;
			Demo.Camera.Mode = Camera.CameraMode.StraightDown;
			Demo.Camera.FixedDistanceDistance = Demo.CAMERA_TARGET_DISTANCE;
			Demo.Camera.FixedDistanceVerticalOffset = Demo.CAMERA2_D_ELEVATION;
		}
예제 #3
0
		// constructor
		public MpPursuer(MpWanderer w, IAnnotationService annotations = null)
            :base(annotations)
		{
			_wanderer = w;
			Reset();
		}