/*
<copyright file="BGNCGetRowIndex.cs" company="BansheeGz">
    Copyright (c) 2018-2021 All Rights Reserved
</copyright>
*/

using NodeCanvas.Framework;
using ParadoxNotion.Design;

namespace BansheeGz.BGDatabase
{
    [Category("BansheeGz")]
    [Name("BGDatabase: Get row index")]
    [Description("Get row's index by row's ID or name and assign it to the targetVar")]
    public class BGNCGetRowIndex : BGNCRowA
    {
        [RequiredField] public BBParameter<int> targetVar;

        protected override void OnExecute()
        {
            targetVar.value = Entity.Index;
            EndAction(true);
        }
    }
}