28 lines
466 B
C#
28 lines
466 B
C#
![]() |
using Godot;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using Godot.Collections;
|
||
|
|
||
|
namespace Rokojori
|
||
|
{
|
||
|
[GlobalClass,Tool]
|
||
|
public partial class RichCounter:Node
|
||
|
{
|
||
|
[Export]
|
||
|
public int numRich = 0;
|
||
|
|
||
|
[Export]
|
||
|
public UIText counter;
|
||
|
|
||
|
[Export]
|
||
|
public Action onCountUp;
|
||
|
|
||
|
public void CountUp()
|
||
|
{
|
||
|
numRich ++;
|
||
|
counter.locale = LocaleText.Create( numRich + "" );
|
||
|
|
||
|
Action.Trigger( onCountUp );
|
||
|
}
|
||
|
}
|
||
|
}
|