private void Awake() { if (_bossCtrl == null) { _bossCtrl = GetComponent <BossCtrl>(); } }
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>(); } }
public DragonDieState(Animator anim, BossCtrl ctrl) { this.anim = anim; this.dragonCtrl = ctrl; }
public DragonAttackState(Animator anim, BossCtrl ctrl) { this.anim = anim; this.bossCtrl = ctrl; }
public DragonReleaseSkillState(Animator anim, BossCtrl ctrl) { this.anim = anim; this.dragonCtrl = ctrl; }
public DragonIdleState(Animator anim, BossCtrl ctrl) { this.anim = anim; this.ctrl = ctrl; }
/* * 보스전 진입 하면 캠퍼스 나오게 하고 보스상태 변화 * 보스전 나가면 캠퍼스 사라지고 보스 idle로 변화 * 다시 들어갈땐 풀피 만들기 쉽죠? */ void Start() { bossCtrl = BossCtrl.Instance; collider = GetComponent <Collider>(); }