Пример #1
0
void ItemList::set_item_custom_fg_color(int p_idx, const Color &p_custom_fg_color) {

	ERR_FAIL_INDEX(p_idx, items.size());

	items[p_idx].custom_fg = p_custom_fg_color;
}
Пример #2
0
void VisibilityEnabler::set_enabler(Enabler p_enabler, bool p_enable) {

	ERR_FAIL_INDEX(p_enabler, ENABLER_MAX);
	enabler[p_enabler] = p_enable;
}
Пример #3
0
void AudioStreamPlayer3D::set_attenuation_model(AttenuationModel p_model) {
	ERR_FAIL_INDEX(p_model, 3);
	attenuation_model = p_model;
}
Пример #4
0
void CPUParticles::set_param(Parameter p_param, float p_value) {

	ERR_FAIL_INDEX(p_param, PARAM_MAX);

	parameters[p_param] = p_value;
}
Пример #5
0
void Particles::set_amount(int p_amount) {

	ERR_FAIL_INDEX(p_amount,4096);
	amount=p_amount;
	VisualServer::get_singleton()->particles_set_amount(particles,p_amount);
}
Пример #6
0
void DirectionalLight::set_shadow_param(ShadowParam p_param, float p_value) {

    ERR_FAIL_INDEX(p_param,3);
    shadow_param[p_param]=p_value;
    VS::get_singleton()->light_directional_set_shadow_param(light,VS::LightDirectionalShadowParam(p_param),p_value);
}
Пример #7
0
void Shader::set_mode(Mode p_mode) {

	ERR_FAIL_INDEX(p_mode,2);
	VisualServer::get_singleton()->shader_set_mode(shader,VisualServer::ShaderMode(p_mode));
	emit_signal(SceneStringNames::get_singleton()->changed);
}
Пример #8
0
void EditorData::set_edited_scene_root(Node* p_root) {

    ERR_FAIL_INDEX(current_edited_scene,edited_scene.size());
    edited_scene[current_edited_scene].root=p_root;
}
Пример #9
0
void EditorData::set_edited_scene_version(uint64_t version) {
    ERR_FAIL_INDEX(current_edited_scene,edited_scene.size());
    edited_scene[current_edited_scene].version=version;

}
Пример #10
0
void EditorData::move_edited_scene_index(int p_idx,int p_to_idx) {

    ERR_FAIL_INDEX(p_idx,edited_scene.size());
    ERR_FAIL_INDEX(p_to_idx,edited_scene.size());
    SWAP(edited_scene[p_idx],edited_scene[p_to_idx]);
}
Пример #11
0
void EditorData::set_edited_scene(int p_idx) {

    ERR_FAIL_INDEX(p_idx,edited_scene.size());
    current_edited_scene=p_idx;
    //swap
}
Пример #12
0
void RigidCollisionObjectBullet::remove_shape_full(int p_index) {
	ERR_FAIL_INDEX(p_index, get_shape_count());
	internal_shape_destroy(p_index);
	shapes.remove(p_index);
	reload_shapes();
}
Пример #13
0
void ItemList::set_item_tooltip_enabled(int p_idx, const bool p_enabled) {
	ERR_FAIL_INDEX(p_idx, items.size());
	items[p_idx].tooltip_enabled = p_enabled;
}
Пример #14
0
void ItemList::set_item_selectable(int p_idx, bool p_selectable) {

	ERR_FAIL_INDEX(p_idx, items.size());

	items[p_idx].selectable = p_selectable;
}
Пример #15
0
void BakedLight::set_lightmap_gen_size(int p_idx,const Size2& p_size){

	ERR_FAIL_INDEX(p_idx,lightmaps.size());
	lightmaps[p_idx].gen_size=p_size;
	_update_lightmaps();
}
Пример #16
0
void EditorData::set_edited_scene_live_edit_root(const NodePath& p_root) {
    ERR_FAIL_INDEX(current_edited_scene,edited_scene.size());

    edited_scene[current_edited_scene].live_edit_root=p_root;

}
Пример #17
0
void Light::set_operator(Operator p_op) {
    ERR_FAIL_INDEX(p_op,2);
    op=p_op;
    VisualServer::get_singleton()->light_set_operator(light,VS::LightOp(op));

}
Пример #18
0
void EditorData::set_edited_scene_import_metadata(Ref<ResourceImportMetadata> p_mdata) {

    ERR_FAIL_INDEX(current_edited_scene,edited_scene.size());
    edited_scene[current_edited_scene].medatata=p_mdata;

}
Пример #19
0
void CollisionObject2D::set_shape(int p_shape_idx, const Ref<Shape2D>& p_shape) {

	ERR_FAIL_INDEX(p_shape_idx,shapes.size());
	shapes[p_shape_idx].shape=p_shape;
	_update_shapes();
}
Пример #20
0
void Curve2D::remove_point(int p_index) {

	ERR_FAIL_INDEX(p_index,points.size());
	points.remove(p_index);
	emit_signal(CoreStringNames::get_singleton()->changed);
}
Пример #21
0
void OSIPhone::queue_event(const Ref<InputEvent> &p_event) {

	ERR_FAIL_INDEX(event_count, MAX_EVENTS);

	event_queue[event_count++] = p_event;
};
Пример #22
0
void FixedMaterial::set_fixed_flag(FixedFlag p_flag, bool p_value) {
	ERR_FAIL_INDEX(p_flag,4);
	fixed_flags[p_flag]=p_value;
	VisualServer::get_singleton()->fixed_material_set_flag(material,(VS::FixedMaterialFlags)p_flag,p_value);

}
Пример #23
0
void CPUParticles::set_param_randomness(Parameter p_param, float p_value) {

	ERR_FAIL_INDEX(p_param, PARAM_MAX);

	randomness[p_param] = p_value;
}
Пример #24
0
void Rect3::get_edge(int p_edge, Vector3 &r_from, Vector3 &r_to) const {

	ERR_FAIL_INDEX(p_edge, 12);
	switch (p_edge) {

		case 0: {

			r_from = Vector3(pos.x + size.x, pos.y, pos.z);
			r_to = Vector3(pos.x, pos.y, pos.z);
		} break;
		case 1: {

			r_from = Vector3(pos.x + size.x, pos.y, pos.z + size.z);
			r_to = Vector3(pos.x + size.x, pos.y, pos.z);
		} break;
		case 2: {
			r_from = Vector3(pos.x, pos.y, pos.z + size.z);
			r_to = Vector3(pos.x + size.x, pos.y, pos.z + size.z);

		} break;
		case 3: {

			r_from = Vector3(pos.x, pos.y, pos.z);
			r_to = Vector3(pos.x, pos.y, pos.z + size.z);

		} break;
		case 4: {

			r_from = Vector3(pos.x, pos.y + size.y, pos.z);
			r_to = Vector3(pos.x + size.x, pos.y + size.y, pos.z);
		} break;
		case 5: {

			r_from = Vector3(pos.x + size.x, pos.y + size.y, pos.z);
			r_to = Vector3(pos.x + size.x, pos.y + size.y, pos.z + size.z);
		} break;
		case 6: {
			r_from = Vector3(pos.x + size.x, pos.y + size.y, pos.z + size.z);
			r_to = Vector3(pos.x, pos.y + size.y, pos.z + size.z);

		} break;
		case 7: {

			r_from = Vector3(pos.x, pos.y + size.y, pos.z + size.z);
			r_to = Vector3(pos.x, pos.y + size.y, pos.z);

		} break;
		case 8: {

			r_from = Vector3(pos.x, pos.y, pos.z + size.z);
			r_to = Vector3(pos.x, pos.y + size.y, pos.z + size.z);

		} break;
		case 9: {

			r_from = Vector3(pos.x, pos.y, pos.z);
			r_to = Vector3(pos.x, pos.y + size.y, pos.z);

		} break;
		case 10: {

			r_from = Vector3(pos.x + size.x, pos.y, pos.z);
			r_to = Vector3(pos.x + size.x, pos.y + size.y, pos.z);

		} break;
		case 11: {

			r_from = Vector3(pos.x + size.x, pos.y, pos.z + size.z);
			r_to = Vector3(pos.x + size.x, pos.y + size.y, pos.z + size.z);

		} break;
	}
}
Пример #25
0
void CollisionPolygon2D::set_build_mode(BuildMode p_mode) {

	ERR_FAIL_INDEX(p_mode, 2);
	build_mode = p_mode;
	_update_parent();
}
Пример #26
0
void SpriteBase3D::set_draw_flag(DrawFlags p_flag, bool p_enable) {

	ERR_FAIL_INDEX(p_flag, FLAG_MAX);
	flags[p_flag] = p_enable;
	_queue_update();
}
Пример #27
0
void Vector3::set_axis(int p_axis,real_t p_value) {
	ERR_FAIL_INDEX(p_axis,3);
	coord[p_axis]=p_value;

}
Пример #28
0
void SpriteBase3D::set_alpha_cut_mode(AlphaCutMode p_mode) {

	ERR_FAIL_INDEX(p_mode, 3);
	alpha_cut = p_mode;
	_queue_update();
}
Пример #29
0
void AudioStreamPlayer3D::set_out_of_range_mode(OutOfRangeMode p_mode) {

	ERR_FAIL_INDEX(p_mode, 2);
	out_of_range_mode = p_mode;
}
Пример #30
0
void Mesh::surface_set_custom_aabb(int p_idx,const AABB& p_aabb) {

	ERR_FAIL_INDEX( p_idx, surfaces.size() );
	surfaces[p_idx].aabb=p_aabb;
// set custom aabb too?
}