protected KAnimControllerBase() { KAnim.Anim.Frame invalidFrame = KAnim.Anim.Frame.InvalidFrame; curAnimFrameIdx = invalidFrame.idx; KAnim.Anim.Frame invalidFrame2 = KAnim.Anim.Frame.InvalidFrame; prevAnimFrame = invalidFrame2.idx; eventManagerHandle = HandleVector <int> .InvalidHandle; overrideAnimFiles = new List <OverrideAnimFileData>(); DeepProfiler = new DeepProfiler(false); playSpeed = 1f; mode = KAnim.PlayMode.Once; stopped = true; animHeight = 1f; animWidth = 1f; _enabled = true; hiddenSymbols = new List <KAnimHashedString>(); anims = new Dictionary <HashedString, AnimLookupData>(); overrideAnims = new Dictionary <HashedString, AnimLookupData>(); animQueue = new Queue <AnimData>(); fgLayer = Grid.SceneLayer.NoLayer; base._002Ector(); previousFrame = -1; currentFrame = -1; PlaySpeedMultiplier = 1f; synchronizer = new KAnimSynchronizer(this); layering = new KAnimLayering(this, fgLayer); isVisible = true; }
protected virtual void OnDestroy() { animFiles = null; curAnim = null; curBuild = null; synchronizer = null; layering = null; animQueue = null; overrideAnims = null; anims = null; synchronizer = null; layering = null; overrideAnimFiles = null; }
public void HideSymbols() { if (!((Object)EntityPrefabs.Instance == (Object)null) && !isForeground) { KAnimFile[] animFiles = controller.AnimFiles; bool flag = IsAnimLayered(animFiles); if (flag && (Object)foregroundController == (Object)null && layer != Grid.SceneLayer.NoLayer) { GameObject gameObject = Util.KInstantiate(EntityPrefabs.Instance.ForegroundLayer, controller.gameObject, null); gameObject.name = controller.name + "_fg"; foregroundController = gameObject.GetComponent <KAnimControllerBase>(); foregroundController.AnimFiles = animFiles; foregroundController.GetLayering().SetIsForeground(true); foregroundController.initialAnim = controller.initialAnim; link = new KAnimLink(controller, foregroundController); Dirty(); KAnimSynchronizer synchronizer = controller.GetSynchronizer(); synchronizer.Add(foregroundController); synchronizer.Sync(foregroundController); float layerZ = Grid.GetLayerZ(layer); Vector3 position = controller.gameObject.transform.GetPosition(); Vector3 position2 = new Vector3(0f, 0f, layerZ - position.z - 0.1f); gameObject.transform.SetLocalPosition(position2); gameObject.SetActive(true); } else if (!flag && (Object)foregroundController != (Object)null) { controller.GetSynchronizer().Remove(foregroundController); foregroundController.gameObject.DeleteObject(); link = null; } if ((Object)foregroundController != (Object)null) { HideSymbolsInternal(); foregroundController.GetLayering()?.HideSymbolsInternal(); } } }