// Use this for initialization void Start() { fading = false; PlayerInventory playerInventory = GameObject.Find("PlayerInventory").GetComponent <PlayerInventory>(); playerInventory.addAbility(abilityToBeAdded.ReturnId()); Invoke("StartFadeOut", 2f); Invoke("DestroySelf", 4f); fadingIn = true; moving = false; player = GameObject.FindWithTag("Player"); audioManager = AudioManager.instance; if (audioManager == null) { //Debug.LogError("No audio manager found in scene, whoops"); } audioManager.PlaySound("AbilityReward"); }
public int getAbilityId() { return(ability.ReturnId()); }