Skip to content

Commit 39ae439

Browse files
authored
Add files via upload
1 parent d0b6d9c commit 39ae439

5 files changed

+218
-6
lines changed

Control.tscn

+101-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,101 @@
1-
version https://git-lfs.github.com/spec/v1
2-
oid sha256:0b538b86182b288d362cbd3d06c44f5e78dcf1d3791d6fbea718bfb5d2f2755f
3-
size 1942
1+
[gd_scene load_steps=2 format=2]
2+
3+
[sub_resource type="GDScript" id=1]
4+
script/source = "extends Control
5+
6+
7+
onready var lbl = $Label
8+
onready var lbl2 = $Label2
9+
10+
11+
func createLbl():
12+
13+
var titleLabel = Label.new()
14+
15+
titleLabel.rect_position = Vector2(253 , 482)
16+
titleLabel.rect_size = Vector2(512, 107)
17+
titleLabel.autowrap = true
18+
titleLabel.text = \"Word Randomizer by Andrew Pozenel\"
19+
20+
21+
func _on_Button_pressed() -> void:
22+
23+
createLbl()
24+
RandomizeWords()
25+
26+
27+
pass # Replace with function body.
28+
29+
30+
31+
func RandomizeWords():
32+
33+
34+
35+
var words = [\"clarity\",\"vague\",\"vantage\", \"point\", \"tithe\", \"coerce\", \"aspire\", \"mundane\", \"sentient\", \"sentinel\", \"prime\", \"lucent\", \"lux\", \"tenebris\", \"edge\", \"sector\", \"adherent\", \"precept\", \"veil\", \"dormitory\", \"rift\", \"avail\", \"propagate\"]
36+
37+
38+
39+
randomize()
40+
41+
for word in words:
42+
43+
randomize()
44+
lbl.text = words[randi()%words.size()]
45+
46+
randomize()
47+
lbl2.text = words[randi()%words.size()]
48+
49+
50+
if lbl.text == lbl2.text:
51+
randomize()
52+
lbl.text = words[randi()%words.size()]
53+
lbl2.text = words[randi()%words.size()]
54+
55+
56+
if lbl2.text == lbl.text:
57+
randomize()
58+
lbl2.text = words[randi()%words.size()]
59+
lbl.text = words[randi()%words.size()]
60+
61+
62+
pass
63+
"
64+
65+
[node name="Control" type="Control"]
66+
anchor_right = 1.0
67+
anchor_bottom = 1.0
68+
script = SubResource( 1 )
69+
70+
[node name="Button" type="Button" parent="."]
71+
anchor_top = 1.0
72+
anchor_right = 1.0
73+
anchor_bottom = 1.0
74+
margin_top = -22.0
75+
text = "Randomize"
76+
expand_icon = true
77+
78+
[node name="Label" type="Label" parent="."]
79+
anchor_top = 0.5
80+
anchor_right = 1.0
81+
anchor_bottom = 0.5
82+
margin_left = 512.0
83+
margin_top = -10.0
84+
margin_right = -0.000488281
85+
margin_bottom = 97.0
86+
align = 1
87+
valign = 1
88+
autowrap = true
89+
90+
[node name="Label2" type="Label" parent="."]
91+
anchor_top = 0.5
92+
anchor_right = 1.0
93+
anchor_bottom = 0.5
94+
margin_top = -7.0
95+
margin_right = -512.0
96+
margin_bottom = 100.0
97+
align = 1
98+
valign = 1
99+
autowrap = true
100+
101+
[connection signal="pressed" from="Button" to="." method="_on_Button_pressed"]

Main.cs

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using Godot;
2+
using System;
3+
using System.IO;
4+
using System.Linq;
5+
6+
public class Main : Control
7+
{
8+
// Declare member variables here. Examples:
9+
// private int a = 2;
10+
// private string b = "text";
11+
12+
// Called when the node enters the scene tree for the first time.
13+
public override void _Ready()
14+
{
15+
16+
}
17+
18+
public void RandomizeWords(){
19+
20+
string[] words = {};
21+
22+
}
23+
24+
// // Called every frame. 'delta' is the elapsed time since the previous frame.
25+
// public override void _Process(float delta)
26+
// {
27+
//
28+
// }
29+
}

RandomWords.csproj

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project Sdk="Godot.NET.Sdk/3.3.0">
2+
<PropertyGroup>
3+
<TargetFramework>net472</TargetFramework>
4+
</PropertyGroup>
5+
</Project>

RandomWords.sln

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio 2012
3+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RandomWords", "RandomWords.csproj", "{24370064-1455-4F62-A4F8-B65DD003F5EE}"
4+
EndProject
5+
Global
6+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7+
Debug|Any CPU = Debug|Any CPU
8+
ExportDebug|Any CPU = ExportDebug|Any CPU
9+
ExportRelease|Any CPU = ExportRelease|Any CPU
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{24370064-1455-4F62-A4F8-B65DD003F5EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13+
{24370064-1455-4F62-A4F8-B65DD003F5EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
14+
{24370064-1455-4F62-A4F8-B65DD003F5EE}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
15+
{24370064-1455-4F62-A4F8-B65DD003F5EE}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
16+
{24370064-1455-4F62-A4F8-B65DD003F5EE}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
17+
{24370064-1455-4F62-A4F8-B65DD003F5EE}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
18+
EndGlobalSection
19+
EndGlobal

project.godot

+64-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,64 @@
1-
version https://git-lfs.github.com/spec/v1
2-
oid sha256:a1b362fa930ac7168597febe47669280ea811f33cc405fd2be2cf192dd839ce6
3-
size 1316
1+
; Engine configuration file.
2+
; It's best edited using the editor UI and not directly,
3+
; since the parameters that go here are not all obvious.
4+
;
5+
; Format:
6+
; [section] ; section goes between []
7+
; param=value ; assign values to parameters
8+
9+
config_version=4
10+
11+
[application]
12+
13+
config/name="RandomWords"
14+
run/main_scene="res://Control.tscn"
15+
run/low_processor_mode=true
16+
run/delta_sync_after_draw=true
17+
18+
[compression]
19+
20+
formats/zstd/long_distance_matching=true
21+
22+
[debug]
23+
24+
settings/stdout/verbose_stdout=true
25+
gdscript/completion/autocomplete_setters_and_getters=true
26+
27+
[display]
28+
29+
window/dpi/allow_hidpi=true
30+
window/vsync/use_vsync=false
31+
32+
[editor]
33+
34+
convert_text_resources_to_binary_on_export=true
35+
36+
[gui]
37+
38+
theme/use_hidpi=true
39+
40+
[input_devices]
41+
42+
buffering/agile_event_flushing=true
43+
pointing/emulate_touch_from_mouse=true
44+
45+
[logging]
46+
47+
file_logging/enable_file_logging.pc=false
48+
49+
[physics]
50+
51+
common/enable_pause_aware_picking=true
52+
3d/physics_engine="Bullet"
53+
54+
[rendering]
55+
56+
quality/driver/fallback_to_gles2=true
57+
2d/options/use_nvidia_rect_flicker_workaround=true
58+
quality/intended_usage/framebuffer_allocation=0
59+
quality/intended_usage/framebuffer_allocation.mobile=1
60+
2d/snapping/use_gpu_pixel_snap=true
61+
threads/thread_model=2
62+
threads/thread_safe_bvh=true
63+
quality/filters/use_nearest_mipmap_filter=true
64+
batching/precision/uv_contract=true

0 commit comments

Comments
 (0)