c# update callback
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
@@ -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}");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user