Skip to content

Commit d9e8887

Browse files
raulsntospaulloz
andauthored
Update tutorials/scripting/instancing_with_signals.rst
Co-authored-by: Paul Joannon <[email protected]>
1 parent 19fccc0 commit d9e8887

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tutorials/scripting/instancing_with_signals.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ In the main scene, we then connect the player's signal (it will appear in the
149149

150150
private void OnPlayerShoot(PackedScene bullet, float direction, Vector2 location)
151151
{
152-
var spawnedBullet = (Bullet)bullet.Instantiate();
152+
var spawnedBullet = bullet.Instantiate<Bullet>();
153153
AddChild(spawnedBullet);
154154
spawnedBullet.Rotation = direction;
155155
spawnedBullet.Position = location;

0 commit comments

Comments
 (0)