void GetComponentFunction() { if (_bossCtrl == null) { _bossCtrl = GetComponentInParent <BossCtrl>(); } if (_BossHealthStatement == null) { _BossHealthStatement = GetComponentInParent <BossHealthStatement>(); } }
//Function :GetComponentFunction // Method : This Function is Mainly used For GetThe Component which is NULL void GetComponentFunction() { if (_instance == null) { _instance = this; } if (_Rgbd == null) { _Rgbd = GetComponent <Rigidbody>(); } if (_anim == null) { _anim = GetComponentInChildren <Animator>(); } if (_caps == null) { _caps = GetComponents <CapsuleCollider>(); } if (_BossHealthStatement == null) { _BossHealthStatement = GetComponent <BossHealthStatement>(); } }