Ejemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        tc             = GetComponent <TimePoint_Corrector>();
        tm_jump_effect = GetComponent <Time_Jump_Effect>();

        for (int i = 0; i < 9; i++)
        {
            time_point_list.Add(new Time_Point());
        }

        time_point_list.Add(new Time_Point()); // 9 Past (0)
        time_point_list.Add(new Time_Point()); // 10 Future (furthest point forward)

        foreach (var obj_type in object_type_list)
        {
            GameObject[] object_array = GameObject.FindGameObjectsWithTag(obj_type.tag);
            foreach (var obj in object_array)
            {
                moveable_object_spawn_transforms.Add(obj.transform);

                Object_Spawns new_spawn = new Object_Spawns();
                new_spawn.position = obj.transform.position;
                new_spawn.obj      = obj_type.obj;

                moveable_object_spawns.Add(new_spawn);
            }
        }


        GameObject[] doors = GameObject.FindGameObjectsWithTag("Door");


        foreach (var door in doors)
        {
            door_list.Add(door.GetComponentInChildren <Door_Activation>());
            door.GetComponentInChildren <Visible_Check>().Add_Camera(player_cam);
        }


        foreach (var obj in dupe_objs)
        {
            obj.vis = obj.obj.GetComponentInChildren <Visible_Check>();
            obj.vis.Add_Camera(player_cam);
        }

        current_time = 0.0f;

        //Add_To_Buffer(hidden_start_pos, player_look_pivot.localRotation, current_time);
        List <Door_Data>   door_data_list = new List <Door_Data>();
        List <Object_Type> obj_array      = new List <Object_Type>();

        Add_To_Buffer(hidden_start_pos, player_look_pivot.localRotation, door_data_list.ToArray(), obj_array.ToArray(), current_time, false, is_grabbing);
        Log_Current_Timestamp(); // To set the initial jump timestamp for the first dupe to be skipped
        Add_To_Buffer(hidden_start_pos, player_look_pivot.localRotation, door_data_list.ToArray(), obj_array.ToArray(), current_time, false, is_grabbing);
        Add_To_Buffer(hidden_start_pos, player_look_pivot.localRotation, door_data_list.ToArray(), obj_array.ToArray(), current_time, false, is_grabbing);
        Add_To_Buffer(hidden_start_pos, player_look_pivot.localRotation, door_data_list.ToArray(), obj_array.ToArray(), current_time, false, is_grabbing);
    }
Ejemplo n.º 2
0
 void Start()
 {
     tm = GetComponent <Timeline_Manager>();
     tc = GetComponent <TimePoint_Corrector>();
 }