public void okButtonClick() { if (killCount >= targetKillCount) { playerInfo.AddCoin(1000); isTask = false; showTaskInfo(); } }
//完成任务 public void OnOkBtn() { source.clip = clip; source.Play(); if (killCount >= 2) //达到任务要求 { info.AddCoin(500); //角色获得任务奖励 killCount = 0; Debug.Log("OK" + info.coin); CoinManager._instance.ShowCoinNum(); ExitUI(); } else { ExitUI(); } }