Example #1
0
        /// <summary>
        /// This function must be overridden, since we have to reset the hotspots
        /// </summary>
        /// <returns></returns>
        public override ShapeBase Clone()
        {
            HeightFieldGeneratorShape copy = base.Clone() as HeightFieldGeneratorShape;

            copy._hotSpotSizeX = null;
            copy._hotSpotSizeY = null;
            copy._hotSpotSizeZ = null;
            System.Diagnostics.Debug.Assert(!copy.Selected); // turned off in ShapeBase

            return(copy);
        }
Example #2
0
        public override ShapeBase CreateShapeInstance()
        {
            ShapeCollection allGenerators = EditorManager.Scene.AllShapesOfType(typeof(HeightFieldGeneratorShape));

            if (allGenerators.Count == 0)
            {
                HeightFieldGeneratorShape generator = new HeightFieldGeneratorShape(GetPluginName());
                generator.Position = EditorManager.Scene.CurrentShapeSpawnPosition;
                return(generator);
            }

            EditorManager.ShowMessageBox("Only one height field generator shape per scene can be set.", "Warning", MessageBoxButtons.OK);
            return(null);
        }
        public override ShapeBase CreateShapeInstance()
        {
            ShapeCollection allGenerators = EditorManager.Scene.AllShapesOfType(typeof(HeightFieldGeneratorShape));
              if (allGenerators.Count == 0)
              {
            HeightFieldGeneratorShape generator = new HeightFieldGeneratorShape(GetPluginName());
            generator.Position = EditorManager.Scene.CurrentShapeSpawnPosition;
            return generator;
              }

              EditorManager.ShowMessageBox("Only one height field generator shape per scene can be set.", "Warning", MessageBoxButtons.OK);
              return null;
        }