Example #1
0
 // Update is called once per frame
 void Update()
 {
     // 両プレイヤーがキャラクターを選択した
     if ((selectPlayer1.GetP1Frag() == false) && (selectPlayer2.GetP2Frag() == false))
     {
         if (GamePad.GetButtonDown(GamePad.Button.Start, GamePad.Index.One))
         {
             audio.Play();
             enterFlag = false;
         }
     }
     // どちらかがまだ選択していない
     else
     {
         enterFlag = true;
     }
 }
Example #2
0
    // Update is called once per frame
    void Update()
    {
        if ((selectPlayer1.GetP1Frag() == false) && (selectPlayer2.GetP2Frag() == false))
        {
            startFlag = true;
            if (sound)
            {
                audio.Play();
                sound = false;
            }
            if (transform.localPosition.x < 0f)
            {
                speed = 100f;
            }
            else
            {
                speed = 0;
            }

            if (alpha <= 255)
            {
                alpha += 20f / 255f;
            }
            this.transform.localPosition += new Vector3(speed, 0, 0);
            image.color = new Color(255, 255, 255, alpha);
        }
        else
        {
            startFlag = false;
            sound     = true;
            this.transform.localPosition = new Vector3(-800, -125, 0);
            image.color = new Color(255, 255, 255, 0);
            speed       = 0;
            alpha       = 0;
        }
        if (enter.GetEnterFlag() == false)
        {
            alpha = 255;
        }
    }