UnitGateComponent.cs 598 B

12345678910111213141516171819202122232425262728
  1. namespace ETModel
  2. {
  3. [ObjectSystem]
  4. public class UnitGateComponentAwakeSystem : AwakeSystem<UnitGateComponent, long>
  5. {
  6. public override void Awake(UnitGateComponent self, long a)
  7. {
  8. self.Awake(a);
  9. }
  10. }
  11. public class UnitGateComponent : Component, ISerializeToEntity
  12. {
  13. public long GateSessionActorId;
  14. public bool IsDisconnect;
  15. public void Awake(long gateSessionId)
  16. {
  17. this.GateSessionActorId = gateSessionId;
  18. }
  19. public ActorMessageSender GetActorMessageSender()
  20. {
  21. return Game.Scene.GetComponent<ActorMessageSenderComponent>().Get(this.GateSessionActorId);
  22. }
  23. }
  24. }