Beginning Game Development: Battleship Puzzle — Scripts

<p>This is the final of a three part series of articles that describe the pieces that make up a &lsquo;Battleship&rsquo; inspired puzzle game. In the previous articles were discussed the construction of the game board and another described the individual buttons.</p> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:770/1*cj71HbOLdl_NmhnNE8Wvfw.png" style="height:1211px; width:700px" /></p> <p><strong>First,&nbsp;</strong>lets look at the script for the individual buttons.</p> <p>&mdash; Variable Declarations<br /> &middot; Each Button has a unique ID assigned when it is created, see method<br /> <strong>&lsquo;SetButtonID&rsquo;</strong>&nbsp;further down.<br /> &middot; Each Button has either been played or not been played.&nbsp;<strong>_buttonState</strong><br /> is the variable that tracks that status.<br /> &middot;<strong>&nbsp;_game&nbsp;</strong>is the variable that reference the main game<br /> &middot; These three variables reference the 3 (three) graphics that make up a<br /> game Button.</p> <p><a href="https://medium.com/@lemapp09/beginning-game-development-battleship-puzzle-scripts-a59f17e20023"><strong>Learn More</strong></a></p>