Exemplo n.º 1
0
 public void Generate()
 {
     if (generated)
     {
         Internal.Destroy();
         PrimaryEditor.Lights.Remove(Internal);
     }
     generated = true;
     Internal  = new PointLight(Position, texturesize, Radius, Color);
     PrimaryEditor.Lights.Add(Internal);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Fired when the entity is despawned.
 /// </summary>
 public override void OnDespawn()
 {
     if (Entity.Engine is GameEngine3D eng)
     {
         eng.MainView.Lights.Remove(InternalLight);
         InternalLight.Destroy();
         InternalLight             = null;
         Entity.OnPositionChanged -= FixPosition;
     }
     else
     {
         SysConsole.Output(OutputType.WARNING, "3D light despawned from a non-3D-engine-based game!");
     }
 }
Exemplo n.º 3
0
 public override void DestroyBody()
 {
     TheClient.MainWorldView.Lights.Remove(light);
     light.Destroy();
     base.DestroyBody();
 }