void Start() { cc = GetComponent <CharacterController>(); enemyShow = GetComponent <ShowAttack>(); animation = GetComponent <Animation>(); player = GameObject.FindGameObjectWithTag(Tags.player).GetComponent <Transform>(); PatrolTimer = 2f; patrolTimer = PatrolTimer; }
/// <summary> /// 初始化信息 /// </summary> private void Start() { agent = GetComponent <NavMeshAgent>(); isLockTarget = false; isLockPosition = false; targetPos = transform.position; AttackTimer = PlayerStatusManager.Instance.GetAttackSpeed(); AttackShow = GetComponent <ShowAttack>(); animation = GetComponent <Animation>(); }
public void set_BattleInfoList(object data) { Debug.Log("对战动作更新:"); List <object> cl = (List <object>)data; InfoList.Clear(); Debug.Log(cl.Count); foreach (object p in cl) { Dictionary <string, object> dic = (Dictionary <string, object>)p; Action a = new Action(); a.action = Convert.ToString(dic["action"]); a.start = Convert.ToInt32(dic["start"]); a.end = Convert.ToInt32(dic["end"]); a.value = Convert.ToInt32(dic["value"]); if (a.action == "power" || a.action == "bepower") { a.valuehp = Convert.ToInt32(dic["valuehp"]); } InfoList.Add(a); } ShowAttack.Attack(); UpandDown.UpDown(); }