You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
855 B
30 lines
855 B
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Babushka.scripts.CSharp.Common.Minigame;
|
|
using Godot;
|
|
|
|
namespace Babushka.scripts.CSharp.Common.TestScripts;
|
|
|
|
public partial class MinigameTestStarter : Node
|
|
{
|
|
[Export] private MinigameController _minigameController = null!;
|
|
|
|
public override void _Ready()
|
|
{
|
|
_minigameController.Run(
|
|
new MinigameController.Builder<int>()
|
|
.WithHitCount(5)
|
|
.AddRegion(1)
|
|
.AddRegion(2).RegionWithProportion(2)
|
|
.AddRegion(3)
|
|
.AddRegion(4).RegionWithProportion(2)
|
|
.AddRegion(5)
|
|
.AddRegion(6).RegionWithProportion(2)
|
|
).ContinueWith(task => OnEnd(task.Result));
|
|
}
|
|
|
|
private void OnEnd(List<int> result)
|
|
{
|
|
GD.Print(string.Join(" ,", result));
|
|
}
|
|
} |