Ejemplo n.º 1
0
        /// <summary>This will add a paint command to this texture's paint stack. The paint stack will be executed at the end of the current frame.</summary>
        public void AddCommand(P3dCommand command)
        {
            if (command.Preview == true)
            {
                command.Index = previewCommands.Count;

                previewCommands.Add(command);
            }
            else
            {
                command.Index = paintCommands.Count;

                paintCommands.Add(command);

                if (state == StateType.LocalCommandCopy && command.Preview == false)
                {
                    var localCommand = command.SpawnCopyLocal(transform);

                    localCommand.Index = localCommands.Count;

                    localCommands.Add(localCommand);
                }
            }

            if (OnAddCommand != null)
            {
                OnAddCommand(command);
            }
        }