Started to import assets from old project

This commit is contained in:
2020-04-20 14:56:39 -06:00
parent b20710501f
commit 2892570539
36 changed files with 345 additions and 149 deletions

View File

@@ -1,4 +1,5 @@
using Microsoft.Xna.Framework;
using Collector.Dimension;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
@@ -6,48 +7,47 @@ namespace Collector
{
public class Main : Game
{
GraphicsDeviceManager graphics;
SpriteBatch spriteBatch;
private GraphicsDeviceManager _graphics;
private SpriteBatch _spriteBatch;
private InputController _inputController;
public Main()
{
graphics = new GraphicsDeviceManager(this);
_graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
IsMouseVisible = true;
}
protected override void Initialize()
{
// TODO: Add your initialization logic here
{// TODO: Add your initialization logic here
base.Initialize();
}
protected override void LoadContent()
{
spriteBatch = new SpriteBatch(GraphicsDevice);
// TODO: use this.Content to load your game content here
{// TODO: use this.Content to load your game content here
_spriteBatch = new SpriteBatch(GraphicsDevice);
BlockMaterials.LoadContent(Content);
}
protected override void Update(GameTime gameTime)
{
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed ||
Keyboard.GetState().IsKeyDown(Keys.Escape))
Exit();
// TODO: Add your update logic here
{// TODO: Add your update logic here/*
_inputController.PlayerInput();
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
// TODO: Add your drawing code here
base.Draw(gameTime);
_spriteBatch.Begin();
BlockMaterials.Draw("grass",_spriteBatch,0,0);
_spriteBatch.End();
}
}
}