change: finished and cleaned all settings changes, code commented, smoothing and easing are now exponential

This commit is contained in:
Chris
2025-09-26 14:03:11 -04:00
parent bd2903a0b2
commit 4569cea664
20 changed files with 676 additions and 399 deletions

View File

@@ -1,12 +1,18 @@
using System;
using Codice.Client.BaseCommands;
using NodeCanvas.Framework;
using ParadoxNotion.Design;
using Reset.Core;
using UnityEngine;
namespace Reset.Units {
[Category("Reset/Movement")]
public class ChangeRotationSettings : ActionTask<UnitMovementHandler> {
[SerializeField] public EnumValueGroup facingDirection = new EnumValueGroup("Facing Direction", PlayerFacingDirection.TowardsTarget);
[SerializeField] public FloatValueGroup rotationSpeed = new (newLabel: "Rotation Speed");
//Use for initialization. This is called only once in the lifetime of the task.
//Return null if init was successfull. Return an error string otherwise
protected override string OnInit() {
@@ -16,7 +22,10 @@ namespace Reset.Units {
//This is called once each time the task is enabled.
//Call EndAction() to mark the action as finished, either in success or failure.
//EndAction can be called from anywhere.
protected override void OnExecute() {
protected override void OnExecute(){
EnumValueGroup.UpdateValue(facingDirection, agent.data.facingDirection);
FloatValueGroup.UpdateValue(rotationSpeed, agent.data.rotationSpeed);
EndAction(true);
}