mirror of
https://github.com/antopilo/Nuake.git
synced 2026-01-06 06:09:52 +03:00
Fixed callback
This commit is contained in:
@@ -22,12 +22,24 @@ namespace Nuake.Net
|
||||
}
|
||||
public class NameComponent : IComponent
|
||||
{
|
||||
internal static unsafe delegate*<int, NativeString> GetNameIcall;
|
||||
|
||||
public NameComponent(int entityId)
|
||||
{
|
||||
EntityID = entityId;
|
||||
}
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
unsafe { return GetNameIcall(EntityID).ToString(); }
|
||||
}
|
||||
set
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class PrefabComponent : IComponent
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nuake.Net
|
||||
{
|
||||
public struct CollisionData
|
||||
{
|
||||
Entity Entity1;
|
||||
Entity Entity2;
|
||||
Vector3 Normal;
|
||||
Vector3 Position;
|
||||
}
|
||||
|
||||
public class Entity
|
||||
{
|
||||
internal static unsafe delegate*<int, int, bool> EntityHasComponentIcall;
|
||||
@@ -43,6 +52,17 @@ namespace Nuake.Net
|
||||
public virtual void OnFixedUpdate(float dt) { }
|
||||
public virtual void OnDestroy() { }
|
||||
|
||||
public virtual void OnCollision(int entity1, int entity2)
|
||||
{
|
||||
Engine.Log("penis");
|
||||
}
|
||||
|
||||
// Physics
|
||||
public void OnCollisionInternal(int entity1, int entity2)
|
||||
{
|
||||
//OnCollision(new Entity { ECSHandle = entity1 }, new Entity { ECSHandle = entity2 });
|
||||
}
|
||||
|
||||
protected static Dictionary<Type, ComponentTypes> MappingTypeEnum = new Dictionary<Type, ComponentTypes>()
|
||||
{
|
||||
{ typeof(ParentComponent), ComponentTypes.PARENT },
|
||||
|
||||
Reference in New Issue
Block a user