void Start() { gameCore = GameObject.Find("GameCore").GetComponent <GameCore>(); components = GameObject.Find("GameComponents").GetComponent <GameComponents>(); smoothCamera = GameObject.Find("MainCamera").GetComponent <SmoothCamera>(); partyLeader = GameObject.Find("PartyLeader").GetComponent <PartyLeader>(); movementNodes = new NodeCollection(); explorationUI = new ExplorationUI(gameCore.Party, partyLeader, smoothCamera, nodeSelection, pathPoints); Dictionary <ExplorationStates, IState <ExplorationScene> > states = new Dictionary <ExplorationStates, IState <ExplorationScene> >(); states.Add(ExplorationStates.CALCULATE_PATH, new ExplorationCalculatePathState()); states.Add(ExplorationStates.PREPARE_UI, new ExplorationPrepareUIState()); states.Add(ExplorationStates.RUN_ACTION, new ExplorationRunActionState()); states.Add(ExplorationStates.WAIT_FOR_UI_ACTION, new ExplorationWaitForUIActionState()); StateMachine = new StateMachine <ExplorationScene, ExplorationStates>(this, states); StateMachine.Initialize(ExplorationStates.CALCULATE_PATH); }
public ExplorationUI(Party party, IUnitObject partyLeader, SmoothCamera smoothCamera, GridSelection nodeSelection, PathPointCollection pathPoints) { this.party = party; this.partyLeader = partyLeader; this.smoothCamera = smoothCamera; movementNodes = null; retraceNode = null; this.nodeSelection = nodeSelection; this.pathPoints = pathPoints; Dictionary <ExplorationUIStates, IState <ExplorationUI> > states = new Dictionary <ExplorationUIStates, IState <ExplorationUI> >(); states.Add(ExplorationUIStates.HALT, new ExplorationUIHaltState()); states.Add(ExplorationUIStates.WAIT_FOR_INPUT, new ExplorationUIWaitForInputState()); states.Add(ExplorationUIStates.TRACE_PATH, new ExplorationUITracePathState()); states.Add(ExplorationUIStates.WAIT_FOR_CONFIRM, new ExplorationUIWaitForConfirmState()); states.Add(ExplorationUIStates.FIRE_MOVE_ACTION, new ExplorationUIFireMoveActionState()); StateMachine = new StateMachine <ExplorationUI, ExplorationUIStates>(this, states); StateMachine.Initialize(ExplorationUIStates.HALT); }
public void ApplyTransformToCamera(SmoothCamera smoothCamera) { smoothCamera.ApplyTransformTarget(transform); }