Initial commit

This commit is contained in:
Senad Uka
2022-11-27 18:58:30 +01:00
commit 50955b03e0
68 changed files with 124783 additions and 0 deletions

28
Letterbox.cs Normal file
View File

@@ -0,0 +1,28 @@
using Godot;
using System;
public class Letterbox : Node2D
{
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
// assign random letters to all the child nodes of type Letter
foreach (var letter in GetChildren())
{
if (letter is Letter)
{
((Letter)letter).Value = RandomLetterAsAString();
}
}
}
// method that returns a string with a random capital letter inside
private string RandomLetterAsAString()
{
var random = new Random();
var randomLetter = (char)random.Next('A', 'Z' + 1);
return randomLetter.ToString();
}
}