1
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user