2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-04-03 11:09:40 -04:00
raylib-cs/Examples.Android/RaylibActivity.cs

18 lines
487 B
C#

using System.Runtime.InteropServices;
namespace Examples.Android;
public abstract class RaylibActivity : NativeActivity
{
protected override void OnCreate(Bundle? savedInstanceState)
{
RaylibSetAndroidCallback(OnReady);
base.OnCreate(savedInstanceState);
}
protected abstract void OnReady();
[DllImport(Raylib.NativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern void RaylibSetAndroidCallback(Action callback);
}