1234567891011121314151617181920212223242526272829 |
- using FairyGUI;
- using XGame.Framework.UI.View;
- namespace XGame.Framework.FGUI
- {
- /// <summary>
- /// FGUI相关的操作都在IUIViewModel的实现类里
- /// </summary>
- public abstract class FguiViewModel : IUIViewModel
- {
- protected GComponent Panel { get; private set; }
- public FguiViewModel(GComponent panel)
- {
- Panel = panel;
- BindComponents(panel);
- OnInited();
- }
- /// <summary>
- /// 结束ui的所有tween
- /// </summary>
- public void KillTweens(bool complete = false)
- {
- GTween.Kill(Panel, complete);
- }
- protected abstract void BindComponents(GComponent panel);
- protected abstract void OnInited();
- }
- }
|