if global.hitstop > 0
	global.hitstop--;
	
if global.developer_mode
{
	if mouse_check_button_pressed(mb_left)
	{
		oPlayer.x = mouse_x;
		oPlayer.y = mouse_y;
	}	
}

// rendering
// 每帧更新光照计算（处理动态光源和遮挡）
global.bulb_renderer.Update();
if global.time_scale_t < 1.0
{
    global.time_scale_t += 1 / global.time_scale_duration;
    global.time_scale_t = min(global.time_scale_t, 1.0);
    
    global.time_scale = lerp(0.1, 1.0, power(global.time_scale_t, 6));
}

if oMain._inventory
{
	global.inventory = icl(oInventory);
	oMain.autoreg_handle("inventory", "inventory", 10);
}
else if oMain._close
{
	with(global.inventory) instance_destroy();
	oMain.autodel_handle("inventory");
}
