コード例 #1
0
    void Start()
    {
        this.current_position.x = 0;
        this.current_position.y = 5;
        if (playerCamera == null)
        {
            playerCamera = Camera.main;
        }
        playerCamera.transparencySortMode = TransparencySortMode.Orthographic;
        //initialization_koef_model
        koef_model = initialization_koef_of_model();
        current_surface.limitation_x = 5;
        current_surface.mu           = 1;

        current_position = this.transform.position;
        bias_ray.x       = (float)current_surface.limitation_x;
        bias_ray.y       = 0;
        vec_gravity.x    = 0;
        vec_gravity.y    = -1;

        //initialization start model
        current_model.Velocity.x = 0;
        current_model.Velocity.y = 0;
        current_model.Coord.x    = System.Convert.ToDouble(current_position.x);
        current_model.Coord.y    = System.Convert.ToDouble(current_position.y);


        //StreamWriter log = new StreamWriter(@"log_unity_start.txt");
        //log.WriteLine("current_position.x = " + current_position.x + "\ncurrent_position.y = " + current_position.y);
        //log.WriteLine("\n\ncurrent_model.Coord.x = " + current_model.Coord.x + "\ncurrent_model.Coord.y = " + current_model.Coord.y);
        //log.Close();
        tmp_test = 0;
    }
コード例 #2
0
 public static unsafe extern int solve_step(ref state_model current_model, ref koef_of_model koef_model, ref surface current_surface, ref double step_time, double force);