31 lines
588 B
C#
31 lines
588 B
C#
![]() |
using Godot;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using Godot.Collections;
|
||
|
|
||
|
namespace Rokojori
|
||
|
{
|
||
|
[GlobalClass,Tool]
|
||
|
public partial class ChangeTime:Action
|
||
|
{
|
||
|
[Export]
|
||
|
public float duration;
|
||
|
|
||
|
[Export]
|
||
|
public bool showInfo;
|
||
|
|
||
|
protected override void _OnTrigger()
|
||
|
{
|
||
|
var edr = Unique<EatDaRichGame>.Get();
|
||
|
|
||
|
edr.ChangeTime( duration );
|
||
|
|
||
|
var timeInfo = Unique<TimeInfo>.Get();
|
||
|
|
||
|
var symbol = duration > 0 ? "+" : "-";
|
||
|
var value = Mathf.Abs( duration )._F();
|
||
|
timeInfo.Show( symbol + value, 2 );
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|