Exemplo n.º 1
0
    void Awake()
    {
        //スクリプトを取得
        g_folder_Script = GetComponent <Folder_Script>();

        //フォルダーを数えるスクリプトの数値を入れる
        g_stage_array_num = g_folder_Script.Filenum("*.json");

        g_json_stage = new string[g_stage_array_num];

        g_folder_Script.Filename("*.json");

        //ファイル数とstageの横の数を割る
        g_stage_var = g_stage_array_num / g_stage_side;

        //ファイル数とstageの横の数を割った数の余りを求める
        g_stage_remainder = g_stage_array_num % g_stage_side;
        //ファイル数とstageの横の数を割りきれなかったとき
        if (g_stage_remainder != 0)
        {
            g_stage_max_var = g_stage_var + 1;
        }
        else
        {
            //割った数で縦の数を決める
            g_stage_max_var = g_stage_var;
        }
    }
Exemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     g_json_array_script = GameObject.Find("Stageinformation").GetComponent <JsonArray>();
     g_var_num           = g_json_array_script.g_stage_max_var;
     g_side_num          = g_json_array_script.g_stage_side;
     g_streaming_folder  = GameObject.Find("Stageinformation").GetComponent <Folder_Script>();
     g_stage_string      = new string[g_var_num, g_side_num];
 }
 void Start()
 {
     g_trouble_Script     = GameObject.Find("TroubleObj").GetComponent <TroubleScr>();
     g_result_Script      = GameObject.Find("Stageinformation").GetComponent <ResultScript>();
     g_clear_Script       = GameObject.Find("Game_Controller").GetComponent <Stage_Clear>();
     g_folder_Script      = GameObject.Find("Stageinformation").GetComponent <Folder_Script>();
     g_information_Script = GameObject.Find("Stageinformation").GetComponent <StageInformation>();
     g_game_con_Script    = GameObject.Find("Game_Controller").GetComponent <Game_Controller>();
     g_player_Script      = GameObject.Find("Player_Controller").GetComponent <Playercontroller>();
     g_player_anim_Script = this.GetComponent <Player_Animation>();
     g_player_obj         = this.gameObject;
 }
Exemplo n.º 4
0
 // Start is called before the first frame update
 void Start()
 {
     //ボタンを生むのに必要な情報を取得
     g_array_Script  = GameObject.Find("Stageinformation").GetComponent <JsonArray>();
     g_folder_Script = GameObject.Find("Stageinformation").GetComponent <Folder_Script>();
     //生み出す横の幅を決定
     g_side_num = g_array_Script.g_stage_side;
     //生み出す縦の幅を決定
     g_varmax_num = g_array_Script.g_stage_max_var;
     g_var_num    = g_array_Script.g_stage_var;
     //生み出すあまりの幅を決定
     g_remainder_num = g_array_Script.g_stage_remainder;
     //生み出す個数
     g_button_sprewn_num = g_array_Script.g_stage_array_num;
     //配列の最大値を決定する
     g_json_button_array = new GameObject[g_varmax_num, g_side_num];
     g_json_stage_array  = new string[g_varmax_num, g_side_num];
     ButtonPool(g_button_obj);
 }
Exemplo n.º 5
0
 void Start()
 {
     DontDestroyOnLoad(this.gameObject);
     g_folder = GetComponent <Folder_Script>();
 }