commit 930253e01313e40293045b62637c4232e2aab487 Author: Yadciel Date: Mon Aug 19 09:33:32 2024 +0200 Initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..90b2857 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +# Godot 4+ specific ignores +.godot/ + +.idea/ diff --git a/GameScene.gd b/GameScene.gd new file mode 100644 index 0000000..04c17c5 --- /dev/null +++ b/GameScene.gd @@ -0,0 +1,247 @@ +extends Control + +var currentPlayer : int +var playerName : Label +var one : OptionButton +var two : OptionButton +var three : OptionButton +var four : OptionButton +var five : OptionButton +var six : OptionButton +var three_of_a_kind : OptionButton +var four_of_a_kind : OptionButton +var full_house : OptionButton +var small_straight : OptionButton +var large_straight : OptionButton +var yahtzee : Button +var chance : OptionButton +var bonus : Label +var score : Label + +# Called when the node enters the scene tree for the first time. +func _ready(): + currentPlayer = 0 + playerName = get_node("ScrollContainer/VBoxContainer/Panel/HBoxContainer/Label") + var players = Player_Manger.get_players() + if players.size() > 0: + playerName.text = players[currentPlayer].name + one = get_node("ScrollContainer/VBoxContainer/One/HBoxContainer/OptionButton") + two = get_node("ScrollContainer/VBoxContainer/Two/HBoxContainer/OptionButton") + three = get_node("ScrollContainer/VBoxContainer/Three/HBoxContainer/OptionButton") + four = get_node("ScrollContainer/VBoxContainer/Four/HBoxContainer/OptionButton") + five = get_node("ScrollContainer/VBoxContainer/Five/HBoxContainer/OptionButton") + six = get_node("ScrollContainer/VBoxContainer/Six/HBoxContainer/OptionButton") + three_of_a_kind = get_node("ScrollContainer/VBoxContainer/Three_of_a_kind/HBoxContainer/OptionButton") + add_items(three_of_a_kind) + four_of_a_kind = get_node("ScrollContainer/VBoxContainer/Four_of_a_Kind/HBoxContainer/OptionButton") + add_items(four_of_a_kind) + full_house = get_node("ScrollContainer/VBoxContainer/Full_House/HBoxContainer/OptionButton") + full_house.add_item("") + full_house.add_item("25") + small_straight = get_node("ScrollContainer/VBoxContainer/Small_Straight/HBoxContainer/OptionButton") + add_items_to_small_straight(small_straight) + large_straight = get_node("ScrollContainer/VBoxContainer/Large_Straight/HBoxContainer/OptionButton") + add_items_to_small_straight(large_straight) + yahtzee = get_node("ScrollContainer/VBoxContainer/yahtzee/HBoxContainer/ButtonYahtzee") + bonus = get_node("ScrollContainer/VBoxContainer/Bonus/HBoxContainer/LabelScore") + chance = get_node("ScrollContainer/VBoxContainer/chance/HBoxContainer/OptionButton") + add_items(chance) + score = get_node("ScrollContainer/VBoxContainer/Score/HBoxContainer/LabelScore") + pass # Replace with function body. + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + calc_bonus() + calc_score() + pass + +func _on_button_right_pressed(): + save() + var players = Player_Manger.get_players() + currentPlayer += 1 + if currentPlayer >= players.size(): + currentPlayer = 0 + playerName.text = players[currentPlayer].name + load_stats() + pass # Replace with function body. + +func calc_bonus(): + var players = Player_Manger.get_players() + var total = 0 + total += int(int(one.get_item_text(one.get_selected_id())) + + int(two.get_item_text(two.get_selected_id())) + + int(three.get_item_text(three.get_selected_id())) + + int(four.get_item_text(four.get_selected_id())) + + int(five.get_item_text(five.get_selected_id())) + + int(six.get_item_text(six.get_selected_id()))) + if total >= 63: + players[currentPlayer].bonus = 35 + bonus.text = "35" + else: + players[currentPlayer].bonus = 0 + bonus.text = "0" + +func calc_score(): + var players = Player_Manger.get_players() + players[currentPlayer].score = (int(one.get_item_text(one.get_selected_id())) + + int(two.get_item_text(two.get_selected_id())) + + int(three.get_item_text(three.get_selected_id())) + + int(four.get_item_text(four.get_selected_id())) + + int(five.get_item_text(five.get_selected_id())) + + int(six.get_item_text(six.get_selected_id())) + + int(three_of_a_kind.get_item_text(three_of_a_kind.get_selected_id())) + + int(four_of_a_kind.get_item_text(four_of_a_kind.get_selected_id())) + + int(full_house.get_item_text(full_house.get_selected_id())) + + int(small_straight.get_item_text(small_straight.get_selected_id())) + + int(large_straight.get_item_text(large_straight.get_selected_id())) + + int(yahtzee.text) + + int(chance.get_item_text(chance.get_selected_id())) + + int(bonus.text)) + score.text = str(players[currentPlayer].score) + +func load_stats(): + var players = Player_Manger.get_players() + one.select(players[currentPlayer].one) + two.select(players[currentPlayer].two) + three.select(players[currentPlayer].three) + four.select(players[currentPlayer].four) + five.select(players[currentPlayer].five) + six.select(players[currentPlayer].six) + three_of_a_kind.select(players[currentPlayer].three_of_a_kind) + four_of_a_kind.select(players[currentPlayer].four_of_a_kind) + full_house.select(players[currentPlayer].full_house) + small_straight.select(players[currentPlayer].small_straight) + large_straight.select(players[currentPlayer].large_straight) + yahtzee.text = str(players[currentPlayer].yahtzee) + chance.set_item_text(0, str(players[currentPlayer].chance)) + bonus.text = str(players[currentPlayer].bonus) + pass + +func save(): + var players = Player_Manger.get_players() + players[currentPlayer].one = one.get_selected_id() + players[currentPlayer].two = two.get_selected_id() + players[currentPlayer].three = three.get_selected_id() + players[currentPlayer].four = four.get_selected_id() + players[currentPlayer].five = five.get_selected_id() + players[currentPlayer].six = six.get_selected_id() + players[currentPlayer].three_of_a_kind = int(three_of_a_kind.get_selected_id()) + players[currentPlayer].four_of_a_kind = int(four_of_a_kind.get_selected_id()) + players[currentPlayer].full_house = int(full_house.get_selected_id()) + players[currentPlayer].small_straight = int(small_straight.get_selected_id()) + players[currentPlayer].large_straight = int(large_straight.get_selected_id()) + players[currentPlayer].yahtzee = int(yahtzee.text) + players[currentPlayer].bonus = int(bonus.text) + players[currentPlayer].score = players[currentPlayer].one + players[currentPlayer].two + players[currentPlayer].three + players[currentPlayer].four + players[currentPlayer].five + players[currentPlayer].six + players[currentPlayer].three_of_a_kind + players[currentPlayer].four_of_a_kind + players[currentPlayer].full_house + players[currentPlayer].small_straight + players[currentPlayer].large_straight + players[currentPlayer].yahtzee + players[currentPlayer].chance + players[currentPlayer].bonus + pass + +func _on_button_left_pressed(): + save() + var players = Player_Manger.get_players() + currentPlayer -= 1 + if currentPlayer < 0: + currentPlayer = players.size() - 1 + playerName.text = players[currentPlayer].name + load_stats() + pass # Replace with function body. + +func add_items_to_small_straight(oButton: OptionButton): + oButton.add_item("") + oButton.add_item("30") + pass # Replace with function body. + +func add_items_to_large_straight(oButton: OptionButton): + oButton.add_item("") + oButton.add_item("40") + pass # Replace with function body. +func add_items(oButton: OptionButton): + oButton.add_item("") + oButton.add_item("0") + oButton.add_item("1") + oButton.add_item("2") + oButton.add_item("3") + oButton.add_item("4") + oButton.add_item("5") + oButton.add_item("6") + oButton.add_item("7") + oButton.add_item("8") + oButton.add_item("9") + oButton.add_item("10") + oButton.add_item("11") + oButton.add_item("12") + oButton.add_item("13") + oButton.add_item("14") + oButton.add_item("15") + oButton.add_item("16") + oButton.add_item("17") + oButton.add_item("18") + oButton.add_item("19") + oButton.add_item("20") + oButton.add_item("21") + oButton.add_item("22") + oButton.add_item("23") + oButton.add_item("24") + oButton.add_item("25") + oButton.add_item("26") + oButton.add_item("27") + oButton.add_item("28") + oButton.add_item("29") + oButton.add_item("30") + oButton.add_item("31") + oButton.add_item("32") + oButton.add_item("33") + oButton.add_item("34") + oButton.add_item("35") + oButton.add_item("36") + oButton.add_item("37") + oButton.add_item("38") + oButton.add_item("39") + oButton.add_item("40") + oButton.add_item("41") + oButton.add_item("42") + oButton.add_item("43") + oButton.add_item("44") + oButton.add_item("45") + oButton.add_item("46") + oButton.add_item("47") + oButton.add_item("48") + oButton.add_item("49") + oButton.add_item("50") + oButton.add_item("51") + oButton.add_item("52") + oButton.add_item("53") + oButton.add_item("54") + oButton.add_item("55") + oButton.add_item("56") + oButton.add_item("57") + oButton.add_item("58") + oButton.add_item("59") + oButton.add_item("60") + oButton.add_item("61") + oButton.add_item("62") + oButton.add_item("63") + oButton.add_item("64") + oButton.add_item("65") + oButton.add_item("66") + oButton.add_item("67") + oButton.add_item("68") + oButton.add_item("69") + oButton.add_item("70") + pass # Replace with function body. + + +func _on_button_yahtzee_pressed(): + Player_Manger.get_players()[currentPlayer].yahtzee += 50 + yahtzee.text = str(Player_Manger.get_players()[currentPlayer].yahtzee) + pass # Replace with function body. + + +func _on_button_yahtzee_minus_pressed(): + Player_Manger.get_players()[currentPlayer].yahtzee -= 50 + yahtzee.text = str(Player_Manger.get_players()[currentPlayer].yahtzee) + pass # Replace with function body. + + +func _on_button_end_pressed(): + get_tree().change_scene_to_file("res://MainMenu.tscn") + pass # Replace with function body. diff --git a/GameScene.tscn b/GameScene.tscn new file mode 100644 index 0000000..8ce54b9 --- /dev/null +++ b/GameScene.tscn @@ -0,0 +1,691 @@ +[gd_scene load_steps=3 format=3 uid="uid://bowvqy1rx2ldx"] + +[ext_resource type="Script" path="res://GameScene.gd" id="1_kyoq5"] +[ext_resource type="Script" path="res://ScrollContainer.gd" id="2_xxo3x"] + +[node name="Control" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_kyoq5") + +[node name="ColorRect" type="ColorRect" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.113725, 0.133333, 0.160784, 1) + +[node name="ButtonEnd" type="Button" parent="."] +layout_mode = 0 +offset_left = 564.0 +offset_top = 20.0 +offset_right = 1064.0 +offset_bottom = 186.0 +theme_override_font_sizes/font_size = 100 +text = "End Game" + +[node name="ScrollContainer" type="ScrollContainer" parent="."] +layout_mode = 1 +anchors_preset = -1 +anchor_top = 0.107 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = -1.44002 +offset_right = 8.0 +grow_horizontal = 2 +grow_vertical = 2 +follow_focus = true +horizontal_scroll_mode = 0 +script = ExtResource("2_xxo3x") + +[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer"] +custom_minimum_size = Vector2(1080, 1714) +layout_mode = 2 + +[node name="Panel" type="Panel" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(0, 160) +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/Panel"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 50 +alignment = 1 + +[node name="ButtonLeft" type="Button" parent="ScrollContainer/VBoxContainer/Panel/HBoxContainer"] +custom_minimum_size = Vector2(100, 0) +layout_mode = 2 +theme_override_font_sizes/font_size = 100 +text = "<" + +[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/Panel/HBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 110 +text = "Player" + +[node name="ButtonRight" type="Button" parent="ScrollContainer/VBoxContainer/Panel/HBoxContainer"] +custom_minimum_size = Vector2(100, 0) +layout_mode = 2 +theme_override_font_sizes/font_size = 100 +text = ">" + +[node name="One" type="Panel" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(1080, 150) +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/One"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -1.0 +offset_top = 1.0 +offset_right = -1.0 +offset_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 500 +alignment = 1 + +[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/One/HBoxContainer"] +custom_minimum_size = Vector2(200, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 70 +text = "One" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="OptionButton" type="OptionButton" parent="ScrollContainer/VBoxContainer/One/HBoxContainer"] +custom_minimum_size = Vector2(250, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 50 +alignment = 1 +clip_text = true +item_count = 6 +allow_reselect = true +popup/item_0/text = "-" +popup/item_0/id = 0 +popup/item_1/text = "1" +popup/item_1/id = 1 +popup/item_2/text = "2" +popup/item_2/id = 2 +popup/item_3/text = "3" +popup/item_3/id = 3 +popup/item_4/text = "4" +popup/item_4/id = 4 +popup/item_5/text = "5" +popup/item_5/id = 5 + +[node name="Two" type="Panel" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(1080, 150) +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/Two"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -1.0 +offset_top = 1.0 +offset_right = -1.0 +offset_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 500 +alignment = 1 + +[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/Two/HBoxContainer"] +custom_minimum_size = Vector2(200, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 70 +text = "Two" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="OptionButton" type="OptionButton" parent="ScrollContainer/VBoxContainer/Two/HBoxContainer"] +custom_minimum_size = Vector2(250, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 50 +alignment = 1 +clip_text = true +item_count = 6 +allow_reselect = true +popup/item_0/text = "-" +popup/item_0/id = 0 +popup/item_1/text = "2" +popup/item_1/id = 1 +popup/item_2/text = "4" +popup/item_2/id = 2 +popup/item_3/text = "6" +popup/item_3/id = 3 +popup/item_4/text = "8" +popup/item_4/id = 4 +popup/item_5/text = "10" +popup/item_5/id = 5 + +[node name="Three" type="Panel" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(1080, 150) +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/Three"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -1.0 +offset_top = 1.0 +offset_right = -1.0 +offset_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 500 +alignment = 1 + +[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/Three/HBoxContainer"] +custom_minimum_size = Vector2(200, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 70 +text = "Three" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="OptionButton" type="OptionButton" parent="ScrollContainer/VBoxContainer/Three/HBoxContainer"] +custom_minimum_size = Vector2(250, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 50 +alignment = 1 +clip_text = true +item_count = 6 +allow_reselect = true +popup/item_0/text = "-" +popup/item_0/id = 0 +popup/item_1/text = "3" +popup/item_1/id = 1 +popup/item_2/text = "6" +popup/item_2/id = 2 +popup/item_3/text = "9" +popup/item_3/id = 3 +popup/item_4/text = "12" +popup/item_4/id = 4 +popup/item_5/text = "15" +popup/item_5/id = 5 + +[node name="Four" type="Panel" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(1080, 150) +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/Four"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -1.0 +offset_top = 1.0 +offset_right = -1.0 +offset_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 500 +alignment = 1 + +[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/Four/HBoxContainer"] +custom_minimum_size = Vector2(200, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 70 +text = "Four" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="OptionButton" type="OptionButton" parent="ScrollContainer/VBoxContainer/Four/HBoxContainer"] +custom_minimum_size = Vector2(250, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 50 +alignment = 1 +clip_text = true +item_count = 6 +allow_reselect = true +popup/item_0/text = "-" +popup/item_0/id = 0 +popup/item_1/text = "4" +popup/item_1/id = 1 +popup/item_2/text = "8" +popup/item_2/id = 2 +popup/item_3/text = "12" +popup/item_3/id = 3 +popup/item_4/text = "16" +popup/item_4/id = 4 +popup/item_5/text = "20" +popup/item_5/id = 5 + +[node name="Five" type="Panel" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(1080, 150) +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/Five"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -1.0 +offset_top = 1.0 +offset_right = -1.0 +offset_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 500 +alignment = 1 + +[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/Five/HBoxContainer"] +custom_minimum_size = Vector2(200, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 70 +text = "Five" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="OptionButton" type="OptionButton" parent="ScrollContainer/VBoxContainer/Five/HBoxContainer"] +custom_minimum_size = Vector2(250, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 50 +alignment = 1 +clip_text = true +item_count = 6 +allow_reselect = true +popup/item_0/text = "-" +popup/item_0/id = 0 +popup/item_1/text = "5" +popup/item_1/id = 1 +popup/item_2/text = "10" +popup/item_2/id = 2 +popup/item_3/text = "15" +popup/item_3/id = 3 +popup/item_4/text = "20" +popup/item_4/id = 4 +popup/item_5/text = "25" +popup/item_5/id = 5 + +[node name="Six" type="Panel" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(1080, 150) +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/Six"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -1.0 +offset_top = 1.0 +offset_right = -1.0 +offset_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 500 +alignment = 1 + +[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/Six/HBoxContainer"] +custom_minimum_size = Vector2(200, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 70 +text = "Six +" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="OptionButton" type="OptionButton" parent="ScrollContainer/VBoxContainer/Six/HBoxContainer"] +custom_minimum_size = Vector2(250, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 50 +alignment = 1 +clip_text = true +item_count = 6 +allow_reselect = true +popup/item_0/text = "-" +popup/item_0/id = 0 +popup/item_1/text = "6" +popup/item_1/id = 1 +popup/item_2/text = "12" +popup/item_2/id = 2 +popup/item_3/text = "18" +popup/item_3/id = 3 +popup/item_4/text = "24" +popup/item_4/id = 4 +popup/item_5/text = "30" +popup/item_5/id = 5 + +[node name="Bonus" type="Panel" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(0, 150) +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/Bonus"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 250 +alignment = 1 + +[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/Bonus/HBoxContainer"] +custom_minimum_size = Vector2(400, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 100 +text = "Bonus:" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="LabelScore" type="Label" parent="ScrollContainer/VBoxContainer/Bonus/HBoxContainer"] +custom_minimum_size = Vector2(400, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 100 +text = "-63" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="Three_of_a_kind" type="Panel" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(1080, 150) +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/Three_of_a_kind"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -1.0 +offset_top = 1.0 +offset_right = -1.0 +offset_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 200 +alignment = 1 + +[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/Three_of_a_kind/HBoxContainer"] +custom_minimum_size = Vector2(200, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 70 +text = "Three of a kind" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="OptionButton" type="OptionButton" parent="ScrollContainer/VBoxContainer/Three_of_a_kind/HBoxContainer"] +custom_minimum_size = Vector2(250, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 50 +alignment = 1 +clip_text = true +item_count = 1 +allow_reselect = true +popup/item_0/text = "-" +popup/item_0/id = 0 + +[node name="Four_of_a_Kind" type="Panel" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(1080, 150) +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/Four_of_a_Kind"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -1.0 +offset_top = 1.0 +offset_right = -1.0 +offset_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 237 +alignment = 1 + +[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/Four_of_a_Kind/HBoxContainer"] +custom_minimum_size = Vector2(200, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 70 +text = "Four of a kind" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="OptionButton" type="OptionButton" parent="ScrollContainer/VBoxContainer/Four_of_a_Kind/HBoxContainer"] +custom_minimum_size = Vector2(250, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 50 +alignment = 1 +clip_text = true +item_count = 1 +allow_reselect = true +popup/item_0/text = "-" +popup/item_0/id = 0 + +[node name="Full_House" type="Panel" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(1080, 150) +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/Full_House"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -1.0 +offset_top = 1.0 +offset_right = -1.0 +offset_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 350 +alignment = 1 + +[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/Full_House/HBoxContainer"] +custom_minimum_size = Vector2(200, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 70 +text = "Full House" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="OptionButton" type="OptionButton" parent="ScrollContainer/VBoxContainer/Full_House/HBoxContainer"] +custom_minimum_size = Vector2(250, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 50 +alignment = 1 +clip_text = true +item_count = 1 +allow_reselect = true +popup/item_0/text = "-" +popup/item_0/id = 0 + +[node name="Small_Straight" type="Panel" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(1080, 150) +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/Small_Straight"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -1.0 +offset_top = 1.0 +offset_right = -1.0 +offset_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 237 +alignment = 1 + +[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/Small_Straight/HBoxContainer"] +custom_minimum_size = Vector2(200, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 70 +text = "Small Straight" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="OptionButton" type="OptionButton" parent="ScrollContainer/VBoxContainer/Small_Straight/HBoxContainer"] +custom_minimum_size = Vector2(250, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 50 +alignment = 1 +clip_text = true +item_count = 1 +allow_reselect = true +popup/item_0/text = "-" +popup/item_0/id = 0 + +[node name="Large_Straight" type="Panel" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(1080, 150) +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/Large_Straight"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -1.0 +offset_top = 1.0 +offset_right = -1.0 +offset_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 237 +alignment = 1 + +[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/Large_Straight/HBoxContainer"] +custom_minimum_size = Vector2(200, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 70 +text = "Large Straight" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="OptionButton" type="OptionButton" parent="ScrollContainer/VBoxContainer/Large_Straight/HBoxContainer"] +custom_minimum_size = Vector2(250, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 50 +alignment = 1 +clip_text = true +item_count = 1 +allow_reselect = true +popup/item_0/text = "-" +popup/item_0/id = 0 + +[node name="yahtzee" type="Panel" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(1080, 150) +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/yahtzee"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -1.0 +offset_top = 1.0 +offset_right = -1.0 +offset_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 100 +alignment = 1 + +[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/yahtzee/HBoxContainer"] +custom_minimum_size = Vector2(200, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 70 +text = "Yahtzee +" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="ButtonYahtzeeMinus" type="Button" parent="ScrollContainer/VBoxContainer/yahtzee/HBoxContainer"] +custom_minimum_size = Vector2(250, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 50 +text = "-" +clip_text = true + +[node name="ButtonYahtzee" type="Button" parent="ScrollContainer/VBoxContainer/yahtzee/HBoxContainer"] +custom_minimum_size = Vector2(250, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 50 +clip_text = true + +[node name="chance" type="Panel" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(1080, 150) +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/chance"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -1.0 +offset_top = 1.0 +offset_right = -1.0 +offset_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 460 +alignment = 1 + +[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/chance/HBoxContainer"] +custom_minimum_size = Vector2(200, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 70 +text = "Chance" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="OptionButton" type="OptionButton" parent="ScrollContainer/VBoxContainer/chance/HBoxContainer"] +custom_minimum_size = Vector2(250, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 50 +alignment = 1 +clip_text = true +item_count = 1 +allow_reselect = true +popup/item_0/text = "-" +popup/item_0/id = 0 + +[node name="Score" type="Panel" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(0, 150) +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/Score"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/separation = 250 +alignment = 1 + +[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/Score/HBoxContainer"] +custom_minimum_size = Vector2(400, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 100 +text = "Score:" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="LabelScore" type="Label" parent="ScrollContainer/VBoxContainer/Score/HBoxContainer"] +custom_minimum_size = Vector2(400, 150) +layout_mode = 2 +theme_override_font_sizes/font_size = 100 +text = "0" +horizontal_alignment = 1 +vertical_alignment = 1 + +[connection signal="pressed" from="ButtonEnd" to="." method="_on_button_end_pressed"] +[connection signal="pressed" from="ScrollContainer/VBoxContainer/Panel/HBoxContainer/ButtonLeft" to="." method="_on_button_left_pressed"] +[connection signal="pressed" from="ScrollContainer/VBoxContainer/Panel/HBoxContainer/ButtonRight" to="." method="_on_button_right_pressed"] +[connection signal="pressed" from="ScrollContainer/VBoxContainer/yahtzee/HBoxContainer/ButtonYahtzeeMinus" to="." method="_on_button_yahtzee_minus_pressed"] +[connection signal="pressed" from="ScrollContainer/VBoxContainer/yahtzee/HBoxContainer/ButtonYahtzee" to="." method="_on_button_yahtzee_pressed"] diff --git a/Kniffel.apk b/Kniffel.apk new file mode 100644 index 0000000..3110a19 Binary files /dev/null and b/Kniffel.apk differ diff --git a/Kniffel.apk.idsig b/Kniffel.apk.idsig new file mode 100644 index 0000000..b3f8685 Binary files /dev/null and b/Kniffel.apk.idsig differ diff --git a/MaiD4BD.tmp b/MaiD4BD.tmp new file mode 100644 index 0000000..cbc480f --- /dev/null +++ b/MaiD4BD.tmp @@ -0,0 +1,66 @@ +[gd_scene load_steps=2 format=3 uid="uid://bnx03xo45brr1"] + +[ext_resource type="Script" path="res://MainMenu.gd" id="1_5nykg"] + +[node name="Control" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_5nykg") + +[node name="ColorRect" type="ColorRect" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.113725, 0.133333, 0.160784, 1) + +[node name="Label" type="Label" parent="."] +layout_mode = 2 +offset_top = 1.0 +offset_right = 2160.0 +offset_bottom = 405.0 +theme_override_font_sizes/font_size = 250 +text = "Kniffel +" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="ScrollContainer" type="ScrollContainer" parent="."] +layout_mode = 1 +anchors_preset = -1 +anchor_top = 0.102 +anchor_right = 1.0 +anchor_bottom = 0.102 +offset_top = -7.68002 +offset_bottom = 2979.32 + +[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer"] +custom_minimum_size = Vector2(2160, 2995) +layout_mode = 2 +theme_override_constants/separation = 30 + +[node name="Button" type="Button" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(0, 350) +layout_mode = 2 +theme_override_font_sizes/font_size = 120 +text = "Add Player" + +[node name="Button" type="Button" parent="."] +layout_mode = 1 +anchors_preset = 12 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = -462.0 +grow_horizontal = 2 +grow_vertical = 0 +theme_override_font_sizes/font_size = 250 +text = "Play" + +[connection signal="pressed" from="ScrollContainer/VBoxContainer/Button" to="." method="_on_button_pressed"] diff --git a/MainMenu.gd b/MainMenu.gd new file mode 100644 index 0000000..efa3cb7 --- /dev/null +++ b/MainMenu.gd @@ -0,0 +1,50 @@ +extends Control + +var PlayerList : VBoxContainer +var PlayerPanel : PackedScene +var GameScene + +# Called when the node enters the scene tree for the first time. +func _ready(): + PlayerList = get_node("ScrollContainer/VBoxContainer") + PlayerPanel = load("res://PlayerPanel.tscn") + GameScene = preload("res://GameScene.tscn").instantiate() + Player_Manger.clear_players() + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass + + +func _on_button_pressed(): + var player = PlayerPanel.instantiate() + var player_name : TextEdit = player.get_child(0) + if player_name != null: + player_name.text = "Player " + str(PlayerList.get_child_count() + 1) + player_name.connect("text_changed", Callable(self, "_on_text_changed")) + PlayerList.add_child(player) + else: + print("Error: player_name is null") + pass # Replace with function body. + +func _on_text_changed(): + var players = PlayerList.get_children() + for player in players: + var player_name : TextEdit = player.get_child(0) + if player_name != null and player_name.text == "": + return + pass # Replace with function body. + +func _on_button_play_pressed(): + var players = PlayerList.get_children() + for player in players: + var player_name : TextEdit = player.get_child(0) + if player_name != null: + var player_instance = Player.new(player_name.text) + Player_Manger.add_player(player_instance) + else: + print("Error: player_name is null") + get_tree().change_scene_to_file("res://GameScene.tscn") + pass # Replace with function body. diff --git a/MainMenu.tscn b/MainMenu.tscn new file mode 100644 index 0000000..1ea7911 --- /dev/null +++ b/MainMenu.tscn @@ -0,0 +1,67 @@ +[gd_scene load_steps=2 format=3 uid="uid://bnx03xo45brr1"] + +[ext_resource type="Script" path="res://MainMenu.gd" id="1_5nykg"] + +[node name="Control" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_5nykg") + +[node name="ColorRect" type="ColorRect" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0.113725, 0.133333, 0.160784, 1) + +[node name="Label" type="Label" parent="."] +layout_mode = 2 +offset_top = 1.0 +offset_right = 1081.0 +offset_bottom = 172.0 +theme_override_font_sizes/font_size = 125 +text = "Kniffel +" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="ScrollContainer" type="ScrollContainer" parent="."] +layout_mode = 1 +anchors_preset = -1 +anchor_top = 0.102 +anchor_right = 1.0 +anchor_bottom = 0.102 +offset_top = -7.84001 +offset_bottom = 1255.16 + +[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer"] +custom_minimum_size = Vector2(1080, 1526) +layout_mode = 2 +theme_override_constants/separation = 30 + +[node name="Button" type="Button" parent="ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(0, 175) +layout_mode = 2 +theme_override_font_sizes/font_size = 120 +text = "Add Player" + +[node name="Button" type="Button" parent="."] +layout_mode = 1 +anchors_preset = 12 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = -203.0 +grow_horizontal = 2 +grow_vertical = 0 +theme_override_font_sizes/font_size = 100 +text = "Play" + +[connection signal="pressed" from="ScrollContainer/VBoxContainer/Button" to="." method="_on_button_pressed"] +[connection signal="pressed" from="Button" to="." method="_on_button_play_pressed"] diff --git a/Player.gd b/Player.gd new file mode 100644 index 0000000..d741099 --- /dev/null +++ b/Player.gd @@ -0,0 +1,39 @@ +class_name Player + +var name: String +var one : int +var two : int +var three : int +var four : int +var five : int +var six : int +var three_of_a_kind : int +var four_of_a_kind : int +var full_house : int +var small_straight : int +var large_straight : int +var yahtzee : int +var chance : int +var bonus : int +var score: int + +func _init(name: String): + self.name = name + self.one = 0 + self.two = 0 + self.three = 0 + self.four = 0 + self.five = 0 + self.six = 0 + self.three_of_a_kind = 0 + self.four_of_a_kind = 0 + self.full_house = 0 + self.small_straight = 0 + self.large_straight = 0 + self.yahtzee = 0 + self.chance = 0 + self.bonus = 0 + self.score = 0 + +func change_name(name: String): + self.name = name diff --git a/PlayerManager.gd b/PlayerManager.gd new file mode 100644 index 0000000..094083d --- /dev/null +++ b/PlayerManager.gd @@ -0,0 +1,14 @@ +extends Node + +class_name PlayerManager + +var players: Array = [] + +func add_player(player: Player): + players.append(player) + +func get_players() -> Array: + return players + +func clear_players(): + players.clear() diff --git a/PlayerPanel.tscn b/PlayerPanel.tscn new file mode 100644 index 0000000..33a9845 --- /dev/null +++ b/PlayerPanel.tscn @@ -0,0 +1,16 @@ +[gd_scene format=3 uid="uid://ceua4rd0na8jl"] + +[node name="Panel" type="Panel"] +custom_minimum_size = Vector2(1080, 125) +offset_right = 40.0 +offset_bottom = 40.0 + +[node name="Label" type="TextEdit" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_font_sizes/font_size = 60 +text = "Player" diff --git a/README.md b/README.md new file mode 100644 index 0000000..cff685e --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Kniffel diff --git a/ScrollContainer.gd b/ScrollContainer.gd new file mode 100644 index 0000000..e30fded --- /dev/null +++ b/ScrollContainer.gd @@ -0,0 +1,18 @@ +extends ScrollContainer + +var dragging = false +var drag_start_position = Vector2() +var scroll_start_position = Vector2() + +func _input(event): + if event is InputEventMouseButton or event is InputEventScreenTouch: + if event.pressed: + dragging = true + drag_start_position = event.position + scroll_start_position = Vector2(get_h_scroll(), get_v_scroll()) + else: + dragging = false + elif dragging and (event is InputEventMouseMotion or event is InputEventScreenDrag): + var delta = event.position - drag_start_position + set_h_scroll(scroll_start_position.x - delta.x) + set_v_scroll(scroll_start_position.y - delta.y) diff --git a/android export/yahtzee.keystore b/android export/yahtzee.keystore new file mode 100644 index 0000000..1d9468e Binary files /dev/null and b/android export/yahtzee.keystore differ diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..880b628 --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,202 @@ +[preset.0] + +name="Android" +platform="Android" +runnable=true +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="./Kniffel.apk" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +gradle_build/use_gradle_build=false +gradle_build/export_format=0 +gradle_build/min_sdk="" +gradle_build/target_sdk="" +architectures/armeabi-v7a=false +architectures/arm64-v8a=true +architectures/x86=true +architectures/x86_64=false +version/code=1 +version/name="" +package/unique_name="com.example.$genname" +package/name="" +package/signed=true +package/app_category=2 +package/retain_data_on_uninstall=false +package/exclude_from_recents=false +package/show_in_android_tv=false +package/show_in_app_library=true +package/show_as_launcher_app=false +launcher_icons/main_192x192="" +launcher_icons/adaptive_foreground_432x432="" +launcher_icons/adaptive_background_432x432="" +graphics/opengl_debug=false +xr_features/xr_mode=0 +screen/immersive_mode=true +screen/support_small=true +screen/support_normal=true +screen/support_large=true +screen/support_xlarge=true +user_data_backup/allow=false +command_line/extra_args="" +apk_expansion/enable=false +apk_expansion/SALT="" +apk_expansion/public_key="" +permissions/custom_permissions=PackedStringArray() +permissions/access_checkin_properties=false +permissions/access_coarse_location=false +permissions/access_fine_location=false +permissions/access_location_extra_commands=false +permissions/access_mock_location=false +permissions/access_network_state=false +permissions/access_surface_flinger=false +permissions/access_wifi_state=false +permissions/account_manager=false +permissions/add_voicemail=false +permissions/authenticate_accounts=false +permissions/battery_stats=false +permissions/bind_accessibility_service=false +permissions/bind_appwidget=false +permissions/bind_device_admin=false +permissions/bind_input_method=false +permissions/bind_nfc_service=false +permissions/bind_notification_listener_service=false +permissions/bind_print_service=false +permissions/bind_remoteviews=false +permissions/bind_text_service=false +permissions/bind_vpn_service=false +permissions/bind_wallpaper=false +permissions/bluetooth=false +permissions/bluetooth_admin=false +permissions/bluetooth_privileged=false +permissions/brick=false +permissions/broadcast_package_removed=false +permissions/broadcast_sms=false +permissions/broadcast_sticky=false +permissions/broadcast_wap_push=false +permissions/call_phone=false +permissions/call_privileged=false +permissions/camera=false +permissions/capture_audio_output=false +permissions/capture_secure_video_output=false +permissions/capture_video_output=false +permissions/change_component_enabled_state=false +permissions/change_configuration=false +permissions/change_network_state=false +permissions/change_wifi_multicast_state=false +permissions/change_wifi_state=false +permissions/clear_app_cache=false +permissions/clear_app_user_data=false +permissions/control_location_updates=false +permissions/delete_cache_files=false +permissions/delete_packages=false +permissions/device_power=false +permissions/diagnostic=false +permissions/disable_keyguard=false +permissions/dump=false +permissions/expand_status_bar=false +permissions/factory_test=false +permissions/flashlight=false +permissions/force_back=false +permissions/get_accounts=false +permissions/get_package_size=false +permissions/get_tasks=false +permissions/get_top_activity_info=false +permissions/global_search=false +permissions/hardware_test=false +permissions/inject_events=false +permissions/install_location_provider=false +permissions/install_packages=false +permissions/install_shortcut=false +permissions/internal_system_window=false +permissions/internet=false +permissions/kill_background_processes=false +permissions/location_hardware=false +permissions/manage_accounts=false +permissions/manage_app_tokens=false +permissions/manage_documents=false +permissions/manage_external_storage=false +permissions/master_clear=false +permissions/media_content_control=false +permissions/modify_audio_settings=false +permissions/modify_phone_state=false +permissions/mount_format_filesystems=false +permissions/mount_unmount_filesystems=false +permissions/nfc=false +permissions/persistent_activity=false +permissions/post_notifications=false +permissions/process_outgoing_calls=false +permissions/read_calendar=false +permissions/read_call_log=false +permissions/read_contacts=false +permissions/read_external_storage=false +permissions/read_frame_buffer=false +permissions/read_history_bookmarks=false +permissions/read_input_state=false +permissions/read_logs=false +permissions/read_phone_state=false +permissions/read_profile=false +permissions/read_sms=false +permissions/read_social_stream=false +permissions/read_sync_settings=false +permissions/read_sync_stats=false +permissions/read_user_dictionary=false +permissions/reboot=false +permissions/receive_boot_completed=false +permissions/receive_mms=false +permissions/receive_sms=false +permissions/receive_wap_push=false +permissions/record_audio=false +permissions/reorder_tasks=false +permissions/restart_packages=false +permissions/send_respond_via_message=false +permissions/send_sms=false +permissions/set_activity_watcher=false +permissions/set_alarm=false +permissions/set_always_finish=false +permissions/set_animation_scale=false +permissions/set_debug_app=false +permissions/set_orientation=false +permissions/set_pointer_speed=false +permissions/set_preferred_applications=false +permissions/set_process_limit=false +permissions/set_time=false +permissions/set_time_zone=false +permissions/set_wallpaper=false +permissions/set_wallpaper_hints=false +permissions/signal_persistent_processes=false +permissions/status_bar=false +permissions/subscribed_feeds_read=false +permissions/subscribed_feeds_write=false +permissions/system_alert_window=false +permissions/transmit_ir=false +permissions/uninstall_shortcut=false +permissions/update_device_stats=false +permissions/use_credentials=false +permissions/use_sip=false +permissions/vibrate=false +permissions/wake_lock=false +permissions/write_apn_settings=false +permissions/write_calendar=false +permissions/write_call_log=false +permissions/write_contacts=false +permissions/write_external_storage=false +permissions/write_gservices=false +permissions/write_history_bookmarks=false +permissions/write_profile=false +permissions/write_secure_settings=false +permissions/write_settings=false +permissions/write_sms=false +permissions/write_social_stream=false +permissions/write_sync_settings=false +permissions/write_user_dictionary=false diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..3fe4f4a --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ + diff --git a/icon.svg.import b/icon.svg.import new file mode 100644 index 0000000..47295e4 --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dffe5x0coss4q" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..a9546ee --- /dev/null +++ b/project.godot @@ -0,0 +1,35 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="Kniffel" +run/main_scene="res://MainMenu.tscn" +config/features=PackedStringArray("4.2", "Mobile") +run/low_processor_mode=true +config/icon="res://icon.svg" + +[autoload] + +Player_Manger="*res://PlayerManager.gd" + +[display] + +window/size/viewport_width=1080 +window/size/viewport_height=1920 +window/size/initial_position=Vector2i(1080, 1920) +window/stretch/mode="canvas_items" +window/stretch/aspect="ignore" +window/handheld/orientation=1 + +[rendering] + +renderer/rendering_method="mobile" +textures/vram_compression/import_etc2_astc=true