Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
6e0421bc65 | |||
b61d649847 | |||
820d2f0d76 | |||
cb5842a32b | |||
ac8b51031b |
35
LLMApi/.vscode/launch.json
vendored
Normal file
35
LLMApi/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
// Use IntelliSense to find out which attributes exist for C# debugging
|
||||||
|
// Use hover for the description of the existing attributes
|
||||||
|
// For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md.
|
||||||
|
"name": ".NET Core Launch (web)",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "build",
|
||||||
|
// If you have changed target frameworks, make sure to update the program path.
|
||||||
|
"program": "${workspaceFolder}/bin/Debug/net7.0/LLMApi.dll",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
|
||||||
|
"serverReadyAction": {
|
||||||
|
"action": "openExternally",
|
||||||
|
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"sourceFileMap": {
|
||||||
|
"/Views": "${workspaceFolder}/Views"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": ".NET Core Attach",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "attach"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
12
LLMApi/.vscode/settings.json
vendored
Normal file
12
LLMApi/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"files.exclude": {
|
||||||
|
"**/.git": true,
|
||||||
|
"**/.svn": true,
|
||||||
|
"**/.hg": true,
|
||||||
|
"**/CVS": true,
|
||||||
|
"**/.DS_Store": true,
|
||||||
|
"**/Thumbs.db": true,
|
||||||
|
"**/bin/": true,
|
||||||
|
"**/obj/": true,
|
||||||
|
}
|
||||||
|
}
|
41
LLMApi/.vscode/tasks.json
vendored
Normal file
41
LLMApi/.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "build",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"build",
|
||||||
|
"${workspaceFolder}/LLMApi.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "publish",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"${workspaceFolder}/LLMApi.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "watch",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"watch",
|
||||||
|
"run",
|
||||||
|
"--project",
|
||||||
|
"${workspaceFolder}/LLMApi.csproj"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
58
LLMApi/Controllers/LLMController.cs
Normal file
58
LLMApi/Controllers/LLMController.cs
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
using LLMApi.Data.Contracts.ChatGpt3_5;
|
||||||
|
using LLMApi.Data.Contracts.Game.ChatGpt3_5;
|
||||||
|
using LLMApi.Services;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace LLMApi.Controllers;
|
||||||
|
|
||||||
|
[ApiController]
|
||||||
|
[Route("[controller]")]
|
||||||
|
public class LLMController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly ILlmApiService _apiService;
|
||||||
|
|
||||||
|
public LLMController(ILlmApiService apiService)
|
||||||
|
{
|
||||||
|
_apiService = apiService;
|
||||||
|
}
|
||||||
|
|
||||||
|
// [HttpGet(nameof(AnswerToPrompt))]
|
||||||
|
// public async Task<ActionResult<Choice>> AnswerToPrompt(string prompt = "Hello!")
|
||||||
|
// {
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// var choices = await _apiService.GetAnswerToPrompt(prompt);
|
||||||
|
|
||||||
|
// return Ok(choices);
|
||||||
|
// }
|
||||||
|
// catch (Exception ex)
|
||||||
|
// {
|
||||||
|
// _logger.LogError(ex, null, Array.Empty<object>());
|
||||||
|
// return StatusCode(500, ex.ToString());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
[HttpGet(nameof(Answer))]
|
||||||
|
public async Task<ActionResult<AnswerResponse>> Answer(AnswerRequest answerRequest)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
System.Console.WriteLine(JsonConvert.SerializeObject(answerRequest));
|
||||||
|
System.Console.WriteLine(">");
|
||||||
|
|
||||||
|
var answerResponse = await _apiService.GetAnswer(answerRequest);
|
||||||
|
|
||||||
|
System.Console.WriteLine(JsonConvert.SerializeObject(answerResponse));
|
||||||
|
System.Console.WriteLine();
|
||||||
|
System.Console.WriteLine();
|
||||||
|
|
||||||
|
return Ok(answerResponse);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine(ex.ToString());
|
||||||
|
return StatusCode(500, ex.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
namespace LLMApi.Data.Contracts.ChatGpt3_5;
|
||||||
|
|
||||||
|
public record ChatCompletionRequest(
|
||||||
|
string Model,
|
||||||
|
Message[] Messages
|
||||||
|
);
|
10
LLMApi/Data/Contracts/ChatGpt3_5/ChatCompletionResponse.cs
Normal file
10
LLMApi/Data/Contracts/ChatGpt3_5/ChatCompletionResponse.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
namespace LLMApi.Data.Contracts.ChatGpt3_5;
|
||||||
|
|
||||||
|
public record ChatCompletionResponse(
|
||||||
|
string Id,
|
||||||
|
string Object,
|
||||||
|
int Created,
|
||||||
|
string Model,
|
||||||
|
Choice[] Choices,
|
||||||
|
Usage Usage
|
||||||
|
);
|
7
LLMApi/Data/Contracts/ChatGpt3_5/Choice.cs
Normal file
7
LLMApi/Data/Contracts/ChatGpt3_5/Choice.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
namespace LLMApi.Data.Contracts.ChatGpt3_5;
|
||||||
|
|
||||||
|
public record Choice(
|
||||||
|
int Index,
|
||||||
|
Message Message,
|
||||||
|
string FinishReason
|
||||||
|
);
|
6
LLMApi/Data/Contracts/ChatGpt3_5/Message.cs
Normal file
6
LLMApi/Data/Contracts/ChatGpt3_5/Message.cs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
namespace LLMApi.Data.Contracts.ChatGpt3_5;
|
||||||
|
|
||||||
|
public record Message(
|
||||||
|
string Role,
|
||||||
|
string? Content
|
||||||
|
);
|
7
LLMApi/Data/Contracts/ChatGpt3_5/Usage.cs
Normal file
7
LLMApi/Data/Contracts/ChatGpt3_5/Usage.cs
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
namespace LLMApi.Data.Contracts.ChatGpt3_5;
|
||||||
|
|
||||||
|
public record Usage(
|
||||||
|
int PromptTokens,
|
||||||
|
int CompletionTokens,
|
||||||
|
int TotalTokens
|
||||||
|
);
|
8
LLMApi/Data/Contracts/Game/ChatGpt3_5/AnswerRequest.cs
Normal file
8
LLMApi/Data/Contracts/Game/ChatGpt3_5/AnswerRequest.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
using LLMApi.Data.Contracts.ChatGpt3_5;
|
||||||
|
|
||||||
|
namespace LLMApi.Data.Contracts.Game.ChatGpt3_5;
|
||||||
|
|
||||||
|
public record AnswerRequest(
|
||||||
|
Message[]? Context,
|
||||||
|
string Prompt
|
||||||
|
);
|
8
LLMApi/Data/Contracts/Game/ChatGpt3_5/AnswerResponse.cs
Normal file
8
LLMApi/Data/Contracts/Game/ChatGpt3_5/AnswerResponse.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
using LLMApi.Data.Contracts.ChatGpt3_5;
|
||||||
|
|
||||||
|
namespace LLMApi.Data.Contracts.Game.ChatGpt3_5;
|
||||||
|
|
||||||
|
public record AnswerResponse(
|
||||||
|
Message[] Context,
|
||||||
|
IEnumerable<Choice> Choices
|
||||||
|
);
|
15
LLMApi/LLMApi.csproj
Normal file
15
LLMApi/LLMApi.csproj
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.11" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
30
LLMApi/Program.cs
Normal file
30
LLMApi/Program.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
using LLMApi.Services;
|
||||||
|
|
||||||
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
|
// Add services to the container.
|
||||||
|
|
||||||
|
builder.Services.AddControllers();
|
||||||
|
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||||
|
builder.Services.AddEndpointsApiExplorer();
|
||||||
|
builder.Services.AddSwaggerGen();
|
||||||
|
|
||||||
|
builder.Services.AddSingleton<HttpClient>();
|
||||||
|
builder.Services.AddSingleton<ILlmApiService, ChatGpt3_5Service>();
|
||||||
|
|
||||||
|
var app = builder.Build();
|
||||||
|
|
||||||
|
// Configure the HTTP request pipeline.
|
||||||
|
if (app.Environment.IsDevelopment())
|
||||||
|
{
|
||||||
|
app.UseSwagger();
|
||||||
|
app.UseSwaggerUI();
|
||||||
|
}
|
||||||
|
|
||||||
|
app.UseHttpsRedirection();
|
||||||
|
|
||||||
|
app.UseAuthorization();
|
||||||
|
|
||||||
|
app.MapControllers();
|
||||||
|
|
||||||
|
app.Run();
|
41
LLMApi/Properties/launchSettings.json
Normal file
41
LLMApi/Properties/launchSettings.json
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||||
|
"iisSettings": {
|
||||||
|
"windowsAuthentication": false,
|
||||||
|
"anonymousAuthentication": true,
|
||||||
|
"iisExpress": {
|
||||||
|
"applicationUrl": "http://localhost:17280",
|
||||||
|
"sslPort": 44333
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profiles": {
|
||||||
|
"http": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"dotnetRunMessages": true,
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "swagger",
|
||||||
|
"applicationUrl": "http://localhost:5246",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"https": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"dotnetRunMessages": true,
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "swagger",
|
||||||
|
"applicationUrl": "https://localhost:7113;http://localhost:5246",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"IIS Express": {
|
||||||
|
"commandName": "IISExpress",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"launchUrl": "swagger",
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
90
LLMApi/Services/ChatGpt3_5.cs
Normal file
90
LLMApi/Services/ChatGpt3_5.cs
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
using LLMApi.Data.Contracts.ChatGpt3_5;
|
||||||
|
using LLMApi.Data.Contracts.Game.ChatGpt3_5;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Serialization;
|
||||||
|
|
||||||
|
namespace LLMApi.Services;
|
||||||
|
|
||||||
|
public class ChatGpt3_5Service : ILlmApiService
|
||||||
|
{
|
||||||
|
private readonly HttpClient _client;
|
||||||
|
private static readonly JsonSerializerSettings jsonDeserializerSettings = new()
|
||||||
|
{
|
||||||
|
ContractResolver = new DefaultContractResolver()
|
||||||
|
{
|
||||||
|
NamingStrategy = new SnakeCaseNamingStrategy()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
private const string VERSION_IDENTIFIER = "gpt-3.5-turbo";
|
||||||
|
|
||||||
|
private readonly string _llmRuleset;
|
||||||
|
|
||||||
|
public ChatGpt3_5Service(HttpClient client, IConfiguration configuration)
|
||||||
|
{
|
||||||
|
_client = client;
|
||||||
|
|
||||||
|
_client.BaseAddress = new Uri("https://api.openai.com");
|
||||||
|
|
||||||
|
var api_key = configuration["api_key"];
|
||||||
|
|
||||||
|
_client.DefaultRequestHeaders.Add("Authorization", $"Bearer {api_key}");
|
||||||
|
|
||||||
|
_llmRuleset = configuration["llm_ruleset"] ?? "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// public async Task<IEnumerable<Choice>> GetAnswerToPrompt(string prompt)
|
||||||
|
// {
|
||||||
|
// var requestContract = new ChatCompletionRequest(VERSION_IDENTIFIER,
|
||||||
|
// new Message[]
|
||||||
|
// {
|
||||||
|
// new("system", "You are a helpful assistant."),
|
||||||
|
// new("user", prompt),
|
||||||
|
// });
|
||||||
|
|
||||||
|
// var responseMessage = await _client.PostAsJsonAsync("/v1/chat/completions", requestContract);
|
||||||
|
|
||||||
|
// var responseContent = await responseMessage.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
// var response = JsonConvert.DeserializeObject<ChatCompletionResponse>(responseContent, jsonDeserializerSettings);
|
||||||
|
|
||||||
|
// ArgumentNullException.ThrowIfNull(response);
|
||||||
|
|
||||||
|
// var choices = response.Choices.OrderBy(c => c.Index);
|
||||||
|
|
||||||
|
// return choices;
|
||||||
|
// }
|
||||||
|
|
||||||
|
public async Task<AnswerResponse> GetAnswer(AnswerRequest answerRequest)
|
||||||
|
{
|
||||||
|
var (context, prompt) = answerRequest;
|
||||||
|
|
||||||
|
Message[] newContext;
|
||||||
|
if (context is null)
|
||||||
|
{
|
||||||
|
newContext = new[]
|
||||||
|
{
|
||||||
|
new Message("system", _llmRuleset),
|
||||||
|
new Message("user", prompt)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newContext = new List<Message>(context)
|
||||||
|
{
|
||||||
|
new("user", prompt)
|
||||||
|
}.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
var requestContract = new ChatCompletionRequest(VERSION_IDENTIFIER, newContext);
|
||||||
|
|
||||||
|
var responseMessage = await _client.PostAsJsonAsync("/v1/chat/completions", requestContract);
|
||||||
|
var responseContent = await responseMessage.Content.ReadAsStringAsync();
|
||||||
|
// var responseContent = await File.ReadAllTextAsync("/home/finn/Documents/pit_hackathon/GOA.git/llmapi/LLMApi/test.json");
|
||||||
|
var response = JsonConvert.DeserializeObject<ChatCompletionResponse>(responseContent, jsonDeserializerSettings);
|
||||||
|
|
||||||
|
ArgumentNullException.ThrowIfNull(response);
|
||||||
|
|
||||||
|
var choices = response.Choices.OrderBy(c => c.Index);
|
||||||
|
return new(newContext, choices);
|
||||||
|
}
|
||||||
|
}
|
11
LLMApi/Services/ILLMApiService.cs
Normal file
11
LLMApi/Services/ILLMApiService.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using LLMApi.Data.Contracts.ChatGpt3_5;
|
||||||
|
using LLMApi.Data.Contracts.Game.ChatGpt3_5;
|
||||||
|
|
||||||
|
namespace LLMApi.Services;
|
||||||
|
|
||||||
|
public interface ILlmApiService
|
||||||
|
{
|
||||||
|
// public Task<IEnumerable<Choice>> GetAnswerToPrompt(string prompt);
|
||||||
|
|
||||||
|
public Task<AnswerResponse> GetAnswer(AnswerRequest answerRequest);
|
||||||
|
}
|
8
LLMApi/appsettings.Development.json
Normal file
8
LLMApi/appsettings.Development.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft.AspNetCore": "Warning"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
11
LLMApi/appsettings.json
Normal file
11
LLMApi/appsettings.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft.AspNetCore": "Warning"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowedHosts": "*",
|
||||||
|
"api_key": "",
|
||||||
|
"llm_ruleset": "You are the game master of a computer RPG. It uses Fallout's S.P.E.C.I.A.L. system. You won't mention the S.P.E.C.I.A.L. system or Fallout. You won't write any Dialogue for the player character, but instead let the player respond themselves, before proceeding. You won't mention any dialogue or interaction options, unless the player asks you for some. When the player dies, you will describe the player's death and write \"\" afterward, without the quotes. Once GAMEOVER is reached, the player cannot interact with anything anymore. The player may use items in their possession, but they can only use items, which they have previously received. Item's may be consumed, if appropriate. Consumed items are not within the possession of the player anymore. You will give the player a couple of items appropriate for their character at the beginning. A player should at least receive some form of consumable healing item and weapon at the beginning. When the player tries to perform an action, you should use the player's attributes to determine if the player succeeds."
|
||||||
|
}
|
@ -4,7 +4,4 @@
|
|||||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||||
<RootNamespace>GodofAI</RootNamespace>
|
<RootNamespace>GodofAI</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
@ -1,6 +1,6 @@
|
|||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 2012
|
# Visual Studio 2012
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "God of AI", "God of AI.csproj", "{9F042379-873C-42A6-B544-C877BAB3A96D}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "God of AI", "God of AI.csproj", "{DE6878AB-07CF-4EBE-8489-F3CFBFE1694C}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@ -9,11 +9,11 @@ Global
|
|||||||
ExportRelease|Any CPU = ExportRelease|Any CPU
|
ExportRelease|Any CPU = ExportRelease|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{9F042379-873C-42A6-B544-C877BAB3A96D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{DE6878AB-07CF-4EBE-8489-F3CFBFE1694C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{9F042379-873C-42A6-B544-C877BAB3A96D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{DE6878AB-07CF-4EBE-8489-F3CFBFE1694C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{9F042379-873C-42A6-B544-C877BAB3A96D}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
|
{DE6878AB-07CF-4EBE-8489-F3CFBFE1694C}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
|
||||||
{9F042379-873C-42A6-B544-C877BAB3A96D}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
|
{DE6878AB-07CF-4EBE-8489-F3CFBFE1694C}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
|
||||||
{9F042379-873C-42A6-B544-C877BAB3A96D}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
|
{DE6878AB-07CF-4EBE-8489-F3CFBFE1694C}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
|
||||||
{9F042379-873C-42A6-B544-C877BAB3A96D}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
|
{DE6878AB-07CF-4EBE-8489-F3CFBFE1694C}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 50 KiB |
@ -1,34 +0,0 @@
|
|||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://vn2ficr8n4n5"
|
|
||||||
path="res://.godot/imported/GodofAi.jpg-def59ddc939d56f01f5cd6cd7522f115.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://GodofAi.jpg"
|
|
||||||
dest_files=["res://.godot/imported/GodofAi.jpg-def59ddc939d56f01f5cd6cd7522f115.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
@ -1,19 +0,0 @@
|
|||||||
using Godot;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
public partial class Hauptmenü : Node2D
|
|
||||||
{
|
|
||||||
// Called when the node enters the scene tree for the first time.
|
|
||||||
public override void _Ready()
|
|
||||||
{
|
|
||||||
var node = this.GetNode<CanvasLayer>("HauptMenü/VBoxContainer/Playbutton/Ingame/Ingame");
|
|
||||||
node.SetProcess(false);
|
|
||||||
node.Hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
public override void _Process(double delta)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
using Godot;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
public partial class LLMApiRequest : HttpRequest
|
|
||||||
{
|
|
||||||
public record AnswerRequest(
|
|
||||||
Message[] Context,
|
|
||||||
string Prompt
|
|
||||||
);
|
|
||||||
|
|
||||||
public record Message(
|
|
||||||
string Role,
|
|
||||||
string? Content
|
|
||||||
);
|
|
||||||
|
|
||||||
private bool PostToApiIsSet = false;
|
|
||||||
|
|
||||||
// Called when the node enters the scene tree for the first time.
|
|
||||||
public override void _Ready()
|
|
||||||
{
|
|
||||||
SetProcess(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PostToApi(Action<long, long, string[], byte[]> action)
|
|
||||||
{
|
|
||||||
if(!PostToApiIsSet)
|
|
||||||
{
|
|
||||||
RequestCompleted += (long result, long responseCode, string[] headers, byte[] body) => action(result, responseCode, headers, body);
|
|
||||||
PostToApiIsSet = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
var answerRequest = new AnswerRequest(new[] { new Message("user", "Hello!"), }, "aodneris");
|
|
||||||
|
|
||||||
|
|
||||||
Request($"http://localhost:5246/LLM/Test", new[] { "Content-Type: application/json" }, HttpClient.Method.Get, Newtonsoft.Json.JsonConvert.SerializeObject(answerRequest));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,38 +0,0 @@
|
|||||||
using Godot;
|
|
||||||
using System;
|
|
||||||
using System.Net.Cache;
|
|
||||||
|
|
||||||
public partial class Playbutton : Button
|
|
||||||
{
|
|
||||||
private LLMApiRequest llmApiRequest;
|
|
||||||
|
|
||||||
// Called when the node enters the scene tree for the first time.
|
|
||||||
public override void _Ready()
|
|
||||||
{
|
|
||||||
SetProcess(false);
|
|
||||||
llmApiRequest = GetNode<LLMApiRequest>("/root/Node2D/HTTPRequests");
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void _Pressed()
|
|
||||||
{
|
|
||||||
// llmApiRequest.RequestCompleted += OnRequestCompleted;
|
|
||||||
// llmApiRequest.Request("https://api.github.com/repos/godotengine/godot/releases/latest");
|
|
||||||
llmApiRequest?.PostToApi(OnRequestCompleted);
|
|
||||||
|
|
||||||
|
|
||||||
GD.Print("a");
|
|
||||||
var node = this.GetNode<CanvasLayer>("Ingame/Ingame");
|
|
||||||
node.SetProcess(true);
|
|
||||||
node.Show();
|
|
||||||
var GParent = this.GetTree().Root.GetNode<CanvasLayer>("Root/Hauptmenü/HauptMenü");
|
|
||||||
GParent.Hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnRequestCompleted(long result, long responseCode, string[] headers, byte[] body)
|
|
||||||
{
|
|
||||||
// Godot.Collections.Dictionary json = Json.ParseString(System.Text.Encoding.UTF8.GetString(body)).AsGodotDictionary();
|
|
||||||
// GD.Print(json["name"]);
|
|
||||||
// GD.Print(Json.ParseString(System.Text.Encoding.UTF8.GetString(body)).AsGodotDictionary());
|
|
||||||
GD.Print(System.Text.Encoding.UTF8.GetString(body));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
using Godot;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
public partial class PopupMenuSzenen : MenuButton
|
|
||||||
{
|
|
||||||
// Called when the node enters the scene tree for the first time.
|
|
||||||
public override void _Ready()
|
|
||||||
{
|
|
||||||
this.Pressed += ButtonPressed;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
public override void _Process(double delta)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ButtonPressed()
|
|
||||||
{
|
|
||||||
GD.Print("abc");
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
[gd_resource type="Theme" format=3 uid="uid://b16massh2pdbt"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
/font_sizes/12 = 20
|
|
@ -11,6 +11,5 @@ public partial class TextEdit : Godot.TextEdit
|
|||||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
public override void _Process(double delta)
|
public override void _Process(double delta)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
304
godot/UI.tscn
304
godot/UI.tscn
@ -1,277 +1,14 @@
|
|||||||
[gd_scene load_steps=8 format=3 uid="uid://1gar30yhw8ay"]
|
[gd_scene load_steps=3 format=3 uid="uid://1gar30yhw8ay"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://Hauptmenü.cs" id="1_4eu52"]
|
|
||||||
[ext_resource type="Script" path="res://TextEdit.cs" id="1_5gfrp"]
|
[ext_resource type="Script" path="res://TextEdit.cs" id="1_5gfrp"]
|
||||||
[ext_resource type="Texture2D" uid="uid://vn2ficr8n4n5" path="res://GodofAi.jpg" id="2_m684j"]
|
|
||||||
[ext_resource type="Script" path="res://PopupMenuSzenen.cs" id="3_l3xnr"]
|
|
||||||
[ext_resource type="Script" path="res://Playbutton.cs" id="3_ucfae"]
|
|
||||||
[ext_resource type="Script" path="res://LLMApiRequests.cs" id="5_pukni"]
|
|
||||||
|
|
||||||
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_ncw85"]
|
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_ncw85"]
|
||||||
|
|
||||||
[node name="Root" type="Node2D"]
|
[node name="Node2D" type="Node2D"]
|
||||||
|
|
||||||
[node name="Hauptmenü" type="Node2D" parent="."]
|
[node name="Ingame" type="CanvasLayer" parent="."]
|
||||||
position = Vector2(320, 20)
|
|
||||||
script = ExtResource("1_4eu52")
|
|
||||||
|
|
||||||
[node name="HauptMenü" type="CanvasLayer" parent="Hauptmenü"]
|
[node name="Eingabe" type="VBoxContainer" parent="Ingame"]
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="Hauptmenü/HauptMenü"]
|
|
||||||
anchors_preset = 8
|
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_top = 0.5
|
|
||||||
anchor_right = 0.5
|
|
||||||
anchor_bottom = 0.5
|
|
||||||
offset_left = -640.0
|
|
||||||
offset_top = -520.0
|
|
||||||
offset_right = 640.0
|
|
||||||
offset_bottom = 520.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
size_flags_horizontal = 0
|
|
||||||
|
|
||||||
[node name="Titelbild" type="TextureRect" parent="Hauptmenü/HauptMenü/VBoxContainer"]
|
|
||||||
custom_minimum_size = Vector2(0, 200)
|
|
||||||
layout_mode = 2
|
|
||||||
texture = ExtResource("2_m684j")
|
|
||||||
|
|
||||||
[node name="Pop up Menu Szenen" type="MenuButton" parent="Hauptmenü/HauptMenü/VBoxContainer"]
|
|
||||||
custom_minimum_size = Vector2(520, 50)
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 4
|
|
||||||
text = "Beispielszenen"
|
|
||||||
flat = false
|
|
||||||
icon_alignment = 1
|
|
||||||
switch_on_hover = true
|
|
||||||
item_count = 12
|
|
||||||
popup/item_0/text = "Fantasy"
|
|
||||||
popup/item_0/id = 0
|
|
||||||
popup/item_0/separator = true
|
|
||||||
popup/item_1/text = "Fantasy 1"
|
|
||||||
popup/item_1/id = 1
|
|
||||||
popup/item_2/text = "Fantasy 2"
|
|
||||||
popup/item_2/id = 2
|
|
||||||
popup/item_3/text = "Sci Fi"
|
|
||||||
popup/item_3/id = 3
|
|
||||||
popup/item_3/separator = true
|
|
||||||
popup/item_4/text = "Sci Fi 1"
|
|
||||||
popup/item_4/id = 4
|
|
||||||
popup/item_5/text = "Sci Fi 2"
|
|
||||||
popup/item_5/id = 5
|
|
||||||
popup/item_6/text = "Cyberpunk"
|
|
||||||
popup/item_6/id = 6
|
|
||||||
popup/item_6/separator = true
|
|
||||||
popup/item_7/text = "Cyberpunk 1"
|
|
||||||
popup/item_7/id = 7
|
|
||||||
popup/item_8/text = "Cyberpunk 2"
|
|
||||||
popup/item_8/id = 8
|
|
||||||
popup/item_9/text = "Krimi"
|
|
||||||
popup/item_9/id = 9
|
|
||||||
popup/item_9/separator = true
|
|
||||||
popup/item_10/text = "Krimi 1"
|
|
||||||
popup/item_10/id = 10
|
|
||||||
popup/item_11/text = "Krimi 2"
|
|
||||||
popup/item_11/id = 11
|
|
||||||
script = ExtResource("3_l3xnr")
|
|
||||||
|
|
||||||
[node name="TextEdit" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer"]
|
|
||||||
custom_minimum_size = Vector2(520, 300)
|
|
||||||
layout_direction = 1
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 4
|
|
||||||
placeholder_text = "Enter a custom setting"
|
|
||||||
drag_and_drop_selection_enabled = false
|
|
||||||
middle_mouse_paste_enabled = false
|
|
||||||
|
|
||||||
[node name="Strength" type="HBoxContainer" parent="Hauptmenü/HauptMenü/VBoxContainer"]
|
|
||||||
custom_minimum_size = Vector2(520, 50)
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 4
|
|
||||||
size_flags_vertical = 2
|
|
||||||
|
|
||||||
[node name="StrengthLabel" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Strength"]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
text = "Strength"
|
|
||||||
editable = false
|
|
||||||
context_menu_enabled = false
|
|
||||||
shortcut_keys_enabled = false
|
|
||||||
selecting_enabled = false
|
|
||||||
deselect_on_focus_loss_enabled = false
|
|
||||||
drag_and_drop_selection_enabled = false
|
|
||||||
virtual_keyboard_enabled = false
|
|
||||||
middle_mouse_paste_enabled = false
|
|
||||||
|
|
||||||
[node name="TextEdit" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Strength"]
|
|
||||||
clip_contents = true
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
placeholder_text = "0"
|
|
||||||
|
|
||||||
[node name="Perception" type="HBoxContainer" parent="Hauptmenü/HauptMenü/VBoxContainer"]
|
|
||||||
custom_minimum_size = Vector2(520, 50)
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 4
|
|
||||||
size_flags_vertical = 2
|
|
||||||
|
|
||||||
[node name="PerceptionLabel" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Perception"]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
text = "Perception"
|
|
||||||
editable = false
|
|
||||||
context_menu_enabled = false
|
|
||||||
shortcut_keys_enabled = false
|
|
||||||
selecting_enabled = false
|
|
||||||
deselect_on_focus_loss_enabled = false
|
|
||||||
drag_and_drop_selection_enabled = false
|
|
||||||
virtual_keyboard_enabled = false
|
|
||||||
middle_mouse_paste_enabled = false
|
|
||||||
|
|
||||||
[node name="TextEdit" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Perception"]
|
|
||||||
clip_contents = true
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
placeholder_text = "0"
|
|
||||||
|
|
||||||
[node name="Endurance" type="HBoxContainer" parent="Hauptmenü/HauptMenü/VBoxContainer"]
|
|
||||||
custom_minimum_size = Vector2(520, 50)
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 4
|
|
||||||
size_flags_vertical = 2
|
|
||||||
|
|
||||||
[node name="EnduranceLabel" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Endurance"]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
text = "Endurance"
|
|
||||||
editable = false
|
|
||||||
context_menu_enabled = false
|
|
||||||
shortcut_keys_enabled = false
|
|
||||||
selecting_enabled = false
|
|
||||||
deselect_on_focus_loss_enabled = false
|
|
||||||
drag_and_drop_selection_enabled = false
|
|
||||||
virtual_keyboard_enabled = false
|
|
||||||
middle_mouse_paste_enabled = false
|
|
||||||
|
|
||||||
[node name="TextEdit" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Endurance"]
|
|
||||||
clip_contents = true
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
placeholder_text = "0"
|
|
||||||
|
|
||||||
[node name="Charisma" type="HBoxContainer" parent="Hauptmenü/HauptMenü/VBoxContainer"]
|
|
||||||
custom_minimum_size = Vector2(520, 50)
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 4
|
|
||||||
size_flags_vertical = 2
|
|
||||||
|
|
||||||
[node name="CharismaLabel" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Charisma"]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
text = "Charisma"
|
|
||||||
editable = false
|
|
||||||
context_menu_enabled = false
|
|
||||||
shortcut_keys_enabled = false
|
|
||||||
selecting_enabled = false
|
|
||||||
deselect_on_focus_loss_enabled = false
|
|
||||||
drag_and_drop_selection_enabled = false
|
|
||||||
virtual_keyboard_enabled = false
|
|
||||||
middle_mouse_paste_enabled = false
|
|
||||||
|
|
||||||
[node name="TextEdit" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Charisma"]
|
|
||||||
clip_contents = true
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
placeholder_text = "0"
|
|
||||||
|
|
||||||
[node name="Intelligence" type="HBoxContainer" parent="Hauptmenü/HauptMenü/VBoxContainer"]
|
|
||||||
custom_minimum_size = Vector2(520, 50)
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 4
|
|
||||||
size_flags_vertical = 2
|
|
||||||
|
|
||||||
[node name="CharismaLabel" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Intelligence"]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
text = "Intelligence"
|
|
||||||
editable = false
|
|
||||||
context_menu_enabled = false
|
|
||||||
shortcut_keys_enabled = false
|
|
||||||
selecting_enabled = false
|
|
||||||
deselect_on_focus_loss_enabled = false
|
|
||||||
drag_and_drop_selection_enabled = false
|
|
||||||
virtual_keyboard_enabled = false
|
|
||||||
middle_mouse_paste_enabled = false
|
|
||||||
|
|
||||||
[node name="TextEdit" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Intelligence"]
|
|
||||||
clip_contents = true
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
placeholder_text = "0"
|
|
||||||
|
|
||||||
[node name="Agillity" type="HBoxContainer" parent="Hauptmenü/HauptMenü/VBoxContainer"]
|
|
||||||
custom_minimum_size = Vector2(520, 50)
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 4
|
|
||||||
size_flags_vertical = 2
|
|
||||||
|
|
||||||
[node name="AgillityLabel" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Agillity"]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
text = "Agillity"
|
|
||||||
editable = false
|
|
||||||
context_menu_enabled = false
|
|
||||||
shortcut_keys_enabled = false
|
|
||||||
selecting_enabled = false
|
|
||||||
deselect_on_focus_loss_enabled = false
|
|
||||||
drag_and_drop_selection_enabled = false
|
|
||||||
virtual_keyboard_enabled = false
|
|
||||||
middle_mouse_paste_enabled = false
|
|
||||||
|
|
||||||
[node name="TextEdit" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Agillity"]
|
|
||||||
clip_contents = true
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
placeholder_text = "0"
|
|
||||||
|
|
||||||
[node name="Luck" type="HBoxContainer" parent="Hauptmenü/HauptMenü/VBoxContainer"]
|
|
||||||
custom_minimum_size = Vector2(520, 50)
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 4
|
|
||||||
size_flags_vertical = 2
|
|
||||||
|
|
||||||
[node name="LuckLabel" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Luck"]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
text = "Luck"
|
|
||||||
editable = false
|
|
||||||
context_menu_enabled = false
|
|
||||||
shortcut_keys_enabled = false
|
|
||||||
selecting_enabled = false
|
|
||||||
deselect_on_focus_loss_enabled = false
|
|
||||||
drag_and_drop_selection_enabled = false
|
|
||||||
virtual_keyboard_enabled = false
|
|
||||||
middle_mouse_paste_enabled = false
|
|
||||||
|
|
||||||
[node name="TextEdit" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Luck"]
|
|
||||||
clip_contents = true
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 3
|
|
||||||
placeholder_text = "0"
|
|
||||||
|
|
||||||
[node name="Playbutton" type="Button" parent="Hauptmenü/HauptMenü/VBoxContainer"]
|
|
||||||
layout_mode = 2
|
|
||||||
size_flags_horizontal = 4
|
|
||||||
size_flags_vertical = 3
|
|
||||||
text = " PLAY "
|
|
||||||
script = ExtResource("3_ucfae")
|
|
||||||
|
|
||||||
[node name="Ingame" type="Node2D" parent="Hauptmenü/HauptMenü/VBoxContainer/Playbutton"]
|
|
||||||
position = Vector2(-699, -1003)
|
|
||||||
|
|
||||||
[node name="Ingame" type="CanvasLayer" parent="Hauptmenü/HauptMenü/VBoxContainer/Playbutton/Ingame"]
|
|
||||||
|
|
||||||
[node name="Eingabe" type="VBoxContainer" parent="Hauptmenü/HauptMenü/VBoxContainer/Playbutton/Ingame/Ingame"]
|
|
||||||
anchors_preset = 12
|
anchors_preset = 12
|
||||||
anchor_top = 1.0
|
anchor_top = 1.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
@ -282,12 +19,12 @@ grow_horizontal = 2
|
|||||||
grow_vertical = 0
|
grow_vertical = 0
|
||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
|
|
||||||
[node name="TextEdit" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Playbutton/Ingame/Ingame/Eingabe"]
|
[node name="TextEdit" type="TextEdit" parent="Ingame/Eingabe"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
script = ExtResource("1_5gfrp")
|
script = ExtResource("1_5gfrp")
|
||||||
|
|
||||||
[node name="Story" type="VBoxContainer" parent="Hauptmenü/HauptMenü/VBoxContainer/Playbutton/Ingame/Ingame"]
|
[node name="Story" type="VBoxContainer" parent="Ingame"]
|
||||||
anchors_preset = 11
|
anchors_preset = 11
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
@ -297,7 +34,7 @@ grow_horizontal = 0
|
|||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
size_flags_horizontal = 8
|
size_flags_horizontal = 8
|
||||||
|
|
||||||
[node name="TextEdit" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Playbutton/Ingame/Ingame/Story"]
|
[node name="TextEdit" type="TextEdit" parent="Ingame/Story"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
placeholder_text = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
|
placeholder_text = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
|
||||||
@ -305,7 +42,7 @@ editable = false
|
|||||||
context_menu_enabled = false
|
context_menu_enabled = false
|
||||||
wrap_mode = 1
|
wrap_mode = 1
|
||||||
|
|
||||||
[node name="Stats" type="VBoxContainer" parent="Hauptmenü/HauptMenü/VBoxContainer/Playbutton/Ingame/Ingame"]
|
[node name="Stats" type="VBoxContainer" parent="Ingame"]
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
@ -315,7 +52,7 @@ offset_bottom = -360.0
|
|||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
|
||||||
[node name="TextEdit" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Playbutton/Ingame/Ingame/Stats"]
|
[node name="TextEdit" type="TextEdit" parent="Ingame/Stats"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
placeholder_text = "SampleStat = 1
|
placeholder_text = "SampleStat = 1
|
||||||
@ -323,54 +60,49 @@ placeholder_text = "SampleStat = 1
|
|||||||
editable = false
|
editable = false
|
||||||
context_menu_enabled = false
|
context_menu_enabled = false
|
||||||
|
|
||||||
[node name="TextEdit2" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Playbutton/Ingame/Ingame/Stats"]
|
[node name="TextEdit2" type="TextEdit" parent="Ingame/Stats"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
editable = false
|
editable = false
|
||||||
context_menu_enabled = false
|
context_menu_enabled = false
|
||||||
|
|
||||||
[node name="TextEdit3" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Playbutton/Ingame/Ingame/Stats"]
|
[node name="TextEdit3" type="TextEdit" parent="Ingame/Stats"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
editable = false
|
editable = false
|
||||||
context_menu_enabled = false
|
context_menu_enabled = false
|
||||||
|
|
||||||
[node name="TextEdit4" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Playbutton/Ingame/Ingame/Stats"]
|
[node name="TextEdit4" type="TextEdit" parent="Ingame/Stats"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
editable = false
|
editable = false
|
||||||
context_menu_enabled = false
|
context_menu_enabled = false
|
||||||
|
|
||||||
[node name="TextEdit5" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Playbutton/Ingame/Ingame/Stats"]
|
[node name="TextEdit5" type="TextEdit" parent="Ingame/Stats"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
editable = false
|
editable = false
|
||||||
context_menu_enabled = false
|
context_menu_enabled = false
|
||||||
|
|
||||||
[node name="TextEdit6" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Playbutton/Ingame/Ingame/Stats"]
|
[node name="TextEdit6" type="TextEdit" parent="Ingame/Stats"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
editable = false
|
editable = false
|
||||||
context_menu_enabled = false
|
context_menu_enabled = false
|
||||||
|
|
||||||
[node name="TextEdit7" type="TextEdit" parent="Hauptmenü/HauptMenü/VBoxContainer/Playbutton/Ingame/Ingame/Stats"]
|
[node name="TextEdit7" type="TextEdit" parent="Ingame/Stats"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
editable = false
|
editable = false
|
||||||
context_menu_enabled = false
|
context_menu_enabled = false
|
||||||
|
|
||||||
[node name="Szenerie" type="TextureRect" parent="Hauptmenü/HauptMenü/VBoxContainer/Playbutton/Ingame/Ingame"]
|
[node name="Szenerie" type="TextureRect" parent="."]
|
||||||
offset_left = -3.0
|
offset_left = -3.0
|
||||||
offset_top = -1.0
|
offset_top = -1.0
|
||||||
offset_right = 1277.0
|
offset_right = 1277.0
|
||||||
offset_bottom = 719.0
|
offset_bottom = 719.0
|
||||||
|
focus_neighbor_left = NodePath("../Ingame/Stats")
|
||||||
|
focus_neighbor_bottom = NodePath("../Ingame/Eingabe")
|
||||||
texture = SubResource("CompressedTexture2D_ncw85")
|
texture = SubResource("CompressedTexture2D_ncw85")
|
||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
stretch_mode = 1
|
stretch_mode = 1
|
||||||
|
|
||||||
[node name="LLMApiRequests" type="HTTPRequest" parent="."]
|
|
||||||
script = ExtResource("5_pukni")
|
|
||||||
|
|
||||||
[node name="Button" type="Button" parent="."]
|
|
||||||
offset_right = 8.0
|
|
||||||
offset_bottom = 8.0
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://dp2wwugsa03q"
|
uid="uid://c5xk7a15wrsip"
|
||||||
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
|
Reference in New Issue
Block a user