Esempio n. 1
0
        internal static BoolVector CreateFilledBoolVector(int size, bool fill)
        {
            var boolVector = new BoolVector(size);

            for (int i = 0; i < size; i++)
            {
                boolVector.Add(fill);
            }
            return(boolVector);
        }
        private void MergeButton_Click(object sender, RoutedEventArgs e)
        {
            EditorSubsystemManaged.getInstance().QueueActionAndBlock(new Action(() =>
            {
                StateSerializer ss   = new StateSerializer();
                BaseState cur_state  = GSM.getInstance().getStateUnderActive();
                BaseState new_state  = GSM.getInstance().getActiveState();
                BoolVector mergeMask = new BoolVector();
                foreach (var obj in objects)
                {
                    mergeMask.Add(obj.ShouldMerge);
                }

                ss.MergeStates(new_state, cur_state, mergeMask);
            }));

            this.Close();
        }
Esempio n. 3
0
        private void MergeButton_Click(object sender, RoutedEventArgs e)
        {
            EditorSubsystemManaged.getInstance().QueueActionAndBlock(new Action(() =>
               {
               StateSerializer ss = new StateSerializer();
               BaseState cur_state = GSM.getInstance().getStateUnderActive();
               BaseState new_state = GSM.getInstance().getActiveState();
               BoolVector mergeMask = new BoolVector();
               foreach (var obj in objects)
                   mergeMask.Add(obj.ShouldMerge);

               ss.MergeStates(new_state, cur_state, mergeMask);
               }));

            this.Close();
        }