架构大更
This commit is contained in:
@@ -8,25 +8,23 @@ namespace Continentis.MainGame.UI
|
||||
{
|
||||
public PointerArrow mainPointerArrow;
|
||||
public List<PointerArrow> pointerArrows;
|
||||
public List<PointerArrow> otherPointerArrows => pointerArrows.FindAll(pointerArrow => pointerArrow != mainPointerArrow);
|
||||
|
||||
public List<PointerArrow> otherPointerArrows =>
|
||||
pointerArrows.FindAll(pointerArrow => pointerArrow != mainPointerArrow);
|
||||
|
||||
public void GeneratePointerArrow(Vector3 startPosition, Vector3 endPosition, bool isMain)
|
||||
{
|
||||
PointerArrow pointerArrow = LeanPool.Spawn(MainGameManager.Instance.basePrefabs.pointerArrow, transform).GetComponent<PointerArrow>();
|
||||
var pointerArrow = LeanPool.Spawn(MainGameManager.Instance.basePrefabs.pointerArrow, transform)
|
||||
.GetComponent<PointerArrow>();
|
||||
pointerArrow.SetArrow(startPosition, endPosition);
|
||||
pointerArrows.Add(pointerArrow);
|
||||
|
||||
if (isMain)
|
||||
{
|
||||
mainPointerArrow = pointerArrow;
|
||||
}
|
||||
|
||||
if (isMain) mainPointerArrow = pointerArrow;
|
||||
}
|
||||
|
||||
|
||||
public void ClearPointerArrows()
|
||||
{
|
||||
foreach (var pointerArrow in pointerArrows)
|
||||
{
|
||||
LeanPool.Despawn(pointerArrow.gameObject);
|
||||
}
|
||||
foreach (var pointerArrow in pointerArrows) LeanPool.Despawn(pointerArrow.gameObject);
|
||||
pointerArrows.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user