/// <summary>
        /// Called to start terrain painting
        /// </summary>
        /// <param name="terrain">The terrain.</param>
        private void PaintStart(FlaxEngine.Terrain terrain)
        {
            // Skip if already is painting
            if (IsPainting)
            {
                return;
            }

            _paintTerrain = terrain;
            PaintStarted?.Invoke();
        }
Exemple #2
0
        /// <summary>
        /// Called to start foliage painting
        /// </summary>
        /// <param name="foliage">The foliage.</param>
        private void PaintStart(FlaxEngine.Foliage foliage)
        {
            // Skip if already is painting
            if (IsPainting)
            {
                return;
            }

            _undoAction   = new EditFoliageAction(foliage);
            _paintFoliage = foliage;
            PaintStarted?.Invoke();
        }
        /// <summary>
        /// Called to start foliage painting
        /// </summary>
        /// <param name="foliage">The foliage.</param>
        private void PaintStart(FlaxEngine.Foliage foliage)
        {
            // Skip if already is painting
            if (IsPainting)
            {
                return;
            }

            if (Editor.Instance.Undo.Enabled)
            {
                _undoAction = new EditFoliageAction(foliage);
            }
            _paintFoliage     = foliage;
            _paintUpdateCount = 0;
            PaintStarted?.Invoke();
        }