This commit is contained in:
CortexCore
2023-10-30 01:25:53 +08:00
parent add6d0cab3
commit 18f664a545
125 changed files with 3529 additions and 700 deletions

View File

@@ -14,14 +14,14 @@ namespace BITKit.Entities.Player
public static event Action<Entity> OnPlayerInitialized;
public static event Action<Entity> OnPlayerDisposed;
public static Entity LocalPlayer { get;private set; }
public static void Register(Entity entity)
public static void Register(Entity unityEntity)
{
OnPlayerInitialized?.Invoke(entity);
LocalPlayer = entity;
OnPlayerInitialized?.Invoke(unityEntity);
LocalPlayer = unityEntity;
}
public static void UnRegister(Entity entity)
public static void UnRegister(Entity unityEntity)
{
OnPlayerDisposed?.Invoke(entity);
OnPlayerDisposed?.Invoke(unityEntity);
LocalPlayer = null;
}
Entity IPlayerService.LocalPlayer=>LocalPlayer;
@@ -35,8 +35,8 @@ namespace BITKit.Entities.Player
add => OnPlayerDisposed += value;
remove => OnPlayerDisposed -= value;
}
void IPlayerService.Register(Entity entity)=>Register(entity);
void IPlayerService.UnRegister(Entity entity)=>UnRegister(entity);
void IPlayerService.Register(Entity unityEntity)=>Register(unityEntity);
void IPlayerService.UnRegister(Entity unityEntity)=>UnRegister(unityEntity);
}
}