Commit Graph

14 Commits

Author SHA1 Message Date
Max Hilbrunner
128d712d89 Merge pull request #8195 from wlsnmrk/cross-scripting-style
Improve code style for cross-language scripting examples
2024-11-19 10:39:43 +01:00
Asa Sprow
a4c0b37464 add C# documentation for connecting to gdscript signal with parameters 2024-10-17 09:45:30 -06:00
Mark Wilson
aa223c335c Improved style for cross-language examples.
* Replaced "foo"/"bar" example values with "my value".
* Changed C# public field to property and GDScript to match.
* Used PascalCase for C# property.
* Used camelCase for C# local variable.
* Used "var" for C# local variable declarations.
* Used PascalCase for GDScript class/script variable.
* Improved clarity of comments documenting expected output.
* Eliminated horizontal scroll in C# code example.
* Fixed a comma splice in the page text.
* Removed an out-of-date warning block.
2024-05-08 16:53:15 -04:00
31
ec757a3839 Fix C# typos: capitalize method name, use public property names 2024-02-02 01:07:54 -08:00
31
848591cefd Apply suggestions from code review
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Paul Joannon <437025+paulloz@users.noreply.github.com>
2024-01-22 04:11:07 -06:00
31
04b42dc143 Elaborate on C# Connect/Disconnect 2024-01-22 01:43:52 -08:00
Mark Wilson
147d2233c7 Improve C# GD.Load() examples
* Use typed version of GD.Load()
* Use absolute paths (i.e., prefixed with "res://")
* Use "Path/To/" intermediate path values on abstract examples, to
  illustrate that files can live in various directories
* Use PascalCase on files that are not GDScript or GLSL
2023-10-08 12:25:43 -04:00
Danil Alexeev
59075ad12f Fix GDScript code style regarding colon (docs) 2023-03-05 16:51:08 +03:00
Raul Santos
b319da3f07 Update some C# examples for 4.0 (#6693)
* Update some C# examples

- Rename members that have been renamed in Godot's C# API for 4.0.
- Change `delta` parameter type to `double`.
- Ensure parameters match base declaration.
- Other minor code fixes.

---------

Co-authored-by: Paul Joannon <437025+paulloz@users.noreply.github.com>
2023-02-04 17:03:03 +01:00
Paul Joannon
ac22d6e537 Update & fix C# blocks under tutorials/scripting/
- `_Process` and `_PhysicsProcess` take their delta argument as a `double`
- Use string interpolation instead of concatenating strings
- Use `string` instead of `String` (`using System` was removed from everywhere in a previous PR)
- Use `System.Array.Empty<T>()` to init empty arrays
- Use `SignalName.*` instead of `nameof(*)` for signals
- Do not use `event` as an argument name (that's a keyword)
- Match node paths to screenshots when retrieving nodes from the tree
- Add a C# example for scene unique nodes
- Update the "Cross language scripting" page
- Add a note about using `is` against `null`
2023-01-13 20:41:23 +01:00
Hana
9e90766a92 update c# class examples 2023-01-12 19:38:20 +01:00
Jean-Samuel Aubry-Guzzi
5e421754ec Add warning about importing c# 2022-10-25 21:24:37 -04:00
David Briscoe
9a14c8ded3 Rename print_x_times to print_n_times in Cross-language scripting (#6143)
Change code to match the rest of the documentation. C# examples
use PrintNTimes and calls print_n_times, so change gdscript to match.
2022-09-06 18:19:16 +02:00
Nathan Lovato
4272395ab7 Move scripting section to tutorials/
Closes #4113
2020-10-07 14:05:48 -06:00