public static GameDevice Instance(ContentManager content, GraphicsDevice graphics) { if (instance == null) { instance = new GameDevice(content, graphics); } return(instance); }
public void DrawTexture(string assetName, Vector2 position, Drawer drawer) { if (textures.ContainsKey(assetName)) { spriteBatch.Draw( textures[assetName], //テクスチャ position + drawer.Origin + ((drawer.DisplayModify) ? GameDevice.Instance().DisplayModify : Vector2.Zero), drawer.Rectangle, drawer.Color * drawer.Alpha, drawer.Rotation, drawer.Origin, drawer.Scale, drawer.SpriteEffects, drawer.LayerDepth ); } }
private Sound sound;//サウンドオブジェクト /// <summary> /// コンストラクタ /// </summary> /// <param name="resources"></param> public BGMLoader(string[,] resources) : base(resources) { sound = GameDevice.Instance().GetSound(); //GameDeviceからサウンドオブジェクトを取得 base.Initialize(); }
private Sound sound;//サウンドオブジェクト /// <summary> /// コンストラクタ /// </summary> /// <param name="resources"></param> public SELoader(string[,] resources) : base(resources) { sound = GameDevice.Instance().GetSound(); base.Initialize(); }