コード例 #1
0
        public void Kill(Shape shape)
        {
            float scale = shape.transform.localScale.x;
            var   data  = new ScaleSystemData(duration.Random, scale, endScale: 0f, actionSource[shape]);

            system.UpdateData(shape.transform, data);
        }
コード例 #2
0
        private void SpawnSatellites(Shape planet, int count, List <Shape> list)
        {
            for (int i = 0; i < count; i++)
            {
                Shape satellite = SpawnSatelliteFor(planet);
                list.Add(satellite);

                var data = new ScaleSystemData(growDuration.Random, startScale: 0f, satellite.Scale, spawnedActionSource[satellite]);
                scaleSystem.AddData(satellite.transform, data);
            }
        }
コード例 #3
0
        protected override void OnShapeSpawned(Shape spawned)
        {
            float _scale = scale.Random;

            spawned.Scale = _scale;
            spawned.transform.localScale = Vector3.zero;

            var data = new ScaleSystemData(duration.Random, startScale: 0f, _scale, actionSource[spawned]);

            system.AddData(spawned.transform, data);
        }