public void OnMouseDown() { if (enemyInfoOpen) { return; } else if (Mathf.Abs(player.position.x - transform.position.x) <= 1 && Mathf.Abs(player.position.y - transform.position.y) <= 1) { string data = npcName + "\n\n" + desc; if (type == "citizen") { inventory.ActivateDialogue(dialogueID); } else if (type == "vendor") { index = 0; inventory.activateVendor(data, true, this); inventory.addItemToSpecificSlot(saleItems[index], 33); } else if (type == "quest") { index = 0; inventory.activateQuester(this); } else if (type == "chest") { inventory.ToggleChest(); } } }