https://github.com/solygambas/unity-projects
Some small projects to learn C# by developing games with Unity.
https://github.com/solygambas/unity-projects
csharp unity
Last synced: 2 months ago
JSON representation
Some small projects to learn C# by developing games with Unity.
- Host: GitHub
- URL: https://github.com/solygambas/unity-projects
- Owner: solygambas
- Created: 2022-08-08T10:11:12.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-15T14:16:09.000Z (almost 4 years ago)
- Last Synced: 2025-05-31T16:27:43.439Z (about 1 year ago)
- Topics: csharp, unity
- Language: C#
- Homepage:
- Size: 368 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Unity Projects
Some small projects to learn C# by developing games with Unity.
## Hero Born
A First-person shooter (FPS) game prototype focused on avoiding enemies and collecting health items.
[See Hero Born folder](Hero%20Born)
### Features
#### C# basics
- setting up a new project in Unity.
- understanding variables, methods, and classes.
- formatting code and debugging information.
- using if-else and switch statements.
- holding collections of values with arrays and lists.
- handling key-value pairs with dictionaries.
- looping through collections with for, foreach and while loops.
- declaring classes and structs.
- creating classes using inheritance, composition, and polymorphism.
#### Unity basics
- building a level in Unity, creating primitives and thinking in 3D.
- keeping the hierarchy of game objects clean.
- working with prefabs.
- setting up lights.
- creating animations in code and in Unity.
- recording keyframes.
#### Game prototype
- managing player movement.
- moving the player with the Transform component.
- scripting camera behavior.
- working with the Unity physics system : Rigidbody, colliders and triggers.
#### Game mechanics
- handling jumps with enumerations and layer masks.
- shooting projectiles by instantiating and cleaning up objects.
- creating a game manager with the get and set properties.
- creating a GUI to display player stats.
- adding win and loss conditions.
- pausing and restarting the game.
- referencing the patrol locations and moving enemy agents with NavMesh.
- changing the agent's destination to seek the player.
- lowering player health and detecting bullet collisions.
#### C# intermediate concepts
- using access modifiers: const, readonly, and static.
- writing overloading methods.
- using the out and ref parameters.
- working with interfaces and abstract classes.
- extending classes and preventing namespace conflicts with type aliasing.
- working with stacks, queues and hashsets.
- using generics and delegates.
- creating events and subscriptions.
- throwing and handling errors.
### Game data
- navigating the file system.
- creating, reading, updating, and deleting files.
- working with text, XML, and JSON data formats.
- using data streams.
- serializing and deserializing objects.
Based on [Learning C# by Developing Games with Unity 2021](https://www.amazon.com/Learning-Developing-Games-Unity-2021/dp/1801813949) by Harrison Ferrone (6th Edition, 2021).