added cool animations

This commit is contained in:
zoe 2021-10-09 18:50:01 +02:00
parent 77ca16be36
commit 6cb03fda72
41 changed files with 569 additions and 19 deletions

View File

@ -0,0 +1,3 @@
source_md5="d48abc7cb3f92f0657136fb95d588815"
dest_md5="6938436fb576d99a27eb3b8d5eacd13d"

View File

@ -0,0 +1,3 @@
source_md5="54142267721793a14abb40d25c573b12"
dest_md5="e6754d8e7916458fb39ffe7850c87c86"

View File

@ -0,0 +1,3 @@
source_md5="0252a082d2cde77f4a1580f698403f8f"
dest_md5="6e158a386f0a1a045d3fe90deaa998fa"

View File

@ -0,0 +1,3 @@
source_md5="0b1da2a61cb9501c085e58303eb91922"
dest_md5="9348b9b7876a68e962d74911d2ab195e"

View File

@ -0,0 +1,3 @@
source_md5="e621a858c6fed2ad38546e756f295133"
dest_md5="a27304771a2ee9f144621c27e324ab27"

View File

@ -0,0 +1,3 @@
source_md5="3d95a9c03e4b4012ea7916e6c8f55156"
dest_md5="7b0296569ab7a26a90741c8d2b4fcf3d"

View File

@ -0,0 +1,3 @@
source_md5="1de1bfd0f1e53b2a9a9b808817dffbb1"
dest_md5="302c3c3aa6770ffe1367d078ec92e7a8"

View File

@ -0,0 +1,3 @@
source_md5="94b4c568ecd122af3bbdf706d4e68189"
dest_md5="d1aad8a972292f4be7c8497bcdfea55b"

View File

@ -0,0 +1,3 @@
source_md5="15ffe461a0c1ebcb153b925810d35148"
dest_md5="2f79c532571ffc06ea2fe3f8fd9fa9fb"

BIN
Aseprite/Scattershot.ase Normal file

Binary file not shown.

View File

@ -90,7 +90,6 @@ process_material = SubResource( 1 )
texture = ExtResource( 6 )
[node name="BallCollision" parent="." instance=ExtResource( 4 )]
visible = true
[node name="TrajectoryTimer" type="Timer" parent="."]
wait_time = 0.1
@ -103,6 +102,7 @@ stream = ExtResource( 5 )
bus = "SFX"
[node name="Arrow" type="Sprite" parent="."]
pause_mode = 2
texture = ExtResource( 7 )
offset = Vector2( 4, 0 )
script = ExtResource( 8 )

View File

@ -1,8 +1,7 @@
[gd_scene load_steps=2 format=2]
[sub_resource type="CircleShape2D" id=2]
[sub_resource type="CircleShape2D" id=1]
radius = 8.23541
[node name="BallCollision" type="CollisionShape2D"]
visible = false
shape = SubResource( 2 )
shape = SubResource( 1 )

View File

@ -81,6 +81,7 @@ tracks/2/keys = {
}
[node name="Transition" type="CanvasLayer"]
pause_mode = 2
layer = 128
script = ExtResource( 2 )

View File

@ -19,10 +19,10 @@ __meta__ = {
[node name="ButtonSFX" parent="." instance=ExtResource( 3 )]
[connection signal="changed" from="." to="." method="save_volume"]
[connection signal="focus_entered" from="." to="ButtonSFX" method="on_hover"]
[connection signal="focus_exited" from="." to="." method="save_volume"]
[connection signal="focus_exited" from="." to="ButtonSFX" method="on_select"]
[connection signal="mouse_entered" from="." to="ButtonSFX" method="on_hover"]
[connection signal="mouse_exited" from="." to="." method="save_volume"]
[connection signal="mouse_exited" from="." to="ButtonSFX" method="on_select"]
[connection signal="value_changed" from="." to="." method="_on_MusicVolumeSlider_value_changed"]

View File

@ -5,3 +5,7 @@ func on_hover():
func on_select():
$Select.play(0)
func scale_up() -> void:
pass # Replace with function body.

View File

@ -42,6 +42,7 @@ shape = SubResource( 1 )
shape = SubResource( 2 )
[node name="GraceTimer" parent="." instance=ExtResource( 3 )]
wait_time = 0.24
[node name="HitSFX" parent="." instance=ExtResource( 4 )]

View File

@ -43,6 +43,7 @@ script = ExtResource( 5 )
[node name="HitSFX" parent="." instance=ExtResource( 6 )]
[node name="GraceTimer" parent="." instance=ExtResource( 3 )]
wait_time = 0.24
[node name="ScoreCounter" parent="." instance=ExtResource( 7 )]
base_multiplier = 0

View File

@ -1,7 +1,12 @@
extends TextureButton
export var powerup = "res://Pegs/Yellow/Powerups/Scattershot/Scattershot.tscn"
var spawn_position = Vector2() setget set_spawn_position, get_spawn_position
func _ready() -> void:
$AnimationPlayer.play("Show")
func set_spawn_position(value):
spawn_position = value
@ -11,5 +16,8 @@ func get_spawn_position():
func _on_TextureButton_pressed() -> void:
get_tree().paused = false
GameStats.current_powerup = powerup
GameStats.pick_powerup()
queue_free()

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=2]
[gd_scene load_steps=9 format=2]
[ext_resource path="res://Menu/Theme.tres" type="Theme" id=1]
[ext_resource path="res://icon.png" type="Texture" id=2]
@ -6,18 +6,38 @@
[ext_resource path="res://Pegs/Yellow/CardIcons/default2.png" type="Texture" id=4]
[ext_resource path="res://Pegs/Yellow/CardIcons/default.png" type="Texture" id=5]
[ext_resource path="res://Pegs/Yellow/PowerupCard.gd" type="Script" id=6]
[ext_resource path="res://Menu/Buttons/ButtonSFX.tscn" type="PackedScene" id=7]
[sub_resource type="Animation" id=1]
resource_name = "Show"
length = 0.5
step = 0.05
tracks/0/type = "value"
tracks/0/path = NodePath(".:rect_rotation")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.05, 0.15, 0.5 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ 0.0, 34.3, -10.0, 0.0 ]
}
[node name="TextureButton" type="TextureButton"]
anchor_right = 0.167
anchor_bottom = 0.296
margin_right = -0.127998
margin_bottom = 0.0639992
rect_min_size = Vector2( 64, 0 )
hint_tooltip = "a powerup!!!"
theme = ExtResource( 1 )
shortcut_in_tooltip = false
texture_normal = ExtResource( 5 )
texture_pressed = ExtResource( 4 )
texture_hover = ExtResource( 3 )
stretch_mode = 3
script = ExtResource( 6 )
__meta__ = {
"_edit_use_anchors_": false
@ -27,4 +47,12 @@ __meta__ = {
position = Vector2( 32, 32 )
texture = ExtResource( 2 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/Show = SubResource( 1 )
[node name="ButtonSFX" parent="." instance=ExtResource( 7 )]
[connection signal="focus_entered" from="." to="ButtonSFX" method="on_hover"]
[connection signal="mouse_entered" from="." to="ButtonSFX" method="on_hover"]
[connection signal="pressed" from="." to="." method="_on_TextureButton_pressed"]
[connection signal="pressed" from="." to="ButtonSFX" method="on_select"]

View File

@ -5,19 +5,32 @@ var scenes = []
func _ready():
GameStats.connect("powerup_picked", self, "queue_free")
scenes.append("res://Pegs/Yellow/PowerupCards/Scattershot.tscn")
scenes.append("res://Pegs/Yellow/PowerupCards/ExtraBall.tscn")
spawn_powerups(3)
spawn_powerups(2)
get_tree().paused = true
GameStats.powerup_screen_active = true
$CanvasLayer/AnimationPlayer.play("Flyin")
func spawn_powerups(value):
spawn_powerup(GameStats.stage_powerup)
var i = 0
while i < value:
var NewPowerup = load(scenes[rand_range(0, scenes.size())])
var new_powerup = NewPowerup.instance()
new_powerup.set_spawn_position(self.global_position)
var main = get_tree().current_scene
$CanvasLayer/CenterContainer/HBoxContainer.add_child(new_powerup)
var timer = Timer.new()
timer.connect("timeout", self, "spawn_random_powerup")
timer.one_shot = true
add_child(timer)
i += 1
timer.start(i * 0.12)
func spawn_random_powerup():
spawn_powerup(scenes[rand_range(0, scenes.size())])
# spawn_powerup(scenes[rand_range(0, scenes.size()])
func spawn_powerup(new_powerup_string):
var NewPowerup = load(new_powerup_string)
var new_powerup = NewPowerup.instance()
new_powerup.set_spawn_position(self.global_position)
$CanvasLayer/CenterContainer/HBoxContainer.add_child(new_powerup)

View File

@ -1,7 +1,22 @@
[gd_scene load_steps=2 format=2]
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Pegs/Yellow/PowerupCards.gd" type="Script" id=1]
[sub_resource type="Animation" id=1]
resource_name = "Flyin"
length = 0.5
step = 0.01
tracks/0/type = "bezier"
tracks/0/path = NodePath("CenterContainer:rect_position:y")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"points": PoolRealArray( 300, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0 ),
"times": PoolRealArray( 0, 0.5 )
}
[node name="PowerupCards" type="Node2D"]
pause_mode = 2
script = ExtResource( 1 )
@ -11,6 +26,8 @@ script = ExtResource( 1 )
[node name="CenterContainer" type="CenterContainer" parent="CanvasLayer"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_top = 50.0
margin_bottom = 50.0
__meta__ = {
"_edit_use_anchors_": false
}
@ -23,3 +40,6 @@ margin_bottom = 108.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="AnimationPlayer" type="AnimationPlayer" parent="CanvasLayer"]
anims/Flyin = SubResource( 1 )

View File

@ -0,0 +1,9 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Pegs/Yellow/PowerupCard.tscn" type="PackedScene" id=1]
[ext_resource path="res://Ball/sprite.png" type="Texture" id=2]
[node name="TextureButton" instance=ExtResource( 1 )]
[node name="Sprite" parent="." index="0"]
texture = ExtResource( 2 )

View File

@ -1,6 +1,29 @@
[gd_scene load_steps=2 format=2]
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Pegs/Yellow/PowerupCard.tscn" type="PackedScene" id=1]
[ext_resource path="res://Pegs/Yellow/Powerups/Scattershot/Scattershot.png" type="Texture" id=2]
[ext_resource path="res://Pegs/Yellow/yellow.png" type="Texture" id=3]
[ext_resource path="res://Pegs/Yellow/Powerups/Scattershot/ScattershoPortalt.png" type="Texture" id=4]
[node name="Scattershot" instance=ExtResource( 1 )]
hint_tooltip = "scattershot!"
[node name="Sprite5" type="Sprite" parent="." index="0"]
position = Vector2( 32, 32 )
texture = ExtResource( 4 )
hframes = 6
[node name="Sprite" parent="." index="1"]
texture = ExtResource( 3 )
[node name="Sprite2" type="Sprite" parent="." index="2"]
position = Vector2( 46, 40 )
texture = ExtResource( 2 )
[node name="Sprite3" type="Sprite" parent="." index="3"]
position = Vector2( 48, 12 )
texture = ExtResource( 2 )
[node name="Sprite4" type="Sprite" parent="." index="4"]
position = Vector2( 13, 18 )
texture = ExtResource( 2 )

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/ScattershoPortalt.png-2ae7ac0cfd70b69cd8ba914119d8fce0.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Pegs/Yellow/Powerups/Scattershot/ScattershoPortalt.png"
dest_files=[ "res://.import/ScattershoPortalt.png-2ae7ac0cfd70b69cd8ba914119d8fce0.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=false
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=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Scattershot-Sheet.png-ecf161ac3d7600c6a9125b1338a0303f.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Pegs/Yellow/Powerups/Scattershot/Scattershot-Sheet.png"
dest_files=[ "res://.import/Scattershot-Sheet.png-ecf161ac3d7600c6a9125b1338a0303f.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=false
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=false
svg/scale=1.0

View File

@ -0,0 +1,39 @@
extends Node2D
var appeared = false
export var ball_number = 16
func _ready() -> void:
$AnimatedSprite.frame = 0
$AnimatedSprite.play("appear")
$Particles2D.emitting = true
func set_time_scale():
Engine.time_scale = 1
func _on_AnimatedSprite_animation_finished() -> void:
if appeared:
queue_free()
else:
appeared = true
$AnimatedSprite.play("disappear")
spawn_balls()
func spawn_balls():
if GameStats.camera_fx:
Engine.time_scale = 0.25
$SlowmoTimer.start()
var i = 0
while i < ball_number:
var Ball = preload("res://Pegs/Yellow/Powerups/Scattershot/ScattershotBall.tscn")
var ball = Ball.instance()
var main = get_tree().current_scene
ball.global_position = global_position
main.add_child(ball)
i += 1

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Scattershot.png-615948268c9a5cf2e66afee78c3b708b.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Pegs/Yellow/Powerups/Scattershot/Scattershot.png"
dest_files=[ "res://.import/Scattershot.png-615948268c9a5cf2e66afee78c3b708b.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=false
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=false
svg/scale=1.0

View File

@ -0,0 +1,102 @@
[gd_scene load_steps=17 format=2]
[ext_resource path="res://Pegs/Yellow/Powerups/Scattershot/Scattershot.gd" type="Script" id=1]
[ext_resource path="res://Pegs/Yellow/Powerups/Scattershot/ScattershoPortalt.png" type="Texture" id=2]
[sub_resource type="AtlasTexture" id=8]
atlas = ExtResource( 2 )
region = Rect2( 160, 0, 32, 32 )
[sub_resource type="AtlasTexture" id=9]
atlas = ExtResource( 2 )
region = Rect2( 128, 0, 32, 32 )
[sub_resource type="AtlasTexture" id=10]
atlas = ExtResource( 2 )
region = Rect2( 96, 0, 32, 32 )
[sub_resource type="AtlasTexture" id=11]
atlas = ExtResource( 2 )
region = Rect2( 64, 0, 32, 32 )
[sub_resource type="AtlasTexture" id=12]
atlas = ExtResource( 2 )
region = Rect2( 32, 0, 32, 32 )
[sub_resource type="AtlasTexture" id=13]
atlas = ExtResource( 2 )
region = Rect2( 0, 0, 32, 32 )
[sub_resource type="AtlasTexture" id=14]
atlas = ExtResource( 2 )
region = Rect2( 0, 0, 32, 32 )
[sub_resource type="AtlasTexture" id=15]
atlas = ExtResource( 2 )
region = Rect2( 32, 0, 32, 32 )
[sub_resource type="AtlasTexture" id=16]
atlas = ExtResource( 2 )
region = Rect2( 64, 0, 32, 32 )
[sub_resource type="AtlasTexture" id=17]
atlas = ExtResource( 2 )
region = Rect2( 96, 0, 32, 32 )
[sub_resource type="AtlasTexture" id=18]
atlas = ExtResource( 2 )
region = Rect2( 128, 0, 32, 32 )
[sub_resource type="AtlasTexture" id=19]
atlas = ExtResource( 2 )
region = Rect2( 160, 0, 32, 32 )
[sub_resource type="SpriteFrames" id=20]
animations = [ {
"frames": [ SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ) ],
"loop": true,
"name": "appear",
"speed": 15.0
}, {
"frames": [ SubResource( 14 ), SubResource( 15 ), SubResource( 16 ), SubResource( 17 ), SubResource( 18 ), SubResource( 19 ) ],
"loop": false,
"name": "disappear",
"speed": 15.0
} ]
[sub_resource type="ParticlesMaterial" id=21]
emission_shape = 1
emission_sphere_radius = 16.0
flag_disable_z = true
direction = Vector3( 1, 10, 0 )
spread = 180.0
gravity = Vector3( 0, 100, 0 )
initial_velocity = 60.0
orbit_velocity = 0.0
orbit_velocity_random = 0.0
color = Color( 0.454902, 0.337255, 0.607843, 1 )
[node name="Scattershot" type="Node2D"]
script = ExtResource( 1 )
[node name="SlowmoTimer" type="Timer" parent="."]
wait_time = 0.25
one_shot = true
autostart = true
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
z_index = -15
frames = SubResource( 20 )
animation = "appear"
[node name="Particles2D" type="Particles2D" parent="."]
z_index = -20
emitting = false
amount = 64
lifetime = 3.0
one_shot = true
explosiveness = 1.0
process_material = SubResource( 21 )
[connection signal="timeout" from="SlowmoTimer" to="." method="set_time_scale"]
[connection signal="animation_finished" from="AnimatedSprite" to="." method="_on_AnimatedSprite_animation_finished"]

View File

@ -0,0 +1,41 @@
extends RigidBody2D
var can_be_deleted = false setget set_can_be_deleted, get_can_be_deleted
func _ready() -> void:
var x_impulse = rand_range(-150, 150)
var y_impulse = rand_range(-150, 150)
var impulse_vector = Vector2(x_impulse, y_impulse)
apply_central_impulse(Vector2(impulse_vector))
func _physics_process(_delta):
var collider_array = get_colliding_bodies()
for collider in collider_array:
set_particle_direction(collider)
turn_pegs_green(collider)
func turn_pegs_green(collider):
# check if pegs can be turned green
if (collider.has_method("make_green")):
#if yes then do it
collider.make_green()
if can_be_deleted:
spawn_particles()
queue_free()
func set_particle_direction(collider):
if (collider.has_method("set_particle_direction")):
collider.set_particle_direction(linear_velocity.normalized() * -1)
func set_can_be_deleted(value):
can_be_deleted = value
func get_can_be_deleted():
return can_be_deleted
func spawn_particles():
var NewParticles = preload("res://Pegs/Yellow/Powerups/Scattershot/ScattershotBallParticles.tscn")
var particles = NewParticles.instance()
var main = get_tree().current_scene
particles.global_position = global_position
main.add_child(particles)

View File

@ -0,0 +1,50 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Pegs/Yellow/Powerups/Scattershot/Scattershot-Sheet.png" type="Texture" id=1]
[ext_resource path="res://Pegs/Yellow/Powerups/Scattershot/ScattershotBall.gd" type="Script" id=2]
[sub_resource type="CircleShape2D" id=1]
radius = 3.17969
[sub_resource type="ParticlesMaterial" id=2]
emission_shape = 1
emission_sphere_radius = 4.0
flag_disable_z = true
direction = Vector3( 0, 0, 0 )
gravity = Vector3( 0, -50, 0 )
orbit_velocity = 0.0
orbit_velocity_random = 0.0
color = Color( 0.968627, 1, 0.682353, 1 )
[node name="ScattershotBall" type="RigidBody2D"]
collision_layer = 0
mass = 2.0
contacts_reported = 1
contact_monitor = true
script = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )
hframes = 6
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
[node name="Timer" type="Timer" parent="."]
wait_time = 1.5
one_shot = true
autostart = true
[node name="CanBeDeletedTimer" type="Timer" parent="."]
wait_time = 0.25
one_shot = true
autostart = true
[node name="Particles2D" type="Particles2D" parent="."]
lifetime = 2.0
local_coords = false
process_material = SubResource( 2 )
[connection signal="timeout" from="Timer" to="." method="queue_free"]
[connection signal="timeout" from="Timer" to="." method="spawn_particles"]
[connection signal="timeout" from="CanBeDeletedTimer" to="." method="set_can_be_deleted" binds= [ true ]]

View File

@ -0,0 +1,4 @@
extends Particles2D
func _ready() -> void:
$AnimatedSprite.play("default")

View File

@ -0,0 +1,59 @@
[gd_scene load_steps=10 format=2]
[ext_resource path="res://Pegs/Yellow/Powerups/Scattershot/Scattershot-Sheet.png" type="Texture" id=1]
[ext_resource path="res://Pegs/Yellow/Powerups/Scattershot/ScattershotBallParticles.gd" type="Script" id=2]
[sub_resource type="ParticlesMaterial" id=1]
emission_shape = 1
emission_sphere_radius = 3.0
flag_disable_z = true
direction = Vector3( 0, -10, 0 )
spread = 70.08
gravity = Vector3( 0, 98, 0 )
initial_velocity = 49.18
orbit_velocity = 0.0
orbit_velocity_random = 0.0
color = Color( 0.968627, 1, 0.682353, 1 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 1 )
region = Rect2( 10, 0, 10, 10 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 1 )
region = Rect2( 20, 0, 10, 10 )
[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 1 )
region = Rect2( 30, 0, 10, 10 )
[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 1 )
region = Rect2( 40, 0, 10, 10 )
[sub_resource type="AtlasTexture" id=7]
atlas = ExtResource( 1 )
region = Rect2( 50, 0, 10, 10 )
[sub_resource type="SpriteFrames" id=2]
animations = [ {
"frames": [ SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ) ],
"loop": false,
"name": "default",
"speed": 15.0
} ]
[node name="ScattershotBallParticles" type="Particles2D"]
emitting = false
amount = 6
lifetime = 5.0
one_shot = true
explosiveness = 0.99
local_coords = false
process_material = SubResource( 1 )
script = ExtResource( 2 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
frames = SubResource( 2 )
[connection signal="animation_finished" from="AnimatedSprite" to="." method="queue_free"]

View File

@ -18,11 +18,12 @@ func make_green():
var main = get_tree().current_scene
main.add_child(green_peg)
var Powerups = preload("res://Pegs/Yellow/PowerupCards.tscn")
var powerups = Powerups.instance()
powerups.position = global_position
var Powerup = load(GameStats.current_powerup)
var powerup = Powerup.instance()
main.add_child(powerups)
powerup.global_position = global_position
main.add_child(powerup)
#finally delete the old peg
queue_free()

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=26 format=2]
[gd_scene load_steps=28 format=2]
[ext_resource path="res://Cannon/Cannon.tscn" type="PackedScene" id=1]
[ext_resource path="res://Borders/tileset.png" type="Texture" id=2]
@ -12,7 +12,9 @@
[ext_resource path="res://Stages/World.gd" type="Script" id=10]
[ext_resource path="res://Effects/FadeIn.tscn" type="PackedScene" id=11]
[ext_resource path="res://Stages/Background.png" type="Texture" id=12]
[ext_resource path="res://Pegs/Purple/PurpleBar.tscn" type="PackedScene" id=13]
[ext_resource path="res://Menu/Pause.tscn" type="PackedScene" id=14]
[ext_resource path="res://Pegs/Yellow/PowerupCards.tscn" type="PackedScene" id=15]
[sub_resource type="ConvexPolygonShape2D" id=1]
points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
@ -242,4 +244,18 @@ position = Vector2( 192, 209 )
[node name="YellowPeg" parent="." instance=ExtResource( 4 )]
position = Vector2( 152, 38 )
[node name="PurpleBar" parent="." instance=ExtResource( 13 )]
position = Vector2( 70, 100 )
[node name="PurpleBar2" parent="." instance=ExtResource( 13 )]
position = Vector2( 123, 134 )
[node name="PurpleBar3" parent="." instance=ExtResource( 13 )]
position = Vector2( 62, 154 )
[node name="PurpleBar4" parent="." instance=ExtResource( 13 )]
position = Vector2( 30, 124 )
[node name="PowerupCards" parent="." instance=ExtResource( 15 )]
[editable path="Ball"]

View File

@ -18,6 +18,8 @@ var camera_fx = true
var bonus_points = 0
var best_combo = 1
var powerup_screen_active = false
var current_powerup = "res://Pegs/Yellow/Powerups/Scattershot/Scattershot.tscn"
var stage_powerup = "res://Pegs/Yellow/PowerupCards/Scattershot.tscn"
func add_balls(balls):
balls_left += balls