For a simple stamina bar - create a 2d overlay based on percent is best.
The code is pretty simple -every 50ms or so:
var maxStamina = 4; // in this case 4% of screen width
var stamina = maxStamina;
if (playerStat == "run") {stamina -= 0.007;}
else if (playerStat == "walk") {stamina += 0.0024;}
else {stamina += 0.005;}
if (stamina > maxStamina) {stamina = maxStamina;}
if (stamina < 0) {stamina = 0;}
ccbSetSceneNodeProperty(stamN, "Width (percent)", stamina);