//public string lastObjectName;
	//private bool hasVerticalAxisReset;
	//private bool hasHorizontalAxisReset;
	
	void Start () {
		playerSoundEffects = GetComponent<PlayerSoundEffects>();
		audioSource = GetComponent<AudioSource>();
		//lastObjectName = "Start";
		//hasVerticalAxisReset = true;
		//hasHorizontalAxisReset = true;
	}
Exemplo n.º 2
0
 void Awake()
 {
     anim        = GetComponent <Animator>();
     boxCollider = GetComponent <BoxCollider2D>();
     rb2D        = GetComponent <Rigidbody2D>();
     soundFx     = GetComponent <PlayerSoundEffects>();
 }
Exemplo n.º 3
0
 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;
	}
Exemplo n.º 5
0
	// 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;
		}
	}
Exemplo n.º 6
0
    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;
    }
Exemplo n.º 7
0
 void Start()
 {
     playerSoundEffects    = transform.parent.GetComponent <PlayerSoundEffects>();
     playerParticleEffects = transform.parent.GetComponent <PlayerParticleEffects>();
     playProp = transform.parent.GetComponent <PlayerProperties>();
 }
Exemplo n.º 8
0
 // Start is called before the first frame update
 void Start()
 {
     player       = GetComponent <Craft>();
     soundEffects = GetComponent <PlayerSoundEffects>();
 }
Exemplo n.º 9
0
 public void playSound(Aspects.Secondary type)
 {
     AudioClip[] sounds = PlayerSoundEffects.instance().getClips(type);
     player.playSound(sounds);
 }