private void Awake()
        {
            MoveTruck = GetComponent <MoveTruck>();

#if UNITY_EDITOR
            if (CarBody == null)
            {
                Debug.LogError("WARNING! The '" + nameof(CarBody) + "' variable of the '" + nameof(AccelerationAnimations) + "'"
                               + " component has not been assigned! Component will be disabled!", gameObject);
                enabled = false;
            }

            if (MoveTruck == null)
            {
                Debug.LogError("WARNING! The '" + nameof(DumpTruck.MoveTruck) + "' component could not"
                               + " be found by the '" + nameof(AccelerationAnimations) + "'"
                               + " component! The '" + nameof(AccelerationAnimations) + "' component will be disabled!", gameObject);
                enabled = false;
            }
#endif

            OriginalZRotation = CarBody.transform.eulerAngles.z;
        }
Пример #2
0
 private void Awake()
 {
     DisplayController = GetComponent <DumpTruckView>();
     MoveTruck         = GetComponent <MoveTruck>();
 }