public override bool PreDrawLogo(SpriteBatch spriteBatch, ref Vector2 logoDrawCenter, ref float logoRotation, ref float logoScale, ref Color drawColor)
{
// 控制时间,锁定白天,要不你的图片会变暗
Main.dayTime = true;
Main.time = 30000;
// 加载背景图片,只需要改这一处的路径就能运行
Texture2D texture = ModContent.Request<Texture2D>("/*这边路径改成自己的*/").Value;
// 这里不要改
float xScale = Main.screenWidth / (float)texture.Width;
float yScale = Main.screenHeight / (float)texture.Height;
float scale = Math.Max(xScale, yScale);
Vector2 drawOffset = new Vector2(
(xScale < yScale) ? -(texture.Width * scale - Main.screenWidth) * 0.5f : 0,
(xScale > yScale) ? -(texture.Height * scale - Main.screenHeight) * 0.5f : 0
);
spriteBatch.Draw(texture, drawOffset, null, drawColor, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f);
// 返回 true,试试返回false会怎么样(
return true;
}