30 lines
814 B
C#
30 lines
814 B
C#
using Gameplay.Area;
|
|
using PhxhSDK;
|
|
using UnityEngine;
|
|
using Constants = Framework.Constants;
|
|
namespace Gameplay.Fight.Protect
|
|
{
|
|
public class BeProtectTargetPoint
|
|
{
|
|
public int cellIndex;
|
|
|
|
private GameObject _displayObj;
|
|
|
|
public BeProtectTargetPoint(int cellIndex)
|
|
{
|
|
var sampleObj = AssetManager.Instance.GetPreLoadResult<GameObject>(Constants.PROTECT_TARGET_POINT_PATH);
|
|
_displayObj = Object.Instantiate(sampleObj);
|
|
var worldPos = AreaManager.instance.GetCellPosByIndex(cellIndex);
|
|
_displayObj.transform.position = worldPos;
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
if (_displayObj == null) return;
|
|
_displayObj.Destroy();
|
|
_displayObj = null;
|
|
}
|
|
|
|
}
|
|
}
|