Ejemplo n.º 1
0
        public override void AttachEditorComponents(Entity entity, Main main)
        {
            base.AttachEditorComponents(entity, main);

            VoxelAttachable.AttachEditorComponents(entity, main, entity.Get <Model>().Color);
            PlayerTrigger.AttachEditorComponents(entity, main, entity.Get <Model>().Color);
        }
Ejemplo n.º 2
0
        public override void AttachEditorComponents(Entity entity, Main main)
        {
            base.AttachEditorComponents(entity, main);
            Model editorModel = entity.Get <Model>("EditorModel");

            editorModel.Add(new Binding <bool>(editorModel.Enabled, () => Editor.EditorModelsVisible && !entity.EditorSelected, entity.EditorSelected, Editor.EditorModelsVisible));

            VoxelAttachable.AttachEditorComponents(entity, main, editorModel.Color);
            PlayerTrigger.AttachEditorComponents(entity, main, editorModel.Color);
        }
Ejemplo n.º 3
0
        public override void AttachEditorComponents(Entity entity, Main main)
        {
            ModelAlpha model = new ModelAlpha();

            model.Filename.Value = "AlphaModels\\light";
            model.Color.Value    = this.Color;
            model.Serialize      = false;

            entity.Add("EditorModel", model);

            model.Add(new Binding <Matrix>(model.Transform, entity.Get <Transform>().Matrix));
            model.Add(new Binding <bool>(model.Enabled, Editor.EditorModelsVisible));

            PlayerTrigger.AttachEditorComponents(entity, main, this.Color);
            VoxelAttachable.AttachEditorComponents(entity, main);
        }