Exemplo n.º 1
0
    void MeleeManage()
    {
        MeleeCDTimeRemaining -= Time.deltaTime;

        if (Input.GetButtonDown(MeleeControllerName) && HasSword && MeleeCDTimeRemaining <= 0f && !MOV.InputLocked)
        {
            MeleeEffectZone.SetActive(true);
            MeleeCDTimeRemaining    = MeleeCD;
            MeleeEffectZoneIsActive = true;
            SC.PlaySound(gameObject, "Attack");
            AN.SetBool("Sword", true);
            AN.SetInteger("State", 3);
        }
        if (MeleeEffectZoneIsActive && (MeleeCDTimeRemaining <= (MeleeCD - MeleeActiveTime)))
        {
            MeleeEffectZoneIsActive = false;
            MeleeEffectZone.SetActive(false);
            AN.SetBool("Sword", false);
            if (MeleeTouchedBoss)
            {
                BreakSword();
                MeleeTouchedBoss = false;
            }
        }
    }
Exemplo n.º 2
0
    void DeathRayManage()
    {
        DeathRayCDTimeRemaining -= Time.deltaTime;


        if (Input.GetButtonDown(DeathRayControllerName) && DeathRayCDTimeRemaining <= 0f)
        {
            GameObject go = Instantiate(DeathRayProjectile, DeathRayCastPoint.transform.position, DeathRayCastPoint.transform.rotation) as GameObject;
            //rustine destroy
            Destroy(go, 2.0f);
            if (go != null)
            {
                //go.GetComponent<DealDamage> ().SetDamage (DeathRayDamage);
            }
            AN.SetInteger("State", 4);
            SC.PlaySound(gameObject, "BossStomp");
            DeathRayCDTimeRemaining = DeathRayCD;
        }
    }
Exemplo n.º 3
0
    // Update is called once per frame
    void Update()
    {
        if (partieActive)
        {
            if (numTuto < 3)
            {
                tutorial();
                screenTuto [numTuto].SetActive(true);
                if (Input.GetButtonUp("Fire1"))
                {
                    numTuto++;
                }
            }
            else
            {
                tutorial();
                deStopJoueurs();
            }
        }
        else
        {
            stopJoueurs();
        }

        //mise a jour taille barre boss
        Vector3 scale = barreBoss.transform.localScale;

        scale.x = vieBoss * scaleBoss / DIVISION;
        barreBoss.transform.localScale = scale;

        //mise a jour taille barre player
        scale   = barrePlayer.transform.localScale;
        scale.x = viePlayers * scalePlayers / DIVISION;
        barrePlayer.transform.localScale = scale;

        if (!playerIntro && !AU.isPlaying)
        {
            AU.loop     = true;
            playerIntro = true;
            SC.PlaySound(gameObject, "Loop");
        }
    }