示例#1
0
    private void Update()
    {
        if (Input.GetKey("u"))
        {
            DestroyMap();
        }
        if (Input.GetKey("m"))
        {
            CreateMap();
        }

        if (end != null)
        {
            if (end.Triggered())
            {
                if (boss && bossEnemy == null)
                {
                    DestroyMap();
                    ended = true;
                }
                else if (!boss)
                {
                    DestroyMap();
                    BossMap();
                    boss = true;
                }
            }
        }

        if (Player.GetComponent <PlayerControls>().isDead())
        {
            DestroyMap();
            ended = false;
            boss  = false;
        }
    }