Exemplo n.º 1
0
        public static Entity New(Entity lineEntity, NewLineModifiers modifiers)
        {
            var ent = LineWorld.Em.CreateEntity(typeof(NewLineUpdateEvent));

            LineWorld.Em.SetComponentData(ent, new NewLineUpdateEvent
            {
                LineEntity = lineEntity,
                Modifiers  = modifiers
            });
            return(ent);
        }
Exemplo n.º 2
0
        public void Execute(ref LineTool tool)
        {
            lineTool = tool;

            // TODO: Load profile for line
            lineTool.Data.LineEntity = Line.New(NewLineCreateEvent.StartingPosition, Line.Prefab);

            EntityManager.SetComponentData(lineTool.Data.LineEntity,
                                           new NewLine
            {
                Modifiers = NewLineModifiers.Defaults()
            });

            CreateLineJoinPoints(lineTool.Data);

            lineTool.State = LineToolState.Editing;

            tool = lineTool;
        }