(client) feat:实现子弹定义 chore:将建筑碰撞体改为方形
This commit is contained in:
20
Client/Assets/Scripts/Entity/BuildingOutline.cs
Normal file
20
Client/Assets/Scripts/Entity/BuildingOutline.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user