1
0
forked from s425077/PotatoPlan
This commit is contained in:
Joel 2020-05-24 13:36:31 +02:00
parent 700979aded
commit 46d27ab057
2 changed files with 5 additions and 15 deletions

View File

@ -311,16 +311,6 @@ namespace Game1
} }
} }
/*cloudFrame++;
if (cloudFrame > cloudAnimationSpeed)
{
cloudSprite++;
if (cloudSprite > 4)
{
cloudSprite = 0;
}
cloudFrame = 0;
}*/
spriteBatch.Draw(house, houseUnit.GetRectangle(), Time.GetTimeOfDay()); spriteBatch.Draw(house, houseUnit.GetRectangle(), Time.GetTimeOfDay());
spriteBatch.Draw(tractor, new Vector2((int)tractorUnit.getPos().X + input.getTileSize() / 2, (int)tractorUnit.getPos().Y + input.getTileSize() / 2), new Rectangle(0, 0, input.getTileSize(), input.getTileSize()), Time.GetTimeOfDay(), tractorUnit.getRotation(), new Vector2(input.getTileSize() / 2, input.getTileSize() / 2), 1.0f, SpriteEffects.None, 1); spriteBatch.Draw(tractor, new Vector2((int)tractorUnit.getPos().X + input.getTileSize() / 2, (int)tractorUnit.getPos().Y + input.getTileSize() / 2), new Rectangle(0, 0, input.getTileSize(), input.getTileSize()), Time.GetTimeOfDay(), tractorUnit.getRotation(), new Vector2(input.getTileSize() / 2, input.getTileSize() / 2), 1.0f, SpriteEffects.None, 1);

View File

@ -64,7 +64,6 @@ class Farm
{ {
if (!astar.isReachable(crops, new Vector2((int)i, (int)j), housepos)) if (!astar.isReachable(crops, new Vector2((int)i, (int)j), housepos))
{ {
//crops[i, j].setStatus(1);
dirtCount--; dirtCount--;
} }
} }
@ -85,12 +84,13 @@ class Farm
public Rectangle getDestinationRectangle(int x, int y) public Rectangle getDestinationRectangle(int x, int y)
{ {
return new Rectangle(x + (int)Math.Round(RainPosition.X), y + (int)Math.Round(RainPosition.Y), 1, 1); return new Rectangle(x + (int)Math.Round(RainPosition.X), y + (int)Math.Round(RainPosition.Y), 1, 1);
//return new Rectangle(0, 0, 112, 112);
} }
public void drawWeatherInformation(SpriteBatch spriteBatch, SpriteFont Bold, Input input) public void drawWeatherInformation(SpriteBatch spriteBatch, SpriteFont Bold, Input input)
{ {
spriteBatch.DrawString(Bold, "Wind Speed: X:" + WindSpeed.X + "Y" + WindSpeed.Y, new Vector2(10, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 282), Color.DarkBlue); spriteBatch.DrawString(Bold, "WindSpeed: " + Math.Round(WindSpeed.X, 4), new Vector2(10, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 282), Color.DarkBlue);
spriteBatch.DrawString(Bold, " : ", new Vector2(153, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 282), Color.DarkBlue);
spriteBatch.DrawString(Bold, Math.Round(WindSpeed.Y, 4).ToString(), new Vector2(163, input.getSize().Y * (input.getTileSize() + input.getSpacing()) + 282), Color.DarkBlue);
} }
public void updateFarm(Vector2 Size, int nDay) public void updateFarm(Vector2 Size, int nDay)
@ -147,8 +147,8 @@ class Farm
private void updateRainMapPosition() private void updateRainMapPosition()
{ {
float x, y; float x, y;
x = WindSpeed.X + GetRandomNumber(-1f, 1f) / 1000; x = WindSpeed.X + GetRandomNumber(-1f, 1f) / 2000;
y = WindSpeed.Y + GetRandomNumber(-1f, 1f) / 1000; y = WindSpeed.Y + GetRandomNumber(-1f, 1f) / 2000;
if (x < 0.02f && x > -0.02f) if (x < 0.02f && x > -0.02f)
{ {