Setting up main scene and some initalization

This commit is contained in:
Chris Bell 2025-02-13 23:53:19 -06:00
parent 85e21b956e
commit 5ff3525a5e
9 changed files with 77 additions and 1 deletions

View File

@ -1,4 +1,5 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACOGWHEEL_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002Econfig_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb946d2ce7ffb4216bc1b230d32963b475600_003F51_003Fe7e8cc77_003FCOGWHEEL_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue">&lt;AssemblyExplorer&gt;
&lt;Assembly Path="/home/chris/.nuget/packages/cogwheellib/1.3.0/lib/net9.0/CogwheelLib.dll" /&gt;
&lt;/AssemblyExplorer&gt;</s:String></wpf:ResourceDictionary>

View File

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://udmowtmx1o3l"]
[ext_resource type="Script" uid="uid://bl2h8ot302x3g" path="res://Core/Scripts/MainNode.cs" id="1_wh72m"]
[node name="Main" type="Node"]
script = ExtResource("1_wh72m")

View File

@ -1,13 +1,23 @@
using System.Reflection;
using ADEPT.Core.Cogwheel;
using Cogwheel;
using Godot;
namespace ADEPT.Core;
public static class ADEPT
{
private static CommandsManager _commandsManager = new CommandsManager();
private static ICogwheelConsole _cogwheelConsole = new GodotCogwheelConsole();
public static void Initialize()
public static MainNode MainNode { get; private set; }
public static void Initialize(MainNode mainNode)
{
COGWHEEL.Initialize(_commandsManager, _cogwheelConsole);
COGWHEEL.AddAssembly(Assembly.GetCallingAssembly());
MainNode = mainNode;
}
public static class Constants

View File

@ -0,0 +1,45 @@
using Cogwheel;
namespace ADEPT.Core.Cogwheel;
public class GodotCogwheelConsole : ICogwheelConsole
{
public void Initialize(CommandsManager commandsManager)
{
}
public void Log(string message)
{
}
public void LogError(string message)
{
}
public void LogWarning(string message)
{
}
public void Write(string message)
{
}
public void ClearConsole()
{
}
public void Exit()
{
}
public string OpeningMessage { get; set; }
public bool IsRunning { get; set; }
public CommandsManager CommandsManager { get; set; }
}

View File

@ -0,0 +1 @@
uid://b8i0oy8ylysdf

View File

@ -0,0 +1,11 @@
using Godot;
namespace ADEPT.Core;
public partial class MainNode : Node
{
public override void _Ready()
{
ADEPT.Initialize(this);
}
}

View File

@ -0,0 +1 @@
uid://bl2h8ot302x3g

View File

@ -0,0 +1 @@
uid://b0olq0km7srqs