https://github.com/saahen-sriyan-mishra/flappy-bird-clone-unity
This project is a clone of the popular Flappy Bird game, created using Unity(2022) and C#(Visual Studio 2022) . The objective of the game is to navigate the bird through an endless series of pipes without hitting them.
https://github.com/saahen-sriyan-mishra/flappy-bird-clone-unity
Last synced: 26 days ago
JSON representation
This project is a clone of the popular Flappy Bird game, created using Unity(2022) and C#(Visual Studio 2022) . The objective of the game is to navigate the bird through an endless series of pipes without hitting them.
- Host: GitHub
- URL: https://github.com/saahen-sriyan-mishra/flappy-bird-clone-unity
- Owner: saahen-sriyan-mishra
- Created: 2024-05-25T19:51:32.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-28T03:36:34.000Z (about 1 year ago)
- Last Synced: 2024-05-28T13:08:37.946Z (about 1 year ago)
- Language: C#
- Size: 2.8 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flappy Bird Clone
This project is a recreation of the popular mobile game Flappy Bird using the Unity game engine. The player controls a bird, navigating it through a series of pipes by making it flap its wings to avoid obstacles. The game features a score system, game over conditions, and a simple user interface.

## Scripts
### GameManager.cs
The `GameManager` script is responsible for managing the overall game state, including starting and ending the game, as well as keeping track of the player's score.
#### Methods:
- `IncreaseScore()`: Increases the player's score by 1 and updates the score text.
- `GameOver()`: Handles the game over state, displays the game over UI, and pauses the game.
- `Play()`: Resets the game state and starts the game.### Player.cs
The `Player` script controls the bird's movement and collision detection.
#### Methods:
- `Update()`: Handles the bird's flapping and movement.
- `OnCollisionEnter2D(Collision2D collision)`: Detects collisions with pipes and triggers the game over state.### Pipes.cs
The `Pipes` script controls the movement and destruction of pipe obstacles.
#### Methods:
- `Update()`: Moves the pipes to the left and destroys them when they go off-screen.### Spawner.cs
The `Spawner` script is responsible for spawning pipes at regular intervals.
#### Methods:
- `Start()`: Initializes the spawning process.
- `SpawnPipe()`: Instantiates a new pipe at a random vertical position.