public void Execute()
        {
            if (objects == null || objects.Count == 0)
            {
                throw new Exception("No selected objects");
            }

            // group objects
            group = SceneManager.Instance.Group(objects);
            Midget.Events.EventFactory.Instance.GenerateGroupEvent(this, objects, group);

            ICommand select = new SelectObjectCommand(group);

            select.Execute();
        }
Beispiel #2
0
        public void Execute()
        {
            if (parameters == null)
            {
                obj = ObjectFactory.CreateObject((int)objectType);
            }
            else
            {
                obj = ObjectFactory.CreateObject((int)objectType, parameters);
            }

            Midget.Events.EventFactory.Instance.GenerateCreateObjectEvent(this, obj);

            SceneManager.Instance.AddObject(obj);
            ICommand select = new SelectObjectCommand(obj);

            select.Execute();
        }