Got rid of previous material system, now uses enumerators and item ids. Also imported QuadTree.cs so we can have entity collision.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Collector.Character;
|
||||
using Collector.Dimension;
|
||||
@@ -19,12 +20,15 @@ namespace Collector
|
||||
private PlayerMouse _playerMouse;
|
||||
private OrthographicCamera _cam;
|
||||
private WorldRenderer WorldRenderer { get; set; }
|
||||
public static Dictionary<Blocks, Texture2D> Materials { get; } = new Dictionary<Blocks, Texture2D>();
|
||||
|
||||
|
||||
public Main()
|
||||
{
|
||||
_graphics = new GraphicsDeviceManager(this);
|
||||
Content.RootDirectory = "Content";
|
||||
IsMouseVisible = true;
|
||||
IsFixedTimeStep = true;
|
||||
}
|
||||
|
||||
protected override void Initialize()
|
||||
@@ -32,8 +36,11 @@ namespace Collector
|
||||
// TODO: Add your initialization logic here
|
||||
base.Initialize();
|
||||
|
||||
BlockMaterials.Initialize(Content);
|
||||
|
||||
foreach (Blocks name in Enum.GetValues(typeof(Blocks)))
|
||||
{
|
||||
Materials.Add(name,Content.Load<Texture2D>(name.ToString()));
|
||||
}
|
||||
|
||||
var viewportAdapter = new BoxingViewportAdapter(Window, GraphicsDevice, 800, 480);
|
||||
_player = new Player(0, 0);
|
||||
_cam = new OrthographicCamera(viewportAdapter);
|
||||
@@ -49,7 +56,6 @@ namespace Collector
|
||||
{
|
||||
// TODO: Add your update logic here/*
|
||||
base.Update(gameTime);
|
||||
|
||||
World.LoadChunks();
|
||||
World.UnloadChunks();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user