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

using BehaviorDesigner.Runtime;
using BehaviorDesigner.Runtime.Tasks;

namespace BansheeGz.BGDatabase
{
    [TaskCategory("BansheeGz")]
    [TaskName("BGDatabase: Get row index")]
    [TaskDescription("Get row's index by row's ID or name and assign it to the targetVar")]
    public class BGBDGetRowIndex : BGBDRowA
    {
        [RequiredField] public SharedInt targetVar;

        protected override void Execute()
        {
            targetVar.Value = Entity.Index;
        }
    }
}