コード例 #1
0
        public override void Load(ContentManager content)
        {
            image     = TextureLoader.Load("enemy", content);
            explosion = content.Load <SoundEffect>("Audio\\explosion");

            base.Load(content);
        }
コード例 #2
0
ファイル: GameObject.cs プロジェクト: Hugo-Duarte/GameEngine
        public virtual void Load(ContentManager content)
        {
            boundingBoxImage = TextureLoader.Load("pixel", content);

            CalculateCenter();

            if (image != null)
            {
                boundingBoxWidth  = image.Width;
                boundingBoxHeight = image.Height;
            }
        }
コード例 #3
0
        public virtual void Load(ContentManager content, string asset)
        {
            image      = TextureLoader.Load(asset, content);
            image.Name = asset;

            boundingBoxWidth  = image.Width;
            boundingBoxHeight = image.Height;

            if (sourceRectangle == Rectangle.Empty)
            {
                sourceRectangle = new Rectangle(0, 0, image.Width, image.Height);
            }
        }
コード例 #4
0
ファイル: Bullet.cs プロジェクト: Hugo-Duarte/GameEngine
 public override void Load(ContentManager content)
 {
     image = TextureLoader.Load("bullet", content);
     base.Load(content);
 }
コード例 #5
0
 public void Load(ContentManager content)
 {
     wallImage = TextureLoader.Load("pixel", content);
 }