新增game hud字体

移除旧版血量控制
This commit is contained in:
2026-07-04 15:22:46 +08:00
parent 08dec79a6e
commit c8e66f72b1
11 changed files with 460 additions and 110 deletions
+15 -8
View File
@@ -1,18 +1,25 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// Billboard 脚本 —— 让 Sprite 始终面朝相机,消除透视相机角度导致的 Sprite 变形。
/// 挂到怪物/角色根物体上即可。
/// </summary>
public class facingcamera : MonoBehaviour
{
// Start is called before the first frame update
void Start()
private Camera _cam;
private void Start()
{
_cam = Camera.main;
}
// Update is called once per frame
void Update()
private void LateUpdate()
{
if (_cam == null) return;
// 让物体的 forward (Z+) 指向相机,Sprite 平面自然朝向相机
transform.LookAt(
transform.position + (_cam.transform.position - transform.position),
Vector3.up
);
}
}