MyUnitHelper.cs 353 B

123456789101112
  1. namespace ET.Client
  2. {
  3. public static class MyUnitHelper
  4. {
  5. public static LSUnit GetMyUnitF(this Room scene)
  6. {
  7. PlayerComponent playerComponent = scene.GetParent<Scene>().GetComponent<PlayerComponent>();
  8. long myId = playerComponent.MyId;
  9. return scene.LSWorld.Get(myId) as LSUnit;
  10. }
  11. }
  12. }