예제 #1
0
    private bool at_point(GameObject merchant, ScheduleData.ScheduleEntry entry_point)
    {
        var current_pos = merchant.transform.position;

        var same_world    = tile_map.get_map_id() == entry_point.world_id;
        var same_position = current_pos.x == entry_point.x_pos && current_pos.z == entry_point.y_pos;

        return(same_position && same_world);
    }
예제 #2
0
    // Private method that assists filling a schedule entry
    private ScheduleData.ScheduleEntry create_schedule_entry(int total_min, string map_id, int x_pos, int y_pos)
    {
        var schedule_entry = new ScheduleData.ScheduleEntry();

        schedule_entry.hour     = total_min / 60;
        schedule_entry.minute   = total_min % 60;
        schedule_entry.world_id = map_id;
        schedule_entry.x_pos    = x_pos;
        schedule_entry.y_pos    = y_pos;
        return(schedule_entry);
    }
예제 #3
0
 // Private method that assists filling a schedule entry
 private ScheduleData.ScheduleEntry create_schedule_entry(int total_min, string map_id, int x_pos, int y_pos)
 {
     var schedule_entry = new ScheduleData.ScheduleEntry();
     schedule_entry.hour = total_min / 60;
     schedule_entry.minute = total_min % 60;
     schedule_entry.world_id = map_id;
     schedule_entry.x_pos = x_pos;
     schedule_entry.y_pos = y_pos;
     return schedule_entry;
 }