Class ViewControllerBase
Inheritance
Implements
Inherited Members
Namespace: MacacaGames.ViewSystem
Assembly: Macaca.ViewSystem.dll
Syntax
public abstract class ViewControllerBase : MonoBehaviour, IViewController
Fields
| Improve this Doc View Source_incance
Declaration
protected static ViewControllerBase _incance
Field Value
Type | Description |
---|---|
ViewControllerBase |
ChangePageToCoroutine
Declaration
protected Coroutine ChangePageToCoroutine
Field Value
Type | Description |
---|---|
UnityEngine.Coroutine |
currentLiveElements
Declaration
[SerializeField]
protected List<ViewElement> currentLiveElements
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<ViewElement> |
currentViewPage
Declaration
[HideInInspector]
public ViewPage currentViewPage
Field Value
Type | Description |
---|---|
ViewPage |
currentViewState
Declaration
[HideInInspector]
public ViewState currentViewState
Field Value
Type | Description |
---|---|
ViewState |
lastViewPage
Declaration
[HideInInspector]
public ViewPage lastViewPage
Field Value
Type | Description |
---|---|
ViewPage |
lastViewState
Declaration
[HideInInspector]
public ViewState lastViewState
Field Value
Type | Description |
---|---|
ViewState |
minimumTimeInterval
Declaration
protected static float minimumTimeInterval
Field Value
Type | Description |
---|---|
System.Single |
nextViewPage
Declaration
[HideInInspector]
public ViewPage nextViewPage
Field Value
Type | Description |
---|---|
ViewPage |
nextViewState
Declaration
[HideInInspector]
public ViewState nextViewState
Field Value
Type | Description |
---|---|
ViewState |
overlayPageStatusDict
The current active Overlay Dictionary which has no ViewState.
Declaration
[SerializeField]
protected Dictionary<string, ViewSystemUtilitys.OverlayPageStatus> overlayPageStatusDict
Field Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, ViewSystemUtilitys.OverlayPageStatus> |
viewPages
Declaration
public List<ViewPage> viewPages
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<ViewPage> |
viewStates
Declaration
public List<ViewState> viewStates
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<ViewState> |
viewStatesNames
Declaration
protected static IEnumerable<string> viewStatesNames
Field Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
Properties
| Improve this Doc View SourceIsOverlayTransition
Declaration
public bool IsOverlayTransition { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsPageTransition
Declaration
public bool IsPageTransition { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
platform
Declaration
public ViewPageItem.PlatformOption platform { get; }
Property Value
Type | Description |
---|---|
ViewPageItem.PlatformOption |
Methods
| Improve this Doc View SourceAwake()
Declaration
protected virtual void Awake()
ChangePage(String, Action, Action, Action, Boolean, Boolean)
Declaration
public Coroutine ChangePage(string targetViewPageName, Action OnStart = null, Action OnChanged = null, Action OnComplete = null, bool AutoWaitPreviousPageFinish = false, bool ignoreTimeScale = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | targetViewPageName | |
System.Action | OnStart | |
System.Action | OnChanged | |
System.Action | OnComplete | |
System.Boolean | AutoWaitPreviousPageFinish | |
System.Boolean | ignoreTimeScale |
Returns
Type | Description |
---|---|
UnityEngine.Coroutine |
ChangePageBase(String, Action, Action, Action, Boolean)
Declaration
public virtual IEnumerator ChangePageBase(string viewPageName, Action OnStart, Action OnCheaged, Action OnComplete, bool ignoreTimeScale)
Parameters
Type | Name | Description |
---|---|---|
System.String | viewPageName | |
System.Action | OnStart | |
System.Action | OnCheaged | |
System.Action | OnComplete | |
System.Boolean | ignoreTimeScale |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
CheckTimeProtect()
Declaration
protected bool CheckTimeProtect()
Returns
Type | Description |
---|---|
System.Boolean |
FullPageChanger()
Declaration
public static FullPageChanger FullPageChanger()
Returns
Type | Description |
---|---|
FullPageChanger |
GetAllViewPageItemInViewPage(ViewPage)
Declaration
protected IEnumerable<ViewPageItem> GetAllViewPageItemInViewPage(ViewPage vp)
Parameters
Type | Name | Description |
---|---|---|
ViewPage | vp |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ViewPageItem> |
GetAllViewPageItemInViewState(ViewState)
Declaration
protected IEnumerable<ViewPageItem> GetAllViewPageItemInViewState(ViewState vs)
Parameters
Type | Name | Description |
---|---|---|
ViewState | vs |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ViewPageItem> |
GetCanvas()
Declaration
public virtual Canvas GetCanvas()
Returns
Type | Description |
---|---|
UnityEngine.Canvas |
GetCurrentOverpageNames()
Declaration
public virtual IEnumerable<string> GetCurrentOverpageNames()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> |
GetOverlayStateKey(ViewPage)
Declaration
protected string GetOverlayStateKey(ViewPage vp)
Parameters
Type | Name | Description |
---|---|---|
ViewPage | vp |
Returns
Type | Description |
---|---|
System.String |
HasOverlayPageLive()
Declaration
public virtual bool HasOverlayPageLive()
Returns
Type | Description |
---|---|
System.Boolean |
InvokeOnOverlayPageLeave(Object, ViewControllerBase.ViewPageEventArgs)
Declaration
protected virtual void InvokeOnOverlayPageLeave(object obj, ViewControllerBase.ViewPageEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | |
ViewControllerBase.ViewPageEventArgs | args |
InvokeOnOverlayPageShow(Object, ViewControllerBase.ViewPageEventArgs)
Declaration
protected virtual void InvokeOnOverlayPageShow(object obj, ViewControllerBase.ViewPageEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | |
ViewControllerBase.ViewPageEventArgs | args |
InvokeOnViewPageChange(Object, ViewControllerBase.ViewPageEventArgs)
Declaration
protected virtual void InvokeOnViewPageChange(object obj, ViewControllerBase.ViewPageEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | |
ViewControllerBase.ViewPageEventArgs | args |
InvokeOnViewPageChangeEnd(Object, ViewControllerBase.ViewPageEventArgs)
Declaration
protected virtual void InvokeOnViewPageChangeEnd(object obj, ViewControllerBase.ViewPageEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | |
ViewControllerBase.ViewPageEventArgs | args |
InvokeOnViewPageChangeStart(Object, ViewControllerBase.ViewPageTrisitionEventArgs)
Declaration
protected virtual void InvokeOnViewPageChangeStart(object obj, ViewControllerBase.ViewPageTrisitionEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | |
ViewControllerBase.ViewPageTrisitionEventArgs | args |
InvokeOnViewStateChange(Object, ViewControllerBase.ViewStateEventArgs)
Declaration
protected virtual void InvokeOnViewStateChange(object obj, ViewControllerBase.ViewStateEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | |
ViewControllerBase.ViewStateEventArgs | args |
IsOverPageLive(String)
Declaration
public virtual bool IsOverPageLive(string viewPageName)
Parameters
Type | Name | Description |
---|---|---|
System.String | viewPageName |
Returns
Type | Description |
---|---|
System.Boolean |
IsViewPageExsit(String)
Declaration
public abstract bool IsViewPageExsit(string viewPageName)
Parameters
Type | Name | Description |
---|---|---|
System.String | viewPageName |
Returns
Type | Description |
---|---|
System.Boolean |
LeaveOverlayViewPage(String, Single, Action, Boolean, Boolean, Boolean)
Declaration
public Coroutine LeaveOverlayViewPage(string viewPageName, float tweenTimeIfNeed = 0.4F, Action OnComplete = null, bool ignoreTransition = false, bool ignoreTimeScale = false, bool waitForShowFinish = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | viewPageName | |
System.Single | tweenTimeIfNeed | |
System.Action | OnComplete | |
System.Boolean | ignoreTransition | |
System.Boolean | ignoreTimeScale | |
System.Boolean | waitForShowFinish |
Returns
Type | Description |
---|---|
UnityEngine.Coroutine |
LeaveOverlayViewPageBase(ViewSystemUtilitys.OverlayPageStatus, Single, Action, Boolean, Boolean, Boolean)
Declaration
public virtual IEnumerator LeaveOverlayViewPageBase(ViewSystemUtilitys.OverlayPageStatus overlayPageState, float tweenTimeIfNeed, Action OnComplete, bool ignoreTransition = false, bool ignoreTimeScale = false, bool waitForShowFinish = false)
Parameters
Type | Name | Description |
---|---|---|
ViewSystemUtilitys.OverlayPageStatus | overlayPageState | |
System.Single | tweenTimeIfNeed | |
System.Action | OnComplete | |
System.Boolean | ignoreTransition | |
System.Boolean | ignoreTimeScale | |
System.Boolean | waitForShowFinish |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
OverlayPageChanger()
Declaration
public static OverlayPageChanger OverlayPageChanger()
Returns
Type | Description |
---|---|
OverlayPageChanger |
RecoveryChanger(PageChanger)
Declaration
public void RecoveryChanger(PageChanger pageChanger)
Parameters
Type | Name | Description |
---|---|---|
PageChanger | pageChanger |
ShowOverlayViewPage(String, Boolean, Action, Action, Action, Boolean)
Declaration
public Coroutine ShowOverlayViewPage(string viewPageName, bool RePlayOnShowWhileSamePage = false, Action OnStart = null, Action OnChanged = null, Action OnComplete = null, bool ignoreTimeScale = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | viewPageName | |
System.Boolean | RePlayOnShowWhileSamePage | |
System.Action | OnStart | |
System.Action | OnChanged | |
System.Action | OnComplete | |
System.Boolean | ignoreTimeScale |
Returns
Type | Description |
---|---|
UnityEngine.Coroutine |
ShowOverlayViewPageBase(ViewPage, Boolean, Action, Action, Action, Boolean)
Declaration
public virtual IEnumerator ShowOverlayViewPageBase(ViewPage vp, bool RePlayOnShowWhileSamePage, Action OnStart, Action OnChanged, Action OnComplete, bool ignoreTimeScale = false)
Parameters
Type | Name | Description |
---|---|---|
ViewPage | vp | |
System.Boolean | RePlayOnShowWhileSamePage | |
System.Action | OnStart | |
System.Action | OnChanged | |
System.Action | OnComplete | |
System.Boolean | ignoreTimeScale |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Start()
Declaration
protected virtual void Start()
StartMicroCoroutine(IEnumerator)
Declaration
public MicroCoroutine.Coroutine StartMicroCoroutine(IEnumerator routine)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerator | routine |
Returns
Type | Description |
---|---|
MicroCoroutine.Coroutine |
StopMicroCoroutine(MicroCoroutine.Coroutine)
Declaration
public void StopMicroCoroutine(MicroCoroutine.Coroutine coroutine)
Parameters
Type | Name | Description |
---|---|---|
MicroCoroutine.Coroutine | coroutine |
TryLeaveAllOverlayPage()
Declaration
public virtual void TryLeaveAllOverlayPage()
WaitPrevious(String, Action, Action, Action, Boolean)
Declaration
public IEnumerator WaitPrevious(string viewPageName, Action OnStart, Action OnChanged, Action OnComplete, bool ignoreTimeScale)
Parameters
Type | Name | Description |
---|---|---|
System.String | viewPageName | |
System.Action | OnStart | |
System.Action | OnChanged | |
System.Action | OnComplete | |
System.Boolean | ignoreTimeScale |
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
Events
| Improve this Doc View SourceOnOverlayPageLeave
OnOverlayPageLeave Calls on an overlay page is leave.(the transition may still working)
Declaration
public event EventHandler<ViewControllerBase.ViewPageEventArgs> OnOverlayPageLeave
Event Type
Type | Description |
---|---|
System.EventHandler<ViewControllerBase.ViewPageEventArgs> |
OnOverlayPageShow
OnOverlayPageShow Calls on an overlay page is show.(the transition may still working)
Declaration
public event EventHandler<ViewControllerBase.ViewPageEventArgs> OnOverlayPageShow
Event Type
Type | Description |
---|---|
System.EventHandler<ViewControllerBase.ViewPageEventArgs> |
OnViewPageChange
OnViewPageChange Calls on last page has leave finished, next page is ready to show.
Declaration
public event EventHandler<ViewControllerBase.ViewPageEventArgs> OnViewPageChange
Event Type
Type | Description |
---|---|
System.EventHandler<ViewControllerBase.ViewPageEventArgs> |
OnViewPageChangeEnd
OnViewPageChangeEnd Calls on page is changed finish, all animation include in OnShow or OnLeave is finished. (Note. the sometimes the Event fire early due to the animation time is longer than "Change Page Max Waiting" time)
Declaration
public event EventHandler<ViewControllerBase.ViewPageEventArgs> OnViewPageChangeEnd
Event Type
Type | Description |
---|---|
System.EventHandler<ViewControllerBase.ViewPageEventArgs> |
OnViewPageChangeStart
OnViewPageChangeStart Calls on page is ready to change with no error(eg. no page fonud etc.), and in this moment last page is still in view.
Declaration
public event EventHandler<ViewControllerBase.ViewPageTrisitionEventArgs> OnViewPageChangeStart
Event Type
Type | Description |
---|---|
System.EventHandler<ViewControllerBase.ViewPageTrisitionEventArgs> |
OnViewStateChange
OnViewStateChange Calls on the ViewPage is changed and has different ViewState.
Declaration
public event EventHandler<ViewControllerBase.ViewStateEventArgs> OnViewStateChange
Event Type
Type | Description |
---|---|
System.EventHandler<ViewControllerBase.ViewStateEventArgs> |