コード例 #1
0
ファイル: Board.cs プロジェクト: Avatarchik/Afro_Disco
    /// <summary>
    /// Indicates that a group of dancers are ready to perform a move
    /// </summary>
    /// <param name="d"></param>
    void GlowDancer(Move move)
    {
        //Common
        var m   = move.GetFoundMove();
        var pos = move.origin;

        bool isBooty = false;

        //Glow Booty call
        if (move.GetFoundMove().Length >= BoardW ||
            move.GetFoundMove()[0].Length >= BoardW)
        {
            isBooty = true;
        }

        for (int i = 0; i < m.Length; i++)
        {
            for (int j = 0; j < m[i].Length; j++)
            {
                if (isBooty)
                {
                    if (GetDancer(new Vector2(j, i) + pos))
                    {
                        painter.AddToLayer(1, pos + new Vector2(j, i), move.Color);
                    }
                }
                else if (m[i][j] == 'D' || m[i][j] == 'A')
                {
                    painter.AddToLayer(1, pos + new Vector2(j, i), move.Color);
                }
            }
        }
    }