forked from unfa/liblast
multiple players
This commit is contained in:
parent
88d94918c4
commit
cc628da615
2 changed files with 3 additions and 6 deletions
2
Game.gd
2
Game.gd
|
@ -59,7 +59,7 @@ func add_player(id):
|
|||
var player = player_scene.instance()
|
||||
|
||||
player.name = str(id)
|
||||
add_child(player)
|
||||
$Players.add_child(player)
|
||||
player.set_network_master(id)
|
||||
player.translation += Vector3(0.0, 3.0, 0.0)
|
||||
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Player.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Game.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Level.tscn" type="PackedScene" id=3]
|
||||
|
||||
[node name="Game" type="Spatial"]
|
||||
script = ExtResource( 2 )
|
||||
is_server = false
|
||||
SERVER_IP = "172.28.166.24"
|
||||
|
||||
[node name="Level" parent="." instance=ExtResource( 3 )]
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource( 1 )]
|
||||
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 12.7215, 13.0596, -0.85251 )
|
||||
[node name="Players" type="Spatial" parent="."]
|
||||
|
|
Loading…
Reference in a new issue