void Awake()
 {
     rb           = GetComponent <Rigidbody>();
     anim         = GetComponentInChildren <Animator>();
     myCollider   = GetComponentInChildren <CapsuleCollider>();
     line         = GetComponent <LineRenderer>();
     audioManager = FindObjectOfType <GameManager_Audio>();
     audioSource  = GetComponentInChildren <AudioSource>();
 }
Beispiel #2
0
    void Start()
    {
        audioManager = FindObjectOfType <GameManager_Audio>();
        anim         = GetComponentInChildren <Animator>();
        spotLight    = GetComponentInChildren <Light>();
        viewAngle    = spotLight.spotAngle;
        rb           = GetComponent <Rigidbody>();
        player       = GameObject.FindGameObjectWithTag("Player").transform;
        energyBall   = (GameObject)Resources.Load(energyBallPath, typeof(GameObject));
        firePoint    = transform.Find("FirePoint");

        currentHealth      = maxHealth;
        maxHealthBarLength = healthBar.rect.width;

        audioManager.ChangeBGM(audioManager.battle_bgm);
    }
Beispiel #3
0
 void Awake()
 {
     audioManager = FindObjectOfType <GameManager_Audio>();
     audioSource  = GetComponent <AudioSource>();
     anim         = GetComponent <Animator>();
 }