示例#1
0
 protected override void OnBeginPaint()
 {
     base.OnBeginPaint();
     if (this.m_paramConstraints.Value)
     {
         TextureManipulator.PaintConstraints_Begin(this.m_paramMinHeight.Value, this.m_paramMaxHeight.Value, this.m_paramHeightFuzziness.Value, this.m_paramMinSlope.Value, this.m_paramMaxSlope.Value);
     }
 }
示例#2
0
 protected override void OnEndPaint()
 {
     base.OnEndPaint();
     if (!this.m_paramConstraints.Value)
     {
         TextureManipulator.Paint_End();
         return;
     }
     TextureManipulator.PaintConstraints_End();
 }
示例#3
0
        protected override void OnPaint(float dt, Vec2 pos)
        {
            base.OnPaint(dt, pos);
            int num = (Control.ModifierKeys != Keys.Control) ? this.m_paramTexture.Value : 0;

            if (num == -1)
            {
                return;
            }
            TextureInventory.Entry textureEntryFromId = TerrainManager.GetTextureEntryFromId(num);
            if (!textureEntryFromId.IsValid)
            {
                return;
            }
            if (!this.m_paramConstraints.Value)
            {
                TextureManipulator.Paint(pos, this.m_paramStrength.Value * 512f * dt, num, this.m_brush);
                return;
            }
            TextureManipulator.PaintConstraints(pos, this.m_paramStrength.Value * 512f * dt, num, this.m_brush);
        }