private void RightClickCommandv2(Vector3 _inTargetPosition, ActionType _inAction, int _targetId) { if (mSelectedNetowrkId > -1) { Command cmd = null; if (_inAction == ActionType.Attack && _targetId > -1) { cmd = AttackCommand.StaticCreate(mSelectedNetowrkId, _targetId); } else if (_inAction == ActionType.Move) { cmd = MoveCommand.StaticCreate(mSelectedNetowrkId, _inTargetPosition); } if (cmd != null) { mCommandList.AddCommand(cmd); } } }
private void RightClickCommand(Vector3 _inTargerPosition) { if (mSelectedNetowrkId > -1) { int targetId = NetworkObject.TrySelectGameobject(_inTargerPosition); Command cmd = null; if (targetId > -1) { cmd = AttackCommand.StaticCreate(mSelectedNetowrkId, targetId); } if (cmd == null) { cmd = MoveCommand.StaticCreate(mSelectedNetowrkId, _inTargerPosition); } if (cmd != null) { mCommandList.AddCommand(cmd); } } }