Exemple #1
0
    void Reset(int lvl)
    {
        GenerateLevel.ClearMapParts();
        _map         = GenerateLevel.Instance.LoadLevel(lvl);
        _lastDir     = EDirecton.NONE;
        _position    = _map.Start;
        _toFillCount = 0;
        _dirMove     = Vector2.zero;
        _hasWin      = false;
        TextNextLvl.SetActive(false);
        var newFloatCoords = GenerateLevel.IntToFloatCoordinates(_position);

        Player.transform.position = new Vector3(newFloatCoords.x, Player.transform.position.y, newFloatCoords.y);
    }