2025-01-08 18:46:17 +00:00
|
|
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System;
|
|
|
|
using Godot;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Rokojori
|
|
|
|
{
|
|
|
|
[Tool]
|
|
|
|
[GlobalClass]
|
|
|
|
public partial class TimeLine:Resource
|
|
|
|
{
|
|
|
|
[Export]
|
|
|
|
public bool isLooping = false;
|
|
|
|
|
|
|
|
[Export]
|
|
|
|
public float loopStart = 0;
|
|
|
|
|
|
|
|
[Export]
|
|
|
|
public float loopEnd = 100000;
|
|
|
|
|
|
|
|
[Export]
|
|
|
|
public float startSpeed = 1;
|
|
|
|
|
|
|
|
[Export]
|
|
|
|
public bool autoStart = true;
|
|
|
|
|
|
|
|
|
|
|
|
public float delta
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
var tm = Unique<TimeLineManager>.Get();
|
|
|
|
return tm.GetRunner( this ).currentDelta;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-01-13 18:11:12 +00:00
|
|
|
public static TimeLine IfNull_ReplaceByGameTime( TimeLine other )
|
|
|
|
{
|
|
|
|
if ( other != null )
|
|
|
|
{
|
|
|
|
return other;
|
|
|
|
}
|
|
|
|
|
|
|
|
var tm = Unique<TimeLineManager>.Get();
|
|
|
|
return tm.gameTimeTimeLine;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static TimeLine IfNull_ReplaceByRealTime( TimeLine other )
|
|
|
|
{
|
|
|
|
if ( other != null )
|
|
|
|
{
|
|
|
|
return other;
|
|
|
|
}
|
|
|
|
|
|
|
|
var tm = Unique<TimeLineManager>.Get();
|
|
|
|
return tm.realTimeTimeLine;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2025-01-08 18:46:17 +00:00
|
|
|
}
|
|
|
|
}
|