Merge branch 'TriceraptodactylDev'
This commit is contained in:
commit
f6ee7b02cf
1 changed files with 3 additions and 4 deletions
|
@ -28,14 +28,13 @@ public class HealthbarController : MonoBehaviour {
|
|||
float offset;
|
||||
|
||||
if (player == null) {
|
||||
currentRotation = 0;
|
||||
offset = 0;
|
||||
offset = -currentRotation;
|
||||
Debug.Log("Player not found");
|
||||
} else {
|
||||
//Debug.Log("calculated offset");
|
||||
offset = ((playerLife / maxRotation) * 100) - currentRotation;
|
||||
}
|
||||
|
||||
offset /= 10;
|
||||
gameObject.transform.Rotate(Vector3.forward, offset);
|
||||
currentRotation += offset;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue