
gamePlayRoot = WidgetContainer:new();

widgetSetRoot(gamePlayRoot);

gamePlayRoot:setNumCols(3);
gamePlayRoot:setNumRows(3);
gamePlayRoot:setStretchableRow(1);
gamePlayRoot:setStretchableCol(1);


gamePlay_hpBar = WidgetText:new();
gamePlay_hpBar:setText("HP: 20");
gamePlay_hpBar:setScale(5);
gamePlayRoot:addChild(gamePlay_hpBar);

gamePlay_scoreBar = WidgetText:new();
gamePlay_scoreBar:setText("Score: 0");
gamePlay_scoreBar:setScale(5);
gamePlayRoot:addChild(nil);
gamePlayRoot:addChild(gamePlay_scoreBar);

function updateGamePlayUI()
   
   if not(mainPlayer == nil) then
	  gamePlay_hpBar:setText("HP: "..mainPlayer.hp);
	  gamePlay_scoreBar:setText("Score: "..playerScore);
   else
	  gamePlay_hpBar:setText("HP: 0");
   end

end

