예제 #1
0
    public void SpawnEnnemi()
    {
        if (thisEnnemi != null)
        {
            thisEnnemi.transform.position = tr.position;
            thisEnnemi.SoinPerso(999999);
        }
        else if (ennemi != null)
        {
            thisEnnemi = Instantiate(ennemi, tr.position, tr.rotation).GetComponent <Ennemis>();
        }

        if (thisEnnemi != null && thisEnnemi.enabled)
        {
            SpawnParticule();
        }
    }
예제 #2
0
    // remet le boss à son état initiale full vie quand le joueur meurt
    public void resetBoss()
    {
        Ennemis pasFin = m_Core.GetComponent <Ennemis>() as Ennemis;

        pasFin.SoinPerso(1000);
        m_Core.GetComponent <SpriteMask>().alphaCutoff = 1.0f;

        List <GameObject> lstLaser = new List <GameObject>(GameObject.FindGameObjectsWithTag("laserBoss"));

        foreach (GameObject las in lstLaser)
        {
            las.GetComponent <laser>().Disparait();
        }

        transform.rotation = Quaternion.Euler(new Vector3(0.0f, 0.0f, 0.0f));

        m_shootState = false;
        m_TPState    = false;
        m_currentTP  = m_nbTP;

        enabled = false;
    }