problems :
- game scene was not as shown in the GDD
- problem when moving tilemap (the placeholders didn't follow)
- possible to place units outside the game area
solutions :
- try to make the game scene as close to the gdd as possible
- don't move the tilemap : move the camera instead (this keeps the world position of tilemap intact)
- there was a logic bug in the DraggablePlaceholder. It ain't anymore
problems :
- there were no test scene
- units would appear weird over some tiles
- units would not recognize some tiles when trying to know if it could place itself on it
solution :
- added test scene
- tweaked sorting layers in units
- added IsCollidable parameter in ILevelObject
problème : les game objects sont offsettés de (-.5, -.5) par rapport aux tiles
contrainte : on ne veut pas changer l'ancrage des game objects ou des tiles
solution : changer le point d'ancrage des tilemaps à la place. Cela peut se faire automatiquement à la création du niveau.
problème : Le level manager n'était pas notified quand un objet ou une tile était enlevée du niveau
solution : LevelTile et LevelObject gèrent l'effaçage avec RefreshTile et OnDestroy.
problèmes :
- mon code et l'arrangement des fichiers avait besoin d'un peu de tidy up
- les tiles qui n'étaient pas des LevelTile ne loadaient pas
solution :
- rangé un peu + respecté structure une classe - un fichier
- tenté un build pour voir si tout roulait comme il faut, ce qui m'a porté à ajouter des directives de preprocessing et à bouger les custom inspectors dans le dossier Editor.
- ajouté une représentation simple des tuiles non-LevelTile dans la sauvegarde.
problem : tiles dont have an update loop, neither do they have a start / destroy method
solution : finished working on a way to create a custom start/update/destroy pipeline for the projects custom tiles. it's using LevelManagerScript as to Update.
note : also created a database and a start of serialization system so we can save and load stuff.
le fait qu'il faille updater des tiles du tilemap posait un réel problème
création d'un système d'héritage pour que les game objects et les tiles puissent cohabiter dans une même game loop
- ILevelObject contient des fonctions de start, de destroy, d'update, d'égalité et une position
- LevelTile et LevelObject héritent de ILevelObject et peuvent être hérité par des tiles ou des MonoBehaviours.
- le level manager est un monobehaviour singleton qui update tous les ILevelObjects à chaque frame.