A dungeon delver roguelike using Pathfinder 2nd edition rules

Setting up start screen

+68 -12
+21 -5
data.go
··· 3 3 import ( 4 4 "fmt" 5 5 6 - "graphics.gd/classdb/Node" 6 + "graphics.gd/classdb/Control" 7 + "graphics.gd/classdb/Label" 8 + "graphics.gd/classdb/Button" 9 + "graphics.gd/classdb/SceneTree" 7 10 ) 8 11 9 - type Dungeoner struct { 10 - Node.Extension[Dungeoner] 12 + type DungeonerStart struct { 13 + Control.Extension[DungeonerStart] 14 + 15 + Title Label.Instance 16 + NewGame Button.Instance 17 + Quit Button.Instance 11 18 } 12 19 13 - func (p *Dungeoner) Ready() { 14 - fmt.Println("Hello world from Go!") 20 + func (ds *DungeonerStart) Ready() { 21 + ds.NewGame.AsBaseButton().OnPressed(ds.OnNewGamePressed) 22 + ds.Quit.AsBaseButton().OnPressed(ds.OnQuitPressed) 23 + } 24 + 25 + func (ds *DungeonerStart) OnNewGamePressed() { 26 + fmt.Println("new game") 27 + } 28 + 29 + func (ds *DungeonerStart) OnQuitPressed() { 30 + SceneTree.Get(ds.AsNode()).Quit() 15 31 }
-5
graphics/main.tscn
··· 1 - [gd_scene format=3 uid="uid://bmhmiv43fqo4c"] 2 - 3 - [node name="Node" type="Node"] 4 - 5 - [node name="Dungeoner" type="Dungeoner" parent="."]
+1 -1
graphics/project.godot
··· 11 11 [application] 12 12 13 13 config/name="dungeoner" 14 - run/main_scene="res://main.tscn" 14 + run/main_scene="res://start.tscn" 15 15 run/main_loop_type="GoMainLoop" 16 16 config/features=PackedStringArray("4.4") 17 17
+45
graphics/start.tscn
··· 1 + [gd_scene format=3 uid="uid://bmhmiv43fqo4c"] 2 + 3 + [node name="Node" type="Node"] 4 + 5 + [node name="DungeonerStart" type="DungeonerStart" parent="."] 6 + anchors_preset = 15 7 + anchor_right = 1.0 8 + anchor_bottom = 1.0 9 + grow_horizontal = 2 10 + grow_vertical = 2 11 + size_flags_horizontal = 3 12 + size_flags_vertical = 3 13 + 14 + [node name="Title" type="Label" parent="DungeonerStart"] 15 + layout_mode = 1 16 + anchors_preset = -1 17 + anchor_top = 0.366 18 + anchor_right = 1.0 19 + anchor_bottom = 0.401 20 + offset_bottom = -236.848 21 + grow_horizontal = 2 22 + text = "Dungeoner" 23 + horizontal_alignment = 1 24 + 25 + [node name="NewGame" type="Button" parent="DungeonerStart"] 26 + layout_mode = 1 27 + anchors_preset = -1 28 + anchor_left = 0.232 29 + anchor_top = 0.426 30 + anchor_right = 0.768 31 + anchor_bottom = 0.474 32 + grow_horizontal = 2 33 + text = "New Game 34 + " 35 + 36 + [node name="Quit" type="Button" parent="DungeonerStart"] 37 + layout_mode = 1 38 + anchors_preset = -1 39 + anchor_left = 0.232 40 + anchor_top = 0.499 41 + anchor_right = 0.768 42 + anchor_bottom = 0.547 43 + offset_bottom = -0.104004 44 + grow_horizontal = 2 45 + text = "Quit"
+1 -1
main.go
··· 6 6 ) 7 7 8 8 func main() { 9 - classdb.Register[Dungeoner]() 9 + classdb.Register[DungeonerStart]() 10 10 startup.Scene() 11 11 }