Space-Smash-Out/Assets/Scripts/ScriptableObjects/MatchRule.cs
Jakob Feldmann 64162cb4a1 feat: whole project restructuring
This can be seen as the initial state of the project after the released demo.

The changes include:
- New ship models
- Singleton manager structure to keep project scaleable in the future
     - Managing players, their settings, character choices, statistics, match setups, controls etc. in a separate decoupled scene
- Main menu with transitions to the arena scene
- Beginnings of a custom audio solution
- Logging with Log4Net

It is really a complete overhaul of the projects structure and management.
2024-04-01 23:06:39 +02:00

34 lines
1.0 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEditor.EditorTools;
using UnityEngine;
/// <summary>
/// Class with which the rules of a game mode can be set and stored.
/// </summary>
[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;
}
/// <summary>
/// The kinds of conditions which can win a match/round.
/// </summary>
public enum WinCondition
{
Lives,
Score,
Time
}