|
@@ -36,8 +36,7 @@ public class ESpirits_Cook : MonoBehaviour
|
|
|
public float activeAniTime; //厨子出现动画的时长
|
|
public float activeAniTime; //厨子出现动画的时长
|
|
|
private bool isAct = false; //厨子已经完整出现
|
|
private bool isAct = false; //厨子已经完整出现
|
|
|
|
|
|
|
|
- private List<GameObject> customers; //厨子的所有顾客
|
|
|
|
|
- private int count; //顾客数量
|
|
|
|
|
|
|
+ //private List<GameObject> customers; //厨子的所有顾客
|
|
|
|
|
|
|
|
public float larger; //顾客变大的程度
|
|
public float larger; //顾客变大的程度
|
|
|
|
|
|
|
@@ -77,7 +76,7 @@ public class ESpirits_Cook : MonoBehaviour
|
|
|
col.enabled = false;
|
|
col.enabled = false;
|
|
|
dia = text.transform.parent.gameObject;
|
|
dia = text.transform.parent.gameObject;
|
|
|
dia.SetActive(false);
|
|
dia.SetActive(false);
|
|
|
- customers = new List<GameObject>();
|
|
|
|
|
|
|
+ //customers = new List<GameObject>();
|
|
|
destX = DestinationX();
|
|
destX = DestinationX();
|
|
|
text.text = chuan.ToString();
|
|
text.text = chuan.ToString();
|
|
|
//curLock = Instantiate(lockEffect, cook.transform.position, new Quaternion(0, 0, 0, 0), cook.transform);
|
|
//curLock = Instantiate(lockEffect, cook.transform.position, new Quaternion(0, 0, 0, 0), cook.transform);
|
|
@@ -98,14 +97,14 @@ public class ESpirits_Cook : MonoBehaviour
|
|
|
{
|
|
{
|
|
|
GameObject ga = other.transform.parent.parent.parent.gameObject;
|
|
GameObject ga = other.transform.parent.parent.parent.gameObject;
|
|
|
Character ca = ga.GetComponent<Character>();
|
|
Character ca = ga.GetComponent<Character>();
|
|
|
- if (!customers.Exists(T => T == ga))
|
|
|
|
|
|
|
+ if (!ca.cooks.Exists(T => T == gameObject))
|
|
|
{
|
|
{
|
|
|
chuan -= 1;
|
|
chuan -= 1;
|
|
|
text.text = chuan.ToString();
|
|
text.text = chuan.ToString();
|
|
|
ani.Play("attack_march", 0, 0);
|
|
ani.Play("attack_march", 0, 0);
|
|
|
ca.HpUp(value, larger);
|
|
ca.HpUp(value, larger);
|
|
|
- customers.Add(ga);
|
|
|
|
|
- count += 1;
|
|
|
|
|
|
|
+ ca.cooks.Add(gameObject);
|
|
|
|
|
+ //count += 1;
|
|
|
//Instantiate(effect, ga.transform.position, new Quaternion(0, 0, 0, 0), ga.transform);
|
|
//Instantiate(effect, ga.transform.position, new Quaternion(0, 0, 0, 0), ga.transform);
|
|
|
if (chuan == 0)
|
|
if (chuan == 0)
|
|
|
{
|
|
{
|