Window fixes

This commit is contained in:
BOTLester 2020-06-15 09:52:17 +02:00
parent 412a0969f0
commit 48c90afe77

View File

@ -3,6 +3,7 @@ using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Input;
using System; using System;
using System.IO; using System.IO;
using WinForm = System.Windows.Forms;
namespace Game1 namespace Game1
{ {
@ -84,8 +85,10 @@ namespace Game1
//Generates the map with some random values //Generates the map with some random values
inventory.initInventorySystem(); inventory.initInventorySystem();
string path = directory + "Game1/Content/ML/Fertilizer_Prediction.csv"; string path = directory + "Game1/Content/ML/Fertilizer_Prediction.csv";
input.init(graphics, new Vector2(16,16), 56, 0); //Generates the starting size int res = WinForm.Screen.PrimaryScreen.Bounds.Height;
input.init(graphics, new Vector2((float)Math.Floor(WinForm.Screen.PrimaryScreen.Bounds.Width/56*0.6f), (float)Math.Floor((WinForm.Screen.PrimaryScreen.Bounds.Height / 56f) - 7)), 56, 0); //Generates the starting size
houseUnit.init(input.getTileSize(), input.getSpacing()); //Generates the house position houseUnit.init(input.getTileSize(), input.getSpacing()); //Generates the house position
tractorUnit.init(houseUnit.GetRectangle(), input); //Generates the Tractor tractorUnit.init(houseUnit.GetRectangle(), input); //Generates the Tractor
tractorUnit.updateSizing(input, 0, houseUnit.getVector(), Time); //Updates the first Size of the Tractor tractorUnit.updateSizing(input, 0, houseUnit.getVector(), Time); //Updates the first Size of the Tractor