mirror of
https://git.kittycat.homes/zoe/pegchamp.git
synced 2024-08-15 03:15:39 +00:00
powerup system
This commit is contained in:
parent
c8747328cf
commit
77ca16be36
149 changed files with 2472 additions and 331 deletions
|
@ -9,3 +9,5 @@ func set_balls():
|
|||
var old_region_size = get_region_rect().size.y
|
||||
var new_region = Rect2(0, 0, old_region_size * GameStats.balls_left - old_region_size, old_region_size)
|
||||
set_region_rect(new_region)
|
||||
visible = true
|
||||
else: visible = false
|
||||
|
|
5
HUD/BallsLeftLabel.gd
Normal file
5
HUD/BallsLeftLabel.gd
Normal file
|
@ -0,0 +1,5 @@
|
|||
extends Node2D
|
||||
|
||||
func _ready():
|
||||
$AnimationPlayer.play("show")
|
||||
$Label.text = "+" + String(GameStats.bonus_points)
|
43
HUD/BallsLeftLabel.tscn
Normal file
43
HUD/BallsLeftLabel.tscn
Normal file
|
@ -0,0 +1,43 @@
|
|||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://Menu/Theme.tres" type="Theme" id=1]
|
||||
[ext_resource path="res://HUD/BallsLeftLabel.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Ball/sprite.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="Animation" id=1]
|
||||
resource_name = "show"
|
||||
length = 1.5
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath(".:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.5, 1.3, 1.5 ),
|
||||
"transitions": PoolRealArray( 1, 1, 1, 1 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( -48, 8 ), Vector2( 8, 8 ), Vector2( 16, 8 ), Vector2( -48, 8 ) ]
|
||||
}
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer"]
|
||||
|
||||
[node name="BallsLeft" type="Node2D" parent="."]
|
||||
position = Vector2( 8, 8 )
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Label" type="Label" parent="BallsLeft"]
|
||||
margin_right = 112.0
|
||||
margin_bottom = 39.0
|
||||
theme = ExtResource( 1 )
|
||||
text = "+50"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="BallsLeft/Label"]
|
||||
position = Vector2( 8, 8 )
|
||||
texture = ExtResource( 3 )
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="BallsLeft"]
|
||||
anims/show = SubResource( 1 )
|
Loading…
Add table
Add a link
Reference in a new issue