Esempio n. 1
0
    public IEnumerator RespawnPlayer()
    {
        player.isAlive  = false;
        player.inBubble = false;
        boss.isCharging = false;
        ghost.DisableGhosts();
        boss.firstEncount = true;
        boss.nextTime     = 100f;
        player.GetComponent <Renderer>().enabled = false;
        boss.GetComponent <stupidai>().enabled   = false;
        boss.GetComponent <Renderer>().enabled   = false;
        boss.rb.velocity = Vector2.zero;
        StartCoroutine(player.DisableNStopMovement(1.2f));
        player.enabled = false;
        ghost.DisableGhosts();
        //player.GetComponent<Renderer>().enabled = false;
        //boss.GetComponent<stupidai>().enabled = false;
        //boss.GetComponent<Renderer>().enabled = false;
        yield return(new WaitForSeconds(1.2f));

        boss.nextTime             = 2.5f;
        player.isAlive            = true;
        player.transform.position = spikeCheckpoint.transform.position;
        boss.transform.position   = boss.ogpos;
        player.enabled            = true;
        ghost.EnableGhosts();
        player.GetComponent <Renderer>().enabled = true;
        boss.GetComponent <stupidai>().enabled   = true;
        boss.GetComponent <Renderer>().enabled   = true;
        //boss.GetComponent<Renderer>().enabled = true;
    }
Esempio n. 2
0
    public IEnumerator RespawnPlayer()
    {
        player.inBubble = false;
        player.isAlive  = false;
        //player.inBubble = false;
        player.soundplayed = false;
        StartCoroutine(player.DisableNStopMovement(1.2f));
        player.enabled = false;
        ghost.DisableGhosts();
        player.GetComponent <Renderer>().enabled = false;
        //player.isAlive = false;
        //player.inBubble = false;
        yield return(new WaitForSeconds(1.2f));

        player.isAlive            = true;
        player.transform.position = spikeCheckpoint.transform.position;
        player.enabled            = true;
        ghost.EnableGhosts();
        player.GetComponent <Renderer>().enabled = true;
        Array.ForEach <DashReset>(resets, r => r.Respawn());
    }
Esempio n. 3
0
    public IEnumerator RespawnPlayer()
    {
        spikeCheckpoint = player.currentCheckpoint;
        player.isAlive  = false;
        player.inBubble = false;
        StartCoroutine(player.DisableNStopMovement(1.2f));
        player.enabled = false;
        ghost.DisableGhosts();
        player.GetComponent <Renderer>().enabled = false;
        boss.GetComponent <stupidai4>().enabled  = false;
        boss.GetComponent <Renderer>().enabled   = false;
        yield return(new WaitForSeconds(1.2f));

        player.isAlive            = true;
        player.transform.position = spikeCheckpoint.transform.position;
        boss.transform.position   = spikeCheckpoint.transform.position;
        player.enabled            = true;
        ghost.EnableGhosts();
        player.GetComponent <Renderer>().enabled = true;
        StartCoroutine(RespawnBoss());
        boss.GetComponent <stupidai4>().enabled = true;
        //boss.GetComponent<Renderer>().enabled = true;
    }