class BtnFruit extends GameObject { fruitInventory = null; addedToScene () { this.fruitInventory = this.scene.addObject(new FruitInventory(352, -500, this.scene.game.images.fruitInventory)); } onClick (btns) { console.log("ey"); MenuManager.Instance.moveToClose(); this.fruitInventory.moveToOpen(); } }