public override void End() { SoundManager.instance.DuckMusic(); m_ChickenFadeRoutine.Clear(); m_OperatorFadeRoutine.Clear(); SetChickenNestFade(1.0f); SetOperatorNestFade(1.0f); if (WinState) { Pilot.SetTrigger("Correct"); //CorrectAnswerDisplay.gameObject.SetActive(true); SoundManager.instance.PlayOneShot(SoundManager.instance.pilotHappy); Timer.GetComponent <Animator>().SetTrigger("won"); ExpressionTitle.GetComponent <Animator>().SetTrigger("win"); if (!IsStandalone) { this.WaitSecondsThen(0.5f, AwardEgg, (Action)FinishMinigame); } else { this.WaitSecondsThen(0.5f, FinishMinigame); } foreach (var animator in ChickenRoot.GetComponentsInChildren <Animator>()) { animator.SetTrigger("win"); } } else { Pilot.SetTrigger("Failure"); //FailedAnswerDisplay.gameObject.SetActive(true); SoundManager.instance.PlayOneShot(SoundManager.instance.pilotAngry); Timer.GetComponent <Animator>().SetTrigger("lost"); ExpressionTitle.GetComponent <Animator>().SetTrigger("fail"); this.WaitSecondsThen(0.5f, FinishMinigame); foreach (var animator in ChickenRoot.GetComponentsInChildren <Animator>()) { animator.SetTrigger("lose"); } foreach (var animator in ExpressionRoot.GetComponentsInChildren <Animator>()) { animator.SetTrigger("lose"); } } Genie.I.LogEvent(new OE_ASSESS(this, Session.instance.timeTaken)); base.End(); }
void Reset() { EndRecall(); _recallTimer = 0.0f; _recallTrigger = 0.0f; _recallKey = null; _recallPosition = default(Vector3); _isBorrowing = false; _initializedCarryoverSeats = false; _waitCountRoutine.Clear(); _carryoverConsumeNestRoutine.Clear(); }
private void OnStampClose() { m_HideRoutine.Clear(); stampCollection.GetComponent <Animator>().SetBool("showCollectionFromBottom", false); stampsBtn.GetComponent <Animator>().SetTrigger("showStampBtn"); m_GroupHider.ShowAll(); }
public void DropStamp() { if (m_SelectedStamp != null) { SoundManager.instance.PlayRandomOneShot(SoundManager.instance.stampDrop); m_SelectedStamp.Drop(); HideControls(); m_SelectedStamp = null; m_DraggingStamp = false; m_SlideRoutine.Clear(); } }
void Dragger_OnDragStart(DragObject obj) { Genie.I.LogEvent(OE_INTERACT.Create(OE_INTERACT.Type.DRAG, "minigame.make10.chicken")); SoundManager.instance.PlayRandomOneShot(SoundManager.instance.chickenDrag); GetComponent <Animator>().SetBool("isDragging", true); GetComponent <Animator>().SetTrigger("startDrag"); GetComponent <Animator>().SetBool("isWalking", false); m_WanderRoutine.Clear(); Vector3 localScale = m_InnerChicken.localScale; localScale.x = 1; m_InnerChicken.localScale = localScale; }
public void OnEggTap() { if (!AllowTap) { return; } Genie.I.LogEvent(OE_INTERACT.Create(OE_INTERACT.Type.TOUCH, "hud.tapEggs")); if (transform.parent.FindChild("egg1").GetComponent <Animator>().GetCurrentAnimatorStateInfo(0).IsName("Base Layer.eggsIdle")) { SoundManager.instance.PlayRandomOneShot(SoundManager.instance.hudTapEgg, .5f); transform.parent.FindChild("egg1").GetComponent <Animator>().SetTrigger("tapped"); secondTap.Clear(); if (Session.instance.eggsEarned != 1) { secondTap = this.WaitSecondsThen(.25f, TapSecondEgg); } } }
private void Update() { if (m_Rotating && m_Stamp != null) { float mouseRotation = Mathf.Atan2(Input.mousePosition.y - transform.position.y, Input.mousePosition.x - transform.position.x); float deltaRotation = mouseRotation - m_OldMouseAngle; m_Stamp.SetRotation(m_Stamp.GetRotation() + deltaRotation * Mathf.Rad2Deg); m_OldMouseAngle = mouseRotation; UpdateAngle(); if (!Input.GetMouseButton(0)) { m_Rotating = false; m_SoundRoutine.Clear(); transform.parent.GetComponent <Animator>().SetBool("showRotateAnim", true); Genie.I.LogEvent(OE_INTERACT.Create(OE_INTERACT.Type.DROP, "suitcase.stamp.rotate")); } } }
private void Update() { if (m_Scaling && m_Stamp != null) { RectTransform rectTransform = (RectTransform)transform; Vector2 localPos = rectTransform.InverseTransformPoint(Input.mousePosition); float percentAmount = Mathf.InverseLerp(-m_Height / 2, m_Height / 2, localPos.y); SetScale(Mathf.Lerp(MIN_SCALE, MAX_SCALE, percentAmount)); UpdatePosition(); if (!Input.GetMouseButton(0)) { m_Scaling = false; m_SoundRoutine.Clear(); transform.parent.GetComponent <Animator>().SetBool("showScaleAnim", true); Genie.I.LogEvent(OE_INTERACT.Create(OE_INTERACT.Type.DROP, "suitcase.stamp.scale")); } } }
public void ForceFinish() { Background.color = m_TargetColor; m_Routine.Clear(); OnFinish(); }
public void StopChecking() { m_CheckRoutine.Clear(); }