Exemple #1
0
        protected override void Awake()
        {
            if (this.SetDirectionAutomatically)
            {
                this.AllowedDirection = DirectionHelper.FromRotation(this.Rotation2D, Direction2D.Down);
            }

            _previousScaleY    = this.Scale2D.Y;
            _previousPositionY = this.Position2D.Y;

            var boxCollider = this.Get <BoxCollider2D>();

            if (boxCollider != null)
            {
                _scaleMultiplier = boxCollider.size.y;
            }
        }