Skip to content
This repository was archived by the owner on Jun 22, 2025. It is now read-only.

Commit 8a88480

Browse files
committed
hp바
1 parent c7130ed commit 8a88480

File tree

4 files changed

+427
-1
lines changed

4 files changed

+427
-1
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
using UnityEngine.UI;
5+
6+
public class PlayerHP : MonoBehaviour
7+
{
8+
[SerializeField] private PlayerRPC player;
9+
[SerializeField] private Slider hpBar;
10+
11+
12+
// Start is called before the first frame update
13+
void Start()
14+
{
15+
hpBar.maxValue = player.hp;
16+
hpBar.value = player.hp;
17+
}
18+
19+
// Update is called once per frame
20+
void Update()
21+
{
22+
hpBar.value = player.hp;
23+
}
24+
}

ShootingGame/Shooting_Np/Assets/01Scripts/Player/PlayerHP.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)