using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using Networking.Server;
|
|
|
|
public class ColorGameMode : GameMode
|
|
{
|
|
|
|
public int MaxRound = 5;
|
|
|
|
private int RoundCount = 0;
|
|
|
|
|
|
/// <summary>
|
|
/// Called once all players have finished their moves but before the Objective is checked
|
|
/// </summary>
|
|
public override void OnRoundFinished()
|
|
{
|
|
RoundCount++;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Checks if the Game is finished
|
|
/// </summary>
|
|
/// <returns>returns if game is finished</returns>
|
|
public override bool isGameOver()
|
|
{
|
|
return (RoundCount <= MaxRound);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Called once per player after they have moved onto a block
|
|
/// </summary>
|
|
/// <param name="character">Character whic hmoved</param>
|
|
/// <param name="client">Client of the character</param>
|
|
/// <param name="currentBlock">Block moved onto</param>
|
|
public override void OnPlayerFinishedMove(Character character,ClientData client, Block currentBlock)
|
|
{
|
|
|
|
//Code for changing block color and updating player scores;
|
|
|
|
}
|
|
}
|