private void Awake() { state = GetComponent <GuardianState>(); ani = GetComponent <GuardianAnimationCtrl>(); eyeTr = GetComponentInChildren <MuzzleComponents>().GetComponent <Transform>(); chargeTime = 3.0f; wsCharge = new WaitForSeconds(chargeTime); }
void Start() { previousHp = hp.curHealth; if (playerController == null) { playerController = (Controller)GameObject.FindGameObjectWithTag("Player").GetComponent <Controller> (); } UpdateFacing(); _state = new IdleState(this, 2f, -1); }
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>(); }
// Use this for initialization void Start() { state = GetComponentInParent <GuardianState>(); attack = GetComponentInParent <GuardianAttack>(); }