Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Clint Fleetwood | |
Old Version | Published before Godot 3 was released. |
I’m VERY new to c++, but have been a programmer for years. So take that into consideration when you reply to this please.
Basically I’m creating a hex grid module to replace the plugin that I have in GD script. I am trying to create a “Hex” DataType, and I need that Hex to be the return for functions as well. If it was just needing to create hex I would just use Vector3 (as the Hex type is essentially 3 integers) , but I also need several other types that need to be called from GD script. Also I want to learn how to do this for future projects.
The way I’m handling it right now is to create a class for each of the types that I need. I am not sure if that is the best way or not. If it was possible to create dataTypes from public “struct” inside the “HexGrid” class that would be awesome, but I haven’t seen any examples of that working, but I digress. Any help would be appreciated.
I am assuming that part of the answer I am looking for can be found in the “Array” classes. I just am not sure which parts I can use.
Clint Fleetwood | 2016-07-20 13:24