Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorshir authored Mar 8, 2024
1 parent a186e6e commit 367732b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,21 @@ Play now on [itch.io](https://parkpulse.itch.io/angrybirdsstyle)!
- Release: Launch the bird.
- Reset button: Restart the current level.

## Explanation of Algorithms, Components, and Techniques Used in Scripts

### AngryBird Script

- **Vector Calculation**: The script calculates the direction and magnitude of the bird's movement when dragged (See [line 31](https://github.com/ParkPulse-dev/AngryBirdsStyle/blob/a186e6eb9a08637456c87747d85b7aa5d8cc4671/Assets/Scripts/AngryBird.cs#L31)).
- **Coroutine for Delayed Release**: It uses a coroutine to release the bird after a short delay, simulating the slingshot mechanic (See [line 63](https://github.com/ParkPulse-dev/AngryBirdsStyle/blob/a186e6eb9a08637456c87747d85b7aa5d8cc4671/Assets/Scripts/AngryBird.cs#L63)).
- **Scene Management**: The script handles scene restarts when all objects are static or when the bird hits the boundary (See [line 71](https://github.com/ParkPulse-dev/AngryBirdsStyle/blob/a186e6eb9a08637456c87747d85b7aa5d8cc4671/Assets/Scripts/AngryBird.cs#L71)).

### Pig Script

- **Collision Detection**: Detects collisions with other objects, specifically with the bird, to calculate damage and health depletion (See [line 30](https://github.com/ParkPulse-dev/AngryBirdsStyle/blob/a186e6eb9a08637456c87747d85b7aa5d8cc4671/Assets/Scripts/Pig.cs#L30)).
- **Health Management**: Reduces the pig's health based on collision velocity and destroys it when health is depleted (See [lines 37-50](https://github.com/ParkPulse-dev/AngryBirdsStyle/blob/a186e6eb9a08637456c87747d85b7aa5d8cc4671/Assets/Scripts/Pig.cs#L37-L50)).
- **Sprite Change**: Changes the pig's sprite when its health is below a certain threshold (See [line 46](https://github.com/ParkPulse-dev/AngryBirdsStyle/blob/a186e6eb9a08637456c87747d85b7aa5d8cc4671/Assets/Scripts/Pig.cs#L46)).

### Restart Script

- **Scene Reloading**: Provides a simple functionality to reset the game by reloading the current scene (See [line 22](https://github.com/ParkPulse-dev/AngryBirdsStyle/blob/a186e6eb9a08637456c87747d85b7aa5d8cc4671/Assets/Scripts/Restart.cs#L22)).

0 comments on commit 367732b

Please sign in to comment.