UnitGateComponent.cs 508 B

1234567891011121314151617181920212223242526
  1. namespace Model
  2. {
  3. [ObjectEvent]
  4. public class UnitGateComponentEvent : ObjectEvent<UnitGateComponent>, IAwake<long>
  5. {
  6. public void Awake(long gateSessionId)
  7. {
  8. this.Get().Awake(gateSessionId);
  9. }
  10. }
  11. public class UnitGateComponent : ComponentDB
  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. }