add player node which will be used to capture their info from the HUD
This commit is contained in:
parent
acccc36a4d
commit
cbac026ebc
@ -1,9 +1,13 @@
|
||||
[gd_scene load_steps=2 format=2]
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://monitor/Monitor.gd" type="Script" id=1]
|
||||
[ext_resource path="res://monitor/Player.gd" type="Script" id=2]
|
||||
|
||||
[node name="Monitor" type="Node"]
|
||||
script = ExtResource( 1 )
|
||||
use_development_url = true
|
||||
|
||||
[node name="Player" type="Node" parent="."]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="HTTPRequest" type="HTTPRequest" parent="."]
|
||||
|
14
godot/monitor/Player.gd
Normal file
14
godot/monitor/Player.gd
Normal file
@ -0,0 +1,14 @@
|
||||
extends Node
|
||||
|
||||
|
||||
var player: Dictionary
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_set_player(player_info: Dictionary) -> void:
|
||||
player["name"] = player_info["name"]
|
||||
player["rut"] = player_info["rut"]
|
||||
player["email"] = player_info["email"]
|
Loading…
Reference in New Issue
Block a user