-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Multiple fixes and improvements to Mono projects #1280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
… Added audio pause when a player loses a game
| real_t sin = Mathf.Sin(angle); | ||
| real_t cos = Mathf.Cos(angle); | ||
| float sin = Mathf.Sin(angle); | ||
| float cos = Mathf.Cos(angle); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
real_t is intended to provide support for compiling Godot with double-precision floats with the same codebase, so it should not be replaced with float which would break that ability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have kept real_t if it worked out of the box. The problem is that in the official version of Godot, the _Process method accepts delta as a double.
Also, this example is for beginners, and I believe that if a beginner compiles Godot themselves with double precision, they can change the float themselves.
I could fix the current code to use real_t everywhere, but is that really necessary? Other C# examples don't use real_t at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then change delta and leave the rest as-is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's your repository, you decide. Should I fix it?
It is not, but also, it cannot, and it does not need to be. Demos for Godot 3.x are maintained on a separate branch.
Follow Godot's guidelines: https://docs.godotengine.org/en/latest/tutorials/scripting/c_sharp/c_sharp_style_guide.html |
Is it compatible with engine version 3x? I don't know, no testing has been done.
Don't treat this as a pull request
In the future, I plan to maintain and create new demos in C#. Do I need to follow Microsoft's formatting guidelines? Or can I format the code however I want?