示例#1
0
        void OnEnable()
        {
            _completeActionRaised = false;

            Vector2 targetScale = _scaleToScreenSize.Simulate(false);

            var data = new ScaleData(transform, targetScale, scaleSpeed);

            _scaler = new ScalerFactory().Make(scaleType, data);
        }
示例#2
0
        private void ScaleDown()
        {
            if (clipOnProjectileSpawn != null)
            {
                MusicAudioPlayer.instance.PlayOneShot(clipOnProjectileSpawn);
            }

            var data = new ScaleData(transform, transform.localScale, scaleDownSpeed);

            _scaleDown = new ScalerFactory().Make(Scale.ScaleType.Down, data);
        }
示例#3
0
        /// <summary>
        /// Makes a Scaler based on specified type and data.
        /// </summary>
        /// <param name="type">Type of Scaler.</param>
        /// <param name="data">Data.</param>
        public Scaler Make(Scale.ScaleType type, ScaleData data)
        {
            Scaler scaler = null;

            if (type == Scale.ScaleType.Down)
            {
                scaler = new ScaleDown(data);
            }
            else
            {
                scaler = new ScaleUp(data);
            }

            return(scaler);
        }
示例#4
0
 public ScaleDown(ScaleData data)
 {
     _scaleData = data;
 }
示例#5
0
 public ScaleUp(ScaleData data)
 {
     _scaleData = data;
 }
示例#6
0
        private void ScaleDown()
        {
            var data = new ScaleData(transform, transform.localScale, scaleDownSpeed);

            _scaleDown = new ScalerFactory().Make(Scale.ScaleType.Down, data);
        }