Class BakedLevel
- Namespace
- TDMaker.Unity.Authoring
- Assembly
- TDMaker.Unity.dll
The result of baking a level: core inputs plus lookups back to authoring assets for the view.
public sealed class BakedLevel
- Inheritance
-
BakedLevel
- Inherited Members
Properties
CameraFraming
Camera framing of the level (from its LevelAsset or a scene override); never null after baking.
public CameraFramingData CameraFraming { get; }
Property Value
HeroSpawns
Spawn position for each hero, index-aligned with Heroes.
public IReadOnlyList<Vector2> HeroSpawns { get; }
Property Value
- IReadOnlyList<Vector2>
Heroes
Hero assets in Level.AvailableHeroes order.
public IReadOnlyList<HeroAsset> Heroes { get; }
Property Value
Level
Level definition for the simulation.
public LevelDef Level { get; }
Property Value
Music
Music of the level (from its LevelAsset); never null after baking.
public LevelMusicData Music { get; }
Property Value
Paths
Authoring paths (with lane settings) used to build the level.
public IReadOnlyList<PathData> Paths { get; }
Property Value
RaisesRemains
Whether any baked template raises bodies (the view then draws body markers).
public bool RaisesRemains { get; }
Property Value
Spells
Spell assets in Level.AvailableSpells (and Simulation.Spells) order.
public IReadOnlyList<SpellAsset> Spells { get; }
Property Value
Templates
Resolved templates for the simulation.
public TemplateRegistry Templates { get; }
Property Value
Methods
GetHero(string)
Finds the hero asset for a template id.
public HeroAsset GetHero(string templateId)
Parameters
templateIdstring
Returns
GetSpell(int)
Finds the spell asset for a spell index (Simulation.Spells order).
public SpellAsset GetSpell(int index)
Parameters
indexint
Returns
GetTower(string)
Finds the tower asset for a template id.
public TowerAsset GetTower(string templateId)
Parameters
templateIdstring
Returns
GetTowerTier(string)
One-based upgrade depth of a tower template (1 = buildable base), or 0 when unknown.
public int GetTowerTier(string templateId)
Parameters
templateIdstring
Returns
IsBossWave(int)
Whether the one-based wave waveNumber is flagged as a boss wave (presentation hint).
public bool IsBossWave(int waveNumber)
Parameters
waveNumberint
Returns
RateVictory(int)
Stars (0..3) the level's VictoryRating gives for lives remaining.
During play read GameState.VictoryStars or the Victory event's IntValue instead.
public int RateVictory(int lives)
Parameters
livesint
Returns
TryGetAsset(string, out EntityAssetBase)
Finds the authoring asset for a template id.
public bool TryGetAsset(string templateId, out EntityAssetBase asset)
Parameters
templateIdstringassetEntityAssetBase
Returns
TryGetEffect(string, out StatusEffectAsset)
Finds the status effect asset for an effect id (from effect events).
public bool TryGetEffect(string effectId, out StatusEffectAsset asset)
Parameters
effectIdstringassetStatusEffectAsset
Returns
TryGetMechanicVisual(string, out MechanicVisual)
Finds the colour and VFX of a keyed mechanic (chain, multi-target attack or region pulse) from its event key.
public bool TryGetMechanicVisual(string key, out MechanicVisual visual)
Parameters
keystringvisualMechanicVisual
Returns
TryGetProjectile(string, out ProjectileAsset)
Finds a projectile asset by view key.
public bool TryGetProjectile(string viewKey, out ProjectileAsset asset)
Parameters
viewKeystringassetProjectileAsset
Returns
WithTemplates(TemplateRegistry)
Returns a copy that uses templates (for example decorated by
SimulationRunner.AddTemplateDecorator) and keeps every authoring lookup.
public BakedLevel WithTemplates(TemplateRegistry templates)
Parameters
templatesTemplateRegistry