/// <summary> /// Initializes the table and the contained objects(Effects, TableElements). /// </summary> /// <param name="Pinball">The Pinball object containing the Table.</param> public void Init(Pinball Pinball) { this.Pinball = Pinball; Effects.Init(this); TableElements.InitAssignedEffects(this); AssignedStaticEffects.Init(this); }
/// <summary> /// Initializes the table and the contained objects(Effects, TableElements). /// </summary> /// <param name="Pinball">The Pinball object containing the Table.</param> public void Init(Pinball Pinball) { this.Pinball = Pinball; FileInfo ShapeDefinitionFile = Pinball.GlobalConfig.GetShapeDefinitionFile(); if (ShapeDefinitionFile != null && ShapeDefinitionFile.Exists) { Log.Write("Loading shape definition file: {0}".Build(ShapeDefinitionFile.FullName)); try { ShapeDefinitions = ShapeDefinitions.GetShapeDefinitionsFromShapeDefinitionsXmlFile(ShapeDefinitionFile); } catch (Exception E) { Log.Exception("Loading shape definition file {0} failed.".Build(ShapeDefinitionFile.FullName), E); } ShapeDefinitions.BitmapFilePattern = new General.FilePattern(ShapeDefinitionFile.FullName.Substring(0, ShapeDefinitionFile.FullName.Length - ShapeDefinitionFile.Extension.Length) + ".png"); } else { if (ShapeDefinitionFile == null) { Log.Warning("Could not determin name of shape definition file"); } else { Log.Warning("Shape definition file {0} does not exist"); } ShapeDefinitions = new ShapeDefinitions(); } Effects.Init(this); TableElements.InitAssignedEffects(this); AssignedStaticEffects.Init(this); }