Esempio n. 1
0
        public void UpdateColumnP2()
        {
            switch (placement)
            {
            case 1: p2.SetColumn(p1.GetColumn());
                break;

            case 2: p2.SetColumn(p1.GetColumn() + 1);
                break;

            case 3: p2.SetColumn(p1.GetColumn());
                break;

            case 4: p2.SetColumn(p1.GetColumn() - 1);
                break;

            default:
                break;
            }
        }
Esempio n. 2
0
 public Pair(Grid grid, int c1, int c2) : base()
 {
     p1        = new Puyo(c1);
     p2        = new Puyo(c2);
     this.grid = grid;
     AddChild(p1);
     AddChild(p2);
     p2.Position = new CCPoint(p1.AnchorPointInPoints.X, p1.AnchorPointInPoints.Y + p1.GetSpriteSize()); //On commence avec le Puyo p2 au-dessus
     p1.SetColumn(2);
     p2.SetColumn(2);                                                                                    //3e colonne
     placement   = 1;                                                                                    //Puyo 2 au-dessus
     ContentSize = new CCSize(p1.ScaledContentSize.Width, p1.ScaledContentSize.Height * 2);
     UpdatePointDown();
 }