123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace Wayne.Lib.StateEngine.Generic
- {
-
-
-
-
-
- public abstract class State<TMain, TData> : State<TMain> where TData : StateData
- {
- #region Fields
- private IStateWithData stateWithData;
- #endregion
- #region Properties
-
-
-
- protected TData Data
- {
- get
- {
- if (stateWithData == null)
- {
- stateWithData = StateData.GetParentCompositeStateWithStateData<TData>(this);
- }
- return stateWithData.StateData as TData;
- }
- }
- #endregion
- }
- }
|