added basic level selection menu

This commit is contained in:
zoe 2021-09-11 22:35:58 +02:00
parent 8639876921
commit 2637008a33
54 changed files with 756 additions and 32 deletions

15
Pegs/Purple/PurpleBar.gd Normal file
View file

@ -0,0 +1,15 @@
extends StaticBody2D
func make_green():
var main = get_tree().current_scene
var Green_bar = preload("res://Pegs/Green/GreenBar.tscn")
var green_bar = Green_bar.instance()
green_bar.global_position = global_position
green_bar.global_rotation = global_rotation
main.add_child(green_bar)
queue_free()
func bouncy():
pass

View file

@ -0,0 +1,27 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://Pegs/Purple/PurpleBar.gd" type="Script" id=1]
[ext_resource path="res://Pegs/Purple/bar.png" type="Texture" id=2]
[sub_resource type="PhysicsMaterial" id=1]
friction = 5.0
absorbent = true
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 15, 4 )
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 16, 3 )
[node name="PurpleBar" type="StaticBody2D"]
physics_material_override = SubResource( 1 )
script = ExtResource( 1 )
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 2 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 2 )
[node name="CollisionShape2D2" type="CollisionShape2D" parent="."]
shape = SubResource( 3 )

View file

@ -12,4 +12,3 @@ script = ExtResource( 1 )
texture = ExtResource( 2 )
[node name="DefaultPegCollisionShape" parent="." instance=ExtResource( 3 )]
visible = false

BIN
Pegs/Purple/bar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/bar.png-8143f2de97cbe2af35e481c665501058.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Pegs/Purple/bar.png"
dest_files=[ "res://.import/bar.png-8143f2de97cbe2af35e481c665501058.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