CreateSpriteBy() публичный статический Метод

public static CreateSpriteBy ( RX_Card card, UISprite parent, int pp, RX_SEAT_POSITION pos ) : UISprite
card RX_Card
parent UISprite
pp int
pos RX_SEAT_POSITION
Результат UISprite
Пример #1
0
        void LayoutCardList()
        {
            this.Card_list.Sort((RX_Card x, RX_Card y) =>
            {
                return((int)y.Level - (int)x.Level);
            });

            RX_CardManager.RefreshPool();


            int width  = Seat_pos == RX_SEAT_POSITION.RX_SEAT_BOTTOM ? this.seat_container.width : this.seat_container.height;
            int height = Seat_pos == RX_SEAT_POSITION.RX_SEAT_BOTTOM ? this.seat_container.height : this.seat_container.width;

            int margin = width / 23;
            int count  = this.card_list.Count;

            int minx = 0 - count / 2 * margin;
            int temp = minx;    //start x position

            for (int i = 0; i < count; i++)
            {
                RX_CardManager.CreateSpriteBy(this.card_list[i], this.seat_container, temp);
                temp += margin;     //change x position to current
            }
        }