// Start is called before the first frame update
 void Awake()
 {
     //col = GetComponent<Collider>();
     enemy_Stats = GetComponentInParent <Enemy_stats>();
     //enemy_Stats.doAttack +=attack;
     //damage = enemy_Stats.attack.GetValue();
 }
 void Start()
 {
     FireStream = Instantiate(FireStreamPrefab, mouthPos.position, mouthPos.rotation * Quaternion.Euler(-90, 0, 0), mouthPos);
     FireStream.transform.localPosition = new Vector3(0, 1, 0);
     FireStream.SetActive(false);
     anim[animIdle].wrapMode = WrapMode.Loop;
     enemy_Stats             = gameObject.GetComponent <Enemy_stats>();
     rb          = gameObject.GetComponent <Rigidbody>();
     attackDelay = 1 / enemy_Stats.attackSpeed.GetValue();
     enemy_Stats.onHealthChanged += getStrongerWithLessHP;
 }
예제 #3
0
 // Start is called before the first frame update
 void Start()
 {
     enemy_Stats = GetComponentInParent <Enemy_stats>();
     //enemy_Stats.doAttack +=attack;
 }
 // Start is called before the first frame update
 void Awake()
 {
     enemy_Stats = GetComponentInParent <Enemy_stats>();
     move_Enemy  = GetComponentInParent <Move_enemy>();
 }