public InventoryStack(Block block, int count) { this.block = block; this.texture = block.textureFromAtlas; this.count = count; this.stackType = InventoryStackTypes.Block; }
public void SetBlockWithReplace(Vector2 pos, Block block) { if (GetBlock(pos) != null) { DeleteBlock(pos); SetBlock(pos, block); } else SetBlock(pos, block); }
public bool SetBlock(Vector2 pos, Block block) { if (GetBlock(pos) == null) { blocks.Add(pos, block); return true; } else return false; }
public void SetBlockWithReplace(int X, int Y, Block block) { SetBlockWithReplace(new Vector2(X, Y), block); }
public bool SetBlock(int X, int Y, Block block) { return SetBlock(new Vector2(X, Y), block); }
public Furnace(TextureAtlas textureAtlas, Block block) : base(textureAtlas, block.texPos, "Furnace", block.destroyTimesWithTools["Null"]) { if (block.name != "Furnace") throw new ArgumentException(); this.destroyTimesWithTools.Add("WoodenPickaxe", 30); this.destroyTimesWithTools.Add("StonePickaxe", 20); this.destroyTimesWithTools.Add("IronPickaxe", 10); }
public Workbench(TextureAtlas textureAtlas, Block block) : base(textureAtlas, block.texPos, "Workbench", block.destroyTimesWithTools["Null"]) { if (block.name != "Workbench") throw new ArgumentException(); }
public InventoryStack(Block block) { this.block = block; this.texture = block.textureFromAtlas; this.stackType = InventoryStackTypes.Block; }
public object Clone(TextureAtlas textureAtlas) { Block block = new Block(textureAtlas, this.texPos, this.name, this.destroyTimesWithTools["Null"]); block.destroyTimesWithTools = this.destroyTimesWithTools; return block; }