* Purpose: Create a game where the user can place spheres in the scene and pop them

* Game logic lives in GameManager.cs . Mouse tracking logic lives in MouseTracker.cs

Feature 1: User can place spheres in the scene 

Input: Left mouse click / Mouse location

Process:

  • Detect mouse click.
  • Check if the Y-coordinate of the click position is less than or equal to 4.1f.
  • If the condition is met, place the sphere at the click position.
  • Increment the counter for placed spheres.
  • If the number of placed spheres reaches the maximum, switch to POP mode.

Output: A sphere is placed at the mouse click position if the conditions are met.

Feature 2: Mouse position tracked on top right corner

Input: Mouse location

Process:

  • Continuously track the mouse position in MouseTracker.cs
  • Update the referenced UI text element with the current X and Y coordinates of the mouse.

Output: The current mouse position is displayed on the screen in the top right corner

Feature 3: User can make spheres bigger through the slider

Input: Moving slider / changing value on the slider

Process:

  • User drags the slider to select a size.
  • Update the size of the next sphere based on the slider value.

Output: The size of the next sphere placed is adjusted based on the slider value.

Feature 4: User can select the color of the spheres through a dropdown

Input: User selects color value from dropdown (RGB)

Process:

  • User selects color through the dropdown
  • Update the color of all spheres placed with that value

Output: All spheres on screen will be that color

Additional Feature: User can pop (destroy) the spheres using raycasting

Input: Mouse click on sphere

Process:

  • User clicks on placed sphere while in POP mode
  • Raycast hit destroys the sphere and plays a popping sound

Output: If raycast hit, destroy the sphere object

Additional Feature: User can set number of spheres

Input: Dropdown to select number of spheres

Process:

  • User selects value from dropdown
  • Number of spheres possible is changed to value
  • User can now place that amount of spheres

Output: User is able to place that amount of spheres

Published 7 days ago
StatusReleased
PlatformsHTML5
Authorcja48