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

float

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

tower TowerAsset

Returns

LevelAsset

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

tower TowerAsset
level LevelAsset

Returns

float