|
|
@@ -36,6 +36,7 @@ public class ESpirits_Cook : MonoBehaviour
|
|
|
private bool isAct = false; //厨子已经完整出现
|
|
|
|
|
|
public float larger; //顾客变大的程度
|
|
|
+ public List<Character> customers; //所有顾客
|
|
|
|
|
|
public Character target;
|
|
|
public SearchTrigger searchtrigger;
|
|
|
@@ -100,18 +101,19 @@ public class ESpirits_Cook : MonoBehaviour
|
|
|
{
|
|
|
if (!isInterval && chuan > 0)
|
|
|
{
|
|
|
- if (!target.cooks.Exists(T => T == gameObject))
|
|
|
+ if (!customers.Exists(T => T == target))
|
|
|
{
|
|
|
isInterval = true;
|
|
|
chuan -= 1;
|
|
|
text.text = chuan.ToString();
|
|
|
ani.Play("attack_march", 0, 0);
|
|
|
target.HpUp(value, larger);
|
|
|
- target.cooks.Add(gameObject);
|
|
|
+ customers.Add(target);
|
|
|
//count += 1;
|
|
|
//Instantiate(effect, ga.transform.position, new Quaternion(0, 0, 0, 0), ga.transform);
|
|
|
if (chuan == 0)
|
|
|
{
|
|
|
+ customers = new List<Character>();
|
|
|
ani.Play("charge", 0, 0);
|
|
|
Invoke("ToRush", chargeTime);
|
|
|
}
|