https://github.com/normandy72/snow-boarder
A "Snow Boarder" game. Complete C# Unity Game Developer 2D.
https://github.com/normandy72/snow-boarder
csharp csharp-code game game-development gamedev unity unity2d unity2d-game
Last synced: 24 days ago
JSON representation
A "Snow Boarder" game. Complete C# Unity Game Developer 2D.
- Host: GitHub
- URL: https://github.com/normandy72/snow-boarder
- Owner: Normandy72
- Created: 2023-01-10T17:30:07.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-13T15:01:37.000Z (over 3 years ago)
- Last Synced: 2025-03-04T08:44:55.533Z (over 1 year ago)
- Topics: csharp, csharp-code, game, game-development, gamedev, unity, unity2d, unity2d-game
- Language: C#
- Homepage:
- Size: 1.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ~ Unity ~
## Add Cinemachine
1. Add the Package Manager window.
2. Find and install Cinemachine.
3. Add a Virtual Camera.
4. Point it to follow the ball.
5. Change the Screen X value to show more of wants to come.
## Surface Effector 2D
1. Add Surface Effector 2D to main layout
2. In Edge Collider mark 'Used by Effector'
## Particle System Component
* Particle System is a Component added to a Game Object.
* We use Modules for controlling behaviour.
## Audio Terminology
* __Audio Listener__ - like a microphone, receives sounds and plays through your computer's speakers.
* __Audio Source__ - plays audio and allows us to adjust settings (e.g. volume).
* __Audio Clip__ - conteins the audio data to be played (mp3, wav, ogg).
***
# ~ C# ~
## Organising Code
* The more code we have, the higher likelihood of conflicts between names and behaviours. Especially on multi-person projects. E.g. Programmer 1 working on player uses "Movement" method but Programmer 2 working on enemy also uses "Movement" method.
* So in C# our code is grouped with a particular structure to reduce conflicts.
```
namespace UnityEngine
class OurClass
SomeMethod()
statementA;
statementB;
```
## Creating A Delay
* There are 2 useful approaches to "waiting a moment":
* Invoke,
* Coroutines.
* Invoke is a bit easier to understand but not as powerful.
## Using Invoke()
When we call `Invoke()` we need to pass in the name of the method we want to call after a delay, as well as how long the delay is.
`Invoke("NameOfMethod", delay);`