chore: updated to godot 4

This commit is contained in:
Tybo Verslype 2024-04-16 12:44:28 +02:00
parent 9e47a2006f
commit 4ae54cfaad
108 changed files with 421 additions and 115 deletions

1
.godot/.gdignore Normal file
View file

@ -0,0 +1 @@

View file

@ -0,0 +1,3 @@
[folding]
sections_unfolded=PackedStringArray()

View file

@ -0,0 +1,175 @@
[editor_states]
Anim={
"visible": false
}
2D={
"grid_offset": Vector2(0, 0),
"grid_snap_active": false,
"grid_step": Vector2(8, 8),
"grid_visibility": 1,
"ofs": Vector2(-165, -110),
"primary_grid_step": Vector2i(8, 8),
"show_edit_locks": true,
"show_guides": true,
"show_helpers": false,
"show_origin": true,
"show_rulers": true,
"show_transformation_gizmos": true,
"show_viewport": true,
"show_zoom_control": true,
"smart_snap_active": false,
"snap_guides": true,
"snap_node_anchors": true,
"snap_node_center": true,
"snap_node_parent": true,
"snap_node_sides": true,
"snap_other_nodes": true,
"snap_pixel": true,
"snap_relative": false,
"snap_rotation": false,
"snap_rotation_offset": 0.0,
"snap_rotation_step": 0.261799,
"snap_scale": false,
"snap_scale_step": 0.1,
"zoom": 1.0
}
3D={
"fov": 70.01,
"gizmos_status": {
"AudioListener3D": 0,
"AudioStreamPlayer3D": 0,
"CPUParticles3D": 0,
"CSGShape3D": 0,
"Camera3D": 0,
"CollisionObject3D": 0,
"CollisionPolygon3D": 0,
"CollisionShape3D": 0,
"Decal": 0,
"FogVolume": 0,
"GPUParticles3D": 0,
"GPUParticlesCollision3D": 0,
"Joint3D": 0,
"Light3D": 0,
"LightmapGI": 0,
"LightmapProbe": 0,
"Marker3D": 0,
"NavigationLink3D": 0,
"NavigationRegion3D": 0,
"OccluderInstance3D": 0,
"Path3D": 0,
"PhysicalBone3D": 0,
"RayCast3D": 0,
"ReflectionProbe": 0,
"ShapeCast3D": 0,
"Skeleton3D": 0,
"SoftBody3D": 0,
"SpringArm3D": 0,
"VehicleWheel3D": 0,
"VisibleOnScreenNotifier3D": 0,
"VoxelGI": 0
},
"local_coords": false,
"preview_sun_env": {
"environ_ao_enabled": false,
"environ_enabled": true,
"environ_energy": 1.0,
"environ_gi_enabled": false,
"environ_glow_enabled": true,
"environ_ground_color": Color(0.2, 0.169, 0.133, 1),
"environ_sky_color": Color(0.385, 0.454, 0.55, 1),
"environ_tonemap_enabled": true,
"sun_color": Color(1, 1, 1, 1),
"sun_enabled": true,
"sun_energy": 1.0,
"sun_max_distance": 100.0,
"sun_rotation": Vector2(-1.0472, 2.61799)
},
"rotate_snap": 15.0,
"scale_snap": 10.0,
"show_grid": true,
"show_origin": true,
"snap_enabled": false,
"translate_snap": 1.0,
"viewport_mode": 1,
"viewports": [{
"auto_orthogonal": false,
"auto_orthogonal_enabled": true,
"cinematic_preview": false,
"display_mode": 20,
"distance": 4.0,
"doppler": false,
"frame_time": false,
"gizmos": true,
"half_res": false,
"information": false,
"listener": true,
"lock_rotation": false,
"orthogonal": false,
"position": Vector3(0, 0, 0),
"use_environment": false,
"view_type": 0,
"x_rotation": 0.5,
"y_rotation": -0.5
}, {
"auto_orthogonal": false,
"auto_orthogonal_enabled": true,
"cinematic_preview": false,
"display_mode": 20,
"distance": 4.0,
"doppler": false,
"frame_time": false,
"gizmos": true,
"half_res": false,
"information": false,
"listener": false,
"lock_rotation": false,
"orthogonal": false,
"position": Vector3(0, 0, 0),
"use_environment": false,
"view_type": 0,
"x_rotation": 0.5,
"y_rotation": -0.5
}, {
"auto_orthogonal": false,
"auto_orthogonal_enabled": true,
"cinematic_preview": false,
"display_mode": 20,
"distance": 4.0,
"doppler": false,
"frame_time": false,
"gizmos": true,
"half_res": false,
"information": false,
"listener": false,
"lock_rotation": false,
"orthogonal": false,
"position": Vector3(0, 0, 0),
"use_environment": false,
"view_type": 0,
"x_rotation": 0.5,
"y_rotation": -0.5
}, {
"auto_orthogonal": false,
"auto_orthogonal_enabled": true,
"cinematic_preview": false,
"display_mode": 20,
"distance": 4.0,
"doppler": false,
"frame_time": false,
"gizmos": true,
"half_res": false,
"information": false,
"listener": false,
"lock_rotation": false,
"orthogonal": false,
"position": Vector3(0, 0, 0),
"use_environment": false,
"view_type": 0,
"x_rotation": 0.5,
"y_rotation": -0.5
}],
"zfar": 4000.01,
"znear": 0.05
}
selected_nodes=Array[NodePath]([])

View file

@ -0,0 +1,5 @@
[folding]
node_unfolds=[NodePath("."), PackedStringArray("Transform"), NodePath("Player"), PackedStringArray("Transform", "Collision"), NodePath("ParallaxBackground/ParallaxLayer"), PackedStringArray("Motion"), NodePath("ParallaxBackground/ParallaxLayer/Sprite2D"), PackedStringArray("Transform")]
resource_unfolds=["res://Main.tscn::1", PackedStringArray("Resource")]
nodes_folded=[]

View file

@ -0,0 +1,3 @@
[folding]
sections_unfolded=PackedStringArray()

View file

@ -0,0 +1,3 @@
[folding]
sections_unfolded=PackedStringArray()

View file

@ -0,0 +1,49 @@
[docks]
dock_1_selected_tab_idx=0
dock_2_selected_tab_idx=0
dock_3_selected_tab_idx=0
dock_4_selected_tab_idx=0
dock_5_selected_tab_idx=0
dock_6_selected_tab_idx=0
dock_7_selected_tab_idx=0
dock_8_selected_tab_idx=0
dock_floating={}
dock_split_2=0
dock_split_3=0
dock_hsplit_1=0
dock_hsplit_2=270
dock_hsplit_3=-270
dock_hsplit_4=0
dock_filesystem_split=0
dock_filesystem_display_mode=0
dock_filesystem_file_sort=0
dock_filesystem_file_list_display_mode=1
dock_filesystem_selected_paths=PackedStringArray("res://")
dock_filesystem_uncollapsed_paths=PackedStringArray("Favorites", "res://")
dock_3="Scene,Import"
dock_4="FileSystem"
dock_5="Inspector,Node,History"
[EditorNode]
open_scenes=PackedStringArray("res://Main.tscn")
current_scene="res://Main.tscn"
center_split_offset=0
selected_default_debugger_tab_idx=0
selected_main_editor_idx=2
selected_bottom_panel_item=1
[ScriptEditor]
open_scripts=["res://Camera2D.gd", "res://Player.gd"]
selected_script="res://Camera2D.gd"
open_help=[]
script_split_offset=70
list_split_offset=0
[ShaderEditor]
open_shaders=[]
split_offset=0
selected_shader=""

View file

@ -0,0 +1,14 @@
ea4bc82a6ad023ab7ee23ee620429895
::res://::1713198935
Camera2D.gd::GDScript::-1::1713198916::0::1::::<>Node<>::
default_env.tres::Environment::-1::1713198916::0::1::::<><>::
icon.png::CompressedTexture2D::224231617940432086::1713198714::1713198936::1::::<><>::
Main.tscn::PackedScene::-1::1713198916::0::1::::<><>::res://Camera2D.gd<>res://Player.tscn<>res://res/sprites.png<>res://UI.tscn
Player.gd::GDScript::-1::1713198916::0::1::::<>Area2D<>::
Player.tscn::PackedScene::-1::1713198916::0::1::::<><>::res://Player.gd<>res://res/sprites.png
Tower.gd::GDScript::-1::1713198916::0::1::::<>Node2D<>::
Tower.tscn::PackedScene::-1::1713198916::0::1::::<><>::res://Tower.gd<>res://res/sprites.png
UI.gd::GDScript::-1::1713198916::0::1::::<>CanvasLayer<>::
UI.tscn::PackedScene::-1::1713198916::0::1::::<><>::res://UI.gd
::res://res/::1713198714
sprites.png::CompressedTexture2D::1870513174833790166::1713198714::1713198936::1::::<><>::

View file

@ -0,0 +1,4 @@
res://default_env.tres
res://Main.tscn
res://Camera2D.gd
res://Player.gd

View file

@ -0,0 +1,20 @@
[editor_metadata]
executable_path="C:/Users/Gebruiker/Desktop/Godot_v4.2.1-stable_win64.exe/Godot_v4.2.1-stable_win64.exe"
[debug_options]
run_live_debug=true
run_reload_scripts=true
[recent_files]
scenes=["res://Main.tscn"]
scripts=["res://Player.gd", "res://Camera2D.gd"]
[linked_properties]
Node2D:scale=true
Sprite2D:scale=true
ParallaxLayer:motion_scale=true
ParallaxLayer:scale=true

View file

@ -0,0 +1,27 @@
[res://Camera2D.gd]
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 12,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 41,
"scroll_position": 0.0,
"selection": false,
"syntax_highlighter": "GDScript"
}
[res://Player.gd]
state={
"bookmarks": PackedInt32Array(),
"breakpoints": PackedInt32Array(),
"column": 46,
"folded_lines": Array[int]([]),
"h_scroll_position": 0,
"row": 8,
"scroll_position": 0.0,
"selection": false,
"syntax_highlighter": "GDScript"
}

View file

@ -0,0 +1 @@
list=Array[Dictionary]([])

View file

@ -0,0 +1,3 @@
source_md5="8dd9ff1eebf38898a54579d8c01b0a88"
dest_md5="b3ccb78ca3b4b8c1c67e8cc239dc4ec3"

View file

@ -0,0 +1,3 @@
source_md5="5438542557626c9814ef2162a19e2908"
dest_md5="1f56895b82b64edf2ffdcea3a61ea0f0"

BIN
.godot/uid_cache.bin Normal file

Binary file not shown.

View file

@ -1,10 +1,10 @@
extends Node
export (PackedScene) var Tower = preload("res://Tower.tscn");
@export var Tower = preload("res://Tower.tscn");
onready var screen_size = Vector2(ProjectSettings.get("display/window/size/width"), ProjectSettings.get("display/window/size/height"))
@onready var screen_size = Vector2(ProjectSettings.get("display/window/size/viewport_width"), ProjectSettings.get("display/window/size/viewport_height"))
export var tower_density = 250
@export var tower_density = 250
signal spawn
@ -13,8 +13,8 @@ var last_built = 300
var towers = []
func build_tower():
var tower = Tower.instance()
tower.connect("exit", self, "_on_Tower_exit")
var tower = Tower.instantiate()
tower.connect("exit", Callable(self, "_on_Tower_exit"))
var pos = Vector2(last_built, (randf() * (screen_size.y * 0.7)) + screen_size.y * 0.15) # The player's movement vector.
@ -34,11 +34,11 @@ func build_all_towers():
func _ready():
var ui = get_node("UI")
var player = get_node("Player")
player.connect("start", self, "build_all_towers")
player.connect("start", ui, "_on_Player_start")
player.connect("hit", ui, "_on_Player_hit")
player.connect("passed", ui, "_on_Player_passed")
connect("spawn", player, "_on_Tower_spawn")
player.connect("start", Callable(self, "build_all_towers"))
player.connect("start", Callable(ui, "_on_Player_start"))
player.connect("hit", Callable(ui, "_on_Player_hit"))
player.connect("passed", Callable(ui, "_on_Player_passed"))
connect("spawn", Callable(player, "_on_Tower_spawn"))
randomize()
func _on_Tower_exit():

View file

@ -1,32 +1,32 @@
[gd_scene load_steps=6 format=2]
[gd_scene load_steps=6 format=3 uid="uid://lm2d6kimhksi"]
[ext_resource path="res://Camera2D.gd" type="Script" id=1]
[ext_resource path="res://Player.tscn" type="PackedScene" id=2]
[ext_resource path="res://res/sprites.png" type="Texture" id=3]
[ext_resource path="res://UI.tscn" type="PackedScene" id=4]
[ext_resource type="Script" path="res://Camera2D.gd" id="1"]
[ext_resource type="PackedScene" path="res://Player.tscn" id="2"]
[ext_resource type="Texture2D" uid="uid://1wdcw8ne7j5w" path="res://res/sprites.png" id="3"]
[ext_resource type="PackedScene" path="res://UI.tscn" id="4"]
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 3 )
region = Rect2( 0, 0, 144, 256 )
[sub_resource type="AtlasTexture" id="1"]
atlas = ExtResource("3")
region = Rect2(0, 0, 144, 256)
[node name="View" type="Node2D"]
script = ExtResource( 1 )
script = ExtResource("1")
[node name="Player" parent="." instance=ExtResource( 2 )]
position = Vector2( 210, 320 )
gravity = 0.0
[node name="Player" parent="." instance=ExtResource("2")]
position = Vector2(210, 320)
collision_layer = 0
gravity = 0.0
[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"]
motion_scale = Vector2( 0.5, 1 )
motion_mirroring = Vector2( 420, 0 )
motion_scale = Vector2(0.5, 1)
motion_mirroring = Vector2(420, 0)
[node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer"]
position = Vector2( 209.839, 320 )
scale = Vector2( 2.91891, 2.5 )
texture = SubResource( 1 )
region_rect = Rect2( 0, 0, 144, 256 )
[node name="Sprite2D" type="Sprite2D" parent="ParallaxBackground/ParallaxLayer"]
position = Vector2(209.839, 320)
scale = Vector2(2.91891, 2.5)
texture = SubResource("1")
region_rect = Rect2(0, 0, 144, 256)
[node name="UI" parent="." instance=ExtResource( 4 )]
[node name="UI" parent="." instance=ExtResource("4")]

Some files were not shown because too many files have changed in this diff Show more