Added minigame
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
using Godot;
|
||||
|
||||
namespace Babushka.scripts.CSharp.Common.Util;
|
||||
|
||||
public partial class ClickDetect : Area2D
|
||||
{
|
||||
[Signal] public delegate void ClickEventHandler();
|
||||
|
||||
public override void _Input(InputEvent evt)
|
||||
{
|
||||
if (evt is InputEventMouseButton { ButtonIndex: MouseButton.Left, Pressed: true })
|
||||
{
|
||||
EmitSignalClick();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://dq7gahfp0lk7v
|
||||
@@ -4,6 +4,8 @@ using System.Collections.Generic;
|
||||
using System.Data.SqlTypes;
|
||||
using System.Linq;
|
||||
using System.Xml.Schema;
|
||||
using Godot;
|
||||
|
||||
namespace Babushka.scripts.CSharp.Common.Util;
|
||||
|
||||
public static class LinqExtras
|
||||
@@ -46,4 +48,11 @@ public static class LinqExtras
|
||||
}
|
||||
return selfList;
|
||||
}
|
||||
|
||||
public static Color RandomHue(this Color color)
|
||||
{
|
||||
color.ToHsv(out _, out float saturation, out var value );
|
||||
var rng = new RandomNumberGenerator();
|
||||
return Color.FromHsv(rng.Randf(), saturation, value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user