Skip to content

Commit

Permalink
Added the coins
Browse files Browse the repository at this point in the history
  • Loading branch information
Plexi09 committed May 29, 2024
1 parent d436cdf commit 6f208f6
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 4 deletions.
113 changes: 113 additions & 0 deletions scenes/coin.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
[gd_scene load_steps=17 format=3 uid="uid:https://cvo47d5omr7wj"]

[ext_resource type="Script" path="res:https://scripts/coin.gd" id="1_lj7o1"]
[ext_resource type="Texture2D" uid="uid:https://bit7onrdoeulr" path="res:https://assets/sprites/coin.png" id="1_t3r3k"]

[sub_resource type="AtlasTexture" id="AtlasTexture_xe758"]
atlas = ExtResource("1_t3r3k")
region = Rect2(0, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_6eu5s"]
atlas = ExtResource("1_t3r3k")
region = Rect2(16, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_mkp22"]
atlas = ExtResource("1_t3r3k")
region = Rect2(32, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_8qgca"]
atlas = ExtResource("1_t3r3k")
region = Rect2(48, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_wx0ow"]
atlas = ExtResource("1_t3r3k")
region = Rect2(64, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_eyyhn"]
atlas = ExtResource("1_t3r3k")
region = Rect2(80, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_o21eg"]
atlas = ExtResource("1_t3r3k")
region = Rect2(96, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_jkav7"]
atlas = ExtResource("1_t3r3k")
region = Rect2(112, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_4ygjk"]
atlas = ExtResource("1_t3r3k")
region = Rect2(128, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_sp3fv"]
atlas = ExtResource("1_t3r3k")
region = Rect2(144, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_8djhe"]
atlas = ExtResource("1_t3r3k")
region = Rect2(160, 0, 16, 16)

[sub_resource type="AtlasTexture" id="AtlasTexture_qlxrc"]
atlas = ExtResource("1_t3r3k")
region = Rect2(176, 0, 16, 16)

[sub_resource type="SpriteFrames" id="SpriteFrames_1wl6x"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_xe758")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6eu5s")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_mkp22")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8qgca")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_wx0ow")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_eyyhn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_o21eg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jkav7")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4ygjk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_sp3fv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8djhe")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qlxrc")
}],
"loop": true,
"name": &"default",
"speed": 10.0
}]

[sub_resource type="CircleShape2D" id="CircleShape2D_raska"]
radius = 5.09902

[node name="Coin" type="Area2D"]
script = ExtResource("1_lj7o1")

[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_1wl6x")
autoplay = "default"
frame = 1
frame_progress = 0.762958

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_raska")

[connection signal="body_entered" from="." to="." method="_on_body_entered"]
69 changes: 66 additions & 3 deletions scenes/game.tscn
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[gd_scene load_steps=6 format=3 uid="uid:https://bu7kgrg5m047b"]
[gd_scene load_steps=10 format=3 uid="uid:https://bu7kgrg5m047b"]

[ext_resource type="PackedScene" uid="uid:https://dbd21fr1athct" path="res:https://scenes/player.tscn" id="1_xggnn"]
[ext_resource type="Texture2D" uid="uid:https://ca57krj641oui" path="res:https://assets/sprites/world_tileset.png" id="2_0rv7l"]
[ext_resource type="PackedScene" uid="uid:https://dxtanox1pnxnx" path="res:https://scenes/platform.tscn" id="3_ldhqo"]
[ext_resource type="PackedScene" uid="uid:https://cvo47d5omr7wj" path="res:https://scenes/coin.tscn" id="4_cfox4"]

[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ovqm5"]
texture = ExtResource("2_0rv7l")
Expand Down Expand Up @@ -406,13 +407,51 @@ texture = ExtResource("2_0rv7l")
physics_layer_0/collision_layer = 1
sources/0 = SubResource("TileSetAtlasSource_ovqm5")

[sub_resource type="Animation" id="Animation_dfkay"]
resource_name = "move"
length = 1.5
loop_mode = 2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1.5),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(290, 30), Vector2(403, 30)]
}

[sub_resource type="Animation" id="Animation_qerx0"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(403, 30)]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_yjwjy"]
_data = {
"RESET": SubResource("Animation_qerx0"),
"move": SubResource("Animation_dfkay")
}

[node name="Game" type="Node2D"]

[node name="TileMap" type="TileMap" parent="."]
position = Vector2(3, -7)
tile_set = SubResource("TileSet_aklaq")
format = 2
layer_0/tile_data = PackedInt32Array(393210, 0, 1, 327674, 0, 1, 327675, 0, 1, 327676, 0, 1, 393212, 0, 1, 393213, 0, 1, 262140, 0, 1, 262141, 0, 1, 196605, 0, 1, 196604, 0, 1, 262138, 0, 0, 262139, 0, 0, 131068, 0, 0, 131069, 0, 0, 196603, 65536, 0, 327677, 65536, 0, 393211, 65536, 1, 262142, 393216, 0, 196608, 393216, 0, 262143, 458752, 1, 327678, 393216, 1, 393214, 393216, 1, 393215, 393216, 1, 327680, 393216, 1, 262144, 393216, 1, 327679, 524288, 0, 196609, 589824, 0, 196610, 655360, 0, 196611, 720896, 0, 196612, 393216, 0, 196613, 393216, 0, 262148, 393216, 1, 327684, 393216, 1, 327685, 393216, 1, 262149, 524288, 1, -65537, 0, 0, -1, 0, 1, -131072, 0, 1, -131071, 0, 1, -65535, 0, 1, -65536, 65536, 1, -196608, 0, 0, -196607, 0, 0, -65534, 0, 0, -65533, 0, 0, 2, 0, 1, 3, 0, 1, -65531, 720896, 0, -65532, 589824, 0, -65530, 0, 0, -131065, 0, 0, -131064, 0, 0, -65527, 0, 0, 6, 0, 1, -65529, 0, 1, -65528, 0, 1, 9, 0, 1, 7, 65536, 1, 8, 0, 1, 10, 262144, 0, 11, 262144, 0, 12, 262144, 0, 65546, 262144, 1, 65547, 262144, 1, 65548, 262144, 1, 131084, 262144, 1, 131085, 262144, 1, 196621, 262144, 1, 196622, 262144, 1, 196623, 262144, 1, 196624, 262144, 1, 262159, 262144, 1, 327695, 262144, 1, 393231, 262144, 1, 393232, 262144, 1, 262160, 262144, 1, 327696, 327680, 1, 65549, 327680, 0, 131086, 327680, 1, 131087, 262144, 0, 131088, 262144, 0, 131094, 131072, 0, 131095, 131072, 0, 196630, 131072, 1, 262166, 131072, 1, 262167, 131072, 1, 327703, 131072, 1, 393239, 131072, 1, 393238, 131072, 1, 327704, 131072, 1, 393240, 131072, 1, 327705, 131072, 1, 393241, 131072, 1, 262169, 131072, 1, 196631, 196608, 0, 262168, 196608, 1, 327702, 196608, 1, -131070, 0, 5, -196606, 0, 4, 196602, 65536, 6, 131076, 0, 8, -65525, 524288, 6, -196596, 327680, 3, -131060, 327680, 4, -65524, 327680, 5, 65550, 327680, 7, 196632, 393216, 7, -327678, 0, 3, -262142, 0, 4)
layer_0/tile_data = PackedInt32Array(393210, 0, 1, 327674, 0, 1, 327675, 0, 1, 327676, 0, 1, 393212, 0, 1, 393213, 0, 1, 262140, 0, 1, 262141, 0, 1, 196605, 0, 1, 196604, 0, 1, 262138, 0, 0, 262139, 0, 0, 131068, 0, 0, 131069, 0, 0, 196603, 65536, 0, 327677, 65536, 0, 393211, 65536, 1, 262142, 393216, 0, 196608, 393216, 0, 262143, 458752, 1, 327678, 393216, 1, 393214, 393216, 1, 393215, 393216, 1, 327680, 393216, 1, 262144, 393216, 1, 327679, 524288, 0, 196609, 589824, 0, 196610, 655360, 0, 196611, 720896, 0, 196612, 393216, 0, 196613, 393216, 0, 262148, 393216, 1, 327684, 393216, 1, 327685, 393216, 1, 262149, 524288, 1, -65537, 0, 0, -1, 0, 1, -131072, 0, 1, -131071, 0, 1, -65535, 0, 1, -65536, 65536, 1, -196608, 0, 0, -196607, 0, 0, -65534, 0, 0, -65533, 0, 0, 2, 0, 1, 3, 0, 1, -65531, 720896, 0, -65532, 589824, 0, -65530, 0, 0, -131065, 0, 0, -131064, 0, 0, -65527, 0, 0, 6, 0, 1, -65529, 0, 1, -65528, 0, 1, 9, 0, 1, 7, 65536, 1, 8, 0, 1, 10, 262144, 0, 11, 262144, 0, 12, 262144, 0, 65546, 262144, 1, 65547, 262144, 1, 65548, 262144, 1, 131084, 262144, 1, 131085, 262144, 1, 196621, 262144, 1, 196622, 262144, 1, 196623, 262144, 1, 196624, 262144, 1, 262159, 262144, 1, 327695, 262144, 1, 393231, 262144, 1, 393232, 262144, 1, 262160, 262144, 1, 327696, 327680, 1, 65549, 327680, 0, 131086, 327680, 1, 131087, 262144, 0, 131088, 262144, 0, -131070, 0, 5, -196606, 0, 4, 196602, 65536, 6, 131076, 0, 8, -65525, 524288, 6, -196596, 327680, 3, -131060, 327680, 4, -65524, 327680, 5, 65550, 327680, 7, -327678, 0, 3, -262142, 0, 4, 262170, 131072, 1, 327706, 196608, 1, 393242, 131072, 1, 131098, 131072, 0, 196634, 131072, 1, 131099, 131072, 0, 196635, 196608, 0, 262171, 131072, 1, 327707, 131072, 1, 393243, 131072, 1, 196636, 393216, 7, 262172, 196608, 1, 327708, 131072, 1, 393244, 131072, 1, 262173, 131072, 1, 327709, 131072, 1, 393245, 131072, 1)

[node name="Player" parent="." instance=ExtResource("1_xggnn")]
position = Vector2(-52, 3)
Expand All @@ -422,5 +461,29 @@ position = Vector2(0, -6)
zoom = Vector2(4, 4)
position_smoothing_enabled = true

[node name="AnimatableBody2D" parent="." instance=ExtResource("3_ldhqo")]
[node name="Platform" parent="." instance=ExtResource("3_ldhqo")]
position = Vector2(-45, -28)

[node name="Platform2" parent="." instance=ExtResource("3_ldhqo")]
position = Vector2(403, 30)

[node name="AnimationPlayer" type="AnimationPlayer" parent="Platform2"]
libraries = {
"": SubResource("AnimationLibrary_yjwjy")
}
autoplay = "move"

[node name="Coin" parent="." instance=ExtResource("4_cfox4")]
position = Vector2(251, 19)

[node name="Coin2" parent="." instance=ExtResource("4_cfox4")]
position = Vector2(-5, -45)

[node name="Coin3" parent="." instance=ExtResource("4_cfox4")]
position = Vector2(-5, 36)

[node name="Coin4" parent="." instance=ExtResource("4_cfox4")]
position = Vector2(344, -1)

[node name="Coin5" parent="." instance=ExtResource("4_cfox4")]
position = Vector2(443, 19)
2 changes: 1 addition & 1 deletion scenes/platform.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[sub_resource type="RectangleShape2D" id="RectangleShape2D_uqk4x"]
size = Vector2(32, 8)

[node name="AnimatableBody2D" type="AnimatableBody2D"]
[node name="Platform" type="AnimatableBody2D"]

[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("1_f30o4")
Expand Down
6 changes: 6 additions & 0 deletions scripts/coin.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
extends Area2D



func _on_body_entered(body):
pass # Replace with function body.

0 comments on commit 6f208f6

Please sign in to comment.