Repository URL to install this package:
Version:
1.0.0 ▾
|
using Fluctio.FluctioSim.Common.Configuration;
using Fluctio.FluctioSim.Core.Components.MachineLearning.NumberProviders;
using UnityEngine;
namespace Fluctio.FluctioSim.Core.Components.MachineLearning.TriggerActions
{
[AddComponentMenu(Config.PrefixedName+"/Machine Learning/Trigger Actions/Add Reward", Config.ComponentMenuOrder + 50)]
public class RewardAdder : AgentAction
{
[SerializeField] protected NumberProvider rewardAmount;
public override void OnExecute()
{
Agent.UnityAgent.AddReward(rewardAmount.GetNumber());
}
//TODO: add items to ContextMenu for easier setup of popular things
}
}