Skip to content

Fixed previous state running after next state starts #24

Open
Errorbot1122 wants to merge 3 commits intoprooheckcp:mainfrom
Errorbot1122:fix-heartbeat
Open

Fixed previous state running after next state starts #24
Errorbot1122 wants to merge 3 commits intoprooheckcp:mainfrom
Errorbot1122:fix-heartbeat

Conversation

@Errorbot1122
Copy link

@Errorbot1122 Errorbot1122 commented Feb 11, 2025

📝Description

Fixed the fact that previous state methods can still run, even after swapping states. (#23)

🔧Changes

  • Added most state method calls to be in _stateTrove
  • Added _CallMethod Private method for calling _stateTrove:Add and task.spawn on the same line.
  • Small Nitpick with Trove:Add() usage.

👣Next steps

  • Doing the same with transitions (however less problematic)
  • Thinking about maybe moving _stateTrove to be in the State class.

@Errorbot1122 Errorbot1122 changed the title Fixed State.OnHeartbeat Bug from #23 Fixed previous state running after next state starts Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant