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