/// <summary>
    /// 移動前を空にして移動先にオブジェクトとタイプを格納する処理
    /// </summary>
    /// <param name="ver">縦</param>
    /// <param name="side">横</param>
    /// <param name="high">高さ</param>
    /// <param name="pointer">子オブジェクト配列の指標</param>
    public void Reset_And_Storage_Obj()
    {
        //動かすダイスの個数分繰り返す
        for (int child_pointer = g_zero_Count; child_pointer < g_work_children.Length; child_pointer++)
        {
            //ダイスのスクリプト取得
            g_child_Script = g_work_children[child_pointer].GetComponent <Dice_Squares>();
            //移動前の位置を取得
            (g_child_Ver, g_child_Side, g_child_High) = g_check_Script.Get_Before_Pointer();
            //移動先の位置を取得
            (g_next_ver, g_next_side, g_next_high) = g_check_Script.Get_After_Pointer();

            //元々格納されていたオブジェクトを空にする
            g_game_Con_Script.Storage_Reset(g_child_Ver, g_child_Side, g_child_High);
            //子オブジェクトを回転に格納
            g_game_Con_Script.Storage_Obj(g_next_ver, g_next_side, g_next_high, g_work_children[child_pointer]);
            //タイプを回転先に格納
            g_game_Con_Script.Storage_Obj_Type(g_next_ver, g_next_side, g_next_high, 100);
            //移動先のポジション取得
            Vector3 pos = g_game_Con_Script.Get_Pos(g_next_ver, g_next_side, g_next_high);
            //ポジション移動
            g_work_children[child_pointer].transform.position = pos;
            //子オブジェクトが保持している指標を更新する
            g_child_Script.Storage_This_Index(g_next_ver, g_next_side, g_next_high);
            //サイコロのマス目を変更
            g_child_Script.Change_Squares(g_now_para);
            //ダイスの全方向を調べて、くっつくダイスがあるか調べる
            g_child_Script.All_Check();
        }
        //ダイス落下処理
        g_dice_fall_Script.All_Dice_Fall(g_work_children, g_center_Dice);
    }
Esempio n. 2
0
 /// <summary>
 /// 操作中のダイスを移動先に格納する
 /// </summary>
 private void Dice_Storage()
 {
     //ダイスの個数分だけ処理を繰り返す
     for (int dice_count = g_zero_Count; dice_count < g_work_dices.Length; dice_count++)
     {
         //ダイスのスクリプト取得
         g_child_Script = g_work_dices[dice_count].GetComponent <Dice_Squares>();
         //ダイスの現在位置取得
         (g_dice_ver, g_dice_side, g_dice_high) = g_child_Script.Get_Dice_Pointer();
         //現在の位置―移動回数をして移動先の高さを計算
         int fall_high = g_dice_high - g_min_counter;
         //ダイス格納
         g_game_Con_Script.Storage_Obj(g_dice_ver, g_dice_side, fall_high, g_work_dices[dice_count]);
         //ダイスのタイプ格納
         g_game_Con_Script.Storage_Obj_Type(g_dice_ver, g_dice_side, fall_high, 100);
         //格納先のポジション取得
         Vector3 dice_pos = g_game_Con_Script.Get_Pos(g_dice_ver, g_dice_side, fall_high);
         //ダイス移動
         g_work_dices[dice_count].transform.position = dice_pos;
         //子オブジェクトが保持している指標を更新する
         g_child_Script.Storage_This_Index(g_dice_ver, g_dice_side, fall_high);
         //全方位を調べて、くっつくダイスがあるか調べる
         g_child_Script.All_Check();
     }
 }