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

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

namespace BansheeGz.BGDatabase
{
    [TaskCategory("BansheeGz")]
    [TaskName("BGDatabase: Add a row")]
    [TaskDescription("Add a row to the specified table, assign index of the new row to newRowIndex")]
    public class BGBDAddRow : BGBDTableA
    {
        public SharedInt newRowIndex;

        protected override void Execute()
        {
            newRowIndex.Value = Meta.NewEntity().Index;
        }
    }
}