Exemple #1
0
        private void RemoveLaserEffect(ObjectReference obj)
        {
            var laser = obj.Object as Laser;

            laserEffectBinding.AttachedLasers.Remove(obj);
            if (laserEffectBinding.AttachedLasers.Count == 0)
            {
                laserEffectBinding.Dispose();
                laserEffectBinding = null;
            }
        }
Exemple #2
0
        private void AddLaserEffect(ObjectReference obj)
        {
            // Get or create laser effect
            if (laserEffectBinding == null)
            {
                var effectSettings = beatmap.GetEffectSettings(currentLaserEffectType);
                laserEffectBinding = new LaserEffectBinding(context, effectSettings);
            }

            laserEffectBinding.AttachedLasers.Add(obj);
        }