using System.Collections;
using System.Collections.Generic;
using UnityEditor.EditorTools;
using UnityEngine;
///
/// Class with which the rules of a game mode can be set and stored.
///
[CreateAssetMenu(fileName = "MatchRule", menuName = "ScriptableObjects/MatchRule")]
public class MatchRule : ScriptableObject
{
[Tooltip("The kind of variable which decides over what wins a round.")]
public WinCondition winCondition;
[Tooltip("How many rounds have to be won to win the match.")]
public int rounds;
[Tooltip("How many lives a player has.")]
public int lives;
[Tooltip("The score a player has to reach to win the round.")]
public int score;
[Tooltip("How long the game lasts. Can be a win condition, but also influences things like sudden death. (-1 for no time limit)")]
public int time;
[Tooltip("Does a match/round enter sudden death once the time is up?")]
public bool suddenDeath;
}
///
/// The kinds of conditions which can win a match/round.
///
public enum WinCondition
{
Lives,
Score,
Time
}