(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

@ -0,0 +1,20 @@
using UnityEngine;
namespace Entity
{
public class BuildingOutline:Outline
{
public BoxCollider2D boxCollider;
override public void Init()
{
var size = GetSize();
outlineRenderer.size = size;
boxCollider.size = size;
if (progressBarPrefab)
{
progressBarPrefab.transform.localPosition += new Vector3(0f, size.y * 2 / 3, 0f);
progressBarPrefab.transform.localScale = new Vector3(size.x, 1f / 10f, 1);
}
}
}
}