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

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;
}
}