├── icon.png ├── assets ├── GUI │ ├── star_1.png │ ├── star_2.png │ ├── star_3.png │ ├── btn_forward.png │ ├── btn_restart.png │ ├── GUIBackground.png │ ├── energy_bar_bg.png │ ├── slot_start_1.png │ ├── slot_start_2.png │ ├── slot_start_3.png │ ├── energy_bar_fill.png │ ├── btn_restart_small.png │ ├── RammettoOne-Regular.ttf │ ├── container_background.png │ ├── star_1.png.import │ ├── star_2.png.import │ ├── star_3.png.import │ ├── btn_forward.png.import │ ├── btn_restart.png.import │ ├── slot_start_1.png.import │ ├── slot_start_2.png.import │ ├── slot_start_3.png.import │ ├── GUIBackground.png.import │ ├── energy_bar_bg.png.import │ ├── energy_bar_fill.png.import │ ├── btn_restart_small.png.import │ └── container_background.png.import └── gameplay │ ├── birds.png │ ├── blocks.png │ ├── smokes.png │ ├── spot.png │ ├── spot_red.png │ ├── elastic_tex.png │ ├── slingshot.png │ ├── slingshot_2.png │ ├── background_1.jpg │ ├── spot.png.import │ ├── birds.png.import │ ├── blocks.png.import │ ├── smokes.png.import │ ├── slingshot.png.import │ ├── spot_red.png.import │ ├── elastic_tex.png.import │ ├── slingshot_2.png.import │ └── background_1.jpg.import ├── .gitignore ├── scenes ├── Spot.tscn ├── RestartButton.tscn ├── Elastic.tscn ├── ennemies │ ├── Ennemy.tscn │ └── LittleGreen.tscn ├── blocks │ ├── Block.tscn │ └── LongWood.tscn ├── Damageable.tscn ├── GUI.gd ├── Slingshot.tscn ├── Explosion.tscn ├── Gameover.tscn ├── Camera.gd ├── birds │ ├── Bird.tscn │ └── Bird.gd ├── Slingshot.gd ├── Damageable.gd └── GUI.tscn ├── default_theme.tres ├── Gameover.gd ├── default_env.tres ├── icon.png.import ├── EndLevel.gd ├── Level.gd ├── project.godot ├── EndLevel.tscn └── Level.tscn /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/icon.png -------------------------------------------------------------------------------- /assets/GUI/star_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/GUI/star_1.png -------------------------------------------------------------------------------- /assets/GUI/star_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/GUI/star_2.png -------------------------------------------------------------------------------- /assets/GUI/star_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/GUI/star_3.png -------------------------------------------------------------------------------- /assets/GUI/btn_forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/GUI/btn_forward.png -------------------------------------------------------------------------------- /assets/GUI/btn_restart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/GUI/btn_restart.png -------------------------------------------------------------------------------- /assets/gameplay/birds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/gameplay/birds.png -------------------------------------------------------------------------------- /assets/gameplay/blocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/gameplay/blocks.png -------------------------------------------------------------------------------- /assets/gameplay/smokes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/gameplay/smokes.png -------------------------------------------------------------------------------- /assets/gameplay/spot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/gameplay/spot.png -------------------------------------------------------------------------------- /assets/GUI/GUIBackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/GUI/GUIBackground.png -------------------------------------------------------------------------------- /assets/GUI/energy_bar_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/GUI/energy_bar_bg.png -------------------------------------------------------------------------------- /assets/GUI/slot_start_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/GUI/slot_start_1.png -------------------------------------------------------------------------------- /assets/GUI/slot_start_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/GUI/slot_start_2.png -------------------------------------------------------------------------------- /assets/GUI/slot_start_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/GUI/slot_start_3.png -------------------------------------------------------------------------------- /assets/gameplay/spot_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/gameplay/spot_red.png -------------------------------------------------------------------------------- /assets/GUI/energy_bar_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/GUI/energy_bar_fill.png -------------------------------------------------------------------------------- /assets/gameplay/elastic_tex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/gameplay/elastic_tex.png -------------------------------------------------------------------------------- /assets/gameplay/slingshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/gameplay/slingshot.png -------------------------------------------------------------------------------- /assets/gameplay/slingshot_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/gameplay/slingshot_2.png -------------------------------------------------------------------------------- /assets/GUI/btn_restart_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/GUI/btn_restart_small.png -------------------------------------------------------------------------------- /assets/gameplay/background_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/gameplay/background_1.jpg -------------------------------------------------------------------------------- /assets/GUI/RammettoOne-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/GUI/RammettoOne-Regular.ttf -------------------------------------------------------------------------------- /assets/GUI/container_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cevantime/BirdsFurry/HEAD/assets/GUI/container_background.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Godot-specific ignores 2 | .import/ 3 | export.cfg 4 | export_presets.cfg 5 | 6 | # Imported translations (automatically generated from CSV files) 7 | *.translation 8 | 9 | # Mono-specific ignores 10 | .mono/ 11 | data_*/ 12 | -------------------------------------------------------------------------------- /scenes/Spot.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=2] 2 | 3 | [ext_resource path="res://assets/gameplay/spot_red.png" type="Texture" id=1] 4 | 5 | [node name="Spot" type="Sprite"] 6 | 7 | scale = Vector2( 0.3, 0.3 ) 8 | texture = ExtResource( 1 ) 9 | _sections_unfolded = [ "Transform" ] 10 | 11 | 12 | -------------------------------------------------------------------------------- /default_theme.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Theme" load_steps=3 format=2] 2 | 3 | [ext_resource path="res://assets/GUI/RammettoOne-Regular.ttf" type="DynamicFontData" id=1] 4 | 5 | [sub_resource type="DynamicFont" id=1] 6 | font_data = ExtResource( 1 ) 7 | 8 | [resource] 9 | default_font = SubResource( 1 ) 10 | -------------------------------------------------------------------------------- /scenes/RestartButton.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=2] 2 | 3 | [ext_resource path="res://assets/GUI/btn_restart_small.png" type="Texture" id=1] 4 | 5 | [node name="RestartButton" type="TextureButton"] 6 | anchor_left = 0.5 7 | anchor_top = 1.0 8 | anchor_right = 0.5 9 | anchor_bottom = 1.0 10 | margin_left = -27.0 11 | margin_top = -83.2881 12 | margin_right = 27.0 13 | margin_bottom = -26.2881 14 | texture_normal = ExtResource( 1 ) 15 | 16 | -------------------------------------------------------------------------------- /Gameover.gd: -------------------------------------------------------------------------------- 1 | extends CanvasLayer 2 | 3 | signal restart_level 4 | 5 | func _ready(): 6 | $PanelContainer.hide() 7 | $RestartButton.hide() 8 | 9 | func display(): 10 | yield(get_tree().create_timer(1), "timeout") 11 | $PanelContainer.show() 12 | yield(get_tree().create_timer(2), "timeout") 13 | $RestartButton.show() 14 | $PanelContainer/Message.text = "Restart ?" 15 | 16 | func _on_RestartButton_pressed(): 17 | emit_signal("restart_level") 18 | -------------------------------------------------------------------------------- /scenes/Elastic.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=2] 2 | 3 | [ext_resource path="res://assets/gameplay/elastic_tex.png" type="Texture" id=1] 4 | 5 | [node name="Elastic" type="Node2D"] 6 | 7 | [node name="Sprite" type="Sprite" parent="." index="0"] 8 | 9 | scale = Vector2( 0.03, 0.03 ) 10 | texture = ExtResource( 1 ) 11 | _sections_unfolded = [ "Transform" ] 12 | 13 | [node name="FixationPoint" type="Position2D" parent="." index="1"] 14 | 15 | 16 | -------------------------------------------------------------------------------- /default_env.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Environment" load_steps=2 format=2] 2 | 3 | [sub_resource type="ProceduralSky" id=1] 4 | sky_top_color = Color( 0.0470588, 0.454902, 0.976471, 1 ) 5 | sky_horizon_color = Color( 0.556863, 0.823529, 0.909804, 1 ) 6 | sky_curve = 0.25 7 | ground_bottom_color = Color( 0.101961, 0.145098, 0.188235, 1 ) 8 | ground_horizon_color = Color( 0.482353, 0.788235, 0.952941, 1 ) 9 | ground_curve = 0.01 10 | sun_energy = 16.0 11 | 12 | [resource] 13 | background_mode = 2 14 | background_sky = SubResource( 1 ) 15 | -------------------------------------------------------------------------------- /scenes/ennemies/Ennemy.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=2] 2 | 3 | [ext_resource path="res://scenes/Damageable.tscn" type="PackedScene" id=1] 4 | 5 | [sub_resource type="CircleShape2D" id=1] 6 | radius = 32.253 7 | 8 | [node name="Ennemy" groups=[ 9 | "Ennemy", 10 | ] instance=ExtResource( 1 )] 11 | 12 | [node name="Texture" parent="." index="0"] 13 | position = Vector2( -0.316502, -4.03055 ) 14 | region_rect = Rect2( 983, 12, 77, 77 ) 15 | 16 | [node name="CollisionShape2D" parent="." index="1"] 17 | shape = SubResource( 1 ) 18 | 19 | -------------------------------------------------------------------------------- /scenes/blocks/Block.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=2] 2 | 3 | [ext_resource path="res://scenes/Damageable.tscn" type="PackedScene" id=1] 4 | 5 | [sub_resource type="StreamTexture" id=1] 6 | 7 | flags = 4 8 | load_path = "res://.import/blocks.png-530f7e8399d9a0feaa5c771db999822a.stex" 9 | 10 | [sub_resource type="RectangleShape2D" id=2] 11 | 12 | custom_solver_bias = 0.0 13 | extents = Vector2( 39.5902, 39.2058 ) 14 | 15 | [node name="Block" instance=ExtResource( 1 )] 16 | 17 | [node name="Texture" parent="." index="0"] 18 | 19 | position = Vector2( -0.342499, -0.183104 ) 20 | texture = SubResource( 1 ) 21 | region_rect = Rect2( 159.75, -0.38175, 79.75, 80.5 ) 22 | 23 | [node name="CollisionShape2D" parent="." index="1"] 24 | 25 | shape = SubResource( 2 ) 26 | 27 | 28 | -------------------------------------------------------------------------------- /icon.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://icon.png" 13 | dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/GUI/star_1.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/star_1.png-880fac456012358eb4a46cb9f32c14fe.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/GUI/star_1.png" 13 | dest_files=[ "res://.import/star_1.png-880fac456012358eb4a46cb9f32c14fe.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/GUI/star_2.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/star_2.png-a53be981c9fd0441c8bb98dae3f0185b.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/GUI/star_2.png" 13 | dest_files=[ "res://.import/star_2.png-a53be981c9fd0441c8bb98dae3f0185b.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/GUI/star_3.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/star_3.png-934112156ce686cf8968fb7d39ff893f.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/GUI/star_3.png" 13 | dest_files=[ "res://.import/star_3.png-934112156ce686cf8968fb7d39ff893f.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/gameplay/spot.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/spot.png-205019f08589b819f08ac0c222f7acdf.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/gameplay/spot.png" 13 | dest_files=[ "res://.import/spot.png-205019f08589b819f08ac0c222f7acdf.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/gameplay/birds.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/birds.png-860e7a796d602b083e68787ebac84b33.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/gameplay/birds.png" 13 | dest_files=[ "res://.import/birds.png-860e7a796d602b083e68787ebac84b33.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/gameplay/blocks.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/blocks.png-530f7e8399d9a0feaa5c771db999822a.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/gameplay/blocks.png" 13 | dest_files=[ "res://.import/blocks.png-530f7e8399d9a0feaa5c771db999822a.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/gameplay/smokes.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/smokes.png-ca713841f7f5755944fdeaab56220bfc.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/gameplay/smokes.png" 13 | dest_files=[ "res://.import/smokes.png-ca713841f7f5755944fdeaab56220bfc.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/GUI/btn_forward.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/btn_forward.png-136b75e80420cd907d505099880820ca.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/GUI/btn_forward.png" 13 | dest_files=[ "res://.import/btn_forward.png-136b75e80420cd907d505099880820ca.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/GUI/btn_restart.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/btn_restart.png-23d7538b6c3daf2810fc4ce9e0b3da07.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/GUI/btn_restart.png" 13 | dest_files=[ "res://.import/btn_restart.png-23d7538b6c3daf2810fc4ce9e0b3da07.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/gameplay/slingshot.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/slingshot.png-7ad630e85b33ee6d694459c127c26249.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/gameplay/slingshot.png" 13 | dest_files=[ "res://.import/slingshot.png-7ad630e85b33ee6d694459c127c26249.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/gameplay/spot_red.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/spot_red.png-e6ddde1254068cc8b35b4ffffbed8de5.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/gameplay/spot_red.png" 13 | dest_files=[ "res://.import/spot_red.png-e6ddde1254068cc8b35b4ffffbed8de5.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/GUI/slot_start_1.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/slot_start_1.png-439d1ca3c1aa21321472beab0e9a6fa5.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/GUI/slot_start_1.png" 13 | dest_files=[ "res://.import/slot_start_1.png-439d1ca3c1aa21321472beab0e9a6fa5.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/GUI/slot_start_2.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/slot_start_2.png-b833a2f7ae9bfab1858ea9cda57678e2.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/GUI/slot_start_2.png" 13 | dest_files=[ "res://.import/slot_start_2.png-b833a2f7ae9bfab1858ea9cda57678e2.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/GUI/slot_start_3.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/slot_start_3.png-8a80e6a3fb6eb806a58277b28cb02668.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/GUI/slot_start_3.png" 13 | dest_files=[ "res://.import/slot_start_3.png-8a80e6a3fb6eb806a58277b28cb02668.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/GUI/GUIBackground.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/GUIBackground.png-2fd629c69490e9447a0cd1a74a7936b3.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/GUI/GUIBackground.png" 13 | dest_files=[ "res://.import/GUIBackground.png-2fd629c69490e9447a0cd1a74a7936b3.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/GUI/energy_bar_bg.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/energy_bar_bg.png-631cba896b660d861406b09759800e93.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/GUI/energy_bar_bg.png" 13 | dest_files=[ "res://.import/energy_bar_bg.png-631cba896b660d861406b09759800e93.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/gameplay/elastic_tex.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/elastic_tex.png-ae684723cde0564221087a31f2c45591.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/gameplay/elastic_tex.png" 13 | dest_files=[ "res://.import/elastic_tex.png-ae684723cde0564221087a31f2c45591.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/gameplay/slingshot_2.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/slingshot_2.png-f85cb216118753abb296267a360a604a.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/gameplay/slingshot_2.png" 13 | dest_files=[ "res://.import/slingshot_2.png-f85cb216118753abb296267a360a604a.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/GUI/energy_bar_fill.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/energy_bar_fill.png-8f3fbf243c545e9f30bd17e2659a05c4.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/GUI/energy_bar_fill.png" 13 | dest_files=[ "res://.import/energy_bar_fill.png-8f3fbf243c545e9f30bd17e2659a05c4.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/gameplay/background_1.jpg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/background_1.jpg-3ab4c6402ba625e378fb29b0afc7b96b.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/gameplay/background_1.jpg" 13 | dest_files=[ "res://.import/background_1.jpg-3ab4c6402ba625e378fb29b0afc7b96b.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /EndLevel.gd: -------------------------------------------------------------------------------- 1 | extends CanvasLayer 2 | 3 | export(Dictionary) var score_levels = { 4 | 1: 5000, 5 | 2: 10000, 6 | 3: 15000 7 | } 8 | 9 | var animated_score 10 | 11 | signal restart_level 12 | 13 | func _ready(): 14 | $Background.hide() 15 | set_process(false) 16 | 17 | func _process(delta): 18 | for level in score_levels.keys(): 19 | if animated_score >= score_levels[level]: 20 | get_node("Background/Star" + str(level)).show() 21 | $Background/Label.text = str(int(animated_score)) 22 | 23 | func display(score): 24 | animated_score = 0 25 | set_process(true) 26 | $Background.show() 27 | $TweenScore.interpolate_property(self, "animated_score", animated_score, score, 2, Tween.TRANS_LINEAR, Tween.EASE_IN) 28 | if ! $TweenScore.is_active(): 29 | $TweenScore.start() 30 | 31 | 32 | func _on_RestartButton_pressed(): 33 | emit_signal("restart_level") 34 | -------------------------------------------------------------------------------- /assets/GUI/btn_restart_small.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/btn_restart_small.png-fced9def8b06e138f4bf114e424348dd.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/GUI/btn_restart_small.png" 13 | dest_files=[ "res://.import/btn_restart_small.png-fced9def8b06e138f4bf114e424348dd.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /assets/GUI/container_background.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/container_background.png-0ca3ca26a9dfed8d5eda3621d6880e04.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://assets/GUI/container_background.png" 13 | dest_files=[ "res://.import/container_background.png-0ca3ca26a9dfed8d5eda3621d6880e04.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /scenes/Damageable.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=2] 2 | 3 | [ext_resource path="res://scenes/Damageable.gd" type="Script" id=1] 4 | [ext_resource path="res://assets/gameplay/birds.png" type="Texture" id=2] 5 | 6 | [sub_resource type="CircleShape2D" id=1] 7 | radius = 32.253 8 | 9 | [node name="Damageable" type="RigidBody2D" groups=[ 10 | "Damageable", 11 | ]] 12 | contacts_reported = 7 13 | contact_monitor = true 14 | script = ExtResource( 1 ) 15 | 16 | [node name="Texture" type="Sprite" parent="."] 17 | position = Vector2( -3.90137, -4.38904 ) 18 | texture = ExtResource( 2 ) 19 | region_enabled = true 20 | region_rect = Rect2( 86.5, 7.875, 78.5, 76.125 ) 21 | 22 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 23 | shape = SubResource( 1 ) 24 | 25 | [node name="AnimationPlayer" type="AnimationPlayer" parent="."] 26 | 27 | [connection signal="body_entered" from="." to="." method="_on_Damageable_body_entered"] 28 | -------------------------------------------------------------------------------- /scenes/GUI.gd: -------------------------------------------------------------------------------- 1 | extends CanvasLayer 2 | 3 | onready var score_progress = $MarginContainer/VBoxContainer/NinePatchRect/HBoxLeft/ScoreProgress 4 | onready var score_max_label = $MarginContainer/VBoxContainer/NinePatchRect/HBoxRight/ScoreMax 5 | onready var score_value_label = $MarginContainer/VBoxContainer/NinePatchRect/HBoxRight/ScoreValue 6 | onready var tween_score = $TweenScore 7 | onready var end_button = $MarginContainer/VBoxContainer/EndButton 8 | 9 | var animated_score = 0 10 | 11 | signal end_game 12 | 13 | func _ready(): 14 | end_button.self_modulate.a = 0 15 | end_button.disabled = true 16 | 17 | func _process(delta): 18 | score_progress.value = animated_score 19 | score_value_label.text = str(int(animated_score)) 20 | 21 | func set_max_score(score_max): 22 | score_progress.max_value = score_max 23 | score_max_label.text = str(score_max) 24 | 25 | func set_score(score): 26 | tween_score.interpolate_property(self, "animated_score", animated_score, score, 0.5, Tween.TRANS_CUBIC, Tween.EASE_IN) 27 | if not tween_score.is_active(): 28 | tween_score.start() 29 | 30 | func display_end_button(): 31 | end_button.self_modulate.a = 1 32 | end_button.disabled = false 33 | 34 | func _on_EndButton_pressed(): 35 | emit_signal("end_game") 36 | -------------------------------------------------------------------------------- /scenes/Slingshot.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=6 format=2] 2 | 3 | [ext_resource path="res://scenes/Slingshot.gd" type="Script" id=1] 4 | [ext_resource path="res://scenes/Spot.tscn" type="PackedScene" id=2] 5 | [ext_resource path="res://assets/gameplay/slingshot.png" type="Texture" id=3] 6 | [ext_resource path="res://assets/gameplay/slingshot_2.png" type="Texture" id=4] 7 | [ext_resource path="res://scenes/Elastic.tscn" type="PackedScene" id=5] 8 | 9 | [node name="Slingshot" type="Node2D"] 10 | script = ExtResource( 1 ) 11 | spot_scene = ExtResource( 2 ) 12 | 13 | [node name="SlingshotBack" type="Sprite" parent="."] 14 | position = Vector2( -9.8618, -0.508491 ) 15 | z_index = -1 16 | texture = ExtResource( 3 ) 17 | 18 | [node name="SlingshotFront" type="Sprite" parent="."] 19 | position = Vector2( -21.9206, -48.824 ) 20 | z_index = 1 21 | texture = ExtResource( 4 ) 22 | 23 | [node name="LaunchPoint" type="Position2D" parent="."] 24 | position = Vector2( -2.20529, -72.0394 ) 25 | 26 | [node name="ElasticBack" parent="." instance=ExtResource( 5 )] 27 | position = Vector2( 13.2038, -75.2618 ) 28 | z_index = -1 29 | 30 | [node name="ElasticFront" parent="." instance=ExtResource( 5 )] 31 | position = Vector2( -31.6892, -62.4981 ) 32 | 33 | [node name="Trajectory" type="Node2D" parent="."] 34 | position = Vector2( -2.20529, -72.0394 ) 35 | 36 | -------------------------------------------------------------------------------- /scenes/Explosion.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=2] 2 | 3 | [ext_resource path="res://assets/gameplay/smokes.png" type="Texture" id=1] 4 | 5 | [sub_resource type="GDScript" id=2] 6 | script/source = "extends Sprite 7 | 8 | func _ready(): 9 | $AnimationPlayer.play(\"default\") 10 | yield($AnimationPlayer, \"animation_finished\"); 11 | queue_free() 12 | 13 | 14 | " 15 | 16 | [sub_resource type="Animation" id=1] 17 | resource_name = "default" 18 | length = 0.35 19 | step = 0.05 20 | tracks/0/type = "value" 21 | tracks/0/path = NodePath(".:region_rect") 22 | tracks/0/interp = 1 23 | tracks/0/loop_wrap = true 24 | tracks/0/imported = false 25 | tracks/0/enabled = true 26 | tracks/0/keys = { 27 | "times": PoolRealArray( 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3 ), 28 | "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ), 29 | "update": 1, 30 | "values": [ Rect2( 912, 247, 44, 46 ), Rect2( 860, 879, 49, 46 ), Rect2( 501, 560, 91, 82 ), Rect2( 1, 822, 116, 111 ), Rect2( 0, 587, 127, 124 ), Rect2( -8, 462, 136, 125 ), Rect2( 127, 153, 145, 138 ) ] 31 | } 32 | 33 | [node name="Explosion" type="Sprite"] 34 | scale = Vector2( 0.75, 0.75 ) 35 | texture = ExtResource( 1 ) 36 | region_enabled = true 37 | region_rect = Rect2( 127, 153, 145, 138 ) 38 | script = SubResource( 2 ) 39 | 40 | [node name="AnimationPlayer" type="AnimationPlayer" parent="."] 41 | anims/default = SubResource( 1 ) 42 | 43 | -------------------------------------------------------------------------------- /scenes/Gameover.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=6 format=2] 2 | 3 | [ext_resource path="res://Gameover.gd" type="Script" id=1] 4 | [ext_resource path="res://assets/GUI/RammettoOne-Regular.ttf" type="DynamicFontData" id=2] 5 | [ext_resource path="res://scenes/RestartButton.tscn" type="PackedScene" id=3] 6 | [ext_resource path="res://assets/GUI/btn_restart.png" type="Texture" id=4] 7 | 8 | [sub_resource type="DynamicFont" id=1] 9 | size = 30 10 | font_data = ExtResource( 2 ) 11 | 12 | [node name="Gameover" type="CanvasLayer"] 13 | script = ExtResource( 1 ) 14 | 15 | [node name="PanelContainer" type="PanelContainer" parent="."] 16 | anchor_left = 0.5 17 | anchor_top = 0.5 18 | anchor_right = 0.5 19 | anchor_bottom = 0.5 20 | margin_left = -102.0 21 | margin_top = -32.5 22 | margin_right = 102.0 23 | margin_bottom = 32.5 24 | 25 | [node name="Message" type="Label" parent="PanelContainer"] 26 | margin_left = 7.0 27 | margin_top = 7.0 28 | margin_right = 197.0 29 | margin_bottom = 58.0 30 | custom_fonts/font = SubResource( 1 ) 31 | text = "Gameover" 32 | align = 1 33 | valign = 1 34 | 35 | [node name="RestartButton" parent="." instance=ExtResource( 3 )] 36 | margin_left = -55.0 37 | margin_top = -200.034 38 | margin_right = 55.0 39 | margin_bottom = -86.0338 40 | texture_normal = ExtResource( 4 ) 41 | 42 | [connection signal="pressed" from="RestartButton" to="." method="_on_RestartButton_pressed"] 43 | -------------------------------------------------------------------------------- /scenes/Camera.gd: -------------------------------------------------------------------------------- 1 | extends Camera2D 2 | 3 | var drag_cam = false 4 | var old_mouse_pos 5 | 6 | export(int) var CAMERA_SPEED = 2 7 | export(float, 0.5, 5) var zoom_min = 1 8 | export(float, 2, 10) var zoom_max = 2 9 | export(int, 1, 10) var zoom_speed = 2 10 | 11 | func _ready(): 12 | # Called every time the node is added to the scene. 13 | # Initialization here 14 | pass 15 | 16 | func _process(delta): 17 | 18 | var mouse_pos = get_global_mouse_position() 19 | 20 | if Input.is_action_just_pressed("drag_cam") : 21 | drag_cam = true 22 | old_mouse_pos = mouse_pos 23 | 24 | if Input.is_action_just_released("drag_cam") : 25 | drag_cam = false 26 | 27 | if drag_cam : 28 | var mouse_move = (old_mouse_pos - mouse_pos) * CAMERA_SPEED 29 | position = clamp_position(position + mouse_move) 30 | old_mouse_pos = mouse_pos 31 | 32 | 33 | 34 | func clamp_position(pos) : 35 | var viewport_radius = get_viewport_rect().size / 2 * zoom 36 | pos.x = clamp(pos.x, limit_left + viewport_radius.x, limit_right - viewport_radius.x) 37 | pos.y = clamp(pos.y, limit_top + viewport_radius.y, limit_bottom - viewport_radius.y) 38 | return pos 39 | 40 | func _input(event): 41 | var z = zoom.x 42 | if event.is_action("zoom_in") : 43 | z -= 0.01 * zoom_speed 44 | if event.is_action("zoom_out") : 45 | z += 0.01 * zoom_speed 46 | 47 | z = clamp(z, zoom_min, zoom_max) 48 | 49 | zoom = Vector2(z,z) 50 | -------------------------------------------------------------------------------- /scenes/birds/Bird.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=2] 2 | 3 | [ext_resource path="res://scenes/Damageable.tscn" type="PackedScene" id=1] 4 | [ext_resource path="res://scenes/birds/Bird.gd" type="Script" id=2] 5 | 6 | [sub_resource type="Animation" id=1] 7 | resource_name = "idle" 8 | length = 5.0 9 | loop = true 10 | tracks/0/type = "value" 11 | tracks/0/path = NodePath("Texture:region_rect") 12 | tracks/0/interp = 1 13 | tracks/0/loop_wrap = true 14 | tracks/0/imported = false 15 | tracks/0/enabled = true 16 | tracks/0/keys = { 17 | "times": PoolRealArray( 0, 3, 3.1, 3.4, 3.5 ), 18 | "transitions": PoolRealArray( 1, 1, 1, 1, 1 ), 19 | "update": 1, 20 | "values": [ Rect2( 87, 7.875, 78, 76.125 ), Rect2( 2, 7.875, 84.5, 76.125 ), Rect2( 87, 7.875, 78, 76.125 ), Rect2( 2, 7.875, 84.5, 76.125 ), Rect2( 87, 7.875, 78, 76.125 ) ] 21 | } 22 | tracks/1/type = "value" 23 | tracks/1/path = NodePath("Texture:scale") 24 | tracks/1/interp = 1 25 | tracks/1/loop_wrap = true 26 | tracks/1/imported = false 27 | tracks/1/enabled = true 28 | tracks/1/keys = { 29 | "times": PoolRealArray( 0, 3, 3.1, 3.4, 3.5 ), 30 | "transitions": PoolRealArray( 1, 1, 1, 1, 1 ), 31 | "update": 1, 32 | "values": [ Vector2( 1, 1 ), Vector2( 0.92, 1 ), Vector2( 1, 1 ), Vector2( 0.92, 1 ), Vector2( 1, 1 ) ] 33 | } 34 | 35 | [node name="Bird" index="0" groups=[ 36 | "Bird", 37 | ] instance=ExtResource( 1 )] 38 | input_pickable = true 39 | can_sleep = false 40 | linear_damp = 0.0 41 | script = ExtResource( 2 ) 42 | health = 50 43 | survive_points = 2000 44 | TRANSFER_SPEED = 500 45 | 46 | [node name="Texture" parent="." index="0"] 47 | region_rect = Rect2( 87, 7.875, 78, 76.125 ) 48 | 49 | [node name="AttachPoint" type="Position2D" parent="." index="2"] 50 | position = Vector2( -35.6004, 8.29051 ) 51 | 52 | [node name="AnimationPlayer" parent="." index="3"] 53 | anims/idle = SubResource( 1 ) 54 | -------------------------------------------------------------------------------- /Level.gd: -------------------------------------------------------------------------------- 1 | extends Node 2 | 3 | var max_score = 0 4 | var score = 0 5 | var unlaunched_birds 6 | var game_ended = false 7 | 8 | func _ready(): 9 | 10 | for damageable in get_tree().get_nodes_in_group("Damageable") : 11 | damageable.connect("exploded", self, "_on_Damageable_exploded") 12 | max_score += max(damageable.destroy_points, damageable.survive_points) 13 | 14 | unlaunched_birds = get_tree().get_nodes_in_group("Bird") 15 | 16 | var current_bird = change_bird() 17 | 18 | max_score -= current_bird.survive_points 19 | 20 | $GUI.set_max_score(max_score) 21 | 22 | func _on_Damageable_exploded(damageable) : 23 | score += damageable.destroy_points 24 | $GUI.set_score(score) 25 | yield(get_tree(), "idle_frame") 26 | var ennemies = get_tree().get_nodes_in_group("Ennemy") 27 | if ennemies.size() == 0: 28 | prepare_end() 29 | 30 | func _on_Bird_eliminated(bird) : 31 | var current_bird = change_bird() 32 | if ! current_bird : 33 | prepare_end() 34 | 35 | func _on_Bird_launched(bird): 36 | unlaunched_birds.pop_front() 37 | 38 | func change_bird(): 39 | if unlaunched_birds.size() == 0: 40 | return null 41 | var current_bird = unlaunched_birds[0] 42 | current_bird.connect("eliminated", self, "_on_Bird_eliminated") 43 | current_bird.connect("launched", self, "_on_Bird_launched") 44 | current_bird.attach_to($Slingshot) 45 | $Camera.position = $Slingshot/ElasticBack/FixationPoint.global_position 46 | return current_bird 47 | 48 | func prepare_end(): 49 | $GUI.display_end_button() 50 | 51 | func end_game(): 52 | if game_ended : 53 | return 54 | game_ended = true 55 | if get_tree().get_nodes_in_group("Ennemy").size() > 0: 56 | $Gameover.display() 57 | return 58 | while unlaunched_birds.size() > 0: 59 | var bird = unlaunched_birds.pop_front() 60 | score += bird.survive_points 61 | bird.explode(false) 62 | $GUI.set_score(score) 63 | yield(get_tree().create_timer(2), "timeout") 64 | $EndLevel.display(score) 65 | 66 | func restart_level(): 67 | get_tree().reload_current_scene() 68 | 69 | func _on_GUI_end_game(): 70 | end_game() 71 | 72 | func _on_EndLevel_restart_level(): 73 | restart_level() 74 | 75 | func _on_Gameover_restart_level(): 76 | restart_level() 77 | -------------------------------------------------------------------------------- /project.godot: -------------------------------------------------------------------------------- 1 | ; Engine configuration file. 2 | ; It's best edited using the editor UI and not directly, 3 | ; since the parameters that go here are not all obvious. 4 | ; 5 | ; Format: 6 | ; [section] ; section goes between [] 7 | ; param=value ; assign values to parameters 8 | 9 | config_version=4 10 | 11 | _global_script_classes=[ ] 12 | _global_script_class_icons={ 13 | 14 | } 15 | 16 | [application] 17 | 18 | config/name="FurryBirds" 19 | run/main_scene="res://Level.tscn" 20 | config/icon="res://icon.png" 21 | 22 | [editor_plugins] 23 | 24 | enabled=PoolStringArray( ) 25 | 26 | [input] 27 | 28 | drag_cam={ 29 | "deadzone": 0.5, 30 | "events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":3,"pressed":false,"doubleclick":false,"script":null) 31 | ] 32 | } 33 | zoom_in={ 34 | "deadzone": 0.5, 35 | "events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":4,"pressed":false,"doubleclick":false,"script":null) 36 | ] 37 | } 38 | zoom_out={ 39 | "deadzone": 0.5, 40 | "events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":5,"pressed":false,"doubleclick":false,"script":null) 41 | ] 42 | } 43 | touch={ 44 | "deadzone": 0.5, 45 | "events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null) 46 | ] 47 | } 48 | 49 | [rendering] 50 | 51 | environment/default_environment="res://default_env.tres" 52 | -------------------------------------------------------------------------------- /scenes/Slingshot.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends Node2D 3 | 4 | var bird 5 | var BirdScript = preload("res://scenes/birds/Bird.gd") 6 | 7 | export(int, 5, 15) var TRAJECTORY_SPOT_COUNT = 10 8 | export(float, 0.2, 1, 0.1) var TRAJECTORY_TIME_STEP = 0.5 9 | export(int, 1, 10) var STRENGTH = 5 10 | export(int, 10, 100) var TRAJECTORY_IMPULSE = 75 11 | export(int, -90, 90) var TRAJECTORY_ANGLE = 45 12 | export(bool) var TRAJECTORY_VISIBILITY = true 13 | export(PackedScene) var spot_scene 14 | 15 | func _ready(): 16 | $Trajectory.position = $LaunchPoint.position 17 | 18 | func _process(delta): 19 | for spot in $Trajectory.get_children() : 20 | spot.queue_free() 21 | 22 | if Engine.is_editor_hint() and TRAJECTORY_VISIBILITY : 23 | draw_trajectory_for_impulse(Vector2(TRAJECTORY_IMPULSE * STRENGTH, 0).rotated(deg2rad( - TRAJECTORY_ANGLE))) 24 | else : 25 | update_elastic($ElasticBack) 26 | update_elastic($ElasticFront) 27 | var impulse = get_impulse() 28 | if is_instance_valid(self.bird) and self.bird.state == BirdScript.STATE_DRAGGED and impulse.x > 0 : 29 | draw_trajectory_for_impulse(impulse) 30 | 31 | func update_elastic(elastic) : 32 | var attach_pos = self.bird.get_node("AttachPoint").get_global_position() if is_instance_valid(self.bird) else $LaunchPoint.get_global_position() 33 | var diff_pos = attach_pos - elastic.get_node("FixationPoint").get_global_position() 34 | var middle = diff_pos / 2 35 | var sprite = elastic.get_node("Sprite") 36 | sprite.position = middle 37 | sprite.scale.x = - middle.length() * 0.01 38 | sprite.rotation = middle.angle() 39 | 40 | func attach_bird(bird) : 41 | self.bird = bird 42 | 43 | func detach_bird() : 44 | self.bird = null 45 | 46 | func get_impulse() : 47 | if ! is_instance_valid(self.bird) : 48 | return null 49 | 50 | return ($LaunchPoint.global_position - self.bird.global_position) * STRENGTH 51 | 52 | func draw_trajectory_for_impulse(impulse) : 53 | var gravity = ProjectSettings.get("physics/2d/default_gravity") 54 | for i in range(0, TRAJECTORY_SPOT_COUNT) : 55 | var t = i * TRAJECTORY_TIME_STEP 56 | var x = impulse.x * t 57 | var y = gravity * t * t / 2 + impulse.y * t 58 | draw_spot(Vector2(x,y)) 59 | 60 | func draw_spot(position): 61 | var spot = spot_scene.instance() 62 | spot.position = position 63 | $Trajectory.add_child(spot) -------------------------------------------------------------------------------- /scenes/Damageable.gd: -------------------------------------------------------------------------------- 1 | extends RigidBody2D 2 | 3 | export(int, 1, 1000) var health = 10 4 | export(PackedScene) var explosion_scene: PackedScene = preload("res://scenes/Explosion.tscn") 5 | export(int, 0, 100000) var destroy_points = 500 6 | export(int, 0, 100000) var survive_points = 0 7 | var processed_velocity = Vector2() 8 | var processed_angular_velocity = Vector2() 9 | onready var max_health = health 10 | 11 | signal exploded 12 | 13 | func _ready(): 14 | update_animation() 15 | 16 | func _physics_process(delta): 17 | self.processed_velocity = self.linear_velocity 18 | self.processed_angular_velocity = self.angular_velocity 19 | 20 | func _integrate_forces(state): 21 | var contact_counts = {} 22 | for i in range(0, state.get_contact_count()) : 23 | var contact_id = state.get_contact_collider_id(i) 24 | if not contact_counts.has(contact_id) : 25 | contact_counts[contact_id] = 1 26 | else : 27 | contact_counts[contact_id] += 1 28 | 29 | for i in range(0, state.get_contact_count()) : 30 | var contact = state.get_contact_collider_object(i) 31 | var contact_velocity = state.get_contact_collider_velocity_at_position(i) 32 | var R = state.get_contact_local_position(i) - self.global_position 33 | var self_velocity = self.processed_velocity + self.processed_angular_velocity * Vector2(-R.y, R.x) 34 | var v = contact_velocity - self_velocity 35 | var m_self = self.mass 36 | var m_contact = contact.mass if contact is RigidBody2D else 100000000 37 | var p = v.dot(state.get_contact_local_normal(i)) * (m_contact / (m_self + m_contact)) / contact_counts[contact.get_instance_id()] 38 | get_damage(p * 0.06) 39 | 40 | func _on_Damageable_body_entered( body ): 41 | # get_damage(self.processed_velocity.length() * 0.05) 42 | pass 43 | 44 | func get_damage(damage) : 45 | damage = round(damage) 46 | if damage > 0 : 47 | print("damage : ", damage) 48 | self.health -= damage 49 | update_animation() 50 | if self.health <= 0: 51 | explode() 52 | 53 | func update_animation() : 54 | if $AnimationPlayer.get_animation_list().size() > 0: 55 | var h_ratio = float(health) / float(max_health) 56 | var current_animation_index = max(ceil(h_ratio * $AnimationPlayer.get_animation_list().size()) - 1, 0) 57 | $AnimationPlayer.play($AnimationPlayer.get_animation_list()[current_animation_index]) 58 | 59 | func explode(emit_signals = true): 60 | var explosion = explosion_scene.instance() 61 | explosion.position = position 62 | get_parent().add_child(explosion) 63 | if emit_signals: 64 | emit_signal("exploded", self) 65 | queue_free() 66 | -------------------------------------------------------------------------------- /scenes/birds/Bird.gd: -------------------------------------------------------------------------------- 1 | extends "res://scenes/Damageable.gd" 2 | 3 | enum { 4 | STATE_IDLE, 5 | STATE_TRANSFERED, 6 | STATE_ATTACHED, 7 | STATE_DRAGGED, 8 | STATE_RELEASED, 9 | STATE_LAUNCHED, 10 | STATE_TOUCHED 11 | } 12 | 13 | var state = STATE_IDLE 14 | var impulse = null 15 | var slingshot = null 16 | 17 | export(int, 60, 2000) var TRANSFER_SPEED = 300 18 | 19 | signal eliminated 20 | signal launched 21 | 22 | func _integrate_forces(s): 23 | ._integrate_forces(s) 24 | 25 | if state == STATE_TOUCHED and self.processed_velocity.length() < 2 : 26 | emit_signal("eliminated", self) 27 | state = STATE_IDLE 28 | 29 | if state == STATE_IDLE: 30 | return 31 | 32 | if s.get_contact_count() > 0 and state == STATE_LAUNCHED : 33 | state = STATE_TOUCHED 34 | 35 | var launch_pos = slingshot.get_node("LaunchPoint").get_global_position() 36 | var diff_pos = launch_pos - get_global_position() 37 | if Input.is_action_just_released("touch") and state == STATE_DRAGGED : 38 | impulse = slingshot.get_impulse() 39 | state = STATE_RELEASED if impulse.x > 0 else STATE_ATTACHED 40 | var lv = s.get_linear_velocity() 41 | var av = s.get_angular_velocity() 42 | var delta = 1 / s.get_step() 43 | 44 | # IMPLEMENT STATES 45 | match state : 46 | STATE_TRANSFERED: 47 | if diff_pos.length() * delta < TRANSFER_SPEED: 48 | lv = diff_pos * delta 49 | state = STATE_ATTACHED 50 | slingshot.attach_bird(self) 51 | else : 52 | lv = diff_pos.normalized() * TRANSFER_SPEED 53 | STATE_ATTACHED: 54 | lv = diff_pos * 20 55 | av = - rotation * delta 56 | STATE_DRAGGED: 57 | var player_force = get_global_mouse_position() - launch_pos 58 | var angle = diff_pos.angle() 59 | av = (angle - rotation) * delta 60 | if angle < -1.2 and angle > -2 : 61 | player_force = player_force.clamped(10) 62 | else : 63 | player_force = player_force.clamped(100) 64 | lv = (player_force + diff_pos) * 20 65 | STATE_RELEASED: 66 | if diff_pos.length() * delta < impulse.length() : 67 | state = STATE_LAUNCHED 68 | slingshot.detach_bird() 69 | emit_signal("launched", self) 70 | else : 71 | lv = diff_pos.normalized() * impulse.length() 72 | STATE_LAUNCHED: 73 | av = (lv.angle() - rotation) * delta 74 | 75 | s.set_linear_velocity(lv) 76 | s.set_angular_velocity(av) 77 | 78 | func attach_to(slingshot) : 79 | self.slingshot = slingshot 80 | state = STATE_TRANSFERED 81 | 82 | func _input_event(viewport, event, shape_idx): 83 | if event.is_action_pressed("touch") and state == STATE_ATTACHED: 84 | state = STATE_DRAGGED 85 | -------------------------------------------------------------------------------- /scenes/ennemies/LittleGreen.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=5 format=2] 2 | 3 | [ext_resource path="res://scenes/ennemies/Ennemy.tscn" type="PackedScene" id=1] 4 | 5 | [sub_resource type="Animation" id=1] 6 | resource_name = "1_weak" 7 | length = 10.0 8 | loop = true 9 | tracks/0/type = "value" 10 | tracks/0/path = NodePath("Texture:region_rect") 11 | tracks/0/interp = 1 12 | tracks/0/loop_wrap = true 13 | tracks/0/imported = false 14 | tracks/0/enabled = true 15 | tracks/0/keys = { 16 | "times": PoolRealArray( 0, 3, 3.1, 3.6, 3.7, 5, 5.5, 5.9, 7.5, 7.6 ), 17 | "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), 18 | "update": 1, 19 | "values": [ Rect2( 1135.5, 10.75, 76, 77.75 ), Rect2( 1211.25, 12.75, 74.75, 75 ), Rect2( 1135.5, 10.75, 76, 77.75 ), Rect2( 1211.25, 12.75, 74.75, 75 ), Rect2( 1135.5, 10.75, 76, 77.75 ), Rect2( 1211.25, 163.25, 75.25, 76 ), Rect2( 986.25, 165, 75, 74.75 ), Rect2( 1135.5, 10.75, 76, 77.75 ), Rect2( 1211.25, 12.75, 74.75, 75 ), Rect2( 1135.5, 10.75, 76, 77.75 ) ] 20 | } 21 | 22 | [sub_resource type="Animation" id=2] 23 | resource_name = "2_average" 24 | length = 10.0 25 | loop = true 26 | tracks/0/type = "value" 27 | tracks/0/path = NodePath("Texture:region_rect") 28 | tracks/0/interp = 1 29 | tracks/0/loop_wrap = true 30 | tracks/0/imported = false 31 | tracks/0/enabled = true 32 | tracks/0/keys = { 33 | "times": PoolRealArray( 0, 2.5, 2.6, 3, 3.1, 5, 5.5 ), 34 | "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ), 35 | "update": 1, 36 | "values": [ Rect2( 984, 89.25, 76.5, 76 ), Rect2( 1135.5, 90.25, 75.5, 74 ), Rect2( 984, 89.25, 76.5, 76 ), Rect2( 1135.5, 90.25, 75.5, 74 ), Rect2( 984, 89.25, 76.5, 76 ), Rect2( 1059.75, 12.75, 76, 75.25 ), Rect2( 984, 89.25, 76.5, 76 ) ] 37 | } 38 | 39 | [sub_resource type="Animation" id=3] 40 | resource_name = "3_healthy" 41 | length = 10.0 42 | loop = true 43 | tracks/0/type = "value" 44 | tracks/0/path = NodePath("Texture:region_rect") 45 | tracks/0/interp = 1 46 | tracks/0/loop_wrap = true 47 | tracks/0/imported = false 48 | tracks/0/enabled = true 49 | tracks/0/keys = { 50 | "times": PoolRealArray( 0, 3, 3.1, 3.5, 3.6, 5, 6 ), 51 | "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ), 52 | "update": 1, 53 | "values": [ Rect2( 981.75, 12.25, 78.25, 76.75 ), Rect2( 1058.5, 239, 77.25, 78.25 ), Rect2( 981.75, 12.25, 78.25, 76.75 ), Rect2( 1058.5, 239, 77.25, 78.25 ), Rect2( 981.75, 12.25, 78.25, 76.75 ), Rect2( 1135.75, 163.5, 75.5, 77 ), Rect2( 981.75, 12.25, 78.25, 76.75 ) ] 54 | } 55 | 56 | [node name="LittleGreen" instance=ExtResource( 1 )] 57 | 58 | [node name="Texture" parent="." index="0"] 59 | region_rect = Rect2( 981.75, 12.25, 78.25, 76.75 ) 60 | 61 | [node name="AnimationPlayer" parent="." index="2"] 62 | anims/1_weak = SubResource( 1 ) 63 | anims/2_average = SubResource( 2 ) 64 | anims/3_healthy = SubResource( 3 ) 65 | 66 | -------------------------------------------------------------------------------- /scenes/blocks/LongWood.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=7 format=2] 2 | 3 | [ext_resource path="res://scenes/blocks/Block.tscn" type="PackedScene" id=1] 4 | 5 | [sub_resource type="RectangleShape2D" id=1] 6 | 7 | custom_solver_bias = 0.0 8 | extents = Vector2( 80.2661, 10 ) 9 | 10 | [sub_resource type="Animation" id=2] 11 | 12 | resource_name = "1_weak" 13 | length = 1.0 14 | loop = false 15 | step = 0.1 16 | tracks/0/type = "value" 17 | tracks/0/path = NodePath("Texture:region_rect") 18 | tracks/0/interp = 1 19 | tracks/0/loop_wrap = true 20 | tracks/0/imported = false 21 | tracks/0/enabled = true 22 | tracks/0/keys = { 23 | "times": PoolRealArray( 1 ), 24 | "transitions": PoolRealArray( 1 ), 25 | "update": 0, 26 | "values": [ Rect2( 631, 664, 161, 21.5 ) ] 27 | } 28 | 29 | [sub_resource type="Animation" id=3] 30 | 31 | resource_name = "2_average" 32 | length = 1.0 33 | loop = false 34 | step = 0.1 35 | tracks/0/type = "value" 36 | tracks/0/path = NodePath("Texture:region_rect") 37 | tracks/0/interp = 1 38 | tracks/0/loop_wrap = true 39 | tracks/0/imported = false 40 | tracks/0/enabled = true 41 | tracks/0/keys = { 42 | "times": PoolRealArray( 0 ), 43 | "transitions": PoolRealArray( 1 ), 44 | "update": 0, 45 | "values": [ Rect2( 791.5, 622, 162, 21.5 ) ] 46 | } 47 | 48 | [sub_resource type="Animation" id=4] 49 | 50 | resource_name = "3_good" 51 | length = 1.0 52 | loop = false 53 | step = 0.1 54 | tracks/0/type = "value" 55 | tracks/0/path = NodePath("Texture:region_rect") 56 | tracks/0/interp = 1 57 | tracks/0/loop_wrap = true 58 | tracks/0/imported = false 59 | tracks/0/enabled = true 60 | tracks/0/keys = { 61 | "times": PoolRealArray( 0 ), 62 | "transitions": PoolRealArray( 1 ), 63 | "update": 0, 64 | "values": [ Rect2( 630.5, 601.5, 162, 20.5 ) ] 65 | } 66 | 67 | [sub_resource type="Animation" id=5] 68 | 69 | resource_name = "4_healthy" 70 | length = 1.0 71 | loop = false 72 | step = 0.1 73 | tracks/0/type = "value" 74 | tracks/0/path = NodePath("Texture:region_rect") 75 | tracks/0/interp = 1 76 | tracks/0/loop_wrap = true 77 | tracks/0/imported = false 78 | tracks/0/enabled = true 79 | tracks/0/keys = { 80 | "times": PoolRealArray( 0 ), 81 | "transitions": PoolRealArray( 1 ), 82 | "update": 0, 83 | "values": [ Rect2( 792.5, 560, 161.5, 20 ) ] 84 | } 85 | 86 | [node name="LongWood" instance=ExtResource( 1 )] 87 | 88 | [node name="Texture" parent="." index="0"] 89 | 90 | region_rect = Rect2( 792.5, 560, 161.5, 20 ) 91 | 92 | [node name="CollisionShape2D" parent="." index="1"] 93 | 94 | shape = SubResource( 1 ) 95 | 96 | [node name="AnimationPlayer" parent="." index="2"] 97 | 98 | anims/1_weak = SubResource( 2 ) 99 | anims/2_average = SubResource( 3 ) 100 | anims/3_good = SubResource( 4 ) 101 | anims/4_healthy = SubResource( 5 ) 102 | 103 | 104 | -------------------------------------------------------------------------------- /scenes/GUI.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=7 format=2] 2 | 3 | [ext_resource path="res://scenes/GUI.gd" type="Script" id=1] 4 | [ext_resource path="res://default_theme.tres" type="Theme" id=2] 5 | [ext_resource path="res://assets/GUI/container_background.png" type="Texture" id=3] 6 | [ext_resource path="res://assets/GUI/energy_bar_bg.png" type="Texture" id=4] 7 | [ext_resource path="res://assets/GUI/energy_bar_fill.png" type="Texture" id=5] 8 | [ext_resource path="res://assets/GUI/btn_forward.png" type="Texture" id=6] 9 | 10 | [node name="GUI" type="CanvasLayer"] 11 | script = ExtResource( 1 ) 12 | 13 | [node name="MarginContainer" type="MarginContainer" parent="."] 14 | anchor_left = 1.0 15 | anchor_right = 1.0 16 | margin_left = -540.0 17 | margin_bottom = 137.0 18 | theme = ExtResource( 2 ) 19 | 20 | [node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] 21 | margin_right = 540.0 22 | margin_bottom = 137.0 23 | 24 | [node name="NinePatchRect" type="NinePatchRect" parent="MarginContainer/VBoxContainer"] 25 | margin_right = 540.0 26 | margin_bottom = 74.0 27 | size_flags_vertical = 3 28 | texture = ExtResource( 3 ) 29 | patch_margin_left = 20 30 | patch_margin_top = 20 31 | patch_margin_right = 20 32 | patch_margin_bottom = 20 33 | 34 | [node name="HBoxLeft" type="HBoxContainer" parent="MarginContainer/VBoxContainer/NinePatchRect"] 35 | anchor_bottom = 1.0 36 | margin_left = 15.0 37 | margin_right = 307.0 38 | 39 | [node name="ScoreLabel" type="Label" parent="MarginContainer/VBoxContainer/NinePatchRect/HBoxLeft"] 40 | margin_top = 23.0 41 | margin_right = 53.0 42 | margin_bottom = 51.0 43 | text = "Score" 44 | 45 | [node name="ScoreProgress" type="TextureProgress" parent="MarginContainer/VBoxContainer/NinePatchRect/HBoxLeft"] 46 | margin_left = 57.0 47 | margin_top = 17.0 48 | margin_right = 305.0 49 | margin_bottom = 57.0 50 | size_flags_vertical = 4 51 | texture_under = ExtResource( 4 ) 52 | texture_progress = ExtResource( 5 ) 53 | 54 | [node name="HBoxRight" type="HBoxContainer" parent="MarginContainer/VBoxContainer/NinePatchRect"] 55 | anchor_left = 1.0 56 | anchor_right = 1.0 57 | anchor_bottom = 1.0 58 | margin_left = -141.0 59 | margin_right = -14.0 60 | alignment = 2 61 | 62 | [node name="ScoreValue" type="Label" parent="MarginContainer/VBoxContainer/NinePatchRect/HBoxRight"] 63 | margin_left = 32.0 64 | margin_top = 23.0 65 | margin_right = 46.0 66 | margin_bottom = 51.0 67 | text = "0" 68 | 69 | [node name="ScoreSep" type="Label" parent="MarginContainer/VBoxContainer/NinePatchRect/HBoxRight"] 70 | margin_left = 50.0 71 | margin_top = 23.0 72 | margin_right = 58.0 73 | margin_bottom = 51.0 74 | text = "/" 75 | 76 | [node name="ScoreMax" type="Label" parent="MarginContainer/VBoxContainer/NinePatchRect/HBoxRight"] 77 | margin_left = 62.0 78 | margin_top = 23.0 79 | margin_right = 127.0 80 | margin_bottom = 51.0 81 | text = "10000" 82 | 83 | [node name="EndButton" type="TextureButton" parent="MarginContainer/VBoxContainer"] 84 | margin_left = 482.0 85 | margin_top = 78.0 86 | margin_right = 540.0 87 | margin_bottom = 137.0 88 | size_flags_horizontal = 8 89 | texture_normal = ExtResource( 6 ) 90 | 91 | [node name="TweenScore" type="Tween" parent="."] 92 | [connection signal="pressed" from="MarginContainer/VBoxContainer/EndButton" to="." method="_on_EndButton_pressed"] 93 | -------------------------------------------------------------------------------- /EndLevel.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=11 format=2] 2 | 3 | [ext_resource path="res://EndLevel.gd" type="Script" id=1] 4 | [ext_resource path="res://assets/GUI/slot_start_1.png" type="Texture" id=2] 5 | [ext_resource path="res://assets/GUI/slot_start_2.png" type="Texture" id=3] 6 | [ext_resource path="res://assets/GUI/slot_start_3.png" type="Texture" id=4] 7 | [ext_resource path="res://assets/GUI/star_1.png" type="Texture" id=5] 8 | [ext_resource path="res://assets/GUI/star_2.png" type="Texture" id=6] 9 | [ext_resource path="res://assets/GUI/star_3.png" type="Texture" id=7] 10 | [ext_resource path="res://assets/GUI/RammettoOne-Regular.ttf" type="DynamicFontData" id=8] 11 | [ext_resource path="res://scenes/RestartButton.tscn" type="PackedScene" id=9] 12 | 13 | [sub_resource type="DynamicFont" id=1] 14 | size = 35 15 | font_data = ExtResource( 8 ) 16 | 17 | [node name="EndLevel" type="CanvasLayer"] 18 | script = ExtResource( 1 ) 19 | 20 | [node name="Background" type="ColorRect" parent="."] 21 | anchor_right = 1.0 22 | anchor_bottom = 1.0 23 | color = Color( 0, 0, 0, 0.705882 ) 24 | 25 | [node name="SlotStar1" type="TextureRect" parent="Background"] 26 | anchor_left = 0.5 27 | anchor_top = 0.5 28 | anchor_right = 0.5 29 | anchor_bottom = 0.5 30 | margin_left = -226.788 31 | margin_top = -81.7288 32 | margin_right = -107.788 33 | margin_bottom = 48.2712 34 | texture = ExtResource( 2 ) 35 | 36 | [node name="SlotStar2" type="TextureRect" parent="Background"] 37 | anchor_left = 0.5 38 | anchor_top = 0.5 39 | anchor_right = 0.5 40 | anchor_bottom = 0.5 41 | margin_left = -78.5 42 | margin_top = -46.2966 43 | margin_right = 78.5 44 | margin_bottom = 91.7034 45 | texture = ExtResource( 3 ) 46 | 47 | [node name="SlotStar3" type="TextureRect" parent="Background"] 48 | anchor_left = 0.5 49 | anchor_top = 0.5 50 | anchor_right = 0.5 51 | anchor_bottom = 0.5 52 | margin_left = 101.508 53 | margin_top = -78.5339 54 | margin_right = 223.508 55 | margin_bottom = 47.4661 56 | texture = ExtResource( 4 ) 57 | 58 | [node name="Star1" type="TextureRect" parent="Background"] 59 | visible = false 60 | anchor_left = 0.5 61 | anchor_top = 0.5 62 | anchor_right = 0.5 63 | anchor_bottom = 0.5 64 | margin_left = -300.051 65 | margin_top = -144.017 66 | margin_right = -99.0507 67 | margin_bottom = 57.9831 68 | texture = ExtResource( 5 ) 69 | 70 | [node name="Star2" type="TextureRect" parent="Background"] 71 | visible = false 72 | anchor_left = 0.5 73 | anchor_top = 0.5 74 | anchor_right = 0.5 75 | anchor_bottom = 0.5 76 | margin_left = -111.5 77 | margin_top = -115.5 78 | margin_right = 111.5 79 | margin_bottom = 115.5 80 | texture = ExtResource( 6 ) 81 | 82 | [node name="Star3" type="TextureRect" parent="Background"] 83 | visible = false 84 | anchor_left = 0.5 85 | anchor_top = 0.5 86 | anchor_right = 0.5 87 | anchor_bottom = 0.5 88 | margin_left = 94.7963 89 | margin_top = -146.102 90 | margin_right = 282.796 91 | margin_bottom = 52.8983 92 | texture = ExtResource( 7 ) 93 | 94 | [node name="Label" type="Label" parent="Background"] 95 | anchor_top = 1.0 96 | anchor_right = 1.0 97 | anchor_bottom = 1.0 98 | margin_top = -171.127 99 | margin_bottom = -111.127 100 | custom_fonts/font = SubResource( 1 ) 101 | text = "20000" 102 | align = 1 103 | valign = 1 104 | 105 | [node name="RestartButton" parent="Background" instance=ExtResource( 9 )] 106 | 107 | [node name="TweenScore" type="Tween" parent="."] 108 | 109 | [connection signal="pressed" from="Background/RestartButton" to="." method="_on_RestartButton_pressed"] 110 | -------------------------------------------------------------------------------- /Level.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=12 format=2] 2 | 3 | [ext_resource path="res://Level.gd" type="Script" id=1] 4 | [ext_resource path="res://assets/gameplay/background_1.jpg" type="Texture" id=2] 5 | [ext_resource path="res://scenes/Camera.gd" type="Script" id=3] 6 | [ext_resource path="res://EndLevel.tscn" type="PackedScene" id=4] 7 | [ext_resource path="res://scenes/Slingshot.tscn" type="PackedScene" id=5] 8 | [ext_resource path="res://scenes/ennemies/LittleGreen.tscn" type="PackedScene" id=6] 9 | [ext_resource path="res://scenes/birds/Bird.tscn" type="PackedScene" id=7] 10 | [ext_resource path="res://scenes/blocks/LongWood.tscn" type="PackedScene" id=8] 11 | [ext_resource path="res://scenes/Gameover.tscn" type="PackedScene" id=9] 12 | [ext_resource path="res://scenes/GUI.tscn" type="PackedScene" id=10] 13 | 14 | [sub_resource type="RectangleShape2D" id=1] 15 | extents = Vector2( 140, 720 ) 16 | 17 | [node name="Level" type="Node"] 18 | script = ExtResource( 1 ) 19 | 20 | [node name="Background" type="Sprite" parent="."] 21 | position = Vector2( 1279.37, 716.676 ) 22 | z_index = -10 23 | texture = ExtResource( 2 ) 24 | 25 | [node name="Ground" type="StaticBody2D" parent="."] 26 | position = Vector2( 1330, 1350 ) 27 | 28 | [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Ground"] 29 | polygon = PoolVector2Array( -1330, -100, 1230, -100, 1230, 90, -1330, 90 ) 30 | 31 | [node name="EastWall" type="StaticBody2D" parent="."] 32 | position = Vector2( 2700, 710 ) 33 | 34 | [node name="CollisionShape2D" type="CollisionShape2D" parent="EastWall"] 35 | position = Vector2( 0, 10 ) 36 | shape = SubResource( 1 ) 37 | 38 | [node name="WestWall" type="StaticBody2D" parent="."] 39 | position = Vector2( 2700, 710 ) 40 | 41 | [node name="CollisionShape2D" type="CollisionShape2D" parent="WestWall"] 42 | position = Vector2( -2840, 10 ) 43 | shape = SubResource( 1 ) 44 | 45 | [node name="Camera" type="Camera2D" parent="."] 46 | position = Vector2( 527.505, 1152.8 ) 47 | current = true 48 | zoom = Vector2( 2, 2 ) 49 | limit_left = 0 50 | limit_top = 0 51 | limit_right = 2560 52 | limit_bottom = 1440 53 | smoothing_enabled = true 54 | smoothing_speed = 10.0 55 | script = ExtResource( 3 ) 56 | 57 | [node name="Birds" type="Node2D" parent="."] 58 | position = Vector2( 551.34, 1221 ) 59 | 60 | [node name="Bird" parent="Birds" instance=ExtResource( 7 )] 61 | position = Vector2( -194.597, 4.42261 ) 62 | 63 | [node name="Bird2" parent="Birds" instance=ExtResource( 7 )] 64 | position = Vector2( -290.033, 2.09497 ) 65 | 66 | [node name="Bird3" parent="Birds" instance=ExtResource( 7 )] 67 | position = Vector2( -429.696, -0.232786 ) 68 | 69 | [node name="Ennemies" type="Node2D" parent="."] 70 | position = Vector2( 1784.93, 1215.97 ) 71 | 72 | [node name="LittleGreen" parent="Ennemies" instance=ExtResource( 6 )] 73 | position = Vector2( 203.521, -198.214 ) 74 | 75 | [node name="LittleGreen3" parent="Ennemies" instance=ExtResource( 6 )] 76 | position = Vector2( 208.13, -20.6334 ) 77 | 78 | [node name="Blocks" type="Node2D" parent="."] 79 | position = Vector2( 2155.01, 1205.9 ) 80 | 81 | [node name="LongWood" parent="Blocks" instance=ExtResource( 8 )] 82 | position = Vector2( -161.699, 28.8707 ) 83 | 84 | [node name="LongWood4" parent="Blocks" instance=ExtResource( 8 )] 85 | position = Vector2( -165.475, -144.802 ) 86 | 87 | [node name="LongWood2" parent="Blocks" instance=ExtResource( 8 )] 88 | position = Vector2( -235.969, -60.4078 ) 89 | rotation = -1.5737 90 | 91 | [node name="LongWood3" parent="Blocks" instance=ExtResource( 8 )] 92 | position = Vector2( -92.5002, -58.5201 ) 93 | rotation = -1.5737 94 | 95 | [node name="Slingshot" parent="." instance=ExtResource( 5 )] 96 | position = Vector2( 606.729, 1150.52 ) 97 | TRAJECTORY_SPOT_COUNT = 10 98 | TRAJECTORY_TIME_STEP = 0.5 99 | STRENGTH = 5 100 | TRAJECTORY_IMPULSE = 75 101 | TRAJECTORY_ANGLE = 45 102 | TRAJECTORY_VISIBILITY = false 103 | 104 | [node name="GUI" parent="." instance=ExtResource( 10 )] 105 | 106 | [node name="EndLevel" parent="." instance=ExtResource( 4 )] 107 | score_levels = { 108 | 1: 2000, 109 | 2: 4000, 110 | 3: 5500 111 | } 112 | 113 | [node name="Gameover" parent="." instance=ExtResource( 9 )] 114 | [connection signal="end_game" from="GUI" to="." method="_on_GUI_end_game"] 115 | [connection signal="restart_level" from="EndLevel" to="." method="_on_EndLevel_restart_level"] 116 | [connection signal="restart_level" from="Gameover" to="." method="_on_Gameover_restart_level"] 117 | --------------------------------------------------------------------------------