Class CampaignLevel
- Namespace
- TDMaker.Unity.Campaign
- Assembly
- TDMaker.Unity.dll
One level of a CampaignAsset: what to play, where its point sits on the world map and when it opens.
public sealed class CampaignLevel
- Inheritance
-
CampaignLevel
- Inherited Members
Constructors
CampaignLevel()
public CampaignLevel()
Fields
branch
A side level: it does not block the main path (levels using PreviousLevel skip it when looking for their previous level). A branch with PreviousLevel opens after the main level before it.
[Tooltip("Side level: it never blocks the main path. With Previous Level it opens after the main level listed before it.")]
public bool branch
Field Value
countsTowardStars
Whether the level's best stars count toward the campaign star total (and star gates).
[Tooltip("Count this level's best stars toward the campaign total (star gates, shop budget).")]
public bool countsTowardStars
Field Value
key
Stable key of the level in save files (lower case, no spaces, for example river_ford). Never rename it after
release: saved progress is stored by key. Also the text key stem (campaign.level.<key>.title|summary).
[Tooltip("Stable key used by save files (never rename it after release) and by the text tables (campaign.level.<key>.title / .summary).")]
public string key
Field Value
level
The level to play.
public LevelAsset level
Field Value
mapPosition
Position of the level point on the map image, 0..1 from the bottom-left corner.
[Tooltip("Position of the level point on the map image: 0..1 from the bottom-left corner. Place it by clicking in the campaign inspector's map view.")]
public Vector2 mapPosition
Field Value
- Vector2
minTotalStars
Earned stars needed on top of the unlock rule (0 = none).
[Tooltip("Total earned stars needed in addition to the unlock rule (0 = no star gate).")]
[Min(0)]
public int minTotalStars
Field Value
pathPoints
Optional bend points (0..1 map space) of the road drawn from the level that opens this one to this level's point.
[Tooltip("Optional bend points (0..1 map space) of the connection drawn from the prerequisite to this level.")]
public List<Vector2> pathPoints
Field Value
- List<Vector2>
requiredLevels
Keys of the levels that must be won first (RequiredLevels only).
public List<string> requiredLevels
Field Value
summary
Short description for the level info panel (English; translated through campaign.level.<key>.summary).
[TextArea(2, 4)]
public string summary
Field Value
title
Title shown on the map (English; translated through campaign.level.<key>.title).
public string title
Field Value
unlock
When the level opens.
public CampaignUnlock unlock