This commit is contained in:
CortexCore
2024-03-11 02:16:25 +08:00
parent 605ccbcf8d
commit 6ef7c5f005
16 changed files with 832 additions and 45 deletions

View File

@@ -184,6 +184,9 @@ namespace BITKit.Mod
OnLocked?.Invoke(value);
}
}
public static event Action<ModPackage> OnPackageLoad;
public static event Action<ModPackage> OnPackageLoaded;
public static event Action<IMod> OnModLoad;
public static event Action<IMod> OnModLoaded;
@@ -409,6 +412,14 @@ namespace BITKit.Mod
if(package.EntryPoint is null) throw new InvalidOperationException("空入口,无法识别类型");
path = Path.Combine(Path.GetDirectoryName(path)!, package.EntryPoint);
if(File.Exists(path) is false) throw new InvalidOperationException($"未找到入口文件:{path}");
OnPackageLoad?.Invoke(package);
foreach (var name in package.Dlls)
{
}
var fileInfo = new FileInfo(path);
switch (fileInfo.Extension)
{
@@ -429,6 +440,7 @@ namespace BITKit.Mod
#endif
}
OnPackageLoaded?.Invoke(package);
}
public static void Load(IMod mod)
{

View File

@@ -1,3 +1,6 @@
using System;
using Unity.Mathematics;
namespace BITKit
{
public enum TransformMode : int
@@ -7,4 +10,13 @@ namespace BITKit
Rotate,
Scale,
}
public interface ITransform:IDisposable
{
float3 LocalPosition { get; set; }
float3 Position { get; set; }
quaternion LocalRotation { get; set; }
quaternion Rotation { get; set; }
float3 LocalScale { get; set; }
float4x4 Matrix { get; set; }
}
}