First godot-ci commit

This commit is contained in:
2025-05-13 13:29:35 +02:00
commit d3e99bc70e
47 changed files with 3158 additions and 0 deletions

10
scenes/Arena.tscn Executable file
View File

@@ -0,0 +1,10 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://scripts/Arena.gd" type="Script" id=1]
[ext_resource path="res://scenes/Background.tscn" type="PackedScene" id=2]
[node name="Arena" type="Node2D"]
script = ExtResource( 1 )
[node name="Background" parent="." instance=ExtResource( 2 )]

28
scenes/Background.tscn Executable file
View File

@@ -0,0 +1,28 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://scripts/ColoredEntity.gd" type="Script" id=1]
[ext_resource path="res://resources/img/2.png" type="Texture2D" id=2]
[node name="Background" type="Node2D" groups=[
"ColoredEntity",
]]
script = ExtResource( 1 )
[node name="NinePatchRect" type="TextureRect" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
offset_left = -199.0
offset_top = -157.0
offset_right = 2097.0
offset_bottom = 1217.0
pivot_offset = Vector2( 0, 0 )
clip_contents = false
mouse_filter = 1
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
texture = ExtResource( 2 )
stretch_mode = 2

46
scenes/Base.tscn Executable file
View File

@@ -0,0 +1,46 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://scripts/Base.gd" type="Script" id=1]
[sub_resource type="CircleShape2D" id=1]
custom_solver_bias = 0.0
radius = 68.9104
[node name="Base" type="Node2D" groups=[
"ColoredEntity",
]]
script = ExtResource( 1 )
[node name="ColorRect" type="ColorRect" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -60.5
offset_top = -33.0
offset_right = 60.5
offset_bottom = 33.0
pivot_offset = Vector2( 0, 0 )
clip_contents = false
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
color = Color( 1, 1, 1, 1 )
[node name="Body" type="Area2D" parent="."]
input_pickable = true
gravity_direction = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
collision_layer = 12
collision_mask = 12
audio_bus_override = false
audio_bus_name = "Master"
[node name="CollisionMask" type="CollisionShape2D" parent="Body"]
shape = SubResource( 1 )
[connection signal="body_entered" from="Body" to="." method="_on_Body_body_entered"]

54
scenes/Cannon.tscn Executable file
View File

@@ -0,0 +1,54 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://scripts/Cannon.gd" type="Script" id=1]
[ext_resource path="res://resources/img/1.png" type="Texture2D" id=2]
[node name="Cannon" type="Node2D" groups=[
"ColoredEntity",
]]
script = ExtResource( 1 )
[node name="Sprite2D" type="TextureRect" parent="."]
anchor_left = 0.0
anchor_top = 0.5
anchor_right = 0.0
anchor_bottom = 0.5
offset_top = -10.0
offset_right = 150.0
offset_bottom = 38.0
custom_minimum_size = Vector2( 150, 24 )
pivot_offset = Vector2( 10, 10 )
clip_contents = false
mouse_filter = 1
mouse_default_cursor_shape = 0
size_flags_horizontal = 0
size_flags_vertical = 0
texture = ExtResource( 2 )
stretch_mode = 2
[node name="GuideLine" type="Line2D" parent="Sprite2D"]
modulate = Color( 1, 1, 1, 0.1 )
show_behind_parent = true
position = Vector2( 0, 10 )
points = PackedVector2Array( 135, 2, 2000, 2 )
width = 5.0
default_color = Color( 1, 1, 1, 1 )
texture_mode = 1
joint_mode = 2
sharp_limit = 2.0
round_precision = 10
[node name="CannonTip" type="Marker2D" parent="Sprite2D"]
position = Vector2( 120, 12 )
[node name="CannonBase" type="Marker2D" parent="Sprite2D"]
position = Vector2( 0, 12 )
[node name="Projectiles" type="Node" parent="."]
[node name="FireCooldown" type="Timer" parent="."]
process_mode = 1
wait_time = 1.0
one_shot = true
autostart = true

7
scenes/ColoredEntity.tscn Executable file
View File

@@ -0,0 +1,7 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://scripts/ColoredEntity.gd" type="Script" id=1]
[node name="ColoredEntity" type="Node2D"]
script = ExtResource( 1 )

View File

@@ -0,0 +1,31 @@
[gd_scene load_steps=3 format=3 uid="uid://b2fpxxnc2fq3o"]
[ext_resource type="Script" path="res://scripts/EnemyGenerator.gd" id="1"]
[sub_resource type="Curve2D" id="1"]
_data = {
"points": PackedVector2Array(0, 0, 0, 0, 802.371, -163.584, 0, 0, 0, 0, 959.909, -42.497, 0, 0, 0, 0, 1955.58, -35.2126, 0, 0, 0, 0, 1977.69, -34.257, 0, 0, 0, 0, 2072.89, -95.3282, 0, 0, 0, 0, 2171.96, -161.2, 0, 0, 0, 0, 1329.54, -162.398, 0, 0, 0, 0, 958.623, -161.461, 0, 0, 0, 0, 801.772, -163.584, 0, 0, 0, 0, 802.371, -163.584)
}
point_count = 10
[node name="EnemyGenerator" type="Node2D"]
script = ExtResource("1")
[node name="Enemies" type="Node" parent="."]
[node name="SpawnArea" type="Path2D" parent="."]
self_modulate = Color(0.5, 0.6, 1, 0.7)
curve = SubResource("1")
[node name="SpawnLocation" type="PathFollow2D" parent="SpawnArea"]
position = Vector2(802.371, -163.584)
rotation = 0.655312
[node name="SpawnTimer" type="Timer" parent="."]
process_mode = 1
wait_time = 1.5
autostart = true
[connection signal="start" from="." to="." method="_on_EnemyGenerator_start"]
[connection signal="stop" from="." to="." method="_on_EnemyGenerator_stop"]
[connection signal="timeout" from="SpawnTimer" to="." method="_on_SpawnTimer_timeout"]

6
scenes/GLOBAL.tscn Normal file
View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://cch0y3px40vrg"]
[ext_resource type="Script" path="res://scripts/GLOBAL.gd" id="1"]
[node name="GLOBAL" type="Node"]
script = ExtResource("1")

21
scenes/Game.tscn Executable file
View File

@@ -0,0 +1,21 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://scripts/Game.gd" type="Script" id=1]
[ext_resource path="res://scenes/Arena.tscn" type="PackedScene" id=2]
[ext_resource path="res://scenes/Player.tscn" type="PackedScene" id=3]
[ext_resource path="res://scenes/Base.tscn" type="PackedScene" id=4]
[ext_resource path="res://scenes/EnemyGenerator.tscn" type="PackedScene" id=5]
[node name="Game" type="Node2D"]
script = ExtResource( 1 )
[node name="Arena" parent="." instance=ExtResource( 2 )]
[node name="Player" parent="." instance=ExtResource( 3 )]
position = Vector2( 456.975, 971.301 )
[node name="Base" parent="." instance=ExtResource( 4 )]
position = Vector2( 94.6306, 955.095 )
[node name="EnemyGenerator" parent="." instance=ExtResource( 5 )]

128
scenes/HUD.tscn Executable file
View File

@@ -0,0 +1,128 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://scripts/HUD.gd" type="Script" id=1]
[node name="HUD" type="Control"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
pivot_offset = Vector2( 0, 0 )
clip_contents = false
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
script = ExtResource( 1 )
[node name="ThemeButtons" type="HBoxContainer" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
offset_left = 1.0
offset_top = 84.0
offset_right = 496.0
offset_bottom = 196.0
pivot_offset = Vector2( 0, 0 )
clip_contents = false
mouse_filter = 1
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
alignment = 0
[node name="Theme1" type="Button" parent="ThemeButtons"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
offset_right = 63.0
offset_bottom = 112.0
pivot_offset = Vector2( 0, 0 )
clip_contents = false
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
toggle_mode = false
focus_mode = 2
shortcut = null
group = null
text = "THEME1"
flat = false
align = 1
[node name="Theme2" type="Button" parent="ThemeButtons"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
offset_left = 67.0
offset_right = 130.0
offset_bottom = 112.0
pivot_offset = Vector2( 0, 0 )
clip_contents = false
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
toggle_mode = false
focus_mode = 2
shortcut = null
group = null
text = "THEME2"
flat = false
align = 1
[node name="Theme3" type="Button" parent="ThemeButtons"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
offset_left = 134.0
offset_right = 197.0
offset_bottom = 112.0
pivot_offset = Vector2( 0, 0 )
clip_contents = false
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
toggle_mode = false
focus_mode = 2
shortcut = null
group = null
text = "THEME3"
flat = false
align = 1
[node name="StartButton" type="Button" parent="."]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
offset_right = 203.0
offset_bottom = 78.0
pivot_offset = Vector2( 0, 0 )
clip_contents = false
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
toggle_mode = false
focus_mode = 2
shortcut = null
group = null
text = "START"
flat = false
align = 1
[connection signal="pressed" from="ThemeButtons/Theme1" to="." method="_on_Theme_Button_pressed" binds= [ 0 ]]
[connection signal="pressed" from="ThemeButtons/Theme2" to="." method="_on_Theme_Button_pressed" binds= [ 1 ]]
[connection signal="pressed" from="ThemeButtons/Theme3" to="." method="_on_Theme_Button_pressed" binds= [ 2 ]]
[connection signal="pressed" from="StartButton" to="." method="_on_StartButton_pressed"]

46
scenes/Main.tscn Normal file
View File

@@ -0,0 +1,46 @@
[gd_scene load_steps=5 format=3 uid="uid://bo3no7bm4rb0n"]
[ext_resource type="Script" path="res://scripts/Main.gd" id="1"]
[ext_resource type="PackedScene" path="res://scenes/Game.tscn" id="2"]
[ext_resource type="PackedScene" path="res://scenes/HUD.tscn" id="3"]
[sub_resource type="Curve2D" id="1"]
_data = {
"points": PackedVector2Array(0, 0, 0, 0, 18.8947, 55.4928, 0, 0, 0, 0, -269.905, -419.567)
}
point_count = 2
[node name="Main" type="Node2D"]
script = ExtResource("1")
[node name="Game" parent="." instance=ExtResource("2")]
[node name="Path2D" type="Path2D" parent="."]
self_modulate = Color(0.5, 0.6, 1, 0.7)
position = Vector2(460.871, 779.989)
rotation = -3.14159
scale = Vector2(2.52308, -0.891921)
curve = SubResource("1")
[node name="PathFollow2D" type="PathFollow2D" parent="Path2D"]
position = Vector2(18.8947, 55.4928)
rotation = -2.11702
loop = false
[node name="MenuCamera" type="Camera2D" parent="Path2D/PathFollow2D"]
position = Vector2(21.2, 58.5266)
zoom = Vector2(0.5, 0.5)
drag_horizontal_enabled = true
drag_vertical_enabled = true
editor_draw_limits = true
editor_draw_drag_margin = true
[node name="HUD" parent="." instance=ExtResource("3")]
layout_mode = 3
anchors_preset = 15
offset_left = 625.0
offset_top = 820.0
offset_right = 625.0
offset_bottom = 820.0
[connection signal="start_zoom_out" from="." to="." method="_on_Main_start_zoom_out"]

36
scenes/Player.tscn Executable file
View File

@@ -0,0 +1,36 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://scripts/Player.gd" type="Script" id=1]
[ext_resource path="res://scenes/Cannon.tscn" type="PackedScene" id=2]
[ext_resource path="res://resources/img/cat0.png" type="Texture2D" id=3]
[sub_resource type="CapsuleShape2D" id=1]
custom_solver_bias = 0.0
radius = 79.0755
height = 89.5214
[node name="Player" type="Node2D" groups=[
"ColoredEntity",
]]
script = ExtResource( 1 )
[node name="Cannon" parent="." instance=ExtResource( 2 )]
position = Vector2( -50.0759, 40.2842 )
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2( 0.5, 0.5 )
texture = ExtResource( 3 )
[node name="Body" type="CharacterBody2D" parent="."]
input_pickable = false
collision_layer = 1
collision_mask = 1
collision/safe_margin = 0.08
motion/sync_to_physics = false
[node name="Collision" type="CollisionShape2D" parent="Body"]
position = Vector2( -6.08298, -9.86302 )
shape = SubResource( 1 )
[connection signal="unblock" from="." to="." method="_on_Player_unblock"]

47
scenes/Projectile.tscn Normal file
View File

@@ -0,0 +1,47 @@
[gd_scene load_steps=7 format=3 uid="uid://dwr8aulhrbt85"]
[ext_resource type="Script" path="res://scripts/Projectile.gd" id="1"]
[ext_resource type="Script" path="res://scripts/ColoredEntity.gd" id="2"]
[ext_resource type="Texture2D" uid="uid://my3jd38hyc7k" path="res://resources/img/missile-placeholder.png" id="3"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_13bxk"]
[sub_resource type="RectangleShape2D" id="1"]
size = Vector2(48, 48)
[sub_resource type="CircleShape2D" id="2"]
radius = 143.093
[node name="Projectile" type="RigidBody2D"]
collision_layer = 0
collision_mask = 0
mass = 3.0
physics_material_override = SubResource("PhysicsMaterial_13bxk")
linear_damp = -1.0
angular_damp = 100.0
script = ExtResource("1")
[node name="Mask" type="Node2D" parent="."]
script = ExtResource("2")
[node name="Sprite2D" type="Sprite2D" parent="Mask"]
texture = ExtResource("3")
[node name="Collision" type="CollisionShape2D" parent="."]
shape = SubResource("1")
[node name="VisibleOnScreenNotifier3D" type="VisibleOnScreenNotifier2D" parent="."]
rect = Rect2(-12, -12, 22, 24)
[node name="ExplosionArea" type="Area2D" parent="."]
collision_layer = 0
collision_mask = 0
gravity = 98.0
[node name="ExplosionShape" type="CollisionShape2D" parent="ExplosionArea"]
shape = SubResource("2")
[connection signal="body_entered" from="." to="." method="_on_Projectile_body_entered"]
[connection signal="screen_exited" from="VisibleOnScreenNotifier3D" to="." method="_on_VisibilityNotifier2D_screen_exited"]
[connection signal="body_entered" from="ExplosionArea" to="." method="_on_ExplosionArea_body_entered"]
[connection signal="body_exited" from="ExplosionArea" to="." method="_on_ExplosionArea_body_exited"]