mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-06 07:50:22 +01:00
Merge pull request #825 from Faless/fix/4.x_bomber_spawn_function
[Net] Fix Multiplayer Bomber custom spawner.
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
extends MultiplayerSpawner
|
extends MultiplayerSpawner
|
||||||
|
|
||||||
func _spawn_custom(data):
|
func _init():
|
||||||
|
spawn_function = _spawn_bomb
|
||||||
|
|
||||||
|
|
||||||
|
func _spawn_bomb(data):
|
||||||
if data.size() != 2 or typeof(data[0]) != TYPE_VECTOR2 or typeof(data[1]) != TYPE_INT:
|
if data.size() != 2 or typeof(data[0]) != TYPE_VECTOR2 or typeof(data[1]) != TYPE_INT:
|
||||||
return null
|
return null
|
||||||
var bomb = preload("res://bomb.tscn").instantiate()
|
var bomb = preload("res://bomb.tscn").instantiate()
|
||||||
|
|||||||
Reference in New Issue
Block a user