//public string lastObjectName; //private bool hasVerticalAxisReset; //private bool hasHorizontalAxisReset; void Start () { playerSoundEffects = GetComponent<PlayerSoundEffects>(); audioSource = GetComponent<AudioSource>(); //lastObjectName = "Start"; //hasVerticalAxisReset = true; //hasHorizontalAxisReset = true; }
void Awake() { anim = GetComponent <Animator>(); boxCollider = GetComponent <BoxCollider2D>(); rb2D = GetComponent <Rigidbody2D>(); soundFx = GetComponent <PlayerSoundEffects>(); }
protected virtual void Awake() { playerData = GetComponentInParent <PlayerData>(); input = GetComponentInParent <PlayerInput>(); controller = GetComponentInParent <Controller2D>(); soundEffects = GetComponentInParent <PlayerSoundEffects>(); playerTransform = transform.parent; animator = GetComponent <Animator>(); spriteRenderer = GetComponent <SpriteRenderer>(); damageDetector = transform.Find("DamageDetector").gameObject; }
void Start () { musicManager = MusicManager.musicManager; playerSoundEffects = PlayerSoundEffects.playerSoundEffects; levelManager = LevelManager.levelManager; EventSystem.current.SetSelectedGameObject(GameObject.FindGameObjectWithTag("Music Volume Slider"), null); musicVolumeSlider = transform.GetChild (3).GetComponent<Slider>(); musicVolumeSlider.value = PlayerPrefsManager.GetMasterMusicVolume(); soundEffectsSlider = transform.GetChild (5).GetComponent<Slider>(); soundEffectsSlider.value = PlayerPrefsManager.GetMasterEffectsVolume(); GameControl.gameControl.mainMenuLevel = 3; }
// Use this for initialization void Start () { //equipmentDatabase = GameObject.FindGameObjectWithTag("Equipment Database").GetComponent<EquipmentDatabase>(); playerSoundEffects = GameObject.FindObjectOfType<PlayerSoundEffects>(); numberOfItems = 1; hasVerticalAxisReset = true; numberOfItemsText = this.GetComponent<Text>(); numberOfItemsText.text = numberOfItems.ToString(); //sets the max item quantity if (GameObject.FindGameObjectWithTag("Item Destroy Verification Canvas")) { } else { //maxItemQuantity = equipmentDatabase.equipment[PlayerPrefsManager.GetEquipmentID()].quantity; } }
private void Awake() { if (Instance == null) { Instance = this; } else { Debug.LogError("Double instantiation : " + this); Destroy(gameObject); return; } julia = GetComponentInChildren <Julia>(); juliett = GetComponentInChildren <Juliett>(); physicalCollider = GetComponent <BoxCollider2D>(); controller = GetComponent <Controller2D>(); soundEffects = GetComponent <PlayerSoundEffects>(); currentHealth = MaxHealth; }
void Start() { playerSoundEffects = transform.parent.GetComponent <PlayerSoundEffects>(); playerParticleEffects = transform.parent.GetComponent <PlayerParticleEffects>(); playProp = transform.parent.GetComponent <PlayerProperties>(); }
// Start is called before the first frame update void Start() { player = GetComponent <Craft>(); soundEffects = GetComponent <PlayerSoundEffects>(); }
public void playSound(Aspects.Secondary type) { AudioClip[] sounds = PlayerSoundEffects.instance().getClips(type); player.playSound(sounds); }