RobotCaseComponentSystem.cs 535 B

123456789101112131415161718192021
  1. using System;
  2. using System.Collections.Generic;
  3. namespace ET.Server
  4. {
  5. [FriendOf(typeof(RobotCaseComponent))]
  6. public static partial class RobotCaseComponentSystem
  7. {
  8. public static int GetN(this RobotCaseComponent self)
  9. {
  10. return ++self.N;
  11. }
  12. public static async ETTask<RobotCase> New(this RobotCaseComponent self)
  13. {
  14. await ETTask.CompletedTask;
  15. RobotCase robotCase = self.AddChild<RobotCase>();
  16. return robotCase;
  17. }
  18. }
  19. }