public static NPCPanel4 Instance() { if (!npcPanel4) { npcPanel4 = FindObjectOfType(typeof(NPCPanel4)) as NPCPanel4; if (!npcPanel4) { Debug.LogError("There needs to be one active NPCPanel4 script on a GameObject in your Scene"); } } return(npcPanel4); }
/* * void Start() * { * * flowerButton.onClick.AddListener(() => item.DestroyItem(flowerButton)); * paintingButton.onClick.AddListener(() => item.DestroyItem(paintingButton)); * } */ void Awake() { modalPanel = ModalPanel.Instance(); movement = Movement.Instance(); // npcPanel = NPCPanel.Instance(); npcPanel4 = NPCPanel4.Instance(); meter = PleasantnessMeter.Instance(); myYesAction = new UnityAction(TestYesFunction); myNoAction = new UnityAction(TestNoFunction); myCancelAction = new UnityAction(TestCancelFunction); /* * flowerButton = GameObject.Find("FlowerButton").GetComponent<Button>(); * paintingButton = GameObject.Find("PaintingButton").GetComponent<Button>(); */ }