private void Awake() { state = GetComponent <GuardianState>(); ani = GetComponent <GuardianAnimationCtrl>(); eyeTr = GetComponentInChildren <MuzzleComponents>().GetComponent <Transform>(); chargeTime = 3.0f; wsCharge = new WaitForSeconds(chargeTime); }
private float maxDistance = 10.0f; // 최대 거리 void Awake() { state = GetComponent <GuardianState>(); ani = GetComponent <GuardianAnimationCtrl>(); headCtrl = GetComponentInChildren <GuardianHeadCtrl>(); attack = GetComponent <GuardianAttack>(); playerLayer = LayerMask.NameToLayer("Player"); layerMask = 1 << playerLayer; (root = Selector.Make()). AddChild(ActionNode.Make(CheckState)). AddChild(Sequence.Make(). AddChild(ActionNode.Make(SenseFoe)). AddChild(ActionNode.Make(ChecktDistFoe)). AddChild(ActionNode.Make(AttackFoe)). AddChild(ActionNode.Make(CheckFoeDead)) ); }
private void Awake() { ani = GetComponent <GuardianAnimationCtrl>(); state = GetComponent <GuardianState>(); uiCtrl = GetComponent <EnemyUICtrl>(); }