Beispiel #1
0
    public void hitMelee()
    {
        switch (typeWeapon)
        {
        case TypeWeaponMelee.hit:
            active = true;
            ; break;

        case TypeWeaponMelee.combo:
            ; break;

        case TypeWeaponMelee.areaShieldIA:

            if (setEffects.GetFX("fxCupule") != null)
            {
                setEffects.PlayFx("fxCupule");
            }
            if (setEffects.GetSX("sxCupula") != null && !active)
            {
                setEffects.GetSX("sxCupula").Play();
            }
            makeAreaShield();

            ; break;

        case TypeWeaponMelee.stump:
            makeStump();
            ; break;
        }
    }
Beispiel #2
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Player")
        {
            if (typeNPC == TypeItem.mana)
            {
                Manager.instance.playerControl.controlInteract.settingMana(Manager.instance.playerControl.controlInteract.getMana() + powerRange);

                if (setEffects.GetFX("fxAddMana") != null)
                {
                    setEffects.GetFX("fxAddMana").Play();
                }

                if (setEffects.GetSX("sxAddMana") != null)
                {
                    // Debug.Log("Otros");
                    setEffects.GetSX("sxAddMana").Play();
                }

                Destroy(gameObject, timeToDestroy);
            }
            else
            {
                Debug.Log("Otros");
            }
        }
    }
Beispiel #3
0
 public void shakingWall()
 {
     if (setEffects.GetFX("fxTemblor") != null)
     {
         setEffects.PlayFx("fxTemblor");
     }
     if (setEffects.GetFX("sxTemblor") != null)
     {
         setEffects.PlayFx("sxTemblor");
     }
     anim.Play("shakingWall");
 }
Beispiel #4
0
    public void stunnedPlayer(float timeStunned)
    {
        if (!stunnedControl)
        {
            if (setEffects.GetFX("fxStun") != null)
            {
                setEffects.PlayFx("fxStun");
            }
            if (setEffects.GetSX("sxStun") != null)
            {
                setEffects.GetSX("sxStun").Play();
            }

            coStun = StartCoroutine(IstunnedPlayer(timeStunned));
        }
    }
Beispiel #5
0
    void dropBomb()
    {
        //Instantiate your projectile
        if (setEffects.GetSX("sxStump") != null)
        {
            setEffects.GetSX("sxStump").Play();
        }

        if (setEffects.GetFX("fxStump") != null)
        {
            //setEffects.PlayFx("fxStump");
            //Debug.Log(setEffects.GetFX("fxBomb"));

            // GameObject bomb = Instantiate(setEffects.GetFX("fxBomb").gameObject, disparador.position, disparador.rotation);
        }
    }
Beispiel #6
0
    public void actackMelee()
    {
        //throw new System.NotImplementedException();
        if (typeNPC == TypeNPC.clero && playerControl.checkers.canAtack)
        {
            // StartCoroutine("IatackDistance");
        }
        else if (typeNPC == TypeNPC.normal && playerControl.checkers.canAtack)
        {
            settinAtack.ArmaMelee[settinAtack.indexArma].hitMelee();

            if (setEffects.GetFX("fxCupule") != null)
            {
                setEffects.GetFX("fxCupule").Play();
            }

            playerControl.checkers.canAtack = false;
        }
        else if (typeNPC == TypeNPC.tanque && playerControl.checkers.canAtack)
        {
            //rb.isKinematic = false;
            agent.enabled = false;
        }
    }