// Use this for initialization void Start() { isVisible = false; animator = GetComponentInChildren <Animator>(); wheel = GetComponentInChildren <MovingEnvironmentController>(); light = GetComponentInChildren <Light>(); GetComponent <Platform>().OnIsActiveChange += UpdateVisibility; UpdateVisibility(false); }
void Start() { if (smooth) { if (script is MovingEnvironmentController) { motor = (MovingEnvironmentController)script; } else { Debug.LogWarning("smoothing is only possible for type MovingEnvironmentController_TEMP"); } } }