You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB

  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using Networking.Server;
  5. public class ColorGameMode : GameMode
  6. {
  7. public int MaxRound = 5;
  8. private int RoundCount = 0;
  9. /// <summary>
  10. /// Called once all players have finished their moves but before the Objective is checked
  11. /// </summary>
  12. public override void OnRoundFinished()
  13. {
  14. RoundCount++;
  15. }
  16. /// <summary>
  17. /// Checks if the Game is finished
  18. /// </summary>
  19. /// <returns>returns if game is finished</returns>
  20. public override bool isGameOver()
  21. {
  22. return (RoundCount <= MaxRound);
  23. }
  24. /// <summary>
  25. /// Called once per player after they have moved onto a block
  26. /// </summary>
  27. /// <param name="character">Character whic hmoved</param>
  28. /// <param name="client">Client of the character</param>
  29. /// <param name="currentBlock">Block moved onto</param>
  30. public override void OnPlayerFinishedMove(Character character,ClientData client, Block currentBlock)
  31. {
  32. //Code for changing block color and updating player scores;
  33. }
  34. }