cirnogodot/Scripts/Resources/TimeModifier.cs

45 lines
814 B
C#
Raw Normal View History

2025-02-09 11:48:30 +01:00
using Godot;
namespace Cirno.Scripts.Resources;
[GlobalClass]
public partial class TimeModifier : Resource
{
[Export] public float TimeInSeconds = 1f;
[Export] public TimeModifierType ModifierType;
[Export] public float Value;
2025-02-14 13:27:30 +01:00
[Export] public bool Continuous = false;
public ModifierWrapper Wrap()
{
return new ModifierWrapper()
{
TimeModifier = this,
Applied = false
};
}
2025-02-13 18:25:55 +01:00
}
public class ModifierWrapper
{
public TimeModifier TimeModifier { get; set; }
public bool Applied { get; set; } = false;
2025-02-14 13:27:30 +01:00
public virtual void Start()
{
}
public virtual void Process(double deltaTime)
{
}
2025-02-09 11:48:30 +01:00
}
public enum TimeModifierType
{
SpeedChange,
RotationChange,
2025-02-14 13:27:30 +01:00
FacePlayer,
Dynamic
2025-02-09 11:48:30 +01:00
}