26 lines
777 B
C#
26 lines
777 B
C#
using Gameplay.Level;
|
|
using UnityEngine;
|
|
|
|
namespace Gameplay.Character
|
|
{
|
|
public partial class Character
|
|
{
|
|
|
|
protected override void _OnSelect()
|
|
{
|
|
// base._OnSelect();
|
|
var currentState = _downFSM?.currentState;
|
|
if (currentState != null && runtimeData != null)
|
|
{
|
|
var targetPos = LevelManager.Instance.CurrentLevel.Map.TGSCellIndex2WorldPosition(controlData.targetCellIndex);
|
|
var targetInfo = (currentState.id == EDownState.Move) ? new SelecterView.TargetInfo() { pos = targetPos } : null;
|
|
SelecterView.Instance.SetSelectAndTarget(Node, targetInfo);
|
|
}
|
|
else
|
|
{
|
|
base._OnSelect();
|
|
}
|
|
}
|
|
|
|
}
|
|
} |