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:
parent
fc896925d6
commit
bb5724429a
23 changed files with 311 additions and 29 deletions
|
|
@ -64,18 +64,18 @@ func _physics_process(delta : float) -> void:
|
|||
# If this movement would take us out of clamp we don't want to do it:
|
||||
var position_change : Vector2 = camera_movement * get_zoom()
|
||||
|
||||
if (position.x + position_change.x) <= limit_left or\
|
||||
(position.x + position_change.x) >= limit_right:
|
||||
if (position.x + position_change.x) < limit_left or\
|
||||
(position.x + position_change.x) > limit_right:
|
||||
camera_movement.x = 0
|
||||
|
||||
if (position.y + position_change.y) <= limit_top or\
|
||||
(position.y + position_change.y) >= limit_bottom:
|
||||
if (position.y + position_change.y) < limit_top or\
|
||||
(position.y + position_change.y) > limit_bottom:
|
||||
camera_movement.y = 0
|
||||
|
||||
if camera_movement.y != 0 or camera_movement.x != 0:
|
||||
# Update position of the camera.
|
||||
position += camera_movement * get_zoom()
|
||||
|
||||
|
||||
# Set camera movement to zero, update old mouse position.
|
||||
camera_movement = Vector2(0,0)
|
||||
_prev_mouse_pos = get_local_mouse_position()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue