2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-04-03 11:09:40 -04:00
raylib-cs/Raylib-cs.Android/RaylibActivity.cs
Angga Permana 5ae2104c9a
Add experimental Android support (#190)
* Add `Raylib-cs.Android` project
* Update ci to handle android native libraries
* Update ci to pack android project
2023-08-23 13:18:50 +01:00

18 lines
480 B
C#

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