Example #1
0
        public void Init(Fsm fsm)
        {
            Screen = new T();
            Injector.InjectInto(Screen);

            state.SetScreen(Screen);
            state.Init(this);

            ParentFsm = fsm;
        }
Example #2
0
        protected override void StartState(IAppState state)
        {
            if (!(state is SubState <T>))
            {
                Debug.LogWarningFormat("<color=\"aqua\">{0} : Substate not valid. Given state has to be {1}</color>", this, typeof(SubState <T>));
            }

            state.SetScreen(Screen);
            base.StartState(state);
        }