mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Update tutorials/scripting/instancing_with_signals.rst
Co-authored-by: Paul Joannon <437025+paulloz@users.noreply.github.com>
This commit is contained in:
@@ -149,7 +149,7 @@ In the main scene, we then connect the player's signal (it will appear in the
|
||||
|
||||
private void OnPlayerShoot(PackedScene bullet, float direction, Vector2 location)
|
||||
{
|
||||
var spawnedBullet = (Bullet)bullet.Instantiate();
|
||||
var spawnedBullet = bullet.Instantiate<Bullet>();
|
||||
AddChild(spawnedBullet);
|
||||
spawnedBullet.Rotation = direction;
|
||||
spawnedBullet.Position = location;
|
||||
|
||||
Reference in New Issue
Block a user