Пример #1
0
        public void SetSweetsType(SweetsType type)
        {
            _type = type;
            _SweetCon.SetSelectedIndex((int)type);
            switch (type)
            {
            case SweetsType.EMPTY:
            {
                IsMove  = false;
                IsClear = false;
                _color  = ColorType.COUNT;
            }
            break;

            case SweetsType.NORMAL:
            {
                IsMove        = true;
                IsClear       = true;
                _loader.alpha = 1;
                Color         = PlayerInfo.Instance.GetSweetColor();
            }
            break;

            case SweetsType.ROW_CLEAR:
            {
                IsMove  = true;
                IsClear = true;
            }
            break;

            case SweetsType.COLUMN_CLEAR:
            {
                IsMove  = true;
                IsClear = true;
            }
            break;

            case SweetsType.EXPLOSION:
            {
                IsMove  = true;
                IsClear = true;
            }
            break;

            case SweetsType.RAINBOWCANDY:
            {
                IsMove  = true;
                IsClear = true;
            }
            break;

            case SweetsType.BARRIER:
            {
                IsMove = false;
                _color = ColorType.COUNT;
            }
            break;
            }
        }
 static public int SetSelectedIndex(IntPtr l)
 {
     try {
         FairyGUI.Controller self = (FairyGUI.Controller)checkSelf(l);
         System.Int32        a1;
         checkType(l, 2, out a1);
         self.SetSelectedIndex(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int SetSelectedIndex(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.Controller obj = (FairyGUI.Controller)ToLua.CheckObject <FairyGUI.Controller>(L, 1);
         int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         obj.SetSelectedIndex(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }