Newer
Older
DungeonShooting / DungeonShooting_Godot / src / framework / ui / UiGridContainer.cs
@小李xl 小李xl on 9 Aug 2023 512 bytes UiCell添加双击和Process函数
  1. using System;
  2. using Godot;
  3.  
  4. /// <summary>
  5. /// 用于 UiGrid 类
  6. /// </summary>
  7. public partial class UiGridContainer : GridContainer
  8. {
  9. private Action _onReady;
  10. private Action<float> _onProcess;
  11. public UiGridContainer(Action onReady, Action<float> onProcess)
  12. {
  13. _onReady = onReady;
  14. _onProcess = onProcess;
  15. }
  16.  
  17. public override void _Ready()
  18. {
  19. _onReady();
  20. }
  21.  
  22. public override void _Process(double delta)
  23. {
  24. _onProcess((float)delta);
  25. }
  26. }