working on multiplayer

This commit is contained in:
2025-06-24 14:45:45 +02:00
parent b1050f627b
commit 5a813f212c
67 changed files with 499 additions and 127 deletions

View File

@@ -0,0 +1,45 @@
using RebootKit.Engine.Foundation;
using UnityEngine;
namespace RebootKit.Engine.Services.Simulation {
public abstract class Actor : MonoBehaviour {
[field: SerializeField]
public SerializableGuid ActorGuid { get; private set; } = SerializableGuid.New();
bool m_IsPlaying = false;
public bool IsPlaying {
get {
return m_IsPlaying;
}
set {
if (m_IsPlaying == value) {
return;
}
m_IsPlaying = value;
if (m_IsPlaying) {
OnBeginPlay();
} else {
OnEndPlay();
}
}
}
public virtual void OnSpawned() {
}
public virtual void OnDespawned() {
}
public virtual void OnBeginPlay() {
}
public virtual void OnEndPlay() {
}
public virtual void OnTick(float deltaTime) {
}
}
}