void Bubble() { if (coolDown.Expend(amountExpendBubble)) { BubbleHydro.Throw(transform.forward, transform.TransformPoint(positionBubble)); } }
void Update() { if (movePlayer != null && !movePlayer.UseSkills) { return; } if (Input.GetKeyDown(Button.Gas)) { if (BubbleHydro.canThrow) { MovePlayer.LockPlayer(true, "Bubble"); m_animator.SetTrigger("Bubble"); } else { BubbleHydro.Deactive(); } } if (!MovePlayer.canMove) { return; } if (Input.GetKeyDown(Button.Defense)) { m_animator.SetBool("Defense", true); } if (Input.GetKeyUp(Button.Defense)) { m_animator.SetBool("Defense", false); } if (m_animator.GetCurrentAnimatorStateInfo(0).length > 0) { inDefense = m_animator.GetCurrentAnimationClipState(0)[0].clip.name.Contains("defense"); } if (Input.GetKeyDown(Button.Dash) && !m_animator.GetCurrentAnimationClipState(0)[0].clip.name.Contains("walk")) { m_animator.SetTrigger("Dash"); } if (Input.GetKeyDown(Button.Liquify)) { StartCoroutine(Liquefying()); } }