void Start() { startPos = this.transform.position; startPos.x = 3.11f; startPos.y = .7f; stageGameObject = GameObject.Find ("Stage"); zoomCameraScript = stageGameObject.GetComponent<ZoomCamera> (); }
void Awake() { StartCoroutine(OnGameStateChange(GameState)); StartCoroutine(OnStartupDoneEvent()); StartCoroutine(OnCocktailModes(selectedCocktailModes.Count)); StartCoroutine(OnSequenceChangement(ModeSequenceType)); StartCoroutine(OnEnvironementChromaChangement(environementChroma)); SetupRewiredPlayers(); ReInput.ControllerConnectedEvent += (ControllerStatusChangedEventArgs obj) => UpdateGamepadList(); ReInput.ControllerDisconnectedEvent += (ControllerStatusChangedEventArgs obj) => UpdateGamepadList(); //OnPlaying += UpdateGamepadList; OnMenu += UpdateGamepadList; LoadModeManager.Instance.OnLevelUnloaded += UpdateGamepadList; OnPlaying += () => SetMouseVisibility(); OnRestartMode += () => SetMouseVisibility(); OnPlaying += UpdatePlayedModes; OnMenu += () => Startup = StartupType.Wave; OnEndMode += () => Startup = StartupType.Delayed; OnEnvironementChromaChange += SetPlayerMouseCursor; MenuManager.Instance.OnStartModeClick += UpdateGamepadList; MenuManager.Instance.OnStartModeClick += CreateAIs; SetPlayerMouseCursor(); mainCamera = GameObject.FindGameObjectWithTag("MainCamera"); screenShakeCamera = mainCamera.GetComponent <ScreenShakeCamera>(); zoomCamera = mainCamera.GetComponent <ZoomCamera>(); dynamicCamera = mainCamera.GetComponent <DynamicCamera>(); menuCameraMovement = mainCamera.GetComponent <MenuCameraMovement>(); slowMotionCamera = mainCamera.GetComponent <SlowMotionCamera>(); fixedDeltaTime = Time.fixedDeltaTime; fixedDeltaFactor = 1 / fixedDeltaTime; GraphicsQualityManager.Instance.OnFixedDeltaTimeChange += (x) => { fixedDeltaTime = x; fixedDeltaFactor = 1 / fixedDeltaTime; }; LoadEnvironementChroma(); }
/// <summary> /// Start this instance. /// </summary> void Start() { /// RTS camera init CameraComponent camera = new CameraComponent(this.gameObject); ZoomCamera zoomCamera = new ZoomCamera(camera, zoomMin, zoomMax, zoomSpeed); RotateCamera rotateCamera = new RotateCamera(zoomCamera, rotateSpeed); FreeCamera freeCamera = new FreeCamera(rotateCamera, minX, minZ, maxX, maxZ, movementSpeed); rtsCamera = new SelectionFrameCamera(freeCamera, selection_frame); /// Follow camera init orbitalCamera = new OrbitalCamera(zoomCamera, rotateSpeed); followCamera = new FollowCamera(orbitalCamera, followDampTime); currentCamera = rtsCamera; }
void Update() { if (messages != null && messages.Count() != 0) { if (messageNumber <= messages.Count() - 1) { messageDisplay.text = messages[messageNumber]; } } PreviousActivity(); OkActivity(); if (messageNumber == 15 && needToAddMovement == true) { needToAddMovement = false; ZoomCamera camZoom = GameObject.Find("tilted").AddComponent <ZoomCamera>(); camZoom.zoomSpeed = 5; camZoom.minZoom = 60; camZoom.maxZoom = 10; CameraMovement camMovement = GameObject.FindGameObjectWithTag("Camera Pivot").AddComponent <CameraMovement>(); camMovement.moveSpeed = 5; camMovement.boostSpeed = 20; camMovement.rotationSpeed = 90; ChangeCamera camChange = GameObject.FindGameObjectWithTag("Camera Pivot").AddComponent <ChangeCamera>(); } if ((messageNumber == 17 || messageNumber == 18) && needToCheckPlayerMoney) { if (GameObject.FindGameObjectWithTag("LevelManager").GetComponent <PlayerInfo>().money >= 2) { needToCheckPlayerMoney = false; messageNumber = 19; } } }
private void Start() { // DEACTIVATE STUFF tutorialTooltips.SetActive(false); gm = gameManager.GetComponent <GameManager>(); zoom = gameManager.GetComponent <ZoomCamera>(); playerMovement.enabled = false; tileTargeting.enabled = false; dayLightAnimator.enabled = false; ui.SetActive(false); zoom.enabled = false; gm.enabled = false; // CINEMATIC STUFF globalLight.intensity = 0.9f; globalLight.color = new Color(0.0f, 0.0f, 0.5f, 1.0f); cam.orthographicSize = 2.0f; cam.transform.localPosition = new Vector3(0, 0.1f, -100f); timer = 0; state = 1; StartCoroutine("StartTutorial"); }
public override void Enter() { //prepare command for undo FirstController.getGlobalFirstController().deleteButtonIsVisible(true); FirstController.getGlobalFirstController().undoButtonFS.gameObject.SetActive(true); FirstController.getGlobalFirstController().undoButtonFS. onClick.AddListener(() => HandleUndoFSClick()); zoomCamera = Camera.main.GetComponent <ZoomCamera> (); zoomCamera.enabled = true; zoomCamera.camera = Camera.main; zoomCamera.listener = this; focusedObject = listener.getLastGesture(this).hit.transform; focusedObjectName = focusedObject.gameObject.name; zoomCamera.focusOnObject(focusedObject); if (focusedObject == null) { Debug.LogWarning("focused is null!!"); } //hide the undo button undoButton = GameObject.Find("UndoButton"); undoButton.SetActive(false); tempcSt = new CommandStack(); //assume that the furniture is going to be rotated FirstController.getGlobalFirstController().dDeleteButtonClicked.Add(onDelete); FirstController.getGlobalFirstController().dFurniturePicked.Add(onSelectedFurniture); FirstController.getGlobalFirstController().orderButton.gameObject.SetActive(false); FirstController.getGlobalFirstController().navButtonIsVisible(false); base.Enter(); }
public void onZoomRevertEnd(ZoomCamera sender) { zoomCamera.enabled = false; this.die(nextState, shouldPop); }
public void AdvanceStory() { while (_story.canContinue) { string text = _story.Continue(); //continua história enquanto possível TextManager.instance.UpdateText(text); //muda texto myTagString = _story.currentTags; for (int i = 0; i < myTagString.Count; i++) { if (myTagString[i].Contains("som")) { tocaPlay(NomeAudio(myTagString[i])); //Debug.Log(GetTagArgument(myTagString[0])); if (tagTemp == "") { tagTemp = GetTagArgument(myTagString[i]); } else { if (tagTemp != GetTagArgument(myTagString[i])) { tocaPlayStop(NomeAudio(tagTemp)); tagTemp = GetTagArgument(myTagString[i]); } } //Debug.Log(myTagString[0]); //tocaPlay(myTagString[0]); } else if (myTagString[i].Contains("scene")) { SceneManager.LoadScene(GetTagArgument(myTagString[i])); } else if (myTagString[i].Contains("tempo")) { tagTemp = GetTagArgument(myTagString[i]); int tempo = Int32.Parse(tagTemp); MaxTextDuration = tempo; } else if (myTagString[i].Contains("zoomin")) { zoom = Camera.main.transform.parent.gameObject.AddComponent <ZoomCamera>(); } else if (myTagString[i].Contains("zoomout")) { zoom.StartZoomOut(); } else if (myTagString[i].Contains("unlockcam")) { GameManager.instance.lastChapter = lockCam.UnlockPosition() ? 6 : 7; } else if (myTagString[i].Contains("lockcam")) { lockCam = Camera.main.transform.parent.gameObject.AddComponent <LockCamera>(); lockCam.objToLock = locktarget; } else if (myTagString[i].Contains("showButton")) { GameManager.instance.ShowButton(true); } } } }
void Start() { thisTransform = transform; zoomCamera = (ZoomCamera)cameraObject.GetComponent( typeof(ZoomCamera) ); cam = cameraObject.camera; character = (CharacterController)GetComponent( typeof(CharacterController) ); ResetControlState(); }