void hurt() { if (isInvincible == true) { state.text = "无敌状态中,食物中毒失效"; } else { state.text = "食物中毒,血量骤减20%"; bloodscreen.gameObject.SetActive(true); bloods.minusBlood(0.2f); minusScore(); } }
void OnTriggerEnter(Collider collider) { if (collider.tag == "Player") { Debug.Log("HIT--------"); bloods.minusBlood(0.2f); } }
void OnTriggerEnter(Collider collider) { if (collider.tag == "Player" && !buff.GetInvincible()) { Debug.Log("HIT--------"); bloods.minusBlood(0.1f); bloodscreen.gameObject.SetActive(true); scoreScript.minusScore(30); } }
void hurt() { if (isInvincible == true) { state.text = "无敌状态中,食物中毒失效"; } else { state.text = "食物中毒,血量骤减30%"; bloods.minusBlood(0.3f); } }