/* * public override void SetToAnInteractiveObject(Transform t, float activeTime = 1.2f) { * transform.SetParent(null, false); * // Set position * * trackingObject = t; * * outofdateValue = activeTime; * * // Set size * MeshFilter mf = t.GetComponent<MeshFilter>(); * if (mf != null) { * Bounds bds = mf.mesh.bounds; * // Find the max one * float maxvalue = 0f; * for (int i = 0; i < 3; ++i) { * if (maxvalue < bds.size[i]) * maxvalue = bds.size[i]; * } * * transform.SetParent(t); * transform.localPosition = bds.center; * // Adjust size * float factor = 0.012f * maxvalue; * transform.localScale = new Vector3(factor, factor, factor); * } * else { * transform.position = t.position; * transform.SetParent(t); * } * gameObject.SetActive(true); * }*/ /* * public void RefreshActiveTime(float time = 1.0f) { * outofdataValue = time; * }*/ public override void UpdateConfig(IndicatorManager.DI_CONFIG config) { transform.Find("Indicator").gameObject.SetActive(config.useSphereText); distanceText.gameObject.SetActive(config.useSphereText); distanceLine.gameObject.SetActive(config.useLine); notifySound.gameObject.SetActive(config.useSound); }
public override void UpdateConfig(IndicatorManager.DI_CONFIG config) { arcSlider.gameObject.SetActive(config.useSphereText); notifySound.gameObject.SetActive(config.useSound); distanceLine.gameObject.SetActive(config.useLine); }
public abstract void UpdateConfig(IndicatorManager.DI_CONFIG config);