So without any further ado, here are the project files for this last part of …
Unfortunately, due to lack of time to prepare the written part of the tutorial I seem not to be able to complete this. I decided to upload the final zip project file for you to play with until I find the time co write about it. I hope it’s helpful and that the comments are clear enough so that it doesn’t seem to complex. I’d suggest you compare it with the project files from the previous page.
There are quite a bit of things changed compared to part 08 enemy AI controller and although it might not seem this way, this last part would be quite lengthy because of this and because I want to go over signals and the Observer pattern and signal/events in greater detail.
This is going to be a very simple assignment or so I hope because by this stage you should have been exposed to a lot of Godot elements and should be comfortable with scripts, certain decision making steps.
Given what I said above, in this section, the task this time is to remove the setter function
__set_energy() and instead set the
player_energy key on
The algorithm used in building the board part of the tutorial isn’t as efficient as it can be. Can you think of a better way of doing it? Hints:
self.__gridwith available locations instead of initializing it to an empty array and populating it every loop step with locations of placed tiles
- the only other modification that needs to be made is …
TileSetinstead of a plain Dictionary with an inner Dictionary so be sure to grab the updated project files! if you went through the tutorial before 2016-09-25 14:20