Revamp the prompt system, the bootstrapper system, the starting cinematic

This commit is contained in:
Michal Pikulski
2025-10-16 19:43:19 +02:00
parent df604fbc03
commit 50448c5bd3
89 changed files with 3964 additions and 677 deletions

View File

@@ -0,0 +1,73 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;
namespace PuzzleS
{
/// <summary>
/// Represents all puzzle steps in a level.
/// This is automatically generated from folder structure during asset import.
/// </summary>
[CreateAssetMenu(fileName = "LevelPuzzleData", menuName = "AppleHills/Items & Puzzles/LevelPuzzleData")]
public class PuzzleLevelDataSO : ScriptableObject
{
/// <summary>
/// Unique identifier for this level, automatically set to match folder name
/// </summary>
public string levelId;
/// <summary>
/// Display name for this level
/// </summary>
public string displayName;
/// <summary>
/// All puzzle steps in this level
/// </summary>
public List<PuzzleStepSO> allSteps = new List<PuzzleStepSO>();
/// <summary>
/// Steps that should be unlocked at level start (no dependencies)
/// </summary>
public List<PuzzleStepSO> initialSteps = new List<PuzzleStepSO>();
/// <summary>
/// Pre-processed dependency data built at edit time.
/// Maps step IDs to arrays of dependency step IDs (which steps are required by each step)
/// </summary>
public Dictionary<string, string[]> stepDependencies = new Dictionary<string, string[]>();
/// <summary>
/// Check if all steps in the level are complete
/// </summary>
public bool IsLevelComplete(HashSet<PuzzleStepSO> completedSteps)
{
if (completedSteps == null) return false;
foreach (var step in allSteps)
{
if (step != null && !completedSteps.Contains(step))
{
return false;
}
}
return true;
}
/// <summary>
/// Gets all steps that will be unlocked by completing the given step
/// </summary>
public List<PuzzleStepSO> GetUnlockedSteps(PuzzleStepSO completedStep)
{
return completedStep != null ? completedStep.unlocks : new List<PuzzleStepSO>();
}
/// <summary>
/// Check if this step is an initial step (no dependencies)
/// </summary>
public bool IsInitialStep(PuzzleStepSO step)
{
return step != null && initialSteps.Contains(step);
}
}
}