I'm new to Unity and wetting my feet with a Backgammon clone. Currently, I have 3 scripts created to handle game stuff:
- I have my core game logic, `GameController` set up in a C# script as a singleton. This script takes care of instancing my prefab pieces and governing whether or not a move is allowed.
- I also have another js script which handles registering mouse clicks on the board mesh, via raycasting, tied to my camera.
- And another js click script on the prefabs which cause the prefabs to change appearance while selected.
However, I'm struggling to tie this all together. When I click on a piece, I want to communicate that to my `GameController`, so it can calculate possible moves. Then when I click on a possible move the selected piece needs to move to its new location.
I imagine that there's something horribly wrong with the way I'm going about trying to architect this, but I'm going to blame that on my unity n00b-ness. Let me know if you think you need some code examples, but as this is more of a general architecture question, I'm not sure you will.
Thanks all!