void setItem() { var pot = new HOZON(); var cane = new Sanctuary(); var weapon = new IronSword(); var potion = new SleepPotion(); var potion2 = new LevelUpPotion(); pot.init(5); cane.init(); weapon.init(0); potion.init(); potion2.init(); Vector2 pos = new Vector2(5, 8); ObjectEntityFactory.createItemEntity(pot, pos + new Vector2(0,0),true); ObjectEntityFactory.createItemEntity(cane, pos+new Vector2(0,1), true); ObjectEntityFactory.createItemEntity(weapon, pos + new Vector2(0, 2), true); ObjectEntityFactory.createItemEntity(potion, pos + new Vector2(0, 3), true); pos += new Vector2(1, 0); ObjectEntityFactory.createItemEntity(pot, pos + new Vector2(0, 0), true); ObjectEntityFactory.createItemEntity(cane, pos + new Vector2(0, 1), true); ObjectEntityFactory.createItemEntity(weapon, pos + new Vector2(0, 2), true); ObjectEntityFactory.createItemEntity(potion, pos + new Vector2(0, 3), true); pos += new Vector2(1, 0); ObjectEntityFactory.createItemEntity(pot, pos + new Vector2(0, 0), true); ObjectEntityFactory.createItemEntity(cane, pos + new Vector2(0, 1), true); ObjectEntityFactory.createItemEntity(weapon, pos + new Vector2(0, 2), true); ObjectEntityFactory.createItemEntity(potion2, pos + new Vector2(0, 3), true); pos += new Vector2(1, 0); ObjectEntityFactory.createItemEntity(pot, pos + new Vector2(0, 0), true); ObjectEntityFactory.createItemEntity(cane, pos + new Vector2(0, 1), true); ObjectEntityFactory.createItemEntity(weapon, pos + new Vector2(0, 2), true); ObjectEntityFactory.createItemEntity(potion2, pos + new Vector2(0, 3), true); pos += new Vector2(1, 0); }