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; }
private void OnEnable() { _surface = UnityUtility.FindParent <Surface>(this); _graphManager = GetComponent <GraphManager>(); _offsetAnimation.Init(0); }