Exemplo n.º 1
0
    public IEnumerator RestartIEnum()
    {
        player.SetActive(false);

        yield return(new WaitForSeconds(1));

        player.transform.position = new Vector2(PlayerstartPos.position.x, PlayerstartPos.position.y);

        player.GetComponent <BotHealth>().Carga = player.GetComponent <BotHealth>().Carga_max;
        player.SetActive(true);
        questmanager.GenerateQuest(Currentlevel);
        LevelRestarted?.Invoke();
        startlevel();
        CanPause = true;
        yield return(null);

        yield break;
    }