public FollowState(CameraFSM controller, GameObject gameObject, bool eventBased) : base(controller) { objectToFollow = gameObject; notifyEventManager = eventBased; print("Camera FollowState"); }
public MoveState(CameraFSM controller, float xPosition, float yPosition, bool eventBased) : base(controller) { targetX = xPosition; targetY = yPosition; notifyEventManager = eventBased; print("Camera MoveState"); }
void Awake() { config = new CameraConfig(ConfigResourceLoader.inst.loadConfig("Config/camera.xml").ToXml()); cam = GetComponent <Camera>(); cam.fieldOfView = config.defaultFOV; fsm = new CameraFSM(this); fsm.changeState(GameState.Enter); LogicEvent.add("onBeginReplay", this, "onBeginReplay"); if (WithoutEnterShow_4Test_EditorOnly.instance != null) { fsm.changeState(GameState.Gaming); } else { fsm.changeState(GameState.Enter); } LogicEvent.add("onGameReady", this, "onGameReady"); LogicEvent.add("onGameOver", this, "onGameOver"); }
// Awake is called before Start void Awake() { // Set up singleton if (!instance) { instance = this; } // Sets this to not be destroyed when loading different scene... Not sure it's needed for this game //DontDestroyOnLoad(gameObject); // Retrieve references for everything game manager cares about livingBeings = GetComponentsInChildren <Living>(); cameraFSM = FindObjectOfType <Camera>().GetComponent <CameraFSM>(); checkpoints = FindObjectsOfType <Checkpoint>(); stageController = FindObjectOfType <StageController>(); gates = FindObjectsOfType <Gate>(); Puppet[] puppets = GetComponentsInChildren <Puppet>(); playerPuppet = puppets[0]; daughterPuppet = puppets[1]; }
public void SetCameraFSM(CameraFSM camera) { cameraFSM = camera; }
public CameraState(CameraFSM camera) : base() { cameraFSM = camera; }