Class LevelContext
- Namespace
- TDMaker.Editor
- Assembly
- TDMaker.Editor.dll
Finds the level a tower belongs to, so editor previews use the level's rules (for example the sale refundShare) instead of per-tower legacy values.
public static class LevelContext
- Inheritance
-
LevelContext
- Inherited Members
Properties
DefaultRefundShare
Default refund share used when the tower is not part of any level.
public static float DefaultRefundShare { get; }
Property Value
Methods
Invalidate()
Clears the lookup cache (call after editing level tower lists).
public static void Invalidate()
LevelOf(TowerAsset)
The first level (by asset path) whose buildable towers or their upgrade trees include tower, or null.
public static LevelAsset LevelOf(TowerAsset tower)
Parameters
towerTowerAsset
Returns
RefundShareFor(TowerAsset, out LevelAsset)
Sale refund share after the first wave for tower: its level's rule, else the default.
public static float RefundShareFor(TowerAsset tower, out LevelAsset level)
Parameters
towerTowerAssetlevelLevelAsset