mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-12 07:05:54 +00:00
Non working procedural generation
This commit is contained in:
parent
5bfffc22ad
commit
794368dde6
10 changed files with 337 additions and 115 deletions
|
|
@ -1,3 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts;
|
||||
|
|
@ -101,4 +104,10 @@ public static class Tools
|
|||
return new Vector2(0, Mathf.Sign(input.Y)); // Up or Down
|
||||
}
|
||||
}
|
||||
|
||||
public static T PickRandom<T>(this IEnumerable<T> list)
|
||||
{
|
||||
var arr = list.ToArray();
|
||||
return arr[GD.RandRange(0, arr.Length -1)];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue