void Start() { motor = GetComponent <i_Human_Motor>(); stats = GetComponent <scr_Stats>(); pathToTarget = GetPath(); timeToNextRandom = Random.Range(_MinRandomRotationTime, _MaxRandomRotationTime); _Model.transform.LookAt(_Model.transform.position + scr_Tilemap.Get.DirectionToVector(GetRandomDirection())); }
void Awake() { if (reference == null) { reference = GetComponent <scr_Stats>(); } if (reference == null) { Destroy(this); } initTextComponents(); }
void Start() { stats = GetComponent <scr_Stats>(); animator = GetComponentInChildren <i_Human_Animator>(); animator.OnPickup += Animator_OnPickup; animator.OnAttack += Animator_OnAttack; animator.OnAnimationTransition += Animator_OnAnimationFinished; move_HalfExtents = new Vector3( _PlayerWidth / 2, _PlayerHeight / 2, _PlayerWidth / 2 ); }
// Use this for initialization void Awake() { if (reference == null) { reference = GetComponent <scr_Stats>(); } if (reference == null) { Destroy(this); } if (tm) { tm.text = reference.Name; } }
void Start() { stats = gameObject.GetComponent <scr_Stats>(); _Stub.SetActive(false); _FelledBody.SetActive(false); }