예제 #1
0
        /// <summary>
        /// Initialization logic which is execute only one time for this Entity (unless the Entity is pooled).
        /// This method is called when the Entity is added to managers. Entities which are instantiated but not
        /// added to managers will not have this method called.
        /// </summary>
        private void CustomInitialize()
        {
            BubblesInstance.CurrentBubbleEmitterType = BubbleEmitterType.Geyser;

            lightEntity = Factories.LightEntityFactory.CreateNew();
            lightEntity.AttachTo(this, false);
            lightEntity.VisualName = "HarvesterLight";
            lightEntity.Visible    = false;

            BubbleSfx.Play();
            BubbleSfx.Volume = 0;

            minSfxDistanceSquared = MinSfxVolumeDistance * MinSfxVolumeDistance;
        }
예제 #2
0
 private void CustomDestroy()
 {
     lightEntity?.Destroy();
     lightEntity = null;
 }