/// <summary> /// Load the game and initialize what needs to be initialized /// </summary> /// <param name="e">e contains the argument(s) of the function</param> protected override void OnLoad(EventArgs e) { //Initialize stuff Map.Init(); ModLoader.Init(); Renderer.Init(); EcsManager.Init(); base.OnLoad(e); }
/// <summary> /// Initialize all entities we need to initialize /// </summary> public override void Init() { Vector2 size = new Vector2(500, 500); Entity terrain = new Entity(); terrain.AddComponents(new Terrain(size)); //Create the main camera1 Camera camera = new Camera(); camera.Position = new Vector3(0, 3, 0); camera.Yaw = 90; Entity player = new Entity(); player.AddComponents(new PlayerInput(25f, 0.2f), camera); EcsManager.AddEntities(player, terrain); }