• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ set_process函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中set_process函数的典型用法代码示例。如果您正苦于以下问题:C++ set_process函数的具体用法?C++ set_process怎么用?C++ set_process使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了set_process函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ERR_FAIL_COND

void BakedLightEditor::_bake_pressed() {

	ERR_FAIL_COND(!node);
	if (node->get_baked_light().is_null()) {
		err_dialog->set_text("BakedLightInstance does not contain a BakedLight resource.");
		err_dialog->popup_centered(Size2(350,70));
		button_bake->set_pressed(false);
		return;
	}

	if (baker->is_baking()) {

		baker->set_pause(!button_bake->is_pressed());
		if (baker->is_paused()) {

			set_process(false);
			bake_info->set_text("");
		} else {

			update_timeout=0;
			set_process(true);
		}

	} else {
		baker->bake(node->get_baked_light(),node);
		update_timeout=0;
		set_process(true);
	}

}
开发者ID:PaulMoffat,项目名称:godot,代码行数:30,代码来源:baked_light_editor_plugin.cpp


示例2: _polygon_draw

void CollisionPolygonEditor::edit(Node *p_collision_polygon) {



	if (p_collision_polygon) {

		node=p_collision_polygon->cast_to<CollisionPolygon>();
		wip.clear();
		wip_active=false;
		edited_point=-1;
		p_collision_polygon->add_child(imgeom);
		_polygon_draw();
		set_process(true);
		prev_depth=-1;

	} else {
		node=NULL;

		if (imgeom->get_parent())
			imgeom->get_parent()->remove_child(imgeom);

		set_process(false);
	}

}
开发者ID:a12n,项目名称:godot,代码行数:25,代码来源:collision_polygon_editor_plugin.cpp


示例3: _menu_option

void Polygon3DEditor::edit(Node *p_collision_polygon) {

	if (p_collision_polygon) {

		node = Object::cast_to<Spatial>(p_collision_polygon);
		//Enable the pencil tool if the polygon is empty
		if (Vector<Vector2>(node->call("get_polygon")).size() == 0) {
			_menu_option(MODE_CREATE);
		}
		wip.clear();
		wip_active = false;
		edited_point = -1;
		p_collision_polygon->add_child(imgeom);
		_polygon_draw();
		set_process(true);
		prev_depth = -1;

	} else {
		node = NULL;

		if (imgeom->get_parent())
			imgeom->get_parent()->remove_child(imgeom);

		set_process(false);
	}
}
开发者ID:ippan,项目名称:godot,代码行数:26,代码来源:collision_polygon_editor_plugin.cpp


示例4: set_process

void InterpolatedCamera::set_interpolation_enabled(bool p_enable) {

	if (enabled == p_enable)
		return;
	enabled = p_enable;
	if (p_enable) {
		if (is_inside_tree() && Engine::get_singleton()->is_editor_hint())
			return;
		set_process(true);
	} else
		set_process(false);
}
开发者ID:Warlaan,项目名称:godot,代码行数:12,代码来源:interpolated_camera.cpp


示例5: set_process

void ExportTemplateManager::_begin_template_download(const String &p_url) {

	for (int i = 0; i < template_list->get_child_count(); i++) {
		BaseButton *b = Object::cast_to<BaseButton>(template_list->get_child(0));
		if (b) {
			b->set_disabled(true);
		}
	}

	download_data.clear();

	Error err = download_templates->request(p_url);
	if (err != OK) {
		EditorNode::get_singleton()->show_warning(TTR("Error requesting url: ") + p_url);
		return;
	}

	set_process(true);

	template_list_state->show();
	template_download_progress->set_max(100);
	template_download_progress->set_value(0);
	template_download_progress->show();
	template_list_state->set_text(TTR("Connecting to Mirror.."));
}
开发者ID:nakoff,项目名称:godot,代码行数:25,代码来源:export_template_manager.cpp


示例6: set_process

void UI_List::SetSpaceY(int v) {
	if (spacey_ != v) {
		spacey_ = v;
		layout_ = true;
		set_process(true);
	}
}
开发者ID:cjmxp,项目名称:godot,代码行数:7,代码来源:ui_list.cpp


示例7: memnew

void UI_List::_notification(int p_what) {
	if (setattribute_) {
		content_->set_size(get_size());
		unsigned count = box_->get_child_count();
		UI_Box* node = NULL;
		for (unsigned i = 0; i < count; i++) {
			node = Object::cast_to<UI_Box>(box_->get_child(i));
			if (node) {
				node->set_visible(false);
			}
		}
		int len = data_.size();
		for (unsigned i = 0; i < len; i++) {
			if (box_->get_child_count() <= i) {
				node = memnew(UI_Box);
				node->SetXml(render_, NULL);
				node->set_name("ui_list_item_" + itos(i));
				box_->add_child(node);
			}
			else {
				node = Object::cast_to<UI_Button>(box_->get_child(i));
			}
			node->set_visible(true);
			node->SetDataSource(data_[i]);
		}
		setattribute_ = false;
		return;
	}
	if (layout_) {
		int count = box_->get_child_count();
		int rx = 0;
		int ry = 0;
		real_t x = 0;
		real_t y = 0;
		UI_Box* node = NULL;
		Size2 size;
		Size2 max;
		for (unsigned i = 0; i < count; i++) {
			node = Object::cast_to<UI_Box>(box_->get_child(i));
			size = node->get_size();
			rx = i % repeatx_;
			ry = i / repeatx_;
			x = size.width * rx + rx * spacex_;
			y = size.height * ry + ry * spacey_;
			node->set_position(Point2(x, y));
			max.width = x + size.width;
			max.height = y + size.height;
		}
		max.width -= spacex_;
		max.height -= spacey_;
		node_size.width = size.width + spacex_;
		node_size.height = size.height + spacey_;
		size = get_size();
		if (size.width > max.width)max.width = size.width;
		if (size.height > max.height)max.height = size.height;
		box_->set_size(max);
		layout_ = false;
		set_process(false);
	}
}
开发者ID:cjmxp,项目名称:godot,代码行数:60,代码来源:ui_list.cpp


示例8: _scan_sources

void EditorFileSystem::scan_sources() {

	if (scanning || scanning_sources|| thread)
		return;

	sources_changed.clear();
	scanning_sources=true;
	scanning_sources_done=false;

	abort_scan=false;

	if (!use_threads) {
		if (filesystem)
			_scan_sources(filesystem,NULL);
		scanning_sources=false;
		scanning_sources_done=true;
		emit_signal("sources_changed",sources_changed.size()>0);
	} else {

		ERR_FAIL_COND(thread_sources);
		set_process(true);
		Thread::Settings s;
		ss_amount=0;
		s.priority=Thread::PRIORITY_LOW;
		thread_sources = Thread::create(_thread_func_sources,this,s);
		//tree->hide();
		//print_line("SCAN BEGIN!");
		//progress->show();
	}



}
开发者ID:AlexTorrin,项目名称:godot,代码行数:33,代码来源:editor_file_system.cpp


示例9: set_process

void SampleLibraryEditor::_notification(int p_what) {

    if (p_what==NOTIFICATION_PROCESS) {
        if (is_playing && !player->is_active()) {
            TreeItem *tl=last_sample_playing->cast_to<TreeItem>();
            tl->set_button(0,0,get_icon("Play","EditorIcons"));
            is_playing = false;
            set_process(false);
        }
    }

    if (p_what==NOTIFICATION_ENTER_TREE) {
        load->set_icon( get_icon("Folder","EditorIcons") );
        load->set_tooltip("Open Sample File(s)");
    }

    if (p_what==NOTIFICATION_READY) {

//		NodePath("/root")->connect("node_removed", this,"_node_removed",Vector<Variant>(),true);
    }

    if (p_what==NOTIFICATION_DRAW) {

    }
}
开发者ID:OpenSocialGames,项目名称:godot,代码行数:25,代码来源:sample_library_editor_plugin.cpp


示例10: set_process

void ExportTemplateManager::_begin_template_download(const String &p_url) {

	if (Input::get_singleton()->is_key_pressed(KEY_SHIFT)) {
		OS::get_singleton()->shell_open(p_url);
		return;
	}

	for (int i = 0; i < template_list->get_child_count(); i++) {
		BaseButton *b = Object::cast_to<BaseButton>(template_list->get_child(0));
		if (b) {
			b->set_disabled(true);
		}
	}

	download_data.clear();
	download_templates->set_download_file(EditorSettings::get_singleton()->get_cache_dir().plus_file("tmp_templates.tpz"));
	download_templates->set_use_threads(true);

	Error err = download_templates->request(p_url);
	if (err != OK) {
		EditorNode::get_singleton()->show_warning(TTR("Error requesting url: ") + p_url);
		return;
	}

	set_process(true);

	template_list_state->show();
	template_download_progress->set_max(100);
	template_download_progress->set_value(0);
	template_download_progress->show();
	template_list_state->set_text(TTR("Connecting to Mirror..."));
}
开发者ID:RandomShaper,项目名称:godot,代码行数:32,代码来源:export_template_manager.cpp


示例11: set_process

void ScriptEditorDebugger::stop(){


	set_process(false);

	server->stop();

	ppeer->set_stream_peer(Ref<StreamPeer>());

	if (connection.is_valid()) {
		EditorNode::get_log()->add_message("** Debug Process Stopped **");
		connection.unref();
	}

	pending_in_queue=0;
	message.clear();

	if (log_forced_visible) {
		EditorNode::get_log()->hide();
		log_forced_visible=false;
	}

	node_path_cache.clear();
	res_path_cache.clear();
	le_clear->set_disabled(false);
	le_set->set_disabled(true);


	hide();
	emit_signal("show_debugger",false);

}
开发者ID:Ragar0ck,项目名称:godot,代码行数:32,代码来源:script_editor_debugger.cpp


示例12: switch

void BakedLightEditor::_menu_option(int p_option) {


	switch(p_option) {


		case MENU_OPTION_BAKE: {

			ERR_FAIL_COND(!node);
			ERR_FAIL_COND(node->get_baked_light().is_null());
			baker->bake(node->get_baked_light(),node);
			node->get_baked_light()->set_mode(BakedLight::MODE_OCTREE);
			update_timeout=0;
			set_process(true);


		} break;
		case MENU_OPTION_CLEAR: {



		} break;

	}
}
开发者ID:Blake-Hudson,项目名称:godot,代码行数:25,代码来源:baked_light_editor_plugin.cpp


示例13: set_process

void BakedLightEditor::_end_baking() {

	baker->clear();
	set_process(false);
	button_bake->set_pressed(false);
	bake_info->set_text("");
}
开发者ID:Blake-Hudson,项目名称:godot,代码行数:7,代码来源:baked_light_editor_plugin.cpp


示例14: switch

void Timer::_set_process(bool p_process, bool p_force) 
{
	switch (timer_process_mode) {
		case TIMER_PROCESS_FIXED: set_fixed_process(p_process); break;
		case TIMER_PROCESS_IDLE: set_process(p_process); break;
	}
}
开发者ID:AwsomeGameEngine,项目名称:godot,代码行数:7,代码来源:timer.cpp


示例15: _update_player

void AnimationPlayerEditor::set_state(const Dictionary& p_state) {

	if (p_state.has("visible") && p_state["visible"]) {

		Node *n = EditorNode::get_singleton()->get_edited_scene()->get_node(p_state["player"]);
		if (n && n->cast_to<AnimationPlayer>()) {
			player=n->cast_to<AnimationPlayer>();
			_update_player();
			show();
			set_process(true);
			ensure_visibility();
			EditorNode::get_singleton()->animation_panel_make_visible(true);

			if (p_state.has("animation")) {
				String anim = p_state["animation"];
				_select_anim_by_name(anim);
				if (p_state.has("editing") && p_state["editing"]) {

					edit_anim->set_pressed(true);
					_animation_edit();
				}
			}

		}
	}

}
开发者ID:Scrik,项目名称:godot,代码行数:27,代码来源:animation_player_editor_plugin.cpp


示例16: set_process

void VideoPlayer::set_paused(bool p_paused) {

	paused=p_paused;
	if (stream.is_valid()) {
		stream->set_paused(p_paused);
		set_process(!p_paused);
	};
};
开发者ID:0871087123,项目名称:godot,代码行数:8,代码来源:video_player.cpp


示例17: set_process

EditorRunNative::EditorRunNative() {
	set_process(true);
	first = true;
	deploy_dumb = false;
	deploy_debug_remote = false;
	debug_collisions = false;
	debug_navigation = false;
}
开发者ID:UgisBrekis,项目名称:godot,代码行数:8,代码来源:editor_run_native.cpp


示例18: set_process

void NetGameServer::_update_signal_mode()
{
	set_process(false);
	set_fixed_process(false);
	switch(signal_mode)
	{
		case PROCESS:
			set_process(true);
			break;
		case FIXED:
			set_fixed_process(true);
			break;
		case THREADED:
			// noop
			break;
	}
}
开发者ID:Faless,项目名称:netgame-godot,代码行数:17,代码来源:net_game_server.cpp


示例19: _reset_timeout

void AnimatedSprite::_set_playing(bool p_playing) {

	if (playing==p_playing)
		return;
	playing=p_playing;
	_reset_timeout();
	set_process(playing);
}
开发者ID:anvilbearryan,项目名称:godot,代码行数:8,代码来源:animated_sprite.cpp


示例20: print_line

void EditorFileDialog::_request_single_thumbnail(const String& p_path) {

	EditorResourcePreview::get_singleton()->queue_resource_preview(p_path,this,"_thumbnail_done",p_path);
	print_line("want file "+p_path);
	set_process(true);
	preview_waiting=true;
	preview_wheel_timeout=0;

}
开发者ID:madjestic,项目名称:godot,代码行数:9,代码来源:editor_file_dialog.cpp



注:本文中的set_process函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ set_prop函数代码示例发布时间:2022-05-30
下一篇:
C++ set_priv函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap