c# update callback

This commit is contained in:
2024-09-10 23:23:37 +05:00
parent e71a6b71fe
commit ec7a8de0cf
8 changed files with 33 additions and 29 deletions

View File

@@ -1,18 +0,0 @@
using System;
class A {
public int a = 0;
public int b = 0;
public int c = 0;
static public int Method(){
return 0;
}
static public int Method(float f, byte b){
return 1;
}
static public int Method(byte b, float f){
Console.WriteLine($"Hello from C#! Received arguments: b={b} f={f}");
return 2;
}
}

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net48</TargetFramework>
<LangVersion>latest</LangVersion>
<RootNamespace>Ougge</RootNamespace>
<ImplicitUsings>disable</ImplicitUsings>

View File

@@ -1,14 +1,16 @@
using System;
using System.Data;
namespace Ougge;
public abstract class ScriptBase {
public virtual void Update(double deltaTime) {}
}
public class Script : ScriptBase
public class ExampleScript : ScriptBase
{
public override void Update(double deltaTime)
{
Console.WriteLine()
Console.WriteLine($"C# deltaTime {deltaTime}");
}
}