コード例 #1
0
        void Start()
        {
            this.GameButton = new GameButtonType[4];

            GameButtonType g = new GameButtonType();

            g.Button           = OneOnOne;
            g.index            = 0;
            this.GameButton[0] = g;
            GameButtonType g1 = new GameButtonType();

            g1.Button          = OneOnFour;
            g1.index           = 1;
            this.GameButton[1] = g1;
            GameButtonType g2 = new GameButtonType();

            g2.Button          = friends;
            g2.index           = 2;
            this.GameButton[2] = g2;
            GameButtonType g3 = new GameButtonType();

            g3.Button          = practice;
            g3.index           = 3;
            this.GameButton[3] = g3;
            UnSelectedGame();
            SelectedGame(this.getCurrentCenterIndex());
        }
コード例 #2
0
 void Move(GameButtonType g, bool direct)
 {
     if (direct)
     {
         g.Button.transform.position = getPosition(g.index);
     }
     else
     {
         iTween.MoveTo(g.Button, getPosition(g.index), 1.0f);
     }
 }
コード例 #3
0
 int getCurrentCenterIndex()
 {
     for (int i = 0; i < 4; i++)
     {
         GameButtonType g = GameButton[i];
         if (g.index == 3)
         {
             return(i);
             // Debug.Log("indicator call = "+i);
         }
     }
     return(0);
     // Debug.Log("indicator call");
 }