diff --git a/Assets/Source/Scripts/Pong/Ball/PongBall.cs b/Assets/Source/Scripts/Pong/Ball/PongBall.cs index 42b4d53..11df1e8 100644 --- a/Assets/Source/Scripts/Pong/Ball/PongBall.cs +++ b/Assets/Source/Scripts/Pong/Ball/PongBall.cs @@ -1,4 +1,15 @@ //namespace Pong.Ball; +<<<<<<< HEAD +======= +/// +/// PongBall: controls the logic for what happens on score and on rebound +/// Initialize: is what happens to the ball when the game begins +/// Serve: happens when the ball intializes/resets +/// Destroy Ball: gets rid of sprite +/// Reset: brings back the spite (repositioned) +/// + +>>>>>>> f106512 (Added summary via comments on headers & other important files) using Pong.Ball; using System; @@ -102,11 +113,14 @@ public void Initialize(Player server) { //Debug.Log(angle); serveAngles.Push((angle, desire)); +<<<<<<< HEAD //TODO: debug /*if (i == 10) { break; }*/ +======= +>>>>>>> f106512 (Added summary via comments on headers & other important files) } // the Player serving is the one on the offensive diff --git a/Assets/Source/Scripts/Pong/Ball/PongBallController.cs b/Assets/Source/Scripts/Pong/Ball/PongBallController.cs index 6188b00..79ad68a 100644 --- a/Assets/Source/Scripts/Pong/Ball/PongBallController.cs +++ b/Assets/Source/Scripts/Pong/Ball/PongBallController.cs @@ -1,4 +1,16 @@ //namespace Pong.Ball; +<<<<<<< HEAD +======= +/// +/// PongBallController Class: Manages the behavior, movement, and interactions of the pong ball in the game. +/// - MoveLocal(): Handles the core movement logic, including: +/// 1. Scoring: Triggers OnScore() when hitting left/right boundaries. +/// 2. Rebounding: Uses Rebounder's forceMap to change trajectory when colliding with a player's stick. +/// 3. Vertical Wall Collisions: Reverses y-axis velocity when hitting top/bottom walls. +/// + + +>>>>>>> f106512 (Added summary via comments on headers & other important files) using Pong.Ball; using System; diff --git a/Assets/Source/Scripts/Pong/GameManager.cs b/Assets/Source/Scripts/Pong/GameManager.cs index 56fea0c..cd983dc 100644 --- a/Assets/Source/Scripts/Pong/GameManager.cs +++ b/Assets/Source/Scripts/Pong/GameManager.cs @@ -20,7 +20,11 @@ public partial class GameManager : MonoBehaviour // CONTEXT: public => reference in the Unity Editor public string player1Name = PlayerData.NO_NAME, player2Name = PlayerData.NO_NAME; public float playerSpeedVP = 1.00f; // per second; travel 100% vertical screen size in one second +<<<<<<< HEAD public float ballSpeedVP = 0.45f; // per second; travel 45% horizontal screen size in one second +======= + public float ballSpeedVP = 0.65f; // per second; travel 45% horizontal screen size in one second +>>>>>>> f106512 (Added summary via comments on headers & other important files) public float ballServeMaxAngle = (3f / 7f) * Mathf.PI; public float ballBounceMaxAngle = (3f / 7f) * Mathf.PI; public uint scoreToWin = GameConstants.DEFAULT_WIN_SCORE; diff --git a/Assets/Source/Scripts/Pong/GamePlayer/Force/ForceMap.cs b/Assets/Source/Scripts/Pong/GamePlayer/Force/ForceMap.cs index 57efc48..b2a29cf 100644 --- a/Assets/Source/Scripts/Pong/GamePlayer/Force/ForceMap.cs +++ b/Assets/Source/Scripts/Pong/GamePlayer/Force/ForceMap.cs @@ -1,4 +1,13 @@ //namespace Pong.GamePlayer.Force; +<<<<<<< HEAD +======= +/// +/// Pong.GamePlayer.ForceMap: helps calculate the force/physics of the ball +/// ApplyAt: manages the velocity/collision of the ball & paddle +/// CalculateRelativeAngle: determines what angle the paddle hit the ball +/// IsNormalAngle: decides if the angle hit at was normal +/// +>>>>>>> f106512 (Added summary via comments on headers & other important files) using Pong.GamePlayer.Force; using System.Collections; diff --git a/Assets/Source/Scripts/Pong/GamePlayer/Player.cs b/Assets/Source/Scripts/Pong/GamePlayer/Player.cs index 4d60f5d..09310ed 100644 --- a/Assets/Source/Scripts/Pong/GamePlayer/Player.cs +++ b/Assets/Source/Scripts/Pong/GamePlayer/Player.cs @@ -1,4 +1,15 @@ //namespace Pong.GamePlayer; +<<<<<<< HEAD +======= +/// +/// Player Class: Manages player attributes, controls, and physics in the game. Serves as the backbone for each player's interaction with the game environment. +/// - playerData: Stores data for machine learning and save/loading features. +/// - scoreboard: Manages the player's score. +/// - CreateNew(): Initializes a new player, giving them a name and setting up their paddle and scoreboard. +/// - ScorePoint(): Adds a point to the scoreboard and updates any relevant data. +/// + +>>>>>>> f106512 (Added summary via comments on headers & other important files) using Pong.GamePlayer; using System.Collections; diff --git a/Assets/Source/Scripts/Pong/GamePlayer/_Pong-GamePlayer.cs b/Assets/Source/Scripts/Pong/GamePlayer/_Pong-GamePlayer.cs index f92133c..5a517b7 100644 --- a/Assets/Source/Scripts/Pong/GamePlayer/_Pong-GamePlayer.cs +++ b/Assets/Source/Scripts/Pong/GamePlayer/_Pong-GamePlayer.cs @@ -1,4 +1,12 @@ +<<<<<<< HEAD // * NAMESPACE HEADER FILE +======= +/// +/// File seems to unify the player controls, and later the data for the AI +/// PlayerData: not currently implemented but will be crucial later for letting the AI control the paddle +/// PlayerControls: synthesizes the controls for players by deciding what each key decides +/// +>>>>>>> f106512 (Added summary via comments on headers & other important files) using System.Collections; using System.Collections.Generic; diff --git a/Assets/Source/Scripts/Pong/_Pong.cs b/Assets/Source/Scripts/Pong/_Pong.cs index 699b313..696a613 100644 --- a/Assets/Source/Scripts/Pong/_Pong.cs +++ b/Assets/Source/Scripts/Pong/_Pong.cs @@ -1,5 +1,13 @@ // * NAMESPACE HEADER FILE - +<<<<<<< HEAD + +======= +/// +/// Overall this file is a good storage place for a lot of variables that can be updated to quickly change the game logic, rules, and general play +/// GameConstants: contains constans for winning score, balls center, the position of the paddles +/// GameCache: creates a cache to store relevant variables that can be updated during the game by other classes +/// +>>>>>>> f106512 (Added summary via comments on headers & other important files) using System.Collections; using System.Collections.Generic; using UnityEngine;