UnitGateComponent.cs 569 B

1234567891011121314151617181920212223242526
  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 void Awake(long gateSessionId)
  15. {
  16. this.GateSessionActorId = gateSessionId;
  17. }
  18. public ActorMessageSender GetActorMessageSender()
  19. {
  20. return Game.Scene.GetComponent<ActorMessageSenderComponent>().Get(this.GateSessionActorId);
  21. }
  22. }
  23. }