void Start() { audioManager = GetComponent <PlayerAudioScript>(); cam = Camera.main; flamespell.Stop(); wavespell.Stop(); }
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> (); }
// 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> (); }
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; }
public void Awake() { playerAudio = GetComponent <PlayerAudioScript>(); }
void Start() { playerAudio = player.GetPlayerAudio(); }