Skip to content

CoreCLR embedding test #63

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
400 changes: 400 additions & 0 deletions CSharp/LuaSTG/.gitignore

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions CSharp/LuaSTG/LuaSTG.Core/BlendMode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LuaSTG.Core
{
public enum BlendMode : byte
{
}
}
17 changes: 17 additions & 0 deletions CSharp/LuaSTG/LuaSTG.Core/Collision.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LuaSTG.Core
{
/// <summary>
/// Stores a collision info.
/// </summary>
/// <param name="Self">The object which has group of first argument in CheckCollision.</param>
/// <param name="Other">The object which has group of second argument in CheckCollision.</param>
public record struct Collision(GameObjectBase Self, GameObjectBase Other)
{
}
}
17 changes: 17 additions & 0 deletions CSharp/LuaSTG/LuaSTG.Core/DestroyEventArgs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace LuaSTG.Core
{
/// <summary>
/// Stores a destroy event info.
/// </summary>
/// <param name="DestroyEventType">Type of the destroy event.</param>
public record struct DestroyEventArgs(DestroyEventType DestroyEventType)
{
}
}
27 changes: 27 additions & 0 deletions CSharp/LuaSTG/LuaSTG.Core/DestroyEventType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LuaSTG.Core
{
/// <summary>
/// Type of the destroy event.
/// </summary>
public enum DestroyEventType : int
{
/// <summary>
/// Destroy by out-of-bounds.
/// </summary>
Bound = 0,
/// <summary>
/// Destroy by Del method.
/// </summary>
Del = 1,
/// <summary>
/// Destroy by Kill method.
/// </summary>
Kill = 2,
}
}
31 changes: 31 additions & 0 deletions CSharp/LuaSTG/LuaSTG.Core/GameObject.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LuaSTG.Core
{
/// <summary>
/// Base class for any objects created in CLR.
/// </summary>
public class GameObject : GameObjectBase
{
public GameObject() : base()
{

}

public override void OnFrame()
{
}

public override void OnColli(Collision collision)
{
}

public override void OnDestroy(DestroyEventArgs args)
{
}
}
}
Loading