UnitGateComponent.cs 530 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 GateSessionId;
  14. public void Awake(long gateSessionId)
  15. {
  16. this.GateSessionId = gateSessionId;
  17. }
  18. public ActorProxy GetActorProxy()
  19. {
  20. return Game.Scene.GetComponent<ActorProxyComponent>().Get(this.GateSessionId);
  21. }
  22. }
  23. }