diff --git a/Doc/cheatsheet.jpg b/Doc/cheatsheet.jpg new file mode 100644 index 0000000..55956aa Binary files /dev/null and b/Doc/cheatsheet.jpg differ diff --git a/Doc/cheatsheet.jpg.import b/Doc/cheatsheet.jpg.import new file mode 100644 index 0000000..cc0c760 --- /dev/null +++ b/Doc/cheatsheet.jpg.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/cheatsheet.jpg-5aca443ec63d30c6a25cb0069c5edba1.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Doc/cheatsheet.jpg" +dest_files=[ "res://.import/cheatsheet.jpg-5aca443ec63d30c6a25cb0069c5edba1.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Prefabs/Settlement.tscn b/Prefabs/Settlement.tscn new file mode 100644 index 0000000..c06b2fd --- /dev/null +++ b/Prefabs/Settlement.tscn @@ -0,0 +1,7 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Assets/settlement.png" type="Texture" id=1] + +[node name="Settlement" type="Sprite"] +scale = Vector2( 0.0534854, 0.0534854 ) +texture = ExtResource( 1 ) diff --git a/Prefabs/StdBoard.tscn b/Prefabs/StdBoard.tscn index 231182c..eb85a04 100644 --- a/Prefabs/StdBoard.tscn +++ b/Prefabs/StdBoard.tscn @@ -13,3 +13,4 @@ distribution = { "mountains": 3, "pasture": 4 } +chits = [ 5, 2, 6, 3, 8, 10, 9, 12, 11, 4, 8, 10, 9, 4, 5, 6, 3, 11 ] diff --git a/Prefabs/StdExtBoard.tscn b/Prefabs/StdExtBoard.tscn index 8f01c10..fdc6252 100644 --- a/Prefabs/StdExtBoard.tscn +++ b/Prefabs/StdExtBoard.tscn @@ -13,3 +13,4 @@ distribution = { "mountains": 5, "pasture": 6 } +chits = [ 2, 5, 4, 6, 3, 9, 8, 11, 11, 10, 6, 3, 8, 4, 8, 10, 11, 12, 10, 5, 4, 9, 5, 9, 12, 3, 2, 6 ] diff --git a/Scenes/HUD.tscn b/Scenes/HUD.tscn new file mode 100644 index 0000000..8190e91 --- /dev/null +++ b/Scenes/HUD.tscn @@ -0,0 +1,22 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://Assets/white-1.png" type="Texture" id=1] +[ext_resource path="res://Assets/black-1.png" type="Texture" id=2] + +[node name="HUD" type="CanvasLayer"] + +[node name="Control" type="Control" parent="."] +anchor_left = 1.0 +anchor_right = 1.0 +margin_left = -307.0 +margin_bottom = 65.0 + +[node name="Dice1" type="Sprite" parent="Control"] +position = Vector2( 179.876, 32.8762 ) +scale = Vector2( 0.0621776, 0.0621776 ) +texture = ExtResource( 1 ) + +[node name="Dice2" type="Sprite" parent="Control"] +position = Vector2( 241.876, 32.8762 ) +scale = Vector2( 0.0621776, 0.0621776 ) +texture = ExtResource( 2 ) diff --git a/Scenes/Main.tscn b/Scenes/Main.tscn index b91db34..54b8185 100644 --- a/Scenes/Main.tscn +++ b/Scenes/Main.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://Scripts/GameCamera.gd" type="Script" id=1] [ext_resource path="res://Prefabs/StdBoard.tscn" type="PackedScene" id=2] +[ext_resource path="res://Scenes/HUD.tscn" type="PackedScene" id=3] [node name="Main" type="Node2D"] @@ -11,3 +12,5 @@ current = true zoom = Vector2( 2, 2 ) script = ExtResource( 1 ) + +[node name="HUD" parent="Camera2D" instance=ExtResource( 3 )] diff --git a/Scripts/Board.gd b/Scripts/Board.gd index 1d14805..490361a 100644 --- a/Scripts/Board.gd +++ b/Scripts/Board.gd @@ -16,6 +16,7 @@ export(Dictionary) var distribution = { "pasture": 0, "desert": 1, } +export(Array, int) var chits = [] func _ready(): var tiles = [] diff --git a/Scripts/GameCamera.gd b/Scripts/GameCamera.gd index db84376..b121aff 100644 --- a/Scripts/GameCamera.gd +++ b/Scripts/GameCamera.gd @@ -19,3 +19,13 @@ func _input(event): if event is InputEventMouseMotion: if pan: translate(-event.relative * zoom) + +func get_corner(corner): + return $Corners.get_node(str(corner)) + +func place_corner(corner, item): + get_corner(corner).add_child(item) + +func clear_corner(corner): + for child in get_corner(corner).get_children(): + child.queue_free()