BuildingAnimationWrapper
A class in Root.Township, the global namespace.
Swaps an original object for a final object, playing a BuildingAnimation spawned from a prefab in between. The spawned animation is created on load and removed before the chunk is saved.
- Listed in Global namespace: A to B
- Inherits or implements
MonoBehaviour,IChangeWithChunking
Constructors
| Member | What it is |
|---|---|
BuildingAnimationWrapper() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
5 private and internal fields
| Member | What it is |
|---|---|
private BuildingAnimation animationPrefab | BuildingAnimation prefab to spawn. |
private GameObject finalObject | Object shown once the animation finishes. |
private static Logger logger | NLog logger for this class. |
private GameObject originalObject | Object shown before the animation finishes. |
private BuildingAnimation spawned | The spawned animation instance. |
Properties
| Member | What it is |
|---|---|
Func<AnimationPart, float, bool, IEnumerator, IEnumerator> PreInsertAnimation { get; set; } | Passes through to the spawned animation's PreInsertAnimation, spawning it first. |
Methods
7 private and internal methods
Used in
Members of other types that take, return or hold a BuildingAnimationWrapper: