|
@@ -6,22 +6,30 @@ using System;
|
|
|
|
|
|
|
|
public class Spirits_Cook : MonoBehaviour
|
|
public class Spirits_Cook : MonoBehaviour
|
|
|
{
|
|
{
|
|
|
- public TextMeshProUGUI text;
|
|
|
|
|
- private GameObject dia;
|
|
|
|
|
- private Transform cook;
|
|
|
|
|
- public float value;
|
|
|
|
|
- public GameObject effect;
|
|
|
|
|
- private Animator ani;
|
|
|
|
|
- private Demonic dem;
|
|
|
|
|
- private bool once = false;
|
|
|
|
|
- private Collider col;
|
|
|
|
|
- private float activeTime;
|
|
|
|
|
- public float activeAniTime;
|
|
|
|
|
- private bool isAct = false;
|
|
|
|
|
- public int chuan;
|
|
|
|
|
- private bool goAway = false;
|
|
|
|
|
- private GameObject[] customers;
|
|
|
|
|
- private int count;
|
|
|
|
|
|
|
+ public TextMeshProUGUI text; //剩余串的数量文本
|
|
|
|
|
+ private GameObject dia; //文本框
|
|
|
|
|
+
|
|
|
|
|
+ private Transform cook; //厨子
|
|
|
|
|
+ private Animator ani; //厨子动画
|
|
|
|
|
+ private Collider col; //厨子的碰撞体
|
|
|
|
|
+ public int chuan; //厨子拥有多少串
|
|
|
|
|
+
|
|
|
|
|
+ public float value; //加血程度百分比
|
|
|
|
|
+ public GameObject effect; //加血效果
|
|
|
|
|
+
|
|
|
|
|
+ private Demonic dem; //厨子的demonic脚本
|
|
|
|
|
+
|
|
|
|
|
+ private bool once = false; //死一次
|
|
|
|
|
+ private bool goAway = false; //厨子命尽
|
|
|
|
|
+
|
|
|
|
|
+ private float activeTime; //厨子已出现的时长
|
|
|
|
|
+ public float activeAniTime; //厨子出现动画的时长
|
|
|
|
|
+ private bool isAct = false; //厨子已经完整出现
|
|
|
|
|
+
|
|
|
|
|
+ private GameObject[] customers; //厨子的所有顾客
|
|
|
|
|
+ private int count; //顾客数量
|
|
|
|
|
+
|
|
|
|
|
+ public float larger; //顾客变大的程度
|
|
|
|
|
|
|
|
private void OnEnable()
|
|
private void OnEnable()
|
|
|
{
|
|
{
|
|
@@ -46,7 +54,7 @@ public class Spirits_Cook : MonoBehaviour
|
|
|
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);
|
|
|
|
|
|
|
+ ca.HpUp(value, larger);
|
|
|
customers[count] = ga;
|
|
customers[count] = ga;
|
|
|
count += 1;
|
|
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);
|