Beispiel #1
0
        public override void Open()
        {
            // create the seeker ("hero"/"attacker")
            CtfSeeker = new CtfSeeker(this, Annotations, _arrive);
            _all.Add(CtfSeeker);

            // create the specified number of enemies,
            // storing pointers to them in an array.
            for (int i = 0; i < CtfEnemies.Length; i++)
            {
                CtfEnemies[i] = new CtfEnemy(this, Annotations);
                _all.Add(CtfEnemies[i]);
            }

            // initialize camera
            Demo.Init2dCamera(CtfSeeker);
            Demo.Camera.Mode            = Camera.CameraMode.FixedDistanceOffset;
            Demo.Camera.FixedTarget     = Vector3.Zero;
            Demo.Camera.FixedTarget.X   = 15;
            Demo.Camera.FixedPosition.X = 80;
            Demo.Camera.FixedPosition.Y = 60;
            Demo.Camera.FixedPosition.Z = 0;

            CtfBase.InitializeObstacles(BaseRadius, _obstacles);
        }
Beispiel #2
0
		public override void Open()
		{
			// create the seeker ("hero"/"attacker")
            CtfSeeker = new CtfSeeker(this, Annotations, _arrive);
			_all.Add(CtfSeeker);

			// create the specified number of enemies, 
			// storing pointers to them in an array.
			for (int i = 0; i < CtfEnemies.Length; i++)
			{
                CtfEnemies[i] = new CtfEnemy(this, Annotations);
				_all.Add(CtfEnemies[i]);
			}

			// initialize camera
			Demo.Init2dCamera(CtfSeeker);
			Demo.Camera.Mode = Camera.CameraMode.FixedDistanceOffset;
			Demo.Camera.FixedTarget = Vector3.Zero;
            Demo.Camera.FixedTarget.X = 15;
			Demo.Camera.FixedPosition.X = 80;
            Demo.Camera.FixedPosition.Y = 60;
            Demo.Camera.FixedPosition.Z = 0;

            CtfBase.InitializeObstacles(BaseRadius, _obstacles);
		}
Beispiel #3
0
        public override void Close()
        {
            // delete seeker
            CtfSeeker = null;

            // delete each enemy
            for (int i = 0; i < CtfEnemies.Length; i++)
            {
                CtfEnemies[i] = null;
            }

            // clear the group of all vehicles
            _all.Clear();
        }
Beispiel #4
0
		public override void Close()
		{
			// delete seeker
			CtfSeeker = null;

			// delete each enemy
			for (int i = 0; i < CtfEnemies.Length; i++)
			{
				CtfEnemies[i] = null;
			}

			// clear the group of all vehicles
			_all.Clear();
		}