Пример #1
0
        public void Init(float pos, float height, float offset)
        {
            _position = pos;
            _positionAnimation.Init(_position);

            _height = height;
            _heightAnimation.Init(_height);

            _offset = offset;
            _offsetAnimation.Init(_offset);

            var rotation = Quaternion.Euler(0, 90, 0);

            _rotationAnimation.Init(rotation);

            transform.localPosition = new Vector3(_position, _height, _offset);
            transform.localRotation = rotation;
        }
Пример #2
0
 private void OnEnable()
 {
     _surface      = UnityUtility.FindParent <Surface>(this);
     _graphManager = GetComponent <GraphManager>();
     _offsetAnimation.Init(0);
 }