Ticket

PHOTO EMBED

Tue Oct 01 2024 09:40:04 GMT+0000 (Coordinated Universal Time)

Saved by @jakebezz

public class Ticket
{
    public string ExerciseName;     //Name of the Exercise Scene
    public float Duration;
    public int Level;

    public Ticket(string name, float duration, int level)
    {
        this.ExerciseName = name;
        this.Duration = duration;
        this.Level = level;
    }

    public virtual void PrintTicket()
    {
        Debug.Log($"Name: {ExerciseName} " +
                  $"Duration: {Duration} " +
                  $"Level: {Level}");
    }
}

public class PuzzleTicket : Ticket
{
    public int NumberOfPieces;
    public float MemoryPhaseSeconds;
    public bool AllPiecesPlacedMode;

    public PuzzleTicket(string name, float duration, int level, int pieces, float memoryPhase, bool allPieceMode) : base(name, duration, level)
    {
        this.NumberOfPieces = pieces;
        this.MemoryPhaseSeconds = memoryPhase;
        this.AllPiecesPlacedMode = allPieceMode;
    }

    public override void PrintTicket()
    {
        base.PrintTicket();

        Debug.Log($"PieceCount: {NumberOfPieces} " +
                  $"MemoryPhase: {MemoryPhaseSeconds} " +
                  $"Mode: {AllPiecesPlacedMode}");
    }
}

public class NinjaTicket : Ticket
{
    public float minSpawnDelay;
    public float maxSpawnDelay;

    public float fruitSpeed;

    public bool enableSmallFruit;
    public int samllFruitChance;

    public bool enableBomb;
    public int bombChance; 

    public NinjaTicket(string name, float duration, int level, float minSpawn, float maxSpawn, float speed, bool smallFruit, int smallChance, bool bomb, int bombChance) : base(name, duration, level)
    {
        this.minSpawnDelay = minSpawn;
        this.maxSpawnDelay = maxSpawn;

        this.fruitSpeed = speed;

        this.enableSmallFruit = smallFruit;
        this.samllFruitChance = smallChance;

        this.enableBomb = bomb;
        this.bombChance = bombChance;
    }
}
content_copyCOPY