21 lines
376 B
C++
21 lines
376 B
C++
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||
|
|
|
||
|
|
|
||
|
|
#include "Widget/WBP_PlayerUI.h"
|
||
|
|
|
||
|
|
#include "Components/TextBlock.h"
|
||
|
|
#include "Widget/UWBP_HpBar.h"
|
||
|
|
|
||
|
|
void UWBP_PlayerUI::SetHp(float hp, float hpMax)
|
||
|
|
{
|
||
|
|
if (HPBar)
|
||
|
|
HPBar->SetHp(hp, hpMax);
|
||
|
|
}
|
||
|
|
|
||
|
|
void UWBP_PlayerUI::SetAmmo(int ammo)
|
||
|
|
{
|
||
|
|
if (AmmoText)
|
||
|
|
AmmoText->SetText(FText::AsNumber(ammo));
|
||
|
|
}
|
||
|
|
|