Ejemplo n.º 1
0
    void TryAddNewAnimation(string propertyName)
    {
        if (animationNames.Contains(propertyName))
        {
            Debug.LogError("已经存在这个属性动画:" + propertyName + ", 请不要重复添加。");
            return;
        }
        Material mat = mTarget.Mat;

        if (mat == null || mat.shader == null)
        {
            return;
        }
        int index;

        if (!propertyNameIndex.TryGetValue(propertyName, out index))
        {
            return;
        }
        ShaderPropertyType type = mat.GetPropertyType(index);

        CardAnimation ca = new CardAnimation(propertyName, type, mTarget.Mat);

        mTarget.animations.Add(ca);
        mTarget.animations.Sort(CompareAnim);
    }
 public void AddAnimation(CardAnimation newAnim)
 {
     //if(currentAnimation == null)
     //{
         currentAnimation = newAnim;
     //}
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 卡片离开怪物区时,怪物区控件的操作
        /// </summary>
        /// <param name="cv">怪物区控件</param>
        /// <param name="card">卡片</param>
        public static void removeFromMonster(MyCanvas cv, CardUI card)
        {
            if (card.info.sCardType.Equals("XYZ怪兽"))
            {
                cv.WhenRemoveChildren -= removeFromMonster;
                while (cv.Children.Count > 0)
                {
                    CardUI remove = cv.Children[0] as CardUI;
                    //remove.getAwayFromParents();
                    CardAnimation.move2Graveyard(remove);
                }
                cv.WhenRemoveChildren += removeFromMonster;
            }
            int count = cv.Children.Count;

            if (count == 0)
            {
                Binding bind = new Binding();
                BindingOperations.ClearBinding(cv.tb_atkDef, TextBlock.TextProperty);
                cv.tb_atkDef.IsHitTestVisible = false;
                return;
            }
            CardUI top = cv.Children[count - 1] as CardUI;

            if (top.Status == Status.BACK_ATK || top.Status == Status.FRONT_ATK)
            {
                Service.CardOperate.sort_XYZ_atk(cv);
            }
            else
            {
                Service.CardOperate.sort_XYZ_def(cv);
            }
            bindingAtk(cv, top);//绑定顶层卡片攻击力
        }
Ejemplo n.º 4
0
    public void PutCardOnBoard(Card card)
    {
        //if server receive
        if (true)
        {
            RectTransform rectCard  = card.transform.parent as RectTransform;
            RectTransform rectBoard = board.transform as RectTransform;
            CardAnimation cardAnim  = card.GetComponent <CardAnimation>();

            //set the card to be a child of "CardsOutside", to be under of the real
            //cards hand without automatically set the childrens by "HandBehavior"
            rectCard.transform.SetParent(hand.cardsToBoard.transform);

            StartCoroutine(cardAnim.Dissolve(false));

            hand.handActualCount--;
            board.CreateCard(card);

            card.startPosition = rectCard.anchoredPosition;
            card.finalPosition = rectBoard.anchoredPosition + board.CalculeCardFinalPosition(board.GetHandCount);

            card.startAngle = rectCard.rotation;
            card.finalAngle = Quaternion.identity;

            card.MoveTo(1, 0, 0);
            card.ChangeSize(0.4885f, 2);
        }
    }
Ejemplo n.º 5
0
 static public int set_onCardUpdateEvent(IntPtr l)
 {
     try {
         CardAnimation self = (CardAnimation)checkSelf(l);
         CardAnimation.onCardUpdate v;
         int op = LuaDelegation.checkDelegate(l, 2, out v);
         if (op == 0)
         {
             self.onCardUpdateEvent = v;
         }
         else if (op == 1)
         {
             self.onCardUpdateEvent += v;
         }
         else if (op == 2)
         {
             self.onCardUpdateEvent -= v;
         }
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 6
0
    private void Awake()
    {
        cardOutput    = GetComponent <CardOutput>();
        cardAnimation = GetComponent <CardAnimation>();

        cardController = new CardController(this, cardAnimation);
    }
 public void Update()
 {
     if(currentAnimation != null)
     {
         if(!currentAnimation.NextUpdate())
         {
             currentAnimation = null;
         }
     }
 }
Ejemplo n.º 8
0
 static public int get_changeScale(IntPtr l)
 {
     try {
         CardAnimation self = (CardAnimation)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.changeScale);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 9
0
 static public int get_rightUpperBound(IntPtr l)
 {
     try {
         CardAnimation self = (CardAnimation)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.rightUpperBound);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 10
0
 static public int get_direction(IntPtr l)
 {
     try {
         CardAnimation self = (CardAnimation)checkSelf(l);
         pushValue(l, true);
         pushEnum(l, (int)self.direction);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 11
0
 static public int get_activeIndex(IntPtr l)
 {
     try {
         CardAnimation self = (CardAnimation)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.activeIndex);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 12
0
        /// <summary>
        /// 卡片进入墓地时,墓地控件的操作
        /// </summary>
        /// <param name="cv">墓地控件</param>
        /// <param name="card">卡片</param>
        public static void add2GraveyradOP(MyCanvas cv, CardUI card)
        {
            card.reSetAtk();
            card.centerAtVerticalInParent();
            card.clearSigns();
            if ((card.StatusLast == Status.BACK_DEF || card.StatusLast == Status.BACK_ATK) && card.Status == Status.FRONT_ATK)
            {
                CardAnimation.turn(card);
            }

            //card.set2FrontAtk();
        }
Ejemplo n.º 13
0
 static public int OnDestroy(IntPtr l)
 {
     try {
         CardAnimation self = (CardAnimation)checkSelf(l);
         self.OnDestroy();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 14
0
 public Card(int x, int y, Texture2D cover, Texture2D face, Texture2D frame, CardAnimation animation, int id, int pairCardId, string value)
 {
     _topLeftCorner.X = x;
     _topLeftCorner.Y = y;
     _coverImage = cover;
     _faceImage = face;
     _currentAnimation = animation;
     _id = id;
     _pairCardId = pairCardId;
     _frame = frame;
     _value = value;
 }
Ejemplo n.º 15
0
 static public int press(IntPtr l)
 {
     try {
         CardAnimation  self = (CardAnimation)checkSelf(l);
         System.Boolean a1;
         checkType(l, 2, out a1);
         self.press(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 16
0
 static public int set_cardCount(IntPtr l)
 {
     try {
         CardAnimation self = (CardAnimation)checkSelf(l);
         System.Int32  v;
         checkType(l, 2, out v);
         self.cardCount = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 17
0
 static public int set_posCurve(IntPtr l)
 {
     try {
         CardAnimation self = (CardAnimation)checkSelf(l);
         UnityEngine.AnimationCurve v;
         checkType(l, 2, out v);
         self.posCurve = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 18
0
 static public int drag(IntPtr l)
 {
     try {
         CardAnimation       self = (CardAnimation)checkSelf(l);
         UnityEngine.Vector2 a1;
         checkType(l, 2, out a1);
         self.drag(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 19
0
 static public int set_changeScale(IntPtr l)
 {
     try {
         CardAnimation  self = (CardAnimation)checkSelf(l);
         System.Boolean v;
         checkType(l, 2, out v);
         self.changeScale = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 20
0
 static public int set_centerExtraRange(IntPtr l)
 {
     try {
         CardAnimation self = (CardAnimation)checkSelf(l);
         System.Single v;
         checkType(l, 2, out v);
         self.centerExtraRange = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 21
0
 static public int set_seqPriority(IntPtr l)
 {
     try {
         CardAnimation self = (CardAnimation)checkSelf(l);
         CardAnimation.ESequencePriority v;
         checkEnum(l, 2, out v);
         self.seqPriority = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 22
0
 static public int slot2Position(IntPtr l)
 {
     try {
         CardAnimation self = (CardAnimation)checkSelf(l);
         System.Int32  a1;
         checkType(l, 2, out a1);
         var ret = self.slot2Position(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 23
0
 /// <summary>
 /// 卡片以覆盖方式进入手卡区时,手卡区控件的操作
 /// </summary>
 /// <param name="cv">手卡区控件</param>
 /// <param name="card">卡片</param>
 public static void add2DeckOP(MyCanvas cv, CardUI card)
 {
     card.reSetAtk();
     card.centerAtVerticalInParent();
     card.clearSigns();
     if (card.Status == Status.FRONT_ATK)
     {
         CardAnimation.turn2Back(card);
     }
     else
     {
         card.set2BackAtk();
     }
     card.ContextMenu = AllMenu.Instance.cm_deck;
 }
Ejemplo n.º 24
0
        /// <summary>
        /// 卡片进入墓地时,墓地控件的操作
        /// </summary>
        /// <param name="cv">墓地控件</param>
        /// <param name="card">卡片</param>
        public static void add2OPBattle(MyCanvas cv, CardUI card)
        {
            if (card == null)
            {
                return;
            }
            if ((card.StatusLast == Status.BACK_DEF || card.StatusLast == Status.BACK_ATK) && card.Status == Status.FRONT_ATK)
            {
                CardAnimation.turn(card);
            }

            if ((card.StatusLast == Status.FRONT_ATK || card.StatusLast == Status.FRONT_DEF) && card.Status == Status.BACK_ATK)
            {
                CardAnimation.turn(card);
            }
        }
Ejemplo n.º 25
0
        /// <summary>
        /// 初始化加载要预览的卡
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            MyStoryboard msb = CardAnimation.scalXY_120(mcv_from.Children);

            msb.FillBehavior = System.Windows.Media.Animation.FillBehavior.Stop;
            msb.Completed   += (object c, EventArgs d) =>
            {
                Point start = new Point((this.ActualWidth - 56) / 2, (this.ActualHeight - 80 - 80) / 2);
                while (mcv_from.Children.Count != 0)
                {
                    CardUI card = mcv_from.Children[0] as CardUI;
                    card.getAwayFromParents();
                    mcv.Children.Add(card);
                    card.set2FrontAtk();
                    card.BeginAnimation(Canvas.LeftProperty, null);
                    card.BeginAnimation(Canvas.TopProperty, null);
                    Canvas.SetLeft(card, start.X);
                    Canvas.SetTop(card, start.Y);
                }
                setCardAutoFit();
            };
            msb.Begin();
        }
Ejemplo n.º 26
0
        /// <summary>
        /// 卡片进入墓地时,墓地控件的操作
        /// </summary>
        /// <param name="cv">墓地控件</param>
        /// <param name="card">卡片</param>
        public static void add2Graveyrad(MyCanvas cv, CardUI card)
        {
            card.reSetAtk();
            card.centerAtVerticalInParent();
            card.clearSigns();
            if (card.Status == Status.BACK_ATK)
            {
                CardAnimation.turn(card);
            }
            else
            {
                card.set2FrontAtk();
            }

            card.ContextMenu = AllMenu.Instance.cm_graveyard;


            #region 指令发送

            MoveInfo moveInfo = new MoveInfo();
            moveInfo.cardID    = CardOperate.getCardID(card);
            moveInfo.isAdd     = true;
            moveInfo.aimArea   = cv.area;
            moveInfo.aimStatus = Status.FRONT_ATK;
            String contentJson = JsonConvert.SerializeObject(moveInfo);

            BaseJson bj = new BaseJson();
            bj.guid   = DuelOperate.getInstance().myself.userindex;
            bj.cid    = "";
            bj.action = ActionCommand.CARD_MOVE;
            bj.json   = contentJson;
            String json = JsonConvert.SerializeObject(bj);
            DuelOperate.getInstance().sendMsg(json);

            #endregion
            //card.set2FrontAtk();
        }
Ejemplo n.º 27
0
        /// <summary>
        /// 卡片自适应
        /// </summary>
        private void setCardAutoFit()
        {
            double perrow = 9;

            int rows = (int)Math.Ceiling(mcv.Children.Count / perrow);

            for (int i = 0; i < rows; i++)
            {
                for (int j = 0; perrow *i + j < mcv.Children.Count && perrow *i + j < perrow *(i + 1); j++)
                {
                    //Console.WriteLine(perrow * i + j);
                    CardUI card = mcv.Children[(int)perrow * i + j] as CardUI;
                    if (card != null)
                    {
                        Point start = new Point(Canvas.GetLeft(card), Canvas.GetTop(card));
                        Point end   = new Point(5 * (j + 1) + 56 * j, 5 * (i + 1) + 81 * i);
                        if (start.X != end.X || start.Y != end.Y)
                        {
                            card.Tag = end;
                            MyStoryboard msb = CardAnimation.CanvasXY(start, end, 300);
                            msb.card       = card;
                            msb.Completed += (object c, EventArgs d) =>
                            {
                                msb.card.BeginAnimation(Canvas.LeftProperty, null);
                                msb.card.BeginAnimation(Canvas.TopProperty, null);
                                Point set = (Point)msb.card.Tag;
                                Canvas.SetLeft(msb.card, set.X);
                                Canvas.SetTop(msb.card, set.Y);
                            };
                            msb.FillBehavior = System.Windows.Media.Animation.FillBehavior.Stop;
                            msb.Begin(card);
                        }
                    }
                }
            }
        }
Ejemplo n.º 28
0
 int CompareAnim(CardAnimation a, CardAnimation b)
 {
     return(propertyNameIndex[a.propertyName] - propertyNameIndex[b.propertyName]);
 }
Ejemplo n.º 29
0
 /// <summary>
 /// Card controller initialization constructor
 /// </summary>
 /// <param name="cardInfo"></param>
 /// <param name="cardAnimation"></param>
 public CardController(CardInfo cardInfo, CardAnimation cardAnimation)
 {
     CardInfo      = cardInfo;
     CardAnimation = cardAnimation;
 }
Ejemplo n.º 30
0
 public void Reset()
 {
     Disabled = false;
     RedrawFrame(Color.White);
     _currentAnimation = CardAnimation.Cover;
 }
Ejemplo n.º 31
0
    void DrawAnimationNode(CardAnimation ca)
    {
        if (CardEditorUtils.DrawHeader(ca.propertyName, ca.propertyName, false, false))
        {
            switch (ca.type)
            {
            case ShaderPropertyType.Color:
                for (int i = 0; i < ca.isDimensionUsed.Length; i++)
                {
                    GUILayout.BeginHorizontal();
                    GUILayout.Space(30);
                    ca.isDimensionUsed[i] = GUILayout.Toggle(ca.isDimensionUsed[i], GetColorDimensionName(i), GUILayout.Width(30));
                    if (ca.isDimensionUsed[i])
                    {
                        if (ca.curves[i] == null)
                        {
                            ca.curves[i] = new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1));
                        }
                        EditorGUILayout.CurveField(ca.curves[i], GUILayout.Height(28));
                    }
                    GUILayout.EndHorizontal();
                }
                break;

            case ShaderPropertyType.Vector:
                for (int i = 0; i < ca.isDimensionUsed.Length; i++)
                {
                    GUILayout.BeginHorizontal();
                    GUILayout.Space(30);
                    ca.isDimensionUsed[i] = GUILayout.Toggle(ca.isDimensionUsed[i], GetVectorDimensionName(i), GUILayout.Width(30));
                    if (ca.isDimensionUsed[i])
                    {
                        if (ca.curves[i] == null)
                        {
                            ca.curves[i] = new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1));
                        }
                        EditorGUILayout.CurveField(ca.curves[i], GUILayout.Height(28));
                    }
                    GUILayout.EndHorizontal();
                }
                break;

            case ShaderPropertyType.Float:
                GUILayout.BeginHorizontal();
                GUILayout.Space(30);
                ca.isDimensionUsed[0] = true;     // GUILayout.Toggle(ca.isDimensionUsed[0], GetVectorDimensionName(i), GUILayout.Width(30));
                //if (ca.isDimensionUsed[i])
                {
                    if (ca.curves[0] == null)
                    {
                        ca.curves[0] = new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1));
                    }
                    EditorGUILayout.CurveField(ca.curves[0], GUILayout.Height(28));
                }
                GUILayout.EndHorizontal();
                break;

            case ShaderPropertyType.Range:
                break;

            case ShaderPropertyType.Texture:
                break;

            default:
                break;
            }

            GUILayout.BeginHorizontal();
            GUILayout.Label("LoopType:");
            ca.loopType = (CardAnimation.LoopType)EditorGUILayout.EnumPopup(ca.loopType);
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Space(20);
            if (GUILayout.Button("delete", GUILayout.Width(60)))
            {
                if (!needRemove.Contains(ca))
                {
                    needRemove.Add(ca);
                }
            }
            GUILayout.EndHorizontal();
        }
    }
Ejemplo n.º 32
0
        /// <summary>
        /// 卡片以覆盖方式进入怪物区时,怪物区控件的操作
        /// </summary>
        /// <param name="mcv">怪物区控件</param>
        /// <param name="card">卡片</param>
        public static void add2MonsterOP(MyCanvas mcv, CardUI card)
        {
            int count = mcv.Children.Count;

            if (count == 1)
            {
                if (card.Status == Status.BACK_ATK || card.Status == Status.FRONT_ATK)
                {
                    card.centerAtVerticalInParent();
                    Service.CardOperate.sort_XYZ_atk(mcv);
                }
                else
                {
                    card.centerAtHorizontalInParent();
                    Service.CardOperate.sort_XYZ_atk(mcv);
                }
                card.ContextMenu = AllMenu.Instance.cm_monster;
            }
            else
            {
                Canvas.SetLeft(card, mcv.ActualWidth - card.Width);
                Canvas.SetTop(card, (mcv.ActualHeight - card.Height) / 2);
                card.ContextMenuOpening += (sender, e) =>
                {
                    card.ContextMenu.DataContext = card;
                };
                CardUI second = mcv.Children[count - 2] as CardUI;

                second.reSetAtk();   //当被叠放时要重置攻击力
                second.clearSigns(); //当被叠放时要清除卡片指示物

                /*
                 * 判断加入前最顶层的卡的状态,若是只要是存在背面或防守,则应先启动相关动画
                 */

                //CardAnimation.setTransformGroup(second);
                TransLibrary.StoryboardChain animator0 = new TransLibrary.StoryboardChain();

                if (second.Status == Status.BACK_DEF)
                {
                    //MyStoryboard msb1 = CardAnimation.ScaleX_120_Rotate(-90, 0, 150, 200);
                    MyStoryboard msb1 = CardAnimation.scalX_120_rotate_9020();
                    msb1.card       = second;
                    msb1.Completed += (object sender_, EventArgs e_) =>
                    {
                        //卡片切换为背面
                        msb1.card.set2FrontAtk();
                        //msb1.card.showImg();
                    };
                    animator0.Animates.Add(msb1);
                    MyStoryboard msb2 = CardAnimation.scalX_021();
                    animator0.Animates.Add(msb2);
                }
                if (second.Status == Status.FRONT_DEF)
                {
                    MyStoryboard msb = CardAnimation.Rotate_D2A();
                    msb.card       = second;
                    msb.Completed += (object sender_, EventArgs e_) =>
                    {
                        msb.card.set2FrontAtk();
                    };
                    animator0.Animates.Add(msb);
                }

                animator0.Begin(second);
                Service.CardOperate.sort_XYZ_atk(mcv);
                //Canvas.SetTop(card, (mcv.ActualHeight - card.ActualHeight) / 2.0);
                //Canvas.SetLeft(card, mcv.ActualWidth - card.ActualWidth);


                //MainWindow mainwin = Application.Current.MainWindow as MainWindow;
                //Point summon2 = mcv.TranslatePoint(new Point(0.5, 0.5), mainwin.OpBattle);
                //Canvas.SetLeft(mainwin.img_overlay_op, summon2.X - ((mainwin.img_overlay_op.Width - mcv.ActualWidth) / 2));
                //Canvas.SetTop(mainwin.img_overlay_op, summon2.Y - ((mainwin.img_overlay_op.Height - mcv.ActualHeight) / 2));
                //CardAnimation.Rotate_Scale_FadeInAndOut(mainwin.img_overlay_op);
            }

            //MainWindow mainwin = Application.Current.MainWindow as MainWindow;

            #region 攻守显示绑定卡片

            if (card.Status != Status.BACK_ATK && card.Status != Status.BACK_DEF)
            {
                bindingAtk(mcv, card);
            }


            #endregion

            //添加指示物
            showSigns(mcv, card);
        }
Ejemplo n.º 33
0
 public Tween GetAction(CardAnimation cc)
 {
     return(CardAnimations[cc]);
 }
Ejemplo n.º 34
0
        private void closeWin()
        {
            mcv.WhenRemoveChildren -= removeFormMcv;
            removeTheDelegateOfMCV();

            MyStoryboard msb = CardAnimation.scalXY_120();

            msb.FillBehavior = FillBehavior.HoldEnd;
            msb.Completed   += (object c, EventArgs d) =>
            {
                if (mcv_from.area == Area.MAINDECK)
                {
                    while (mcv.Children.Count != 0)
                    {
                        Random r     = new Random(40);
                        int    which = r.Next(mcv.Children.Count);
                        CardUI card  = mcv.Children[which] as CardUI;
                        card.getAwayFromParents();
                        card.set2BackAtk();
                        mcv_from.Children.Add(card);
                        card.BeginAnimation(Canvas.LeftProperty, null);
                        card.BeginAnimation(Canvas.TopProperty, null);
                        card.centerAtVerticalInParent();
                    }
                }
                else
                {
                    while (mcv.Children.Count != 0)
                    {
                        CardUI card = mcv.Children[0] as CardUI;
                        card.getAwayFromParents();
                        switch (mcv_from.area)
                        {
                        case Area.BANISH:
                        case Area.EXTRA:
                            if (card.StatusLast == Status.BACK_ATK)
                            {
                                card.set2BackAtk();
                            }
                            break;

                        default:
                            break;
                        }

                        mcv_from.Children.Add(card);
                        card.BeginAnimation(Canvas.LeftProperty, null);
                        card.BeginAnimation(Canvas.TopProperty, null);
                        card.centerAtVerticalInParent();
                    }
                }

                addTheDelegateOfMCV();

                mcv_from.AllowDrop = true;
                if (mcv_from.Children.Count == 0)
                {
                    this.Close();
                }
                else
                {
                    MyStoryboard msb0 = CardAnimation.scalXY_021(mcv_from.Children);
                    //msb0.FillBehavior = System.Windows.Media.Animation.FillBehavior.Stop;
                    msb0.Completed += (object c0, EventArgs d0) =>
                    {
                        this.Close();
                    };
                    msb0.Begin();
                }
            };
            msb.Begin(this);
        }