mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-22 06:33:47 +00:00
Added GTWeen
This commit is contained in:
parent
457998788e
commit
2036e4e748
152 changed files with 5889 additions and 7 deletions
41
GTweensGodot/Godot/Source/Extensions/Camera3DExtensions.cs
Normal file
41
GTweensGodot/Godot/Source/Extensions/Camera3DExtensions.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using Godot;
|
||||
using GTweens.Extensions;
|
||||
using GTweens.Tweens;
|
||||
|
||||
namespace GTweensGodot.Extensions;
|
||||
|
||||
public static class Camera3DExtensions
|
||||
{
|
||||
public static GTween TweenHOffset(this Camera3D target, float to, float duration)
|
||||
{
|
||||
return GTweenExtensions.Tween(
|
||||
() => target.HOffset,
|
||||
current => target.HOffset = current,
|
||||
to,
|
||||
duration,
|
||||
GodotObjectExtensions.GetGodotObjectValidationFunction(target)
|
||||
);
|
||||
}
|
||||
|
||||
public static GTween TweenVOffset(this Camera3D target, float to, float duration)
|
||||
{
|
||||
return GTweenExtensions.Tween(
|
||||
() => target.VOffset,
|
||||
current => target.VOffset = current,
|
||||
to,
|
||||
duration,
|
||||
GodotObjectExtensions.GetGodotObjectValidationFunction(target)
|
||||
);
|
||||
}
|
||||
|
||||
public static GTween TweenFov(this Camera3D target, float to, float duration)
|
||||
{
|
||||
return GTweenExtensions.Tween(
|
||||
() => target.Fov,
|
||||
current => target.Fov = current,
|
||||
to,
|
||||
duration,
|
||||
GodotObjectExtensions.GetGodotObjectValidationFunction(target)
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue