- Home /
2D Hex/ Square Tile Resource Controller Help
Hey guys, on the project I'm working on I have a Controller that generates hexagonal tiles in an array and names them based on their position (ie. hextile_1-1). After each Tile is generated it is given three variables: Temp, Nutrients, and StoredNutrients all starting at 0, as the Environment Temperature goes up, so does the Temp variable on each tile. the Temp Effects how many points the nutrients variable will have; and after 100 it starts adding points to the Stored Nutrients. My problem comes in where I need each tile to communicate with the surrounding tiles and check, how much nutrients they have, and if it can share the nutrients from the Stored variable. I'm not an advanced programmer, but I have a good amount of experience in C#, any help or general guidance will be appreciated! if you need to see some code lmk
here is an example of the kind of communication im talking about. Higher Temps makes less nutrients, so neighboring tiles try to compensate. nutri: 1 to 100 points Temp: 0 to 110°