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