/// <summary> /// Creates the object of the specified type. /// </summary> /// <param name="typeName">Name of the type.</param> /// <returns></returns> public static object CreateType(BlackbirdGame game, string typeName, params object[] pars) { Type type = game.TypeManager.GetType(typeName); if (type == null) { throw new BlackbirdException(string.Format(Resources.TypeNotFound, typeName)); } object ret = Activator.CreateInstance(type, pars); if (ret == null) { throw new BlackbirdException(string.Format(Resources.TypeNotInitialized, typeName)); } return(ret); }
/// <summary> /// Initializes a new instance of the <see cref="BasicSimulationComponent"/> class. /// </summary> /// <param name="game">The game.</param> /// <param name="id">The id.</param> public BasicSimulationComponent(BlackbirdGame game, string id) { this.Game = game; this.Id = id; }
/// <summary> /// Initializes a new instance of the <see cref="TextureManager"/> class. /// </summary> /// <param name="game">The game.</param> public TextureManager(BlackbirdGame game) { this.Game = game; }
/// <summary> /// Initializes a new instance of the <see cref="TextureManager"/> class. /// </summary> /// <param name="game">The game.</param> public TypeManager(BlackbirdGame game) { this.Game = game; }
/// <summary> /// Initializes a new instance of the <see cref="BlackbirdGameInfo"/> class. /// </summary> /// <param name="game">The game.</param> public BlackbirdGameInfo(BlackbirdGame game) { this.Game = game; }
/// <summary> /// Initializes a new instance of the <see cref="GameScreenManager"/> class. /// </summary> /// <param name="game">The game instance.</param> public GameScreenManager(BlackbirdGame game) { this.Game = game; }
/// <summary> /// Initializes a new instance of the <see cref="FontManager"/> class. /// </summary> /// <param name="game">The game.</param> public FontManager(BlackbirdGame game) { this.Game = game; this.innerData = new Dictionary <string, Font>(); }
/// <summary> /// Initializes a new instance of the <see cref="MouseManager"/> class. /// </summary> /// <param name="game">The game.</param> public MouseManager(BlackbirdGame game) { this.game = game; }
/// <summary> /// Initializes a new instance of the <see cref="GameScreen"/> class. /// </summary> /// <param name="game">The game.</param> public GameScreen(BlackbirdGame game, string faceId) { this.game = game; this.FaceId = faceId; }