public Game(mScene sceneManager) : base(sceneManager) { //Set window title sceneManager.Title = "Transport Simulation Game"; //Set the render and update delegates sceneManager.renderer = Render; sceneManager.updater = Update; entities = MainEntry.entityManager.Entities(); keyboardInput = MainEntry.inputManager.Keyboard(); //Setup camera position and view values camera = MainEntry.camera; camera.Position = new Vector3(12, -35, 12); camera.Direction = new Vector3(12, 1, 12); camera.UpDirection = new Vector3(0, 0, 1); camera.FOV = 45; camera.AspectRatio = (1920 / 1080f); camera.Near = 0.01f; camera.Far = 100f; CreateEntities(); //Retrieves all entities with a stock component and stores them in a factory list for use in the game factories = new List <oEntity>(); foreach (oEntity entity in entities) { if (entity.GetStock() != null) { factories.Add(entity); } } trucks = new List <oEntity>(); food = 0; medical = 0; housing = 0; electronics = 0; population = 100; populationTemp = 100; money = 0; paused = false; pauseToggleTimer = 0; upgradeToggleTimer = 0; tickRateTimer = 0; }
static void Main() { sceneManager = new mScene(); entityManager = new mEntity(); systemManager = new mSystem(); inputManager = new mInput(sceneManager); camera = new oCamera(new Vector3(12, -35, 12), new Vector3(12, 1, 12), new Vector3(0, 0, 1), 45, 1920f / 1080f, 0.1f, 100f); MapLoader.loadMap("Maps/Map.txt"); CreateSystems(); using (sceneManager) { sceneManager.LoadScene(new Game(sceneManager)); sceneManager.Run(60.0, 0.0); } }
public sAudio(oCamera camera) { }
public sRender(oCamera cameraIn, Rectangle clientRectangleIn) { entityList = new List <oEntity>(); camera = cameraIn; clientRectangle = clientRectangleIn; }