12 Commits

Author SHA1 Message Date
hdubbs
d6da7be302 Fix vector value in bullet example in Instancing with signals (#8203) 2023-11-09 11:26:28 +01: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
Raul Santos
d9e888744e Update tutorials/scripting/instancing_with_signals.rst
Co-authored-by: Paul Joannon <437025+paulloz@users.noreply.github.com>
2023-07-13 12:17:19 +02:00
Raul Santos
19fccc0bd5 C#: Fix instancing_with_signals tutorial 2023-07-12 16:02:45 +02:00
Max Hilbrunner
72c0af46b2 Snake-case .tscn, .gd and _on_* callbacks
Co-authored-by: Doug Thompson <s-git@dougthompson.co.uk>
2023-05-18 12:46:58 +02: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
Hugo Locurcio
509804650e Update all instances of instance() to instantiate() 2022-11-29 16:59:09 +01:00
TheYellowArchitect
6c566613a8 [Instancing with signals] Updated to 4.0 (#6268)
* [Instancing with signals] Updated to 4.0

Basically started with changing `instance()` to `instantiate()`

Was a good chance to also upgrade the badly named `b` variables into proper intuitive names.

It's a good tutorial, short and to the point, though kinda abstract so I don't think there is anything more to add (if I put an image above the final codeblock, on how to add a signal via UI, it would ruin the abstraction imo)

* Made the signal location a bit more obvious

* Updated signal emission to 4.0 syntax

Interesting that emit_signal did work, backwards compatibility ftw!
`emit_signal()` its less intuitive as you must know a "magical function" of Godot instead of using the obvious variable, and also takes string argument lmao
2022-10-07 16:08:35 +02:00
Raul Santos
3b36a94d35 Update C# signal documentation
Updates C# signal documentation and code examples to the new API in 4.0
2022-08-26 15:59:43 +02:00
Rémi Verschelde
9a05eef561 4.0: Convert Sprite references to Sprite2D
Some screenshots will need to be updated so that the scene structures shown
in screenshot fit what the code blocks are referring to.
2021-10-06 14:29:55 +02:00
Nathan Lovato
ef602495cf Move remaining pages in getting_started/scripting after rebase 2020-10-08 14:19:45 -06:00