20 lines
555 B
C#
20 lines
555 B
C#
![]() |
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);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|