Browse Source

Improve visuals

Improved the look of the label that shows the number of coins
master
Abheek Dhawan 4 years ago
parent
commit
be38b244b7
  1. 52
      Game Scenes/Game.tscn
  2. 4
      Objects/Coin.tscn
  3. 0
      Scripts/Coin.gd

52
Game Scenes/Game.tscn

@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=2]
[gd_scene load_steps=14 format=2]
[ext_resource path="res://Objects/Rocket.tscn" type="PackedScene" id=1]
[ext_resource path="res://Scripts/Rocket.gd" type="Script" id=2]
@ -6,6 +6,40 @@
[ext_resource path="res://Scripts/Game.gd" type="Script" id=4]
[ext_resource path="res://Scripts/Score.gd" type="Script" id=5]
[ext_resource path="res://Scripts/CoinLabel.gd" type="Script" id=6]
[ext_resource path="res://Images and Anims/In Game/coin.png" type="Texture" id=7]
[sub_resource type="AtlasTexture" id=1]
flags = 4
atlas = ExtResource( 7 )
region = Rect2( 0, 0, 16, 16 )
[sub_resource type="AtlasTexture" id=2]
flags = 4
atlas = ExtResource( 7 )
region = Rect2( 16, 0, 16, 16 )
[sub_resource type="AtlasTexture" id=3]
flags = 4
atlas = ExtResource( 7 )
region = Rect2( 32, 0, 16, 16 )
[sub_resource type="AtlasTexture" id=4]
flags = 4
atlas = ExtResource( 7 )
region = Rect2( 48, 0, 16, 16 )
[sub_resource type="AtlasTexture" id=5]
flags = 4
atlas = ExtResource( 7 )
region = Rect2( 64, 0, 16, 16 )
[sub_resource type="SpriteFrames" id=6]
animations = [ {
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ) ],
"loop": true,
"name": "default",
"speed": 10.0
} ]
[node name="Game" type="Node2D"]
script = ExtResource( 4 )
@ -16,11 +50,10 @@ scale = Vector2( 2, 2 )
script = ExtResource( 2 )
[node name="Coins" type="Label" parent="Rocket"]
margin_left = -41.9442
margin_top = -56.8347
margin_right = 42.0558
margin_bottom = -41.8347
align = 1
margin_left = -3.92264
margin_top = -41.2194
margin_right = 49.0774
margin_bottom = -27.2194
valign = 1
script = ExtResource( 6 )
__meta__ = {
@ -42,6 +75,13 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="CoinAnim" type="AnimatedSprite" parent="Rocket"]
position = Vector2( -8.0022, -34.2137 )
scale = Vector2( 0.401688, 0.401688 )
frames = SubResource( 6 )
frame = 4
playing = true
[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"]

4
Objects/Coin.tscn

@ -1,7 +1,7 @@
[gd_scene load_steps=10 format=2]
[ext_resource path="res://Images and Anims/In Game/coin.png" type="Texture" id=1]
[ext_resource path="res://Objects/Coin.gd" type="Script" id=2]
[ext_resource path="res://Scripts/Coin.gd" type="Script" id=2]
[sub_resource type="CircleShape2D" id=1]
radius = 22.2384
@ -49,6 +49,6 @@ shape = SubResource( 1 )
scale = Vector2( 2, 2 )
frames = SubResource( 7 )
animation = "Spin"
frame = 2
frame = 4
playing = true
[connection signal="body_entered" from="." to="." method="_on_Coin_body_entered"]

0
Objects/Coin.gd → Scripts/Coin.gd

Loading…
Cancel
Save