mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
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
This commit is contained in:
@@ -337,7 +337,7 @@ uses the mouse pointer. Here is the code for the Player, using ``move_and_slide(
|
||||
|
||||
public partial class MyCharacterBody2D : CharacterBody2D
|
||||
{
|
||||
private PackedScene _bullet = (PackedScene)GD.Load("res://bullet.tscn");
|
||||
private PackedScene _bullet = GD.Load<PackedScene>("res://Bullet.tscn");
|
||||
private int _speed = 200;
|
||||
|
||||
public void GetInput()
|
||||
|
||||
Reference in New Issue
Block a user