Пример #1
0
        void Start()
        {
            _distanceComponent = GetComponent <DistanceOnPath>();
            Debug.Assert(_distanceComponent != null);

            Debug.Assert(winAtDistance > 0);
        }
Пример #2
0
        void Start()
        {
            _animator = GetComponent <Animator>();
            Debug.Assert(_animator != null);

            _distanceComponent = GameObject.Find("Player")
                                 .GetComponent <DistanceOnPath>();
            Debug.Assert(_distanceComponent != null);

            Debug.Assert(animationDuration > 0);

            _totalDistance = LinearPath.instance.Length;
        }
Пример #3
0
        void Awake()
        {
            Debug.Assert(animator != null);

            _cursor = GetComponent <PathCursor>();
            Debug.Assert(_cursor != null);

            _transformAnimated = transform.GetChild(0);
            Debug.Assert(_transformAnimated != null);

            _transformFree = _transformAnimated.GetChild(0);
            Debug.Assert(_transformFree != null);

            _playerDistance = GameObject.Find("Player")
                              .GetComponent <DistanceOnPath>();
            Debug.Assert(_playerDistance != null);
        }