Exemple #1
0
    private void Move(int x, int y)
    {
        TileType active = placer.GetActive();

        int newX = active.X + x;
        int newY = active.Y + y;

        if (placer.GetAt(newX, newY) != null)
        {
            if (placer.GetAt(newX, newY).Type == "G")
            {
                GetComponent <GameManeger>().NextLevel();
            }
        }

        if (placer.CheckAt(newX, newY))
        {
            placer.SetActive(newX, newY);
        }
        else
        {
            placer.Show();
            placer.ToFade = 0.3f;
            errors++;
        }
    }