Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Dies ist das Inventar des Spielers
- Inventory = function(){
- this.slots = 0;
- this.slot = new Array();
- this.addSlot = function(){
- if(this.slots >= 0){
- this.slots += 1;
- player[0].inventory.slot[player[0].inventory.slots] = new ItemSlot();
- slots.innerHTML += slotDiv;
- }
- }
- this.removeSlot = function(){
- if(this.slots >= 1){
- window["slotdiv" + (player[0].inventory.slots)].parentNode.removeChild(window["slotdiv" + (player[0].inventory.slots)]);
- delete this.slot[(this.slots)];
- this.slots -= 1;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement