private void Awake() { rb = GetComponent <Rigidbody>(); mechStatus = GetComponent <MechStatus>(); camTrans = transform.GetChild(0); strideDist = 0; }
private void SetupTeamStatus() { for (int i = 0; i < teams.Length; ++i) { for (int j = 0; j < teams[i].mechs.Count; j++) { GameObject mechItem = GameObject.Instantiate(mechPrefab); MechStatus status = mechItem.GetComponent <MechStatus>(); status.Init(teams[i].mechs[j], i); teams[i].mechs[j].AttachStatus(status); mechItem.transform.SetParent(teamrows[i]); mechItem.transform.localPosition = new Vector3(-120f * j, 0, 0); } } }
private void Awake() { agent = GetComponent <NavMeshAgent>(); mechTrans = GameObject.FindWithTag("Player").transform; mechStatus = mechTrans.GetComponent <MechStatus>(); }
internal void AttachStatus(MechStatus mStatus) { status = mStatus; }