5. Explosion effect not working, still splash effect when we hit
In UtilityFunction.cs:
ROW 256 = AddAnimation (row, col, "Splash"); -> AddAnimation (row, col, "Explosion");
ROW 314 = Added a delay of 1ms between animation cells using SwinGame.Delay(10) to improve the effect.
New Feature:
1. Add Current Difficulty
In GameResources.cs:
ROW 21: Add new font named "MenuLarge"
In MenuController.cs:
ROW 44: Create new variable (CURRENT_DIFFICULTY)
ROW 148: Draw current difficulty by adding new SwinGame.DrawTextLines(...)
ROW 292-300: Add new codes to change current difficulty in PerformSetupMenuAction() function. (CURRENT_DIFFICULTY = ...)
2. Add Score Monitor
In GameResources.cs:
ROW 65: Instantiate variable: const int SCORE_TOP = 306, for Score's position.
ROW 79: Draw the score to the screen by adding SwinGame.DrawText (GameController.HumanPlayer.Score.ToString (), Color.White, GameResources.GameFont ("Menu"), SCORES_LEFT, SCORE_TOP);
In Images folder:
Edit background image: add score's row
3. Add Result Summary in endgame
In EndingGameController.cs:
ROW 27 - 39: Add more SwinGame.DrawTextLines()
In GameResources.cs:
ROW 17: Add new font named "ArialSmall"
4. Add Pause button
In GameResources.cs:
ROW 36 -> Add new image named PauseButton
In DiscoveryController.cs:
ROW 49 -> Add pause area (if (row == -1 & col == 9))
ROW 92 -> Draw pause button by adding SwinGame.DrawBitmap()
In Images folder:
Add pause button image
5. Add Github button
In Images folder:
Create Guthub button image
In MenuController.cs:
ROW 135-144 ->
//If wiki page button is clicked
Point2D mouse = default (Point2D);
mouse = SwinGame.MousePosition ();
int mouseX = Convert.ToInt32 (mouse.X);
int mouseY = Convert.ToInt32 (mouse.Y);
if (mouseX > 700 && mouseX < 780 && mouseY > 200 && mouseY <246) {
Process.Start ("https://github.com/Manfredtham/Battleship/wiki");
}
ROW 233-234 ->
//Add navigator to Group Wiki page.
SwinGame.DrawText ("About Us", Color.White, GameResources.GameFont ("Menu"), 695, 160);
SwinGame.DrawBitmap (GameResources.GameImage ("GitHub"), 700, 200);