void Start()
 {
     audioManager = GetComponent <PlayerAudioScript>();
     cam          = Camera.main;
     flamespell.Stop();
     wavespell.Stop();
 }
Esempio n. 2
0
 void Start()
 {
     //Setting initial bools for spawning
     right             = true;
     flipped           = false;
     sprinting         = false;
     anim              = bitch.GetComponent <Animator>();
     playerSound       = GameObject.FindWithTag("PlayerSound");
     playerAudioScript = playerSound.GetComponent <PlayerAudioScript> ();
     player            = GameObject.FindWithTag("Player");
     jumpingScript     = player.GetComponent <JumpingScript> ();
 }
Esempio n. 3
0
    // Use this for initialization
    void Start()
    {
        //The player doesn't start within range of an enemy so this is false
        canAttack = false;
        //Setting our initial variables to make the player start out being able to perform an attack
        damageCooldown = 0f;
        animCoolDown   = 0f;
        //Finding the animator component to control the animation
        anim       = player.GetComponent <Animator>();
        enemyLayer = 1 << 13;


        playerSound       = GameObject.FindWithTag("PlayerSound");
        playerAudioScript = playerSound.GetComponent <PlayerAudioScript> ();
    }
Esempio n. 4
0
 protected void Awake()
 {
     playerAudio     = GetComponent <PlayerAudioScript>();
     initialPosition = transform.position;
     initialRotation = transform.rotation.eulerAngles;
     myRigidBody     = GetComponent <Rigidbody2D>();
     powerupEffect   = transform.GetChild(0).GetComponent <PowerupEffectScript>();
     tail            = GetComponent <TrailRenderer>();
     transform.Find("Orb Attractor").GetComponent <CircleCollider2D>().radius = coinAttractionRadius / transform.lossyScale.x;
     nearbyPlanets = new List <GameObject>();
     chargeBar     = transform.Find("Charge Bar").gameObject;
     jetpackBar    = GameObject.FindGameObjectWithTag("PlayerHUD").GetComponent <JetpackBar>();
     tractorBeam   = GetComponent <LineRenderer>();
     jetpackFlame  = transform.Find("Jetpack Flame").gameObject;
 }
Esempio n. 5
0
 public void Awake()
 {
     playerAudio = GetComponent <PlayerAudioScript>();
 }
Esempio n. 6
0
 void Start()
 {
     playerAudio = player.GetPlayerAudio();
 }