New ship has been added alongside with burst animation
After Width: | Height: | Size: 3.5 KiB |
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="StreamTexture"
|
type="StreamTexture"
|
||||||
path="res://.import/asteroid_tiny.png-ffeeb3d6ad46f56e166f43c37735ea56.stex"
|
path="res://.import/Exhaust_Frame_01.png-73973e26157e2b33a7832c7f56474a53.stex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://images/asteroid_tiny.png"
|
source_file="res://images/Exhaust_Frame_01.png"
|
||||||
dest_files=[ "res://.import/asteroid_tiny.png-ffeeb3d6ad46f56e166f43c37735ea56.stex" ]
|
dest_files=[ "res://.import/Exhaust_Frame_01.png-73973e26157e2b33a7832c7f56474a53.stex" ]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
After Width: | Height: | Size: 3.7 KiB |
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="StreamTexture"
|
type="StreamTexture"
|
||||||
path="res://.import/asteroid_grey.png-8dc4d6f97bc2cff97dcb90e982bc3460.stex"
|
path="res://.import/Exhaust_Frame_02.png-4c72c24d965d737e278c892b7c523f63.stex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://images/asteroid_grey.png"
|
source_file="res://images/Exhaust_Frame_02.png"
|
||||||
dest_files=[ "res://.import/asteroid_grey.png-8dc4d6f97bc2cff97dcb90e982bc3460.stex" ]
|
dest_files=[ "res://.import/Exhaust_Frame_02.png-4c72c24d965d737e278c892b7c523f63.stex" ]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
After Width: | Height: | Size: 3.4 KiB |
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="StreamTexture"
|
type="StreamTexture"
|
||||||
path="res://.import/background-red.png-cfd79b18e6744e1b1528eaa92dd95c53.stex"
|
path="res://.import/Exhaust_Frame_03.png-89e6003264539e355848350bef2c2da2.stex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://images/background-red.png"
|
source_file="res://images/Exhaust_Frame_03.png"
|
||||||
dest_files=[ "res://.import/background-red.png-cfd79b18e6744e1b1528eaa92dd95c53.stex" ]
|
dest_files=[ "res://.import/Exhaust_Frame_03.png-89e6003264539e355848350bef2c2da2.stex" ]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
After Width: | Height: | Size: 3.5 KiB |
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="StreamTexture"
|
type="StreamTexture"
|
||||||
path="res://.import/pixel_asteroid.png-4c8492b5959058b49bb7cde80113cd5e.stex"
|
path="res://.import/Exhaust_Frame_04.png-1b6fa9e6c2431ee4c18528357313c2c0.stex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://images/pixel_asteroid.png"
|
source_file="res://images/Exhaust_Frame_04.png"
|
||||||
dest_files=[ "res://.import/pixel_asteroid.png-4c8492b5959058b49bb7cde80113cd5e.stex" ]
|
dest_files=[ "res://.import/Exhaust_Frame_04.png-1b6fa9e6c2431ee4c18528357313c2c0.stex" ]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
After Width: | Height: | Size: 3.6 KiB |
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Exhaust_Frame_05.png-4609410d28d51f2c6780e575475fb8ea.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://images/Exhaust_Frame_05.png"
|
||||||
|
dest_files=[ "res://.import/Exhaust_Frame_05.png-4609410d28d51f2c6780e575475fb8ea.stex" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_mode=0
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
flags/repeat=0
|
||||||
|
flags/filter=true
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
After Width: | Height: | Size: 3.2 KiB |
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="StreamTexture"
|
||||||
|
path="res://.import/Exhaust_Frame_06.png-ce8fbbabde1b4b27fa88b93297d9d0b5.stex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://images/Exhaust_Frame_06.png"
|
||||||
|
dest_files=[ "res://.import/Exhaust_Frame_06.png-ce8fbbabde1b4b27fa88b93297d9d0b5.stex" ]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_mode=0
|
||||||
|
compress/bptc_ldr=0
|
||||||
|
compress/normal_map=0
|
||||||
|
flags/repeat=0
|
||||||
|
flags/filter=true
|
||||||
|
flags/mipmaps=false
|
||||||
|
flags/anisotropic=false
|
||||||
|
flags/srgb=2
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/HDR_as_SRGB=false
|
||||||
|
process/invert_color=false
|
||||||
|
stream=false
|
||||||
|
size_limit=0
|
||||||
|
detect_3d=true
|
||||||
|
svg/scale=1.0
|
After Width: | Height: | Size: 20 KiB |
|
@ -2,15 +2,15 @@
|
||||||
|
|
||||||
importer="texture"
|
importer="texture"
|
||||||
type="StreamTexture"
|
type="StreamTexture"
|
||||||
path="res://.import/asteroid_grey_tiny.png-193f065c369845d128bbc29aebc466dc.stex"
|
path="res://.import/PlayerRed_Frame_01.png-a1b13767a761fc8009c20efe6cbca3cd.stex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://images/asteroid_grey_tiny.png"
|
source_file="res://images/PlayerRed_Frame_01.png"
|
||||||
dest_files=[ "res://.import/asteroid_grey_tiny.png-193f065c369845d128bbc29aebc466dc.stex" ]
|
dest_files=[ "res://.import/PlayerRed_Frame_01.png-a1b13767a761fc8009c20efe6cbca3cd.stex" ]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
Before Width: | Height: | Size: 359 B |
Before Width: | Height: | Size: 623 B |
Before Width: | Height: | Size: 585 B |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 635 B |
Before Width: | Height: | Size: 358 B |
|
@ -1,34 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="StreamTexture"
|
|
||||||
path="res://.import/pixel_ship_red.png-cc824bfd01a377152c43f409da7b4c36.stex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://images/pixel_ship_red.png"
|
|
||||||
dest_files=[ "res://.import/pixel_ship_red.png-cc824bfd01a377152c43f409da7b4c36.stex" ]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/hdr_mode=0
|
|
||||||
compress/bptc_ldr=0
|
|
||||||
compress/normal_map=0
|
|
||||||
flags/repeat=0
|
|
||||||
flags/filter=true
|
|
||||||
flags/mipmaps=false
|
|
||||||
flags/anisotropic=false
|
|
||||||
flags/srgb=2
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/HDR_as_SRGB=false
|
|
||||||
process/invert_color=false
|
|
||||||
stream=false
|
|
||||||
size_limit=0
|
|
||||||
detect_3d=true
|
|
||||||
svg/scale=1.0
|
|
|
@ -1,8 +1,6 @@
|
||||||
[gd_scene load_steps=4 format=2]
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://images/background-red.png" type="Texture" id=1]
|
[ext_resource path="res://scenes/Player.tscn" type="PackedScene" id=1]
|
||||||
[ext_resource path="res://scenes/Player.tscn" type="PackedScene" id=2]
|
|
||||||
[ext_resource path="res://scenes/BigAstroid.tscn" type="PackedScene" id=3]
|
|
||||||
|
|
||||||
[node name="Main" type="Node"]
|
[node name="Main" type="Node"]
|
||||||
|
|
||||||
|
@ -10,17 +8,7 @@
|
||||||
|
|
||||||
[node name="ParallaxLayer" type="ParallaxLayer" parent="background"]
|
[node name="ParallaxLayer" type="ParallaxLayer" parent="background"]
|
||||||
|
|
||||||
[node name="background-red" type="Sprite" parent="background/ParallaxLayer"]
|
[node name="Player" parent="." instance=ExtResource( 1 )]
|
||||||
position = Vector2( 390, 211 )
|
|
||||||
texture = ExtResource( 1 )
|
|
||||||
|
|
||||||
[node name="Player" parent="." instance=ExtResource( 2 )]
|
|
||||||
position = Vector2( 490, 190 )
|
position = Vector2( 490, 190 )
|
||||||
|
|
||||||
[node name="StartPosition" type="Position2D" parent="."]
|
[node name="StartPosition" type="Position2D" parent="."]
|
||||||
|
|
||||||
[node name="BigAstroid" parent="." instance=ExtResource( 3 )]
|
|
||||||
position = Vector2( 350, 220 )
|
|
||||||
|
|
||||||
[node name="TileMap" type="TileMap" parent="."]
|
|
||||||
format = 1
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ signal hit
|
||||||
func _ready():
|
func _ready():
|
||||||
# hide()
|
# hide()
|
||||||
screen_size = get_viewport_rect().size
|
screen_size = get_viewport_rect().size
|
||||||
|
$Burst.hide()
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
if Input.is_action_pressed('click'):
|
if Input.is_action_pressed('click'):
|
||||||
|
@ -35,6 +35,8 @@ func _process(delta):
|
||||||
if speed >= max_speed:
|
if speed >= max_speed:
|
||||||
speed = max_speed
|
speed = max_speed
|
||||||
|
|
||||||
|
$Burst.show()
|
||||||
|
$Burst.play('burst')
|
||||||
velocity = (touch_point - position).normalized() * speed
|
velocity = (touch_point - position).normalized() * speed
|
||||||
|
|
||||||
if released and speed > 0:
|
if released and speed > 0:
|
||||||
|
@ -43,6 +45,7 @@ func _process(delta):
|
||||||
if speed <= 0:
|
if speed <= 0:
|
||||||
speed = 0
|
speed = 0
|
||||||
|
|
||||||
|
$Burst.play('cooldown')
|
||||||
velocity = velocity.normalized() * speed
|
velocity = velocity.normalized() * speed
|
||||||
|
|
||||||
|
|
||||||
|
@ -65,3 +68,8 @@ func start(pos):
|
||||||
position = pos
|
position = pos
|
||||||
show()
|
show()
|
||||||
$CollisionShape2D.disabled = false
|
$CollisionShape2D.disabled = false
|
||||||
|
|
||||||
|
|
||||||
|
func _on_Burst_animation_finished():
|
||||||
|
if $Burst.animation == 'cooldown':
|
||||||
|
$Burst.hide()
|
||||||
|
|
|
@ -1,24 +1,43 @@
|
||||||
[gd_scene load_steps=5 format=2]
|
[gd_scene load_steps=12 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://scenes/Player.gd" type="Script" id=1]
|
[ext_resource path="res://scenes/Player.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://images/pixel_ship_red.png" type="Texture" id=2]
|
[ext_resource path="res://images/PlayerRed_Frame_01.png" type="Texture" id=2]
|
||||||
|
[ext_resource path="res://images/Exhaust_Frame_06.png" type="Texture" id=3]
|
||||||
|
[ext_resource path="res://images/Exhaust_Frame_05.png" type="Texture" id=4]
|
||||||
|
[ext_resource path="res://images/Exhaust_Frame_03.png" type="Texture" id=5]
|
||||||
|
[ext_resource path="res://images/Exhaust_Frame_01.png" type="Texture" id=6]
|
||||||
|
[ext_resource path="res://images/Exhaust_Frame_02.png" type="Texture" id=7]
|
||||||
|
[ext_resource path="res://images/Exhaust_Frame_04.png" type="Texture" id=8]
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id=1]
|
[sub_resource type="SpriteFrames" id=1]
|
||||||
animations = [ {
|
animations = [ {
|
||||||
"frames": [ ExtResource( 2 ), ExtResource( 2 ) ],
|
"frames": [ ExtResource( 2 ) ],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": "idle",
|
"name": "idle",
|
||||||
"speed": 5.0
|
"speed": 5.0
|
||||||
} ]
|
} ]
|
||||||
|
|
||||||
|
[sub_resource type="SpriteFrames" id=3]
|
||||||
|
animations = [ {
|
||||||
|
"frames": [ ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ) ],
|
||||||
|
"loop": false,
|
||||||
|
"name": "cooldown",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [ ExtResource( 6 ), ExtResource( 7 ), ExtResource( 5 ), ExtResource( 4 ), ExtResource( 8 ), ExtResource( 3 ) ],
|
||||||
|
"loop": true,
|
||||||
|
"name": "burst",
|
||||||
|
"speed": 5.0
|
||||||
|
} ]
|
||||||
|
|
||||||
[sub_resource type="ConvexPolygonShape2D" id=2]
|
[sub_resource type="ConvexPolygonShape2D" id=2]
|
||||||
points = PoolVector2Array( -20, -5, -15, -20, -5, -20, 20, 0, -5, 20, -15, 20, -20, 5 )
|
points = PoolVector2Array( -20, -5, -15, -20, -5, -20, 20, 0, -5, 20, -15, 20, -20, 5 )
|
||||||
|
|
||||||
[node name="Player" type="KinematicBody2D"]
|
[node name="Player" type="KinematicBody2D"]
|
||||||
script = ExtResource( 1 )
|
script = ExtResource( 1 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_horizontal_guides_": [ ],
|
"_edit_horizontal_guides_": [ -43.9838 ],
|
||||||
"_edit_vertical_guides_": [ ]
|
"_edit_vertical_guides_": [ -22.5089 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Ship" type="AnimatedSprite" parent="."]
|
[node name="Ship" type="AnimatedSprite" parent="."]
|
||||||
|
@ -29,6 +48,13 @@ frames = SubResource( 1 )
|
||||||
animation = "idle"
|
animation = "idle"
|
||||||
offset = Vector2( 0, -5 )
|
offset = Vector2( 0, -5 )
|
||||||
|
|
||||||
|
[node name="Burst" type="AnimatedSprite" parent="."]
|
||||||
|
position = Vector2( -45, 0 )
|
||||||
|
rotation = 1.5708
|
||||||
|
frames = SubResource( 3 )
|
||||||
|
animation = "burst"
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
position = Vector2( 0, -1 )
|
position = Vector2( 0, -1 )
|
||||||
shape = SubResource( 2 )
|
shape = SubResource( 2 )
|
||||||
|
[connection signal="animation_finished" from="Burst" to="." method="_on_Burst_animation_finished"]
|
||||||
|
|