private void addMovement() { Vector3 currentRotation; if (!phony.getMuerto()) { if (!phony.getKeysDisabler()) { if (Input.GetKey(phony.left)) { transform.Rotate(0f, 0f, 1f, Space.Self); currentRotation = transform.localRotation.eulerAngles; currentRotation.z = Mathf.Clamp(currentRotation.z, -15, 15); transform.localRotation = Quaternion.Euler(currentRotation); } if (Input.GetKey(phony.right)) { } if (Input.GetKey(phony.down)) { } if (Input.GetKey(phony.up)) { } } } }
void incresePoints() { if (survive >= repeatTime) { survive = 0f; if (!phony.getMuerto()) { phony.setPoints(phony.getPoints() + 50); } } text_points.text = (phony.getPoints()).ToString(); }