Added job component and queue system

- Introduced a new JobComponent and JobQueue to manage jobs in the game.
- Created two new jobs: DigJob and InfectJob with their respective scripts.
- Updated CrystalGlowComponent, FreeCameraComponent, MushroomGlowComponent, WaterEffectComponent to improve logging messages.
- Adjusted camera movement limits in FreeCameraGameCameraComponent for better control.
- Added FiniteStateMachine class for managing states of entities.
- Implemented GlowingIdle state as an example of using the state machine.
- Included a utility function to fetch file paths by extension from a directory.
This commit is contained in:
Dan 2024-06-06 15:49:05 +01:00
parent fc896925d6
commit bb5724429a
23 changed files with 311 additions and 29 deletions

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=115 format=3 uid="uid://cbiwnafhckchl"]
[gd_scene load_steps=116 format=3 uid="uid://cbiwnafhckchl"]
[ext_resource type="Texture2D" uid="uid://cwkjk7hh7csea" path="res://resources/sCaveTile.png" id="1_au2ii"]
[ext_resource type="Material" uid="uid://bpverily2kmvm" path="res://levels/resources/material_desaturate_tileset.tres" id="1_iph1s"]
@ -15,6 +15,7 @@
[ext_resource type="PackedScene" uid="uid://c87qvtq8ho3bb" path="res://components/MushroomGlowComponent.tscn" id="13_uwl47"]
[ext_resource type="PackedScene" uid="uid://mawos5ss1cod" path="res://components/WaterEffectComponent.tscn" id="14_x3ue3"]
[ext_resource type="PackedScene" uid="uid://htaqjgupmiiu" path="res://components/FreeCameraComponent.tscn" id="15_xajk3"]
[ext_resource type="PackedScene" uid="uid://buadlj7sbutdh" path="res://components/JobComponent.tscn" id="16_qq30h"]
[sub_resource type="Environment" id="Environment_ct14l"]
background_mode = 3
@ -4000,6 +4001,9 @@ shader_parameter/noise_scroll_direction = Vector2(1, 0)
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_ct14l")
[node name="FreeCameraComponent" parent="." node_paths=PackedStringArray("tile_map") instance=ExtResource("15_xajk3")]
tile_map = NodePath("../TileMap")
[node name="TileMap" type="TileMap" parent="."]
tile_set = SubResource("TileSet_lsdax")
format = 2
@ -4035,5 +4039,4 @@ position = Vector2(2167, 319)
[node name="CanvasModulate" type="CanvasModulate" parent="."]
color = Color(0.301961, 0.45098, 1, 1)
[node name="FreeCameraComponent" parent="." node_paths=PackedStringArray("tile_map") instance=ExtResource("15_xajk3")]
tile_map = NodePath("../TileMap")
[node name="JobComponent" parent="." instance=ExtResource("16_qq30h")]