protected override InputState GetIdleState() //initilization { var states = new StateDictionary(); states.Add((int)AllInputStates.Idle, s => new InputIdleState(s)); states.Add((int)AllInputStates.Rotate, s => new InputRotateStateWithCursorReturning(s)); states.Add((int)AllInputStates.Zoom, s => new InputZoomState(s)); states.Add((int)AllInputStates.Pan, s => new InputPanState(s)); states.Add((int)AllInputStates.ChangeRotateCenter, s => new InputChangeRotateCenterState(s)); var router = new StateHandleProcessor <ICameraInputHandler>(states, this /*,externalInputHandler*/); router.SwitchTo((int)AllInputStates.Idle, InputStateData.Create()); return(router); }
protected override InputState GetIdleState() //initilization { var states = new StateDictionary(); states.Add((int)AllInputStates.Idle, s => new InputIdleState(s)); states.Add((int)AllInputStates.Rotate, s => new InputRotateState(s)); states.Add((int)AllInputStates.Zoom, s => new InputZoomState(s)); states.Add((int)AllInputStates.Pan, s => new InputPanState(s)); states.Add((int)AllInputStates.Target, s => new InputTargetState(s)); states.Add((int)AllInputStates.KeywordDown, s => new KeywordMovingState(s)); states.Add((int)AllInputStates.ChangeFocus, s => new FocusToObjectState(s)); var router = new StateHandleProcessor <ICameraInputHandler>(states, this); router.SwitchTo((int)AllInputStates.Idle, InputStateData.Create()); return(router); }