// PUBLIC STATIC
		
		// PRIVATE
		
		
		// PRIVATE STATIC
		
		//--------------------------------------
		//  Constructor / Destructor
		//--------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="com.rmc.projects.paddle_soccer.mvcs.model.vo.RoundDataVO"/> class.
		/// </summary>
		/// <param name="aCurrentRound_uint">A current round_uint.</param>
		/// <param name="aPlayerGoalsRequiredToWin_uint">A player goals required to win_uint.</param>
		/// <param name="aCPUGoalsRequiredToLose_uint">A CPU goals required to lose_uint.</param>
		/// <param name="aCPUMoveSpeed_range">A CPU move speed_range.</param>
		public RoundDataVO (uint aCurrentRound_uint, uint aPlayerGoalsRequiredToWin_uint, uint aCPUGoalsRequiredToLose_uint, Range aCPUMoveSpeed_range)
		{
			currentRound_uint 				= aCurrentRound_uint;
			playerGoalsRequiredToWin 		= aPlayerGoalsRequiredToWin_uint;
			cpuGoalsRequiredToLose 			= aCPUGoalsRequiredToLose_uint;
			cpuMoveSpeed_range				= aCPUMoveSpeed_range;
			//
			playerGoalsScoredThisRound 		= 0;
			cpuGoalsScoredThisRound			= 0;
			
		}
Beispiel #2
0
		/// <summary>
		/// Starts the next round.
		/// </summary>
		public void doRoundStart ()
		{
			//
			_currentRound_uint++;

			//
			uint currentRound_uint 				= _currentRound_uint;
			uint playerGoalsRequiredToWin 		= _currentRound_uint*_PLAYER_GOALS_REQUIRED_PER_ROUND_MULTIPLYER;
			uint cpuGoalsRequiredToLose 		= _CPU_GOALS_REQUIRED_PER_ROUND;
			Range cpuMoveSpeed_range			= new Range (
				Constants.PADDLE_Y_LERP_ACCELERATION_DEFAULT_MINIMUM,
				Constants.PADDLE_Y_LERP_ACCELERATION_DEFAULT_MAXIMUM
				); //lock to one value, but you can put a range here (optional)

			//
			currentRoundDataVO = new RoundDataVO (
				currentRound_uint,
				playerGoalsRequiredToWin,
				cpuGoalsRequiredToLose,
				cpuMoveSpeed_range
				);


		}
		// PRIVATE STATIC
		
		//--------------------------------------
		//  Methods
		//--------------------------------------
		
		///////////////////////////////////////////////////////////////////////////
		///////////////////////////////////////////////////////////////////////////
		///			CONSTRUCTOR / DESTRUCTOR
		///////////////////////////////////////////////////////////////////////////
		///////////////////////////////////////////////////////////////////////////
		/// <summary>
		/// Initializes a new instance of the <see cref="com.rmc.projects.paddle_soccer.mvcs.model.vo.RoundDataVO"/> class.
		/// </summary>
		/// <param name="aCurrentRound_uint">A current round_uint.</param>
		/// <param name="aTotalEnemiesToKill_uint">A total enemies to kill_uint.</param>
		/// <param name="aEnemiesSpawnedAtOnce_range">A enemies spawned at once_range.</param>
		/// <param name="aEnemyHealth_range">A enemy health_range.</param>
		/// <param name="aEnemySpeed_range">A enemy speed_range.</param>
		public RoundDataVO (uint aCurrentRound_uint, uint aTotalEnemiesToKill_uint, Range aEnemiesSpawnedAtOnce_range, Range aEnemyHealth_range, Range aEnemySpeed_range)
		{
			currentRound_uint 				= aCurrentRound_uint;
			goalsRequired 			= aTotalEnemiesToKill_uint;
			enemiesSpawnedAtOnceRange 		= aEnemiesSpawnedAtOnce_range;
			enemySpeedRange					= aEnemySpeed_range;
			enemyHealthRange				= aEnemyHealth_range;
			//
			
		}
		/// <summary>
		/// Starts the next round.
		/// </summary>
		public void doRoundStart ()
		{
			//
			_currentRound_uint++;

			//
			uint goalsRequiredToWin_uint 			= _currentRound_uint*_GOALS_REQUIRED_PER_ROUND;
			Range enemiesSpawnedAtOnce_range	= new Range (1, _currentRound_uint);
			Range enemyHealth_range 			= new Range (11, 22);
			Range enemySpeed_range				= new Range (1f, 2f);
			//
			currentRoundDataVO = new RoundDataVO (
				_currentRound_uint,
				goalsRequiredToWin_uint,
				enemiesSpawnedAtOnce_range,
				enemyHealth_range,
				enemySpeed_range
				);


		}