// Use this for initialization void Start() { coinText.text = "0"; playerAttack = GetComponent <PlayerAttack>(); sfxMixer = SFXMixer.instance; sfxAudio = sfxMixer.GetComponent <AudioSource>(); }
private void Start() { audioSources = GetComponents <AudioSource>(); if (instance != null) { Debug.LogError("ERROR: More than one SFXMixer in scene"); } else { instance = this; } }
private void Start() { isAttacking = false; swordsmanAnimator = swordsman.GetComponent <Animator>(); princessAnimator = princess.GetComponent <Animator>(); swordsmanMaterial = swordsman.GetComponent <Renderer>().material; princessMaterial = princess.GetComponent <Renderer>().material; hurtFlashSeconds = new WaitForSeconds(hurtFlashTime); invincibleParticles = GetComponentInChildren <ParticleSystem>(); beatCount = invincibleBeats; swordsmanInFront = true; sfxMixer = SFXMixer.instance; playerMovement = GetComponent <PlayerMovement>(); }
// Use this for initialization void Start() { currentHealth = maxHealth; hearts = new List <GameObject>(); List <Transform> transforms = heartStartingPosition.GetComponentsInChildren <Transform>().ToList(); hearts = transforms.Select(t => t.gameObject) .Where(t => t.GetInstanceID() != heartStartingPosition.GetInstanceID()) .ToList(); hearts.Sort((x, y) => string.Compare(x.name, y.name)); //Debug.Log(string.Join(",", hearts.Select(h => h.name).ToArray())); UpdateHearts(); //Debug.Log("Number of controllers detected: " + Input.GetJoystickNames().Length); sfxMixer = SFXMixer.instance; }
private void Start() { pool = GameObject.FindGameObjectWithTag(gameManagerTag).GetComponent <ObjectPool>(); sfxMixer = GameObject.FindGameObjectWithTag(sfxMixerTag).GetComponent <SFXMixer>(); }