27 lines
615 B
C#
27 lines
615 B
C#
using System;
|
|
using Hexa.NET.ImGui;
|
|
|
|
namespace Ougge;
|
|
|
|
public class ExampleComponent : Component
|
|
{
|
|
public ExampleComponent(GameObject gameObject) : base(gameObject)
|
|
{
|
|
}
|
|
|
|
public override void Update(double deltaTime)
|
|
{
|
|
Console.WriteLine($"C# deltaTime {deltaTime} object id {Owner.Id}");
|
|
ImGui.Begin("C# WINDOW");
|
|
ImGui.Text("Hello from ExampleComponent!");
|
|
if (ImGui.Button("create GameObject"))
|
|
{
|
|
GameObject.Create();
|
|
}
|
|
if (ImGui.Button("GC Collect"))
|
|
{
|
|
GC.Collect();
|
|
}
|
|
ImGui.End();
|
|
}
|
|
} |