(client) feat:实现子弹定义 chore:将建筑碰撞体改为方形

This commit is contained in:
m0_75251201
2025-08-14 13:26:02 +08:00
parent 35924f3695
commit 12a4f9efaa
10 changed files with 287 additions and 10 deletions

View File

@ -18,15 +18,17 @@ namespace Entity
public static Vector3 minimum=new(0.5f,0.5f,0.5f);
public void Init()
public virtual void Init()
{
var size = GetSize();
outlineRenderer.size = size;
outlineCollider.direction = size.x > size.y ? CapsuleDirection2D.Horizontal : CapsuleDirection2D.Vertical;
outlineCollider.size = size;
progressBarPrefab.transform.localPosition += new Vector3(0f,size.y * 2 / 3,0f);
progressBarPrefab.transform.localScale = new Vector3(size.x, size.x / 10, 1);
if (progressBarPrefab)
{
progressBarPrefab.transform.localPosition += new Vector3(0f, size.y * 2 / 3, 0f);
progressBarPrefab.transform.localScale = new Vector3(size.x, 1f / 10f, 1);
}
}
public void Show()