From c7777580a49fbe5b29e6d363217c081dbdc43772 Mon Sep 17 00:00:00 2001 From: Matteo Balugani Date: Mon, 2 Oct 2023 20:36:00 +0200 Subject: [PATCH] coal_and_diamond --- .../coal_diamond_converter.tscn | 3 +- entity/coal_diamond/coal.tscn | 35 +++++++++++++++++++ entity/{gem => coal_diamond}/diamond.png | 0 .../{gem => coal_diamond}/diamond.png.import | 6 ++-- entity/coal_diamond/diamond.tscn | 35 +++++++++++++++++++ .../{gem => coal_diamond}/diamond_white.png | 0 .../diamond_white.png.import | 6 ++-- entity/coin_copper/coin_copper.tscn | 2 +- main.tscn | 2 +- 9 files changed, 79 insertions(+), 10 deletions(-) create mode 100644 entity/coal_diamond/coal.tscn rename entity/{gem => coal_diamond}/diamond.png (100%) rename entity/{gem => coal_diamond}/diamond.png.import (71%) create mode 100644 entity/coal_diamond/diamond.tscn rename entity/{gem => coal_diamond}/diamond_white.png (100%) rename entity/{gem => coal_diamond}/diamond_white.png.import (70%) diff --git a/converters/gold_to_coaldiamond/coal_diamond_converter.tscn b/converters/gold_to_coaldiamond/coal_diamond_converter.tscn index 6320110..179196c 100644 --- a/converters/gold_to_coaldiamond/coal_diamond_converter.tscn +++ b/converters/gold_to_coaldiamond/coal_diamond_converter.tscn @@ -70,12 +70,11 @@ size = Vector2(26, 5) [sub_resource type="RectangleShape2D" id="RectangleShape2D_jeo5f"] size = Vector2(26, 10) -[node name="CoalDiamondConverter" type="StaticBody2D" node_paths=PackedStringArray("spawner")] +[node name="CoalDiamondConverter" type="StaticBody2D"] scale = Vector2(3, 3) collision_layer = 8 collision_mask = 0 script = ExtResource("1_mf1ls") -spawner = NodePath("") [node name="SpriteBack" type="Sprite2D" parent="."] z_index = -2 diff --git a/entity/coal_diamond/coal.tscn b/entity/coal_diamond/coal.tscn new file mode 100644 index 0000000..0caf55c --- /dev/null +++ b/entity/coal_diamond/coal.tscn @@ -0,0 +1,35 @@ +[gd_scene load_steps=6 format=3 uid="uid://diy8fj7mcc00p"] + +[ext_resource type="PhysicsMaterial" uid="uid://c6kn1an85lccr" path="res://entity/coin_physics_material.tres" id="1_ftt7x"] +[ext_resource type="Texture2D" uid="uid://bgq5afrrpc4a3" path="res://entity/coal_diamond/diamond_white.png" id="2_ug7o0"] +[ext_resource type="PackedScene" uid="uid://bk1vvq5rug01m" path="res://collector/collectible.tscn" id="4_e8hbs"] +[ext_resource type="PackedScene" uid="uid://ujpra0s1kpqi" path="res://value/valuable.tscn" id="5_3e4d8"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_x6m8s"] +radius = 10.5119 + +[node name="Coal" type="RigidBody2D"] +collision_layer = 4 +collision_mask = 14 +mass = 2.0 +inertia = 600.0 +physics_material_override = ExtResource("1_ftt7x") +continuous_cd = 1 +can_sleep = false +linear_damp = 0.1 +angular_damp = 0.1 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +scale = Vector2(2, 2) +shape = SubResource("CircleShape2D_x6m8s") + +[node name="Sprite" type="Sprite2D" parent="CollisionShape2D"] +texture_filter = 1 +texture = ExtResource("2_ug7o0") + +[node name="Collectible" parent="." instance=ExtResource("4_e8hbs")] +type = &"Coal" + +[node name="Valuable" parent="." instance=ExtResource("5_3e4d8")] + +[connection signal="collected" from="Collectible" to="Collectible" method="_on_done" flags=18] diff --git a/entity/gem/diamond.png b/entity/coal_diamond/diamond.png similarity index 100% rename from entity/gem/diamond.png rename to entity/coal_diamond/diamond.png diff --git a/entity/gem/diamond.png.import b/entity/coal_diamond/diamond.png.import similarity index 71% rename from entity/gem/diamond.png.import rename to entity/coal_diamond/diamond.png.import index 8abbbb8..ea59bdd 100644 --- a/entity/gem/diamond.png.import +++ b/entity/coal_diamond/diamond.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bquk2q5g6bst5" -path="res://.godot/imported/diamond.png-0575d649be1d35db3ad92a77f7f138c4.ctex" +path="res://.godot/imported/diamond.png-0fb18f4a52a588670257dc6a7f72ec4b.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://entity/gem/diamond.png" -dest_files=["res://.godot/imported/diamond.png-0575d649be1d35db3ad92a77f7f138c4.ctex"] +source_file="res://entity/coal_diamond/diamond.png" +dest_files=["res://.godot/imported/diamond.png-0fb18f4a52a588670257dc6a7f72ec4b.ctex"] [params] diff --git a/entity/coal_diamond/diamond.tscn b/entity/coal_diamond/diamond.tscn new file mode 100644 index 0000000..b43ea0e --- /dev/null +++ b/entity/coal_diamond/diamond.tscn @@ -0,0 +1,35 @@ +[gd_scene load_steps=6 format=3 uid="uid://cr5tiep20hk0s"] + +[ext_resource type="PhysicsMaterial" uid="uid://c6kn1an85lccr" path="res://entity/coin_physics_material.tres" id="1_mma75"] +[ext_resource type="Texture2D" uid="uid://bquk2q5g6bst5" path="res://entity/coal_diamond/diamond.png" id="2_abwth"] +[ext_resource type="PackedScene" uid="uid://bk1vvq5rug01m" path="res://collector/collectible.tscn" id="3_n4fa5"] +[ext_resource type="PackedScene" uid="uid://ujpra0s1kpqi" path="res://value/valuable.tscn" id="4_yfos5"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_x6m8s"] +radius = 10.5119 + +[node name="Diamond" type="RigidBody2D"] +collision_layer = 4 +collision_mask = 14 +mass = 2.0 +inertia = 600.0 +physics_material_override = ExtResource("1_mma75") +continuous_cd = 1 +can_sleep = false +linear_damp = 0.1 +angular_damp = 0.1 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +scale = Vector2(2, 2) +shape = SubResource("CircleShape2D_x6m8s") + +[node name="Sprite" type="Sprite2D" parent="CollisionShape2D"] +texture_filter = 1 +texture = ExtResource("2_abwth") + +[node name="Collectible" parent="." instance=ExtResource("3_n4fa5")] +type = &"Diamond" + +[node name="Valuable" parent="." instance=ExtResource("4_yfos5")] + +[connection signal="collected" from="Collectible" to="Collectible" method="_on_done" flags=18] diff --git a/entity/gem/diamond_white.png b/entity/coal_diamond/diamond_white.png similarity index 100% rename from entity/gem/diamond_white.png rename to entity/coal_diamond/diamond_white.png diff --git a/entity/gem/diamond_white.png.import b/entity/coal_diamond/diamond_white.png.import similarity index 70% rename from entity/gem/diamond_white.png.import rename to entity/coal_diamond/diamond_white.png.import index 937ac9d..2c14cda 100644 --- a/entity/gem/diamond_white.png.import +++ b/entity/coal_diamond/diamond_white.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bgq5afrrpc4a3" -path="res://.godot/imported/diamond_white.png-ea17eba66708a2de5eae13c889056729.ctex" +path="res://.godot/imported/diamond_white.png-3d313595ab6d3b2376dafee829b7e427.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://entity/gem/diamond_white.png" -dest_files=["res://.godot/imported/diamond_white.png-ea17eba66708a2de5eae13c889056729.ctex"] +source_file="res://entity/coal_diamond/diamond_white.png" +dest_files=["res://.godot/imported/diamond_white.png-3d313595ab6d3b2376dafee829b7e427.ctex"] [params] diff --git a/entity/coin_copper/coin_copper.tscn b/entity/coin_copper/coin_copper.tscn index 7588034..9297f4b 100644 --- a/entity/coin_copper/coin_copper.tscn +++ b/entity/coin_copper/coin_copper.tscn @@ -5,7 +5,7 @@ [ext_resource type="Texture2D" uid="uid://2vtvoj6ua3cb" path="res://entity/coin_copper/coin_copper_outline_2.png" id="3_dq1f7"] [ext_resource type="PackedScene" uid="uid://bk1vvq5rug01m" path="res://collector/collectible.tscn" id="4_npwn2"] [ext_resource type="PackedScene" uid="uid://ujpra0s1kpqi" path="res://value/valuable.tscn" id="5_fd0r7"] -[ext_resource type="AudioStream" uid="uid://ds2rl6eg5jr1" path="res://audio/tap/click5.wav" id="7_fxd28"] +[ext_resource type="AudioStream" uid="uid://wy7f2j0wg1ur" path="res://audio/tap/click5.wav" id="7_fxd28"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_c6byl"] size = Vector2(14, 3) diff --git a/main.tscn b/main.tscn index 5a3fe62..5d45374 100644 --- a/main.tscn +++ b/main.tscn @@ -6,7 +6,7 @@ [ext_resource type="PackedScene" uid="uid://cklkdygv61bny" path="res://interface/shop_ui.tscn" id="2_qj86l"] [ext_resource type="Script" path="res://interface/custom_ui.gd" id="3_xav0n"] [ext_resource type="PackedScene" uid="uid://bo5unrhqpoyim" path="res://interface/game_ui.tscn" id="4_siim3"] -[ext_resource type="PackedScene" uid="uid://bpvx3nkkbluip" path="res://safe_ui.tscn" id="5_2uxda"] +[ext_resource type="PackedScene" path="res://safe_ui.tscn" id="5_2uxda"] [ext_resource type="Script" path="res://game_camera.gd" id="5_xxjtg"] [sub_resource type="GDScript" id="GDScript_kyj65"]