Exemple #1
0
    private void Awake()
    {
        GameObject inventary = new GameObject("Invetary");

        bows = new List <Transform>(10);
        for (int cont = 0; cont < 10; cont++)
        {
            bows.Add(Instantiate(bowPrefab.transform, inventary.transform));
            bows[cont].gameObject.SetActive(false);
            ProjectileController p = bows[cont].GetComponent <ProjectileController>();
            p.instance(damageBow, speed, destroySeconds, layerEnemie);
        }
        enumBows      = bows.GetEnumerator();
        currentWeapom = TypeWeapom.Sword;
        playerScript  = GetComponent <PlayerController>();
    }
Exemple #2
0
    private void NextWeapom()
    {
        switch (currentWeapom)
        {
        case TypeWeapom.Bow:
            currentWeapom = TypeWeapom.Sword;
            break;

        case TypeWeapom.Sword:
            currentWeapom = TypeWeapom.Magic;
            break;

        case TypeWeapom.Magic:
            currentWeapom = TypeWeapom.Bow;
            break;
        }
    }