|
|
@@ -47,20 +47,23 @@ public class Spirits_Cook : MonoBehaviour
|
|
|
{
|
|
|
if (!once && other.gameObject.layer == 7 || other.gameObject.layer == 8 || other.gameObject.layer == 6)
|
|
|
{
|
|
|
- GameObject ga = other.transform.parent.parent.parent.gameObject;
|
|
|
- Character ca = ga.GetComponent<Character>();
|
|
|
- if (Array.IndexOf(customers, ga) == -1)
|
|
|
+ if (chuan > 0)
|
|
|
{
|
|
|
- chuan -= 1;
|
|
|
- text.text = chuan.ToString();
|
|
|
- ani.Play("attack_march", 0, 0);
|
|
|
- ca.HpUp(value, larger);
|
|
|
- customers[count] = ga;
|
|
|
- count += 1;
|
|
|
- Instantiate(effect, ga.transform.position, new Quaternion(0, 0, 0, 0), ga.transform);
|
|
|
- if (chuan == 0)
|
|
|
+ GameObject ga = other.transform.parent.parent.parent.gameObject;
|
|
|
+ Character ca = ga.GetComponent<Character>();
|
|
|
+ if (Array.IndexOf(customers, ga) == -1)
|
|
|
{
|
|
|
- goAway = true;
|
|
|
+ chuan -= 1;
|
|
|
+ text.text = chuan.ToString();
|
|
|
+ ani.Play("attack_march", 0, 0);
|
|
|
+ ca.HpUp(value, larger);
|
|
|
+ customers[count] = ga;
|
|
|
+ count += 1;
|
|
|
+ Instantiate(effect, ga.transform.position, new Quaternion(0, 0, 0, 0), ga.transform);
|
|
|
+ if (chuan <= 0)
|
|
|
+ {
|
|
|
+ goAway = true;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
/*×ܹ²ÄÃÒ»´®
|