public void IfSpeedClick() { if (IsDead) { return; } animator.SetBool("IsSpeedBtn", true); purigonState = PurigonState.FlyGlide; if (currentSpeed < (basicSpeed * accelspeed)) { currentSpeed += increaseSpeed; if (currentSpeed > maxSpeed) { currentSpeed = maxSpeed; //최대속도 초과시 최대속도만큼만. } } }
public void IfSpeedUnClick() { if (IsDead) { return; } if (IsDash == true) { return; } if (IsCollision == true) { currentSpeed = 0f; return; } animator.SetBool("IsSpeedBtn", false); purigonState = PurigonState.FlyGlide; //currentSpeed = basicSpeed; if (currentSpeed > basicSpeed) { currentSpeed -= increaseSpeed; } }
public void IfSpeedUnClick() { animator.SetBool("IsSpeedBtn", false); purigonState = PurigonState.FlyGlide; moveSpeed = 2.0f; }
public void IfSpeedClick() { animator.SetBool("IsSpeedBtn", true); purigonState = PurigonState.FlyGlide; moveSpeed = 10.0f; }