private void OnEnable() { if (Application.isEditor) { if (!circleRenderer) { circleRenderer = GetComponent <MeshRenderer>(); } } _shadeCorners = new LinkedLerp.MaterialFloat("_Courners", startingValue: 0, startingSpeed: 10, circleRenderer); _shadeSelected = new LinkedLerp.MaterialFloat("_Selected", 0, 4, circleRenderer); _textureFadeIn = new LinkedLerp.MaterialFloat("_TextureFadeIn", 0, 10, circleRenderer); _localPos = new LinkedLerp.TransformLocalPosition(transform, 90); _localScale = new LinkedLerp.TransformLocalScale(circleRenderer.transform, 120); _texTransition = new LinkedLerp.RendererMaterialTextureTransition(circleRenderer); }
void OnEnable() { if (instance && instance != this) { Debug.LogError("Multiple Game Controllers detected"); } else { instance = this; } upperColor = new LinkedLerp.MaterialColor("_BG_GRAD_COL_1", Color.white, 1, backgroundMaterial); middleColor = new LinkedLerp.MaterialColor("_BG_CENTER_COL", Color.white, 1, backgroundMaterial); bottomColor = new LinkedLerp.MaterialColor("_BG_GRAD_COL_2", Color.white, 1, backgroundMaterial); gradientMiddle = new LinkedLerp.MaterialFloat("_Center", 0.1f, 1, m: backgroundMaterial); if (Application.isPlaying) { OpenMainMenu_Internal(); gameProgressData.Load(); } }