public SelectabilityStateEngine(IUIImage uiImage, IUIManager uim)
        {
            selectableState   = new SelectableState(uiImage, uim);
            unselectableState = new UnselectableState(uiImage, uim);
            selectedState     = new SelectedState(uiImage, uim);

            MakeSureStatesAreSet();

            this.SetToInitialState();
        }
示例#2
0
        public SelectabilityStateEngine(
            ISelectabilityStateImplementor implementor
            )
        {
            State.IConstArg stateArg = new State.ConstArg(
                implementor
                );
            selectableState = new SelectableState(
                stateArg
                );
            unselectableState = new UnselectableState(
                stateArg
                );
            selectedState = new SelectedState(
                stateArg
                );
            MakeSureStatesAreSet();

            thisCurState = selectableState;
        }