-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
root = true | ||
|
||
[*.cs] | ||
indent_style = space | ||
indent_size = 4 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
charset = utf-8 | ||
end_of_line = lf | ||
dotnet_sort_system_directives_first = true | ||
dotnet_style_qualification_for_field = false:warning | ||
dotnet_style_qualification_for_property = false:warning | ||
dotnet_style_qualification_for_method = false:warning | ||
dotnet_style_qualification_for_event = false:warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
dotnet format --check --folder --include **/*.cs --verbosity minimal | ||
if [ $? -ne 0 ]; then | ||
echo "Code formatting issues detected. Please fix them before committing." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Unity C# Linter | ||
|
||
on: | ||
push: # Trigger on every push | ||
pull_request: # Also run on pull requests | ||
|
||
jobs: | ||
lint: | ||
name: Run C# Linter | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: '7.x' # Adjust to the required .NET version for Unity | ||
|
||
- name: Install dotnet-format | ||
run: dotnet tool install -g dotnet-format | ||
|
||
- name: Run dotnet-format | ||
# Run dotnet-format in check mode to identify issues only in .cs files in Assets/Scripts and subfolders | ||
run: dotnet-format Assets/Scripts --check --folder --include **/*.cs --verbosity diagnostic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 erelsgl-at-ariel-gamedev | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Unity week 2: Formal elements | ||
|
||
A project with step-by-step scenes illustrating some of the formal elements of game development in Unity, including: | ||
|
||
* Prefabs for instantiating new objects; | ||
* Colliders for triggering outcomes of actions; | ||
* Coroutines for setting time-based rules. | ||
|
||
Text explanations are available | ||
[here](https://github.com/gamedev-at-ariel/gamedev-5782) in folder 04. | ||
|
||
## Cloning | ||
To clone the project, you may need to install git lfs first (if it is not already installed): | ||
|
||
git lfs install | ||
|
||
To clone faster, you can limit the depth to 1 like this: | ||
|
||
git clone --depth=1 https://github.com/<repository-name>.git | ||
|
||
When you first open this project, you may not see the text in the score field. | ||
This is because `TextMeshPro` is not in the project. | ||
The Unity Editor should hopefully prompt you to import TextMeshPro; | ||
once you do this, re-open the scenes, and you should be able to see the texts. | ||
|
||
|
||
|
||
## Credits | ||
|
||
Programming: | ||
* Maoz Grossman | ||
* Erel Segal-Halevi | ||
|
||
Online courses: | ||
* [The Ultimate Guide to Game Development with Unity 2019](https://www.udemy.com/the-ultimate-guide-to-game-development-with-unity/), by Jonathan Weinberger | ||
|
||
Graphics: | ||
* [Matt Whitehead](https://ccsearch.creativecommons.org/photos/7fd4a37b-8d1a-4d4c-80a2-4ca4a3839941) | ||
* [Kenney's space kit](https://kenney.nl/assets/space-kit) | ||
* [Ductman's 2D Animated Spacehips](https://assetstore.unity.com/packages/2d/characters/2d-animated-spaceships-96852) | ||
* [Franc from the Noun Project](https://commons.wikimedia.org/w/index.php?curid=64661575) | ||
* [Greek-arrow-animated.gif by Andrikkos is licensed under CC BY-SA 3.0](https://search.creativecommons.org/photos/2db102af-80d0-4ec8-9171-1ac77d2565ce) |