示例#1
0
        public override void Open()
        {
            // Make a field
            _bbox = new AABBox(new Vector3(-20, 0, -10), new Vector3(20, 0, 10));
            // Red goal
            _teamAGoal = new AABBox(new Vector3(-21, 0, -7), new Vector3(-19, 0, 7));
            // Blue Goal
            _teamBGoal = new AABBox(new Vector3(19, 0, -7), new Vector3(21, 0, 7));
            // Make a ball
            _ball = new Ball(_bbox);
            // Build team A
            const int PLAYER_COUNT_A = 8;

            for (int i = 0; i < PLAYER_COUNT_A; i++)
            {
                Player pMicTest = new Player(_teamA, _allPlayers, _ball, true, i, Annotations);
                Demo.SelectedVehicle = pMicTest;
                _teamA.Add(pMicTest);
                _allPlayers.Add(pMicTest);
            }
            // Build Team B
            const int PLAYER_COUNT_B = 8;

            for (int i = 0; i < PLAYER_COUNT_B; i++)
            {
                Player pMicTest = new Player(_teamB, _allPlayers, _ball, false, i, Annotations);
                Demo.SelectedVehicle = pMicTest;
                _teamB.Add(pMicTest);
                _allPlayers.Add(pMicTest);
            }
            // initialize camera
            Demo.Init2dCamera(_ball);
            Demo.Camera.Position      = new Vector3(10, Demo.CAMERA2_D_ELEVATION, 10);
            Demo.Camera.FixedPosition = new Vector3(40);
            Demo.Camera.Mode          = Camera.CameraMode.Fixed;
            _redScore  = 0;
            _blueScore = 0;
        }
示例#2
0
		public override void Open()
		{
			// Make a field
			_bbox = new AABBox(new Vector3(-20, 0, -10), new Vector3(20, 0, 10));
			// Red goal
			_teamAGoal = new AABBox(new Vector3(-21, 0, -7), new Vector3(-19, 0, 7));
			// Blue Goal
			_teamBGoal = new AABBox(new Vector3(19, 0, -7), new Vector3(21, 0, 7));
			// Make a ball
			_ball = new Ball(_bbox);
			// Build team A
			const int PLAYER_COUNT_A = 8;
			for (int i = 0; i < PLAYER_COUNT_A; i++)
			{
                Player pMicTest = new Player(_teamA, _allPlayers, _ball, true, i, Annotations);
				Demo.SelectedVehicle = pMicTest;
				_teamA.Add(pMicTest);
				_allPlayers.Add(pMicTest);
			}
			// Build Team B
			const int PLAYER_COUNT_B = 8;
			for (int i = 0; i < PLAYER_COUNT_B; i++)
			{
                Player pMicTest = new Player(_teamB, _allPlayers, _ball, false, i, Annotations);
				Demo.SelectedVehicle = pMicTest;
				_teamB.Add(pMicTest);
				_allPlayers.Add(pMicTest);
			}
			// initialize camera
			Demo.Init2dCamera(_ball);
			Demo.Camera.Position = new Vector3(10, Demo.CAMERA2_D_ELEVATION, 10);
			Demo.Camera.FixedPosition = new Vector3(40);
			Demo.Camera.Mode = Camera.CameraMode.Fixed;
			_redScore = 0;
			_blueScore = 0;
		}
示例#3
0
 public Ball(AABBox bbox, IAnnotationService annotations = null)
     : base(annotations)
 {
     _mBbox = bbox;
     Reset();
 }
示例#4
0
        public Ball(AABBox bbox, IAnnotationService annotations = null)
            :base(annotations)
		{
			_mBbox = bbox;
			Reset();
		}