ProcedurePreload.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //------------------------------------------------------------
  2. // Game Framework
  3. // Copyright © 2013-2021 Jiang Yin. All rights reserved.
  4. // Homepage: https://gameframework.cn/
  5. // Feedback: mailto:ellan@gameframework.cn
  6. //------------------------------------------------------------
  7. using GameFramework;
  8. using GameFramework.Event;
  9. using GameFramework.Resource;
  10. using System;
  11. using System.Collections.Generic;
  12. using UnityEngine;
  13. using UnityGameFramework.Runtime;
  14. using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
  15. namespace GFMain
  16. {
  17. public class ProcedurePreload : ProcedureBase
  18. {
  19. public override bool UseNativeDialog
  20. {
  21. get
  22. {
  23. return true;
  24. }
  25. }
  26. public static readonly string[] DataTableNames = new string[]
  27. {
  28. // "实体类格式参考表",
  29. //"EquipDataTable"
  30. "InterphonePassages"
  31. };
  32. private bool isCompleted = false;
  33. protected override void OnEnter(ProcedureOwner procedureOwner)
  34. {
  35. base.OnEnter(procedureOwner);
  36. isCompleted = true;
  37. }
  38. protected override void OnLeave(ProcedureOwner procedureOwner, bool isShutdown)
  39. {
  40. base.OnLeave(procedureOwner, isShutdown);
  41. }
  42. protected override void OnUpdate(ProcedureOwner procedureOwner, float elapseSeconds, float realElapseSeconds)
  43. {
  44. base.OnUpdate(procedureOwner, elapseSeconds, realElapseSeconds);
  45. if (isCompleted)
  46. ChangeState<ProcedureBusiness>(procedureOwner);
  47. }
  48. }
  49. }