Пример #1
0
 public static GameDevice Instance(ContentManager content, GraphicsDevice graphics)
 {
     if (instance == null)
     {
         instance = new GameDevice(content, graphics);
     }
     return(instance);
 }
Пример #2
0
 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
             );
     }
 }
Пример #3
0
        private Sound sound;//サウンドオブジェクト

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

        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="resources"></param>
        public SELoader(string[,] resources)
            : base(resources)
        {
            sound = GameDevice.Instance().GetSound();
            base.Initialize();
        }