Пример #1
0
    // 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");
    }
Пример #2
0
 public int getAbilityId()
 {
     return(ability.ReturnId());
 }