public override void ShowDebugVisualization(IEntityManager manager) { if (debugVisualObject.IsNotNull()) { debugVisualObject.Show(manager); coordinateSystemObject.Show(manager); return; } var entity = manager.GetEntity(Tag); var l = entity.GetComponent <LightComponent>(); var c = entity.GetComponent <ColorComponent>(); var center = l.Position; switch (l.Type) { case LightTypes.Point: debugVisualObject = SphereGameObject.Create(manager, new SphereGameObject.Data { Center = center, Color = V4Colors.Red, // c.Color * l.Intensity }); break; } coordinateSystemObject = CoordinateSystemLinesGameObject.Build(manager, center); base.ShowDebugVisualization(manager); }
public override void Execute(object parameter) { if (gameObj == null) { gameObj = CoordinateSystemLinesGameObject.Build(main.context.GetEntityManager()); return; } if (isShowed) { gameObj.Hide(main.context.GetEntityManager()); } else { gameObj.Show(main.context.GetEntityManager()); } isShowed = !isShowed; main.ForceRender(); }