예제 #1
0
    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;*/
        }
    }
예제 #2
0
 private void OnMouseDown()
 {
     objName = gameObject.name;
     inventoryObj.AddtoInv(interactablesList[objName]);
     gameObject.SetActive(false);
 }