コード例 #1
0
    public void GameSelect_Input(Title_Player player)
    {
        switch (player.input)
        {
        case Title_Player.Player_Input.UP:
        {
            if (Input.GetButtonDown("Down_Input"))
            {
                player.setInput(Title_Player.Player_Input.DOWN);
            }
            if (Input.GetButtonDown("Decision"))
            {
                player.setSence(Title_Player.Character_Sence.GAME_START);
            }
            break;
        }

        /*
         * case Player.Player_Input.CENTER:
         * {
         *  if(Input.GetButtonDown("Up_Input"))
         *  {
         *      player.setInput(Player.Player_Input.UP);
         *  }
         *  if(Input.GetButtonDown("Down_Input"))
         *  {
         *      player.setInput(Player.Player_Input.DOWN);
         *  }
         *  if (Input.GetButtonDown("Decision"))
         *  {
         *      player.setSence(Player.Character_Sence.GAME_DATADELETE_CHECK);
         *      player.setInput(Player.Player_Input.UP);
         *  }
         *  break;
         * }
         */
        case Title_Player.Player_Input.DOWN:
        {
            if (Input.GetButtonDown("Up_Input"))
            {
                player.setInput(Title_Player.Player_Input.UP);
            }
            if (Input.GetButtonDown("Decision"))
            {
                player.setSence(Title_Player.Character_Sence.GAME_END_CHECK);
                player.setInput(Title_Player.Player_Input.UP);
            }
            break;
        }
        }
        if (Input.GetButtonDown("Cancel"))
        {
            player.setSence(Title_Player.Character_Sence.PUSH_GAME_START);
        }
    }
コード例 #2
0
 // Start is called before the first frame update
 void Start()
 {
     player_Draw = GameObject.Find("Canvas");
     player      = player_Draw.GetComponent <Title_Player>();
     player.setSence(Title_Player.Character_Sence.PUSH_GAME_START);
     player.setInput(Title_Player.Player_Input.UP);
     audioSource = GetComponent <AudioSource>();
 }
コード例 #3
0
 public void Player_Init()
 {
     // プレイヤーのコンポーネントを取得。
     player_Draw = GameObject.Find("Canvas");
     //  player_data = GameObject.Find("Canvas").GetComponent<Player_Data>();
     //  player_data.Load_Data(player_data, player_data.datapath);
     player = player_Draw.GetComponent <Title_Player>();
     Player_Sence_Check();
     player.setInput(Title_Player.Player_Input.UP);
     player.set_Data_Complete_FalseFlg();
     // player_data.max_stage = 5;
     // player_data.delete_start = false;
     Cursor.lockState = CursorLockMode.Locked;
     Cursor.visible   = false;
 }
コード例 #4
0
    /*
     * public void GameDatadeleteCheck_Input(Player player)
     * {
     *  switch (player.input)
     *  {
     *      case Player.Player_Input.UP:
     *      {
     *          if(Input.GetButtonDown("Down_Input"))
     *          {
     *              player.setInput(Player.Player_Input.DOWN);
     *          }
     *          if (Input.GetButtonDown("Decision"))
     *          {
     *              player.set_Data_Complete_TrueFlg();
     *              player.setSence(Player.Character_Sence.GAME_SELECT);
     *          }
     *          break;
     *      }
     *      case Player.Player_Input.DOWN:
     *      {
     *          if(Input.GetButtonDown("Up_Input"))
     *          {
     *              player.setInput(Player.Player_Input.UP);
     *          }
     *          if (Input.GetButtonDown("Decision"))
     *          {
     *              player.setSence(Player.Character_Sence.GAME_SELECT);
     *              player.setInput(Player.Player_Input.CENTER);
     *          }
     *          break;
     *      }
     *  }
     *  if (Input.GetButtonDown("Cancel"))
     *  {
     *      player.setSence(Player.Character_Sence.GAME_SELECT);
     *      player.setInput(Player.Player_Input.CENTER);
     *  }
     * }
     */

    public void GameEndCheck_Input(Title_Player player)
    {
        switch (player.input)
        {
        case Title_Player.Player_Input.UP:
        {
            if (Input.GetButtonDown("Down_Input"))
            {
                player.setInput(Title_Player.Player_Input.DOWN);
            }
            if (Input.GetButtonDown("Decision"))
            {
                player.setSence(Title_Player.Character_Sence.GAME_END);
            }
            break;
        }

        case Title_Player.Player_Input.DOWN:
        {
            if (Input.GetButtonDown("Up_Input"))
            {
                player.setInput(Title_Player.Player_Input.UP);
            }
            if (Input.GetButtonDown("Decision"))
            {
                player.setSence(Title_Player.Character_Sence.GAME_SELECT);
            }
            break;
        }
        }
        if (Input.GetButtonDown("Cancel"))
        {
            player.setSence(Title_Player.Character_Sence.GAME_SELECT);
            player.setInput(Title_Player.Player_Input.DOWN);
        }
    }