2025-06-12 09:03:02 +00:00
|
|
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System;
|
|
|
|
using Godot;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Rokojori
|
|
|
|
{
|
|
|
|
[Tool]
|
|
|
|
[GlobalClass]
|
|
|
|
public partial class Duration:Resource
|
|
|
|
{
|
|
|
|
[Export]
|
|
|
|
public TimeLine timeLine;
|
|
|
|
|
|
|
|
public virtual float GetDurationInSeconds()
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2025-07-25 08:13:35 +00:00
|
|
|
|
|
|
|
public static string GetTimerLabel( float seconds )
|
|
|
|
{
|
|
|
|
var secondsAmount = seconds % 60;
|
|
|
|
var minutesAmount = ( seconds - secondsAmount ) / 60f;
|
|
|
|
|
|
|
|
|
|
|
|
var secondsLabel = Text.WithLeadingZeros( Mathf.CeilToInt( secondsAmount ) );
|
|
|
|
var minutesLabel = Text.WithLeadingZeros( Mathf.CeilToInt( minutesAmount ) );
|
|
|
|
|
|
|
|
return minutesLabel + ":" + secondsLabel;
|
|
|
|
}
|
2025-06-12 09:03:02 +00:00
|
|
|
}
|
|
|
|
}
|