public override ShapeBase CreateShapeInstance() { MirrorShape shape = new MirrorShape("Mirror"); shape.Position = EditorManager.Scene.CurrentShapeSpawnPosition; //assign a default effect: if (EditorManager.EngineManager.IsInitialized()) { shape.ShaderEffect.EffectLibrary = @"\Shaders\Mirror.Shaderlib"; shape.ShaderEffect.EffectName = "SimpleMirror"; } return(shape); }
/// <summary> /// This function must be overridden, since we have to reset the hotspots /// </summary> /// <returns></returns> public override ShapeBase Clone() { MirrorShape copy = (MirrorShape)base.Clone(); System.Diagnostics.Debug.Assert(!copy.Selected); // turned off in ShapeBase copy._shaderFX = (ShaderEffectConfig)_shaderFX.Clone(); copy._shaderFX.OnShaderEffectChanged += new CSharpFramework.Scene.ShaderEffectConfig.ShaderEffectChangedEventHandler(copy._shaderFX_OnShaderEffectChanged); copy._hotSpotSizeX = null; copy._hotSpotSizeY = null; return(copy); }
public override ShapeBase CreateShapeInstance() { MirrorShape shape = new MirrorShape("Mirror"); shape.Position = EditorManager.Scene.CurrentShapeSpawnPosition; //assign a default effect: if (EditorManager.EngineManager.IsInitialized()) { shape.ShaderEffect.EffectLibrary = @"\Shaders\Mirror.Shaderlib"; shape.ShaderEffect.EffectName = "SimpleMirror"; } return shape; }