public void CatTalk(OtherCats cat) { nowCat = cat; if (cat.inMyGang) { CleanBars(); Text text = workBar.GetComponentInChildren <Text> (); text.text = "Name:\t\t" + cat.name + "\n\nLevel:\t\t" + cat.level.ToString(); text.text += "\n\nFood:\t\t" + cat.getFoodRate + "/day\n"; text.text += "Money:\t\t" + cat.makeMoneyRate + "/day\n"; text.text += "Fame:\t\t" + cat.fame; text.text += "\nWork:\t\t"; switch (nowCat.job) { case -1: text.text += "未指派"; break; case 0: text.text += "找食物"; break; case 1: text.text += "賺錢"; break; case 2: text.text += "巡邏"; break; } if (cat.finishJob) { getBtn.SetActive(true); } else { getBtn.SetActive(false); } workBar.SetActive(true); } else { CleanBars(); Text text = buyBar.GetComponentInChildren <Text> (); text.text = "Name:\t\t" + cat.name + "\n\nLevel:\t\t" + cat.level.ToString(); buyBar.SetActive(true); } }
public void fighting(OtherCats cat) { fightStatu = 1; fightingCat = cat; }