new loading texture.

This commit is contained in:
Harrison Deng 2018-10-30 19:47:01 -05:00
parent a9647f2146
commit eeebff355f
6 changed files with 35 additions and 24 deletions

View File

@ -631,18 +631,6 @@
/processorParam:Quality=Best
/build:sfx/pop_open.ogg
#begin defaultCover.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:defaultCover.png
#begin 1920x1080/fonts/darktech_ldr.spritefont
/importer:FontDescriptionImporter
/processor:FontDescriptionProcessor
@ -676,3 +664,27 @@
/processorParam:TextureFormat=Color
/build:recrown.png
#begin default_cover.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:default_cover.png
#begin RhythmBullet.png
/importer:TextureImporter
/processor:TextureProcessor
/processorParam:ColorKeyColor=255,0,255,255
/processorParam:ColorKeyEnabled=True
/processorParam:GenerateMipmaps=False
/processorParam:PremultiplyAlpha=True
/processorParam:ResizeToPowerOfTwo=False
/processorParam:MakeSquare=False
/processorParam:TextureFormat=Color
/build:RhythmBullet.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

View File

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

View File

@ -91,7 +91,7 @@ namespace RhythmBullet
{
// Create a new SpriteBatch, which can be used to draw textures.
spriteBatch = new SpriteBatch(GraphicsDevice);
Screen = new LoadingScreen(Content.Load<Texture2D>("recrown"));
Screen = new LoadingScreen(Content.Load<Texture2D>("RhythmBullet"), new Rectangle(0,0, Graphics.PreferredBackBufferWidth, Graphics.PreferredBackBufferHeight));
// TODO: use this.Content to load your game content here
}
@ -126,7 +126,7 @@ namespace RhythmBullet
/// <param name="gameTime">Provides a snapshot of timing values.</param>
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.White);
GraphicsDevice.Clear(Color.Transparent);
spriteBatch.Begin();
Screen.Draw(spriteBatch);
spriteBatch.End();
@ -155,7 +155,7 @@ namespace RhythmBullet
Assets.Queue<Texture2D>("cybercircle3B");
Assets.Queue<Texture2D>("title");
Assets.Queue<Texture2D>("cybercircle1");
Assets.Queue<Texture2D>("defaultCover");
Assets.Queue<Texture2D>("default_cover");
Assets.Queue<Texture2D>("laser");
Assets.Queue<Texture2D>("pellet");
Assets.Queue<Texture2D>("shard");

View File

@ -73,14 +73,11 @@ namespace RhythmBullet.Zer01HD.Utilities.ContentSystem
/// </summary>
public void Update()
{
if (queue.Count > 0)
if (queue.Count > 0 && (thread == null || !thread.IsAlive))
{
if (thread == null || !thread.IsAlive)
{
ThreadStart threadStart = new ThreadStart(LoadBatch);
thread = new Thread(threadStart);
thread.Start();
}
ThreadStart threadStart = new ThreadStart(LoadBatch);
thread = new Thread(threadStart);
thread.Start();
}
}

View File

@ -14,14 +14,16 @@ namespace RhythmBullet.Zer01HD.Game
class LoadingScreen : Screen
{
Texture2D recrown;
public LoadingScreen(Texture2D recrown)
Rectangle rectangleBounds;
public LoadingScreen(Texture2D recrown, Rectangle bounds)
{
this.recrown = recrown;
this.rectangleBounds = bounds;
}
public override void Draw(SpriteBatch spriteBatch)
{
spriteBatch.Draw(recrown, recrown.Bounds, Color.White);
spriteBatch.Draw(recrown, rectangleBounds, Color.White);
base.Draw(spriteBatch);
}
}