private void OnMouseDown() { switch (name) { case "Knight Puzzle Collider": invObj.AddtoInv(_interactable.knight_i); ChessPuzzle.knightSet = false; this.gameObject.SetActive(false); break; case "King Puzzle Collider": invObj.AddtoInv(_interactable.king_i); ChessPuzzle.kingSet = false; this.gameObject.SetActive(false); break; /*case "King Answer Collider": * ChessPuzzle.kingSet = true;*/ } }
private void OnMouseDown() { objName = gameObject.name; inventoryObj.AddtoInv(interactablesList[objName]); gameObject.SetActive(false); }