private void OnMouseUp() { anim.Play("GoAway"); if (!MessageSystemPlayingScene.IsStart) { menuPanel.SetActive(false); MessageSystemPlayingScene.StartGame(); if (Conecting.Management == 0) { screen.SetActive(true); } else { StartCoroutine(EnButtons()); } MessageSystemGameBlock.DisableAllBlock(); Score.increeze(); } else { MessageSystemGameBlock.StartAfterHit(); MessageSystemPlayingScene.Player.GetComponent <Animator>().speed = 1; EnableButtons(); } if (PlayerPrefs.HasKey("FirstStart")) { PauseGame.IsPause = false; pause.SetActive(true); } else { FirstStart.SetActiveStopCollider(true); } source.Play(); }
private void OnMouseDown() { OkEducationPanel.Resume(); PlayerPrefs.SetInt("FirstStart", 1); FirstStart.EnableMenuAndQuestion(); FirstStart.SetActiveStopCollider(false); }
private void OnMouseDown() { transform.localScale = new Vector3(newSize, newSize, 1); OpenMenu.PressAtMenu(); FirstStart.SetActiveStopCollider(true); FirstStart.DisableMenuAndQuestion(); PlayerPrefs.DeleteKey("FirstStart"); level_1.GetComponent <TapToLevel>().SelectForEducation(); }
/// <summary> /// Ermittelt die Ausnahmeregel für einen bestimmten Tag. /// </summary> /// <param name="recordingEnd">Der Endzeitpunkt einer Aufzeichnung.</param> /// <returns>Die zugehörige Ausnahmeregel.</returns> public VCRScheduleException FindException(DateTime recordingEnd) { // Not repeating if (!Days.HasValue) { return(null); } // Get the local time we will record var time = FirstStart.ToLocalTime().TimeOfDay; // Get the day to check for var date = recordingEnd.ToLocalTime().Date; // Process day around check day for (int i = 5; i-- > 0;) { // Get the current date to test var referenceDay = date.AddDays(2 - i); // Wrong day of week if (!MayRecordOn(referenceDay)) { continue; } // Get the exception for the day var exception = GetException(referenceDay) ?? new VCRScheduleException { When = referenceDay }; // Get the start and end var start = (referenceDay + time).ToUniversalTime().AddMinutes(exception.ShiftTime.GetValueOrDefault(0)); var end = start.AddMinutes(exception.Duration.GetValueOrDefault(Duration)); // Check for match if (end == recordingEnd) { return(exception); } } // Report return(new VCRScheduleException { When = date }); }
private void Start() { typeAnimation = 0; isCollision = false; saveConstr = RigidbodyConstraints2D.FreezeAll; int j = 0; foreach (Image img in adviceButton.GetComponentsInChildren <Image>()) { imageButtons[j++] = img.gameObject; } panel.SetActive(false); imageButtons[0].SetActive(false); imageButtons[2].SetActive(false); for (int i = 0; i < 2; i++) { message[i] = new string[10]; } txt = panel.GetComponentInChildren <Text>(); hashtable.Add("Robot", 0); hashtable.Add("Cube", 1); hashtable.Add("Barrier_Grey", 2); hashtable.Add("Portal_Grey", 3); hashtable.Add("Abyss", 4); hashtable.Add("Blade", 5); hashtable.Add("Speedy", 6); hashtable.Add("Saw", 7); hashtable.Add("Needles", 8); hashtable.Add("Enemy#1", 9); education[0] = (obj) => // Robot { currentObj = obj.GetComponentInChildren <Animator>().gameObject; typeAnimation = 2; obj.GetComponentInChildren <Animator>().speed = 0; SetMessage(message[Conecting.Language][0]); SetButtonImage(sprites[1]); }; education[1] = (obj) =>// Cube { typeAnimation = 0; SetMessage(message[Conecting.Language][1]); SetButtonImage(sprites[2]); }; education[2] = (obj) =>// Barrier { sortingLayerObj = FindBarrier(obj); sortingLayerObj.GetComponent <SpriteRenderer>().sortingOrder = 0; typeAnimation = 0; SetMessage(message[Conecting.Language][2]); SetButtonImage(sprites[0]); SetActiveImageButtons(true); }; education[3] = (obj) =>//Portal { sortingLayerObj = FindPortal(obj); sortingLayerObj.GetComponent <SpriteRenderer>().sortingOrder = 0; typeAnimation = 0; SetMessage(message[Conecting.Language][3]); SetButtonImage(sprites[0]); SetActiveImageButtons(true); PlayerPrefs.SetInt("FirstStart", 1); }; education[4] = (obj) =>//Abyss { typeAnimation = 0; SetMessage(message[Conecting.Language][4]); SetButtonImage(sprites[2]); }; education[5] = (obj) =>//Blade { currentObj = obj.GetComponentInChildren <Animator>().gameObject; obj.GetComponentInChildren <Animator>().speed = 0; typeAnimation = 2; SetMessage(message[Conecting.Language][5]); SetButtonImage(sprites[3]); }; education[6] = (obj) =>//Speedy { SetFontMaxSize(78); typeAnimation = 0; SetMessage(message[Conecting.Language][6]); imageButtons[1].SetActive(false); }; education[7] = (obj) =>//Saw { SetFontMaxSize(56); imageButtons[1].SetActive(true); currentObj = obj; currentObj.GetComponent <Animation>()["Saw"].speed = 0; typeAnimation = 1; SetMessage(message[Conecting.Language][7]); SetButtonImage(sprites[4]); }; education[8] = (obj) =>//Needles { currentObj = obj; currentObj.GetComponent <Animator>().speed = 0; typeAnimation = 2; SetMessage(message[Conecting.Language][8]); SetButtonImage(sprites[2]); }; education[9] = (obj) =>//Enemy #1 { currentObj = obj.GetComponentInChildren <Animator>().gameObject; if (currentObj) { currentObj.GetComponent <Animator>().speed = 0; typeAnimation = 2; SetMessage(message[Conecting.Language][9]); SetButtonImage(sprites[1]); FirstStart.EnableMenuAndQuestion(); gameObject.SetActive(false); } else { MessageSystemPlayingScene.EnableCollider(); IsCollision = false; MessageSystemPlayingScene.IsHit = false; MessageSystemGameBlock.StartAfterHit(); MessageSystemPlayingScene.Player.GetComponent <Animator>().speed = 1; RestoreConstraints(); SetDefaultSortingLayer(); SetActiveImageButtons(false); panel.SetActive(false); FirstStart.EnableMenuAndQuestion(); gameObject.SetActive(false); } }; anim[0] = () => { }; anim[1] = () => currentObj.GetComponent <Animation>()["Saw"].speed = 1; anim[2] = () => currentObj.GetComponent <Animator>().speed = 1; InicializedMessage(); gameObject.SetActive(false); }