protected virtual void Update() { if (MyInput.GetKeyDown(myKey) && isAtObject && !isTouch) { Action(); } }
IEnumerator Check() { while (true) { yield return(null); if (MyInput.GetKeyDown(code)) { gameObject.SetActive(false); } } }
// Update is called once per frame void Update() { if (MyInput.GetKeyDown(MyKeyCode.Down) && isAtObject && downEnabled) { if (clickCheckTimer <= 0) { StartCoroutine("ClickCheck"); } else { Down(); } } }
protected override void Update() { base.Update(); /*if (MyInput.GetKeyDown(KeyCode.UpArrow)) JumpAccept(); * //if (MyInput.GetKeyUp(KeyCode.UpArrow)) JumpStop(); * if (MyInput.GetKey(KeyCode.UpArrow)) Jump(); 여기까지는 옛 점프(누른 시간 비례 점프) */ //if (MyInput.GetKeyDown(KeyCode.Q)) circleWeapon(WeaponList.sword); //if (MyInput.GetKeyDown(KeyCode.W)) circleWeapon(WeaponList.shield); //if (MyInput.GetKeyDown(KeyCode.E)) circleWeapon(WeaponList.fist); if (isLive) { if (isGround) { jumpCount = 0; } if (isDashable > 0f) { isDashable = Mathf.Clamp(isDashable - Time.deltaTime, 0, dashCoolTime); } if (Map.Instance.CheckOutSide(transform.position)) { OnDieCallBack(); } if (MyInput.GetKeyDown(MyKeyCode.Attack)) { Action(); } if (MyInput.GetKeyUp(MyKeyCode.Right)) { anim.SetBool("isRunning", false); //달리기 애니메이션 버그, 이걸 밖으로 빼니 고쳐짐 } if (MyInput.GetKeyUp(MyKeyCode.Left)) { anim.SetBool("isRunning", false); } if (IsMovable) { if (SaveManager.GetSkillUnlockInfo(0)) { if (MyInput.GetKeyDown(MyKeyCode.Dash) && isDashable <= 0f && isGround && !isDashing) { Dash(); } } if (MyInput.GetKeyDown(MyKeyCode.Jump)) { Jump(); } } if (isGround && isJumping) { isJumping = false; anim.SetBool("isJumping", false); } if (isJumpSkillUsing && isGround) { isJumpSkillUsing = false; } DisplayInfo(); ladderActionAnim(); CheckFalling(); previousPos = transform.position; } }