1
0
Fork 0

Merge branch 'TriceraptodactylDev'

This commit is contained in:
Triceraptodactyl 2018-04-24 01:28:28 +02:00
commit f6ee7b02cf

View file

@ -28,14 +28,13 @@ public class HealthbarController : MonoBehaviour {
float offset; float offset;
if (player == null) { if (player == null) {
currentRotation = 0; offset = -currentRotation;
offset = 0;
Debug.Log("Player not found"); Debug.Log("Player not found");
} else { } else {
//Debug.Log("calculated offset"); //Debug.Log("calculated offset");
offset = ((playerLife / maxRotation) * 100) - currentRotation; offset = ((playerLife / maxRotation) * 100) - currentRotation;
} }
offset /= 10;
gameObject.transform.Rotate(Vector3.forward, offset); gameObject.transform.Rotate(Vector3.forward, offset);
currentRotation += offset; currentRotation += offset;
} }