Coin added to prototype
This commit is contained in:
parent
4a64951f28
commit
57289dcb8f
31
godot/Collectables/Coin/Coin.tscn
Normal file
31
godot/Collectables/Coin/Coin.tscn
Normal file
@ -0,0 +1,31 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://assets/coin.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
radius = 6.0
|
||||
|
||||
[sub_resource type="AtlasTexture" id=2]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 0, 0, 18, 18 )
|
||||
|
||||
[sub_resource type="AtlasTexture" id=3]
|
||||
atlas = ExtResource( 1 )
|
||||
region = Rect2( 18, 0, 18, 18 )
|
||||
|
||||
[sub_resource type="SpriteFrames" id=4]
|
||||
animations = [ {
|
||||
"frames": [ SubResource( 2 ), SubResource( 3 ) ],
|
||||
"loop": true,
|
||||
"name": "default",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[node name="coin" type="Area2D"]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||
frames = SubResource( 4 )
|
||||
playing = true
|
@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://Main.gdns" type="Script" id=1]
|
||||
[ext_resource path="res://levels/Level2.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://levels/Prototype.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="Main" type="Node"]
|
||||
script = ExtResource( 1 )
|
||||
|
@ -1,13 +1,16 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://CameraLimit.gdns" type="Script" id=1]
|
||||
[ext_resource path="res://characters/player/Player.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://levels/Prototype.tmx" type="PackedScene" id=3]
|
||||
[ext_resource path="res://assets/backgrounds/mountains.png" type="Texture" id=4]
|
||||
[ext_resource path="res://Collectables/Coin/Coin.tscn" type="PackedScene" id=5]
|
||||
|
||||
[node name="Prototype" type="Node2D"]
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource( 2 )]
|
||||
collision_layer = 5
|
||||
collision_mask = 6
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="Player"]
|
||||
current = true
|
||||
@ -39,3 +42,9 @@ centered = false
|
||||
|
||||
[node name="Prototype" parent="Map" instance=ExtResource( 3 )]
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="coin" parent="." instance=ExtResource( 5 )]
|
||||
position = Vector2( 72, 456 )
|
||||
|
||||
[node name="coin2" parent="." instance=ExtResource( 5 )]
|
||||
position = Vector2( 240, 456 )
|
||||
|
@ -95,6 +95,7 @@ right={
|
||||
|
||||
2d_physics/layer_1="Player"
|
||||
2d_physics/layer_2="Tiles"
|
||||
2d_physics/layer_3="Collectables"
|
||||
|
||||
[physics]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user