Exemplo n.º 1
0
 public static GameDevice Instance(ContentManager content, GraphicsDevice graphics)
 {
     if (instance == null)
     {
         instance = new GameDevice(content, graphics);
     }
     return(instance);
 }
Exemplo n.º 2
0
 public void DrawTexture(string assetName, Vector2 position, Drawer drawer)
 {
     if (textures.ContainsKey(assetName))
     {
         spriteBatch.Draw(
             textures[assetName], //テクスチャ
             position + GameDevice.Instance().DisplayQuake + 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
             );
     }
 }
Exemplo n.º 3
0
        private Sound sound;//サウンドオブジェクト

        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="resources"></param>
        public SELoader(string[,] resources)
            : base(resources)
        {
            sound = GameDevice.Instance().GetSound();
            base.Initialize();
        }
Exemplo n.º 4
0
        private Sound sound;//サウンドオブジェクト

        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="resources"></param>
        public BGMLoader(string[,] resources)
            : base(resources)
        {
            sound = GameDevice.Instance().GetSound(); //GameDeviceからサウンドオブジェクトを取得
            base.Initialize();
        }