Added back the map, movement and zooming. Also changed all Textures to 32bit

This commit is contained in:
2020-04-21 13:39:42 -06:00
parent 2892570539
commit 85af72cfa1
56 changed files with 659 additions and 241 deletions

View File

@@ -1,62 +1,19 @@
using Collector;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
public class Player : IRestrictions {
private static int X;
private static int Y;
private string SpriteName;
private Inventory playerInventory;
namespace Collector.Character
{
public class Player : IRestrictions
{
public static int X { get; set; }
public static int Y { get; set; }
public Dictionary<string,Rectangle> Animation { get; set; }
//private Inventory PlayerInventory { get; }
public Player(int x, int y) {
//Player location
X = x<<IRestrictions.TileShift;
Y = y<<IRestrictions.TileShift;
//Player Inventory
playerInventory = new Inventory();
//Player animation
//spriteName = "man";
//textureAtlas = new TextureAtlas("man.atlas");
//Array<TextureAtlas.AtlasRegion> keyFrames = textureAtlas.findRegions(spriteName + "_Down");
//float frameDuration = 1 / 4f;
//animation = new Animation<>(frameDuration, keyFrames);
public Player(int x, int y) {
X = x<<IRestrictions.TileShift;
Y = y<<IRestrictions.TileShift;
//PlayerInventory = new Inventory();
}
}
public static int getX() {
return X;
}
public static int getY() {
return Y;
}
public static void addX(int x){
X += x;
}
public static void addY(int y){
Y += y;
}
/*
public String getSpriteName() {
return spriteName;
}
public Animation<TextureAtlas.AtlasRegion> getAnimation() {
return animation;
}
public void setAnimation(Animation<TextureAtlas.AtlasRegion> animationTemp) {
animation = animationTemp;
}
public void dispose(){
//textureAtlas.dispose();
}
public TextureAtlas getTextureAtlas() {
return textureAtlas;
}
*/
}