This repository has been archived on 2023-11-16. You can view files and clone it, but cannot push or open issues or pull requests.
GOA/godot/Playbutton.cs

26 lines
656 B
C#

using Godot;
using System;
using System.Net.Cache;
public partial class Playbutton : Button
{
private LLMApiRequests llmApiRequests;
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
SetProcess(false);
llmApiRequests = GetTree().Root.GetNode<LLMApiRequests>("Root/LLMApiRequests");
}
public override void _Pressed()
{
// GD.Print("a");
llmApiRequests?.PostToApi();
var node = GetTree().Root.GetNode<CanvasLayer>("Root/Ingame/IngameCanvas");
node.SetProcess(true);
node.Show();
var GParent = GetTree().Root.GetNode<CanvasLayer>("Root/MainMenu/MainMenuCanvas");
GParent.Hide();
}
}