virtual protected void Start() { // Make sure the Tagalong object has a BoxCollider. tagalongCollider = GetComponent <BoxCollider>(); if (!tagalongCollider) { // If we can't find one, disable the script. enabled = false; } // Add an Interpolator component and set some default parameters for // it. These parameters can be adjusted in Unity's Inspector. interpolator = gameObject.AddComponent <Interpolator>(); interpolator.SmoothLerpToTarget = SmoothMotion; interpolator.SmoothPositionLerpRatio = SmoothingFactor; }
protected virtual void Start() { // Make sure the Tagalong object has a BoxCollider. tagalongCollider = GetComponent<BoxCollider>(); if (!tagalongCollider) { // If we can't find one, disable the script. enabled = false; } // Add an Interpolator component and set some default parameters for // it. These parameters can be adjusted in Unity's Inspector. interpolator = gameObject.AddComponent<Interpolator>(); interpolator.SmoothLerpToTarget = SmoothMotion; interpolator.SmoothPositionLerpRatio = SmoothingFactor; }