28 lines
711 B
C#
28 lines
711 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Text.RegularExpressions;
|
|
using System.Text;
|
|
using Godot;
|
|
|
|
namespace Rokojori
|
|
{
|
|
[Tool]
|
|
[GlobalClass]
|
|
public abstract partial class FloatDriverTarget:Resource
|
|
{
|
|
|
|
[Export]
|
|
public Curve mappingCurve;
|
|
|
|
public abstract string GetTargetMemberPath( FloatDriver driver );
|
|
|
|
public abstract GodotObject GetGodotObject( FloatDriver driver );
|
|
|
|
public void Update( FloatDriver driver )
|
|
{
|
|
var mappedValue = mappingCurve.Sample( driver.value );
|
|
var targetMemberPath = GetTargetMemberPath( driver );
|
|
TweenFloat.SetTargetValue( GetGodotObject( driver ), targetMemberPath, mappedValue );
|
|
}
|
|
}
|
|
} |