add player node which will be used to capture their info from the HUD

This commit is contained in:
Chris Cromer 2022-07-04 11:13:11 -04:00 committed by Gitea
parent f582a32124
commit cf20410bc8
2 changed files with 19 additions and 1 deletions

View File

@ -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
View 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"]