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#
Raw Permalink Normal View History

2023-09-23 17:04:11 +02:00
using Godot;
using System;
2023-09-23 19:42:38 +02:00
using System.Net.Cache;
2023-09-23 17:04:11 +02:00
public partial class Playbutton : Button
{
private LLMApiRequests llmApiRequests;
2023-09-23 17:04:11 +02:00
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
2023-09-23 19:42:38 +02:00
SetProcess(false);
llmApiRequests = GetTree().Root.GetNode<LLMApiRequests>("Root/LLMApiRequests");
2023-09-23 17:04:11 +02:00
}
2023-09-23 20:23:55 +02:00
public override void _Pressed()
{
// GD.Print("a");
2023-09-23 21:52:03 +02:00
llmApiRequests?.PostToApi();
var node = GetTree().Root.GetNode<CanvasLayer>("Root/Ingame/IngameCanvas");
2023-09-23 17:04:11 +02:00
node.SetProcess(true);
node.Show();
var GParent = GetTree().Root.GetNode<CanvasLayer>("Root/MainMenu/MainMenuCanvas");
2023-09-23 17:04:11 +02:00
GParent.Hide();
2023-09-23 20:23:55 +02:00
}
2023-09-23 17:04:11 +02:00
}