// Shows both arrows public void ShowPanel() { if (TutorialManager.Instance && TutorialManager.Instance.IsTutorialActive()) { return; } PanToMoveCamera panScript = CameraManager.Instance.PanScript; int currentLocalPartition = panScript.currentLocalPartition; int firstPartition = panScript.firstPartition; int lastPartition = panScript.lastPartition; bool gatingEnabled = DataManager.Instance.GameData.GatingProgress.IsEnabled(); //deco mode specific checks if (DecoModeUIManager.Instance && DecoModeUIManager.Instance.IsOpen) { //first partition if (currentLocalPartition == firstPartition) { if (panScript.CanDecoModeMoveToRight()) { ShowRightArrowOnly(); } } //last partition else if (currentLocalPartition == lastPartition) { ShowLeftArrowOnly(); } //in between partitions else { if (!gatingEnabled || panScript.CanDecoModeMoveToRight()) { ShowBothArrows(false); } else { ShowLeftArrowOnly(); } } } //regular mode (all non deco) checks else { if (currentLocalPartition == firstPartition) { ShowRightArrowOnly(); } else if (currentLocalPartition == lastPartition) { ShowLeftArrowOnly(); } else { bool canEnterRightRoom = GatingManager.Instance.CanEnterRoom(currentLocalPartition, RoomDirection.Left); ShowBothArrows(!canEnterRightRoom); } } }
void Awake() { // set pan script if (SceneManager.GetActiveScene().name == SceneUtils.BEDROOM || SceneManager.GetActiveScene().name == SceneUtils.YARD) { scriptPan = CameraManager.Instance.PanScript; } }
public Dictionary <int, Gate> activeGates = new Dictionary <int, Gate>(); //gates currently in the game void Awake() { if (SceneUtils.CurrentScene == SceneUtils.BEDROOM || SceneUtils.CurrentScene == SceneUtils.YARD) { // set pan script scriptPan = CameraManager.Instance.PanScript; // Get current zone currentZone = SceneUtils.GetZoneTypeFromSceneName(SceneManager.GetActiveScene().name).ToString(); } }
void Awake() { GatingManager.OnDestroyedGate += MoveToCenter; // set up camera variables scriptPan = CameraManager.Instance.PanScript; mainCamera = CameraManager.Instance.CameraMain; // get speed from constants normalSpeed = Constants.GetConstant <float>("NormalMoveSpeed"); sickSpeed = Constants.GetConstant <float>("SickMoveSpeed"); verySickSpeed = Constants.GetConstant <float>("VerySickMoveSpeed"); // Get the constant height ratio in screens of 2D pet movement movementStaticHeightRatio = Constants.GetConstant <float>("StaticMovementHeightRatio"); }
void OnSwipe(SwipeGesture gesture) { FingerGestures.SwipeDirection direction = gesture.Direction; if (direction == FingerGestures.SwipeDirection.Left) { PanToMoveCamera scriptPan = CameraManager.Instance.PanScript; scriptPan.TutorialSwipeLeft(); if (OnTutorialSwiped != null) { OnTutorialSwiped(this, EventArgs.Empty); } } }
/// <summary> /// This function handles the slight pan to view the smoke monster in the next room. /// </summary> /// <returns>The pan right.</returns> private IEnumerator BeginPanRight() { // wait a brief moment float waitTime = Constants.GetConstant <float>("SmokeIntroWaitBetweenPans"); yield return(new WaitForSeconds(waitTime)); // begin the pan right PanToMoveCamera scriptPan = CameraManager.Instance.PanScript; float moveTo = scriptPan.partitionOffset; float panTime = Constants.GetConstant <float>("SmokeIntroPanTime"); LeanTween.moveX(CameraManager.Instance.gameObject.transform.parent.gameObject, moveTo, panTime) .setEase(LeanTweenType.easeInOutQuad); yield return(new WaitForSeconds(panTime)); OnRightPanDone(); }