- Home /
Where should I put this function?
I have two scripts a manager script and a board piece script.
Should I have my board pieces hold a dice function (which gets the number of spaces to move), or should my manager have this function and it send the amount to move to the pieces script?
Both ways work I just want to know if one is more accurate then the other or does it not matter?
Answer by Bleakmountain50 · Nov 04, 2018 at 02:55 AM
I think it would be better to have the piece hold it so its easier to code the piece actually moving
Answer by leftshoe18 · Nov 04, 2018 at 03:41 AM
If you're going to use the dice for more than just moving the pieces I would say put it in the manager. Otherwise putting it in the piece script will work just fine.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How can i check/wait until the gameobject will end the rotation ? 1 Answer
Optimal way to display a player's health with hearths? 1 Answer
How can I call the Load method and/or the ShootingSettings method also only once in the Update ? 1 Answer