Ejemplo n.º 1
0
 public InventoryStack(Block block, int count)
 {
     this.block = block;
     this.texture = block.textureFromAtlas;
     this.count = count;
     this.stackType = InventoryStackTypes.Block;
 }
Ejemplo n.º 2
0
 public void SetBlockWithReplace(Vector2 pos, Block block)
 {
     if (GetBlock(pos) != null)
     {
         DeleteBlock(pos);
         SetBlock(pos, block);
     }
     else
         SetBlock(pos, block);
 }
Ejemplo n.º 3
0
 public bool SetBlock(Vector2 pos, Block block)
 {
     if (GetBlock(pos) == null)
     {
         blocks.Add(pos, block);
         return true;
     }
     else
         return false;
 }
Ejemplo n.º 4
0
 public void SetBlockWithReplace(int X, int Y, Block block)
 {
     SetBlockWithReplace(new Vector2(X, Y), block);
 }
Ejemplo n.º 5
0
 public bool SetBlock(int X, int Y, Block block)
 {
     return SetBlock(new Vector2(X, Y), block);
 }
Ejemplo n.º 6
0
            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);
            }
Ejemplo n.º 7
0
 public Workbench(TextureAtlas textureAtlas, Block block)
     : base(textureAtlas, block.texPos, "Workbench", block.destroyTimesWithTools["Null"])
 {
     if (block.name != "Workbench")
         throw new ArgumentException();
 }
Ejemplo n.º 8
0
 public InventoryStack(Block block)
 {
     this.block = block;
     this.texture = block.textureFromAtlas;
     this.stackType = InventoryStackTypes.Block;
 }
Ejemplo n.º 9
0
 public object Clone(TextureAtlas textureAtlas)
 {
     Block block = new Block(textureAtlas, this.texPos, this.name, this.destroyTimesWithTools["Null"]);
     block.destroyTimesWithTools = this.destroyTimesWithTools;
     return block;
 }