JayJay 2 Posted February 5, 2018 Report Share Posted February 5, 2018 I'm considering using Behaviors (Phaser.Plugin.Behavior) for my game, so I'm trying to understand if player movement could/should be modeled as a behavior, even if entity movement is accomplished via pathfinding (say EasyStar.js). There's no physics, btw. So the basic idea is to use the the behavior's onUpdate method to do one of 3 things: 1) If path is not yet calculated, it will call the .calculate() method of EasyStar to advance the calculation processing 2) If the calculation is done, move the entity futher along the path, if not yet reached the target point 3) do nothing (or maybe remove the behavior?) if already arrived at target location. Let me know if this looks like it could work or otherwise how Phaser.Plugin.Behavior and PathFinding could co-exist on a game. Quote Link to post Share on other sites
JayJay 2 Posted February 10, 2018 Author Report Share Posted February 10, 2018 up! No love for my question so far Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.