From 9581bc9bb339ee2c5a609b68b98eccbd986db7d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 21 Nov 2023 16:13:03 +0100 Subject: [PATCH] Sync class reference translations with upstream 4.x Still only zh_CN for now. zh_TW is near 100% complete, but it has hundreds of validation errors which need to be fixed first. --- classes/zh_CN/class_@gdscript.rst | 135 +- classes/zh_CN/class_@globalscope.rst | 324 ++-- classes/zh_CN/class_aabb.rst | 64 +- classes/zh_CN/class_acceptdialog.rst | 94 +- classes/zh_CN/class_aescontext.rst | 32 +- classes/zh_CN/class_animatablebody2d.rst | 32 +- classes/zh_CN/class_animatablebody3d.rst | 36 +- classes/zh_CN/class_animatedsprite2d.rst | 44 +- classes/zh_CN/class_animatedsprite3d.rst | 44 +- classes/zh_CN/class_animatedtexture.rst | 40 +- classes/zh_CN/class_animation.rst | 46 +- classes/zh_CN/class_animationlibrary.rst | 67 +- classes/zh_CN/class_animationmixer.rst | 809 ++++++++ classes/zh_CN/class_animationnode.rst | 82 +- classes/zh_CN/class_animationnodeadd2.rst | 24 +- classes/zh_CN/class_animationnodeadd3.rst | 24 +- .../zh_CN/class_animationnodeanimation.rst | 36 +- classes/zh_CN/class_animationnodeblend2.rst | 24 +- classes/zh_CN/class_animationnodeblend3.rst | 24 +- .../zh_CN/class_animationnodeblendspace1d.rst | 44 +- .../zh_CN/class_animationnodeblendspace2d.rst | 48 +- .../zh_CN/class_animationnodeblendtree.rst | 48 +- classes/zh_CN/class_animationnodeoneshot.rst | 36 +- classes/zh_CN/class_animationnodeoutput.rst | 24 +- .../zh_CN/class_animationnodestatemachine.rst | 46 +- ...lass_animationnodestatemachineplayback.rst | 36 +- ...ss_animationnodestatemachinetransition.rst | 40 +- classes/zh_CN/class_animationnodesub2.rst | 24 +- classes/zh_CN/class_animationnodesync.rst | 34 +- .../zh_CN/class_animationnodetimescale.rst | 24 +- classes/zh_CN/class_animationnodetimeseek.rst | 24 +- .../zh_CN/class_animationnodetransition.rst | 40 +- classes/zh_CN/class_animationplayer.rst | 612 ++---- classes/zh_CN/class_animationrootnode.rst | 26 +- classes/zh_CN/class_animationtree.rst | 445 +---- classes/zh_CN/class_area2d.rst | 50 +- classes/zh_CN/class_area3d.rst | 58 +- classes/zh_CN/class_array.rst | 88 +- classes/zh_CN/class_arraymesh.rst | 46 +- classes/zh_CN/class_arrayoccluder3d.rst | 42 +- classes/zh_CN/class_aspectratiocontainer.rst | 36 +- classes/zh_CN/class_astar2d.rst | 40 +- classes/zh_CN/class_astar3d.rst | 58 +- classes/zh_CN/class_astargrid2d.rst | 154 +- classes/zh_CN/class_atlastexture.rst | 28 +- classes/zh_CN/class_audiobuslayout.rst | 20 +- classes/zh_CN/class_audioeffect.rst | 44 +- classes/zh_CN/class_audioeffectamplify.rst | 32 +- .../class_audioeffectbandlimitfilter.rst | 24 +- .../zh_CN/class_audioeffectbandpassfilter.rst | 24 +- classes/zh_CN/class_audioeffectcapture.rst | 40 +- classes/zh_CN/class_audioeffectchorus.rst | 64 +- classes/zh_CN/class_audioeffectcompressor.rst | 32 +- classes/zh_CN/class_audioeffectdelay.rst | 50 +- classes/zh_CN/class_audioeffectdistortion.rst | 36 +- classes/zh_CN/class_audioeffecteq.rst | 34 +- classes/zh_CN/class_audioeffecteq10.rst | 24 +- classes/zh_CN/class_audioeffecteq21.rst | 24 +- classes/zh_CN/class_audioeffecteq6.rst | 24 +- classes/zh_CN/class_audioeffectfilter.rst | 40 +- .../zh_CN/class_audioeffecthighpassfilter.rst | 24 +- .../class_audioeffecthighshelffilter.rst | 24 +- classes/zh_CN/class_audioeffectinstance.rst | 46 +- classes/zh_CN/class_audioeffectlimiter.rst | 34 +- .../zh_CN/class_audioeffectlowpassfilter.rst | 24 +- .../zh_CN/class_audioeffectlowshelffilter.rst | 24 +- .../zh_CN/class_audioeffectnotchfilter.rst | 24 +- classes/zh_CN/class_audioeffectpanner.rst | 32 +- classes/zh_CN/class_audioeffectphaser.rst | 32 +- classes/zh_CN/class_audioeffectpitchshift.rst | 36 +- classes/zh_CN/class_audioeffectrecord.rst | 40 +- classes/zh_CN/class_audioeffectreverb.rst | 32 +- .../class_audioeffectspectrumanalyzer.rst | 38 +- ...ss_audioeffectspectrumanalyzerinstance.rst | 32 +- .../zh_CN/class_audioeffectstereoenhance.rst | 36 +- classes/zh_CN/class_audiolistener2d.rst | 28 +- classes/zh_CN/class_audiolistener3d.rst | 28 +- classes/zh_CN/class_audioserver.rst | 58 +- classes/zh_CN/class_audiostream.rst | 98 +- classes/zh_CN/class_audiostreamgenerator.rst | 71 +- .../class_audiostreamgeneratorplayback.rst | 36 +- classes/zh_CN/class_audiostreammicrophone.rst | 24 +- classes/zh_CN/class_audiostreammp3.rst | 34 +- classes/zh_CN/class_audiostreamoggvorbis.rst | 59 +- classes/zh_CN/class_audiostreamplayback.rst | 100 +- .../class_audiostreamplaybackoggvorbis.rst | 18 +- .../class_audiostreamplaybackpolyphonic.rst | 32 +- .../class_audiostreamplaybackresampled.rst | 52 +- classes/zh_CN/class_audiostreamplayer.rst | 50 +- classes/zh_CN/class_audiostreamplayer2d.rst | 46 +- classes/zh_CN/class_audiostreamplayer3d.rst | 50 +- classes/zh_CN/class_audiostreampolyphonic.rst | 28 +- classes/zh_CN/class_audiostreamrandomizer.rst | 40 +- classes/zh_CN/class_audiostreamwav.rst | 47 +- classes/zh_CN/class_backbuffercopy.rst | 38 +- classes/zh_CN/class_basebutton.rst | 58 +- classes/zh_CN/class_basematerial3d.rst | 62 +- classes/zh_CN/class_basis.rst | 76 +- classes/zh_CN/class_bitmap.rst | 28 +- classes/zh_CN/class_bone2d.rst | 42 +- classes/zh_CN/class_boneattachment3d.rst | 36 +- classes/zh_CN/class_bonemap.rst | 44 +- classes/zh_CN/class_bool.rst | 56 +- classes/zh_CN/class_boxcontainer.rst | 54 +- classes/zh_CN/class_boxmesh.rst | 28 +- classes/zh_CN/class_boxoccluder3d.rst | 34 +- classes/zh_CN/class_boxshape3d.rst | 32 +- classes/zh_CN/class_button.rst | 236 ++- classes/zh_CN/class_buttongroup.rst | 42 +- classes/zh_CN/class_callable.rst | 46 +- classes/zh_CN/class_callbacktweener.rst | 34 +- classes/zh_CN/class_camera2d.rst | 46 +- classes/zh_CN/class_camera3d.rst | 56 +- classes/zh_CN/class_cameraattributes.rst | 30 +- .../zh_CN/class_cameraattributesphysical.rst | 42 +- .../zh_CN/class_cameraattributespractical.rst | 28 +- classes/zh_CN/class_camerafeed.rst | 40 +- classes/zh_CN/class_cameraserver.rst | 46 +- classes/zh_CN/class_cameratexture.rst | 28 +- classes/zh_CN/class_canvasgroup.rst | 28 +- classes/zh_CN/class_canvasitem.rst | 88 +- classes/zh_CN/class_canvasitemmaterial.rst | 32 +- classes/zh_CN/class_canvaslayer.rst | 50 +- classes/zh_CN/class_canvasmodulate.rst | 28 +- classes/zh_CN/class_canvastexture.rst | 34 +- classes/zh_CN/class_capsulemesh.rst | 28 +- classes/zh_CN/class_capsuleshape2d.rst | 28 +- classes/zh_CN/class_capsuleshape3d.rst | 32 +- classes/zh_CN/class_centercontainer.rst | 32 +- classes/zh_CN/class_characterbody2d.rst | 50 +- classes/zh_CN/class_characterbody3d.rst | 50 +- classes/zh_CN/class_charfxtransform.rst | 103 +- classes/zh_CN/class_checkbox.rst | 310 +-- classes/zh_CN/class_checkbutton.rst | 310 +-- classes/zh_CN/class_circleshape2d.rst | 28 +- classes/zh_CN/class_classdb.rst | 28 +- classes/zh_CN/class_codeedit.rst | 546 ++---- classes/zh_CN/class_codehighlighter.rst | 36 +- classes/zh_CN/class_collisionobject2d.rst | 180 +- classes/zh_CN/class_collisionobject3d.rst | 148 +- classes/zh_CN/class_collisionpolygon2d.rst | 36 +- classes/zh_CN/class_collisionpolygon3d.rst | 30 +- classes/zh_CN/class_collisionshape2d.rst | 32 +- classes/zh_CN/class_collisionshape3d.rst | 42 +- classes/zh_CN/class_color.rst | 94 +- classes/zh_CN/class_colorpicker.rst | 58 +- classes/zh_CN/class_colorpickerbutton.rst | 270 +-- classes/zh_CN/class_colorrect.rst | 32 +- classes/zh_CN/class_compressedcubemap.rst | 22 +- .../zh_CN/class_compressedcubemaparray.rst | 22 +- classes/zh_CN/class_compressedtexture2d.rst | 36 +- .../zh_CN/class_compressedtexture2darray.rst | 20 +- classes/zh_CN/class_compressedtexture3d.rst | 36 +- .../zh_CN/class_compressedtexturelayered.rst | 38 +- classes/zh_CN/class_concavepolygonshape2d.rst | 38 +- classes/zh_CN/class_concavepolygonshape3d.rst | 50 +- classes/zh_CN/class_conetwistjoint3d.rst | 40 +- classes/zh_CN/class_configfile.rst | 42 +- classes/zh_CN/class_confirmationdialog.rst | 38 +- classes/zh_CN/class_container.rst | 54 +- classes/zh_CN/class_control.rst | 208 +- classes/zh_CN/class_convexpolygonshape2d.rst | 44 +- classes/zh_CN/class_convexpolygonshape3d.rst | 32 +- classes/zh_CN/class_cpuparticles2d.rst | 56 +- classes/zh_CN/class_cpuparticles3d.rst | 56 +- classes/zh_CN/class_crypto.rst | 28 +- classes/zh_CN/class_cryptokey.rst | 34 +- classes/zh_CN/class_csgbox3d.rst | 32 +- classes/zh_CN/class_csgcombiner3d.rst | 24 +- classes/zh_CN/class_csgcylinder3d.rst | 32 +- classes/zh_CN/class_csgmesh3d.rst | 38 +- classes/zh_CN/class_csgpolygon3d.rst | 36 +- classes/zh_CN/class_csgprimitive3d.rst | 34 +- classes/zh_CN/class_csgshape3d.rst | 46 +- classes/zh_CN/class_csgsphere3d.rst | 32 +- classes/zh_CN/class_csgtorus3d.rst | 32 +- classes/zh_CN/class_csharpscript.rst | 32 +- classes/zh_CN/class_cubemap.rst | 30 +- classes/zh_CN/class_cubemaparray.rst | 40 +- classes/zh_CN/class_curve.rst | 50 +- classes/zh_CN/class_curve2d.rst | 36 +- classes/zh_CN/class_curve3d.rst | 46 +- classes/zh_CN/class_curvetexture.rst | 38 +- classes/zh_CN/class_curvexyztexture.rst | 34 +- classes/zh_CN/class_cylindermesh.rst | 28 +- classes/zh_CN/class_cylindershape3d.rst | 38 +- classes/zh_CN/class_dampedspringjoint2d.rst | 30 +- classes/zh_CN/class_decal.rst | 40 +- classes/zh_CN/class_dictionary.rst | 104 +- classes/zh_CN/class_diraccess.rst | 58 +- classes/zh_CN/class_directionallight2d.rst | 32 +- classes/zh_CN/class_directionallight3d.rst | 38 +- classes/zh_CN/class_displayserver.rst | 226 ++- classes/zh_CN/class_dtlsserver.rst | 28 +- classes/zh_CN/class_editorcommandpalette.rst | 42 +- classes/zh_CN/class_editordebuggerplugin.rst | 64 +- classes/zh_CN/class_editordebuggersession.rst | 32 +- classes/zh_CN/class_editorexportplatform.rst | 38 +- .../class_editorexportplatformandroid.rst | 48 +- .../zh_CN/class_editorexportplatformios.rst | 36 +- .../class_editorexportplatformlinuxbsd.rst | 28 +- .../zh_CN/class_editorexportplatformmacos.rst | 52 +- .../zh_CN/class_editorexportplatformpc.rst | 18 +- .../zh_CN/class_editorexportplatformweb.rst | 62 +- .../class_editorexportplatformwindows.rst | 36 +- classes/zh_CN/class_editorexportplugin.rst | 280 +-- classes/zh_CN/class_editorfeatureprofile.rst | 40 +- classes/zh_CN/class_editorfiledialog.rst | 60 +- classes/zh_CN/class_editorfilesystem.rst | 34 +- .../zh_CN/class_editorfilesystemdirectory.rst | 28 +- ...itorfilesystemimportformatsupportquery.rst | 48 +- classes/zh_CN/class_editorimportplugin.rst | 86 +- classes/zh_CN/class_editorinspector.rst | 50 +- classes/zh_CN/class_editorinspectorplugin.rst | 90 +- classes/zh_CN/class_editorinterface.rst | 98 +- classes/zh_CN/class_editornode3dgizmo.rst | 106 +- .../zh_CN/class_editornode3dgizmoplugin.rst | 172 +- classes/zh_CN/class_editorpaths.rst | 32 +- classes/zh_CN/class_editorplugin.rst | 220 +-- classes/zh_CN/class_editorproperty.rst | 52 +- .../class_editorresourceconversionplugin.rst | 50 +- classes/zh_CN/class_editorresourcepicker.rst | 68 +- classes/zh_CN/class_editorresourcepreview.rst | 36 +- .../class_editorresourcepreviewgenerator.rst | 80 +- .../class_editorresourcetooltipplugin.rst | 60 +- .../zh_CN/class_editorsceneformatimporter.rst | 84 +- .../class_editorsceneformatimporterblend.rst | 20 +- .../class_editorsceneformatimporterfbx.rst | 20 +- .../class_editorsceneformatimportergltf.rst | 18 +- classes/zh_CN/class_editorscenepostimport.rst | 48 +- .../class_editorscenepostimportplugin.rst | 68 +- classes/zh_CN/class_editorscript.rst | 38 +- classes/zh_CN/class_editorscriptpicker.rst | 28 +- classes/zh_CN/class_editorselection.rst | 32 +- classes/zh_CN/class_editorsettings.rst | 124 +- classes/zh_CN/class_editorspinslider.rst | 36 +- .../zh_CN/class_editorsyntaxhighlighter.rst | 46 +- .../class_editortranslationparserplugin.rst | 44 +- classes/zh_CN/class_editorundoredomanager.rst | 36 +- classes/zh_CN/class_editorvcsinterface.rst | 212 +- classes/zh_CN/class_encodedobjectasid.rst | 28 +- classes/zh_CN/class_enetconnection.rst | 38 +- classes/zh_CN/class_enetmultiplayerpeer.rst | 40 +- classes/zh_CN/class_enetpacketpeer.rst | 40 +- classes/zh_CN/class_engine.rst | 38 +- classes/zh_CN/class_enginedebugger.rst | 28 +- classes/zh_CN/class_engineprofiler.rst | 48 +- classes/zh_CN/class_environment.rst | 54 +- classes/zh_CN/class_expression.rst | 32 +- classes/zh_CN/class_fastnoiselite.rst | 36 +- classes/zh_CN/class_fileaccess.rst | 106 +- classes/zh_CN/class_filedialog.rst | 56 +- classes/zh_CN/class_filesystemdock.rst | 32 +- classes/zh_CN/class_float.rst | 42 +- classes/zh_CN/class_flowcontainer.rst | 54 +- classes/zh_CN/class_fogmaterial.rst | 30 +- classes/zh_CN/class_fogvolume.rst | 36 +- classes/zh_CN/class_font.rst | 42 +- classes/zh_CN/class_fontfile.rst | 70 +- classes/zh_CN/class_fontvariation.rst | 40 +- classes/zh_CN/class_gdextension.rst | 40 +- classes/zh_CN/class_gdextensionmanager.rst | 59 +- classes/zh_CN/class_gdscript.rst | 32 +- classes/zh_CN/class_generic6dofjoint3d.rst | 112 +- classes/zh_CN/class_geometry2d.rst | 32 +- classes/zh_CN/class_geometry3d.rst | 34 +- classes/zh_CN/class_geometryinstance3d.rst | 48 +- classes/zh_CN/class_gltfaccessor.rst | 61 +- classes/zh_CN/class_gltfanimation.rst | 35 +- classes/zh_CN/class_gltfbufferview.rst | 43 +- classes/zh_CN/class_gltfcamera.rst | 42 +- classes/zh_CN/class_gltfdocument.rst | 130 +- classes/zh_CN/class_gltfdocumentextension.rst | 209 +- ...tfdocumentextensionconvertimportermesh.rst | 25 +- classes/zh_CN/class_gltflight.rst | 42 +- classes/zh_CN/class_gltfmesh.rst | 39 +- classes/zh_CN/class_gltfnode.rst | 42 +- classes/zh_CN/class_gltfphysicsbody.rst | 46 +- classes/zh_CN/class_gltfphysicsshape.rst | 42 +- classes/zh_CN/class_gltfskeleton.rst | 55 +- classes/zh_CN/class_gltfskin.rst | 67 +- classes/zh_CN/class_gltfspecgloss.rst | 34 +- classes/zh_CN/class_gltfstate.rst | 90 +- classes/zh_CN/class_gltftexture.rst | 33 +- classes/zh_CN/class_gltftexturesampler.rst | 35 +- classes/zh_CN/class_godotsharp.rst | 28 +- classes/zh_CN/class_gpuparticles2d.rst | 132 +- classes/zh_CN/class_gpuparticles3d.rst | 140 +- .../zh_CN/class_gpuparticlesattractor3d.rst | 34 +- .../class_gpuparticlesattractorbox3d.rst | 36 +- .../class_gpuparticlesattractorsphere3d.rst | 36 +- ...ass_gpuparticlesattractorvectorfield3d.rst | 38 +- .../zh_CN/class_gpuparticlescollision3d.rst | 44 +- .../class_gpuparticlescollisionbox3d.rst | 38 +- ...ass_gpuparticlescollisionheightfield3d.rst | 44 +- .../class_gpuparticlescollisionsdf3d.rst | 54 +- .../class_gpuparticlescollisionsphere3d.rst | 38 +- classes/zh_CN/class_gradient.rst | 50 +- classes/zh_CN/class_gradienttexture1d.rst | 32 +- classes/zh_CN/class_gradienttexture2d.rst | 36 +- classes/zh_CN/class_graphedit.rst | 256 ++- classes/zh_CN/class_graphelement.rst | 97 +- classes/zh_CN/class_graphnode.rst | 152 +- classes/zh_CN/class_gridcontainer.rst | 40 +- classes/zh_CN/class_gridmap.rst | 52 +- classes/zh_CN/class_groovejoint2d.rst | 28 +- classes/zh_CN/class_hashingcontext.rst | 32 +- classes/zh_CN/class_hboxcontainer.rst | 55 +- classes/zh_CN/class_heightmapshape3d.rst | 28 +- classes/zh_CN/class_hflowcontainer.rst | 67 +- classes/zh_CN/class_hingejoint3d.rst | 42 +- classes/zh_CN/class_hmaccontext.rst | 28 +- classes/zh_CN/class_hscrollbar.rst | 189 +- classes/zh_CN/class_hseparator.rst | 63 +- classes/zh_CN/class_hslider.rst | 161 +- classes/zh_CN/class_hsplitcontainer.rst | 95 +- classes/zh_CN/class_httpclient.rst | 50 +- classes/zh_CN/class_httprequest.rst | 56 +- classes/zh_CN/class_image.rst | 112 +- classes/zh_CN/class_imageformatloader.rst | 26 +- .../class_imageformatloaderextension.rst | 52 +- classes/zh_CN/class_imagetexture.rst | 36 +- classes/zh_CN/class_imagetexture3d.rst | 28 +- classes/zh_CN/class_imagetexturelayered.rst | 32 +- classes/zh_CN/class_immediatemesh.rst | 41 +- classes/zh_CN/class_importermesh.rst | 38 +- .../zh_CN/class_importermeshinstance3d.rst | 193 +- classes/zh_CN/class_input.rst | 92 +- classes/zh_CN/class_inputevent.rst | 44 +- classes/zh_CN/class_inputeventaction.rst | 34 +- classes/zh_CN/class_inputeventfromwindow.rst | 30 +- classes/zh_CN/class_inputeventgesture.rst | 36 +- .../zh_CN/class_inputeventjoypadbutton.rst | 32 +- .../zh_CN/class_inputeventjoypadmotion.rst | 32 +- classes/zh_CN/class_inputeventkey.rst | 69 +- .../zh_CN/class_inputeventmagnifygesture.rst | 34 +- classes/zh_CN/class_inputeventmidi.rst | 32 +- classes/zh_CN/class_inputeventmouse.rst | 42 +- classes/zh_CN/class_inputeventmousebutton.rst | 34 +- classes/zh_CN/class_inputeventmousemotion.rst | 34 +- classes/zh_CN/class_inputeventpangesture.rst | 34 +- classes/zh_CN/class_inputeventscreendrag.rst | 34 +- classes/zh_CN/class_inputeventscreentouch.rst | 32 +- classes/zh_CN/class_inputeventshortcut.rst | 30 +- .../zh_CN/class_inputeventwithmodifiers.rst | 50 +- classes/zh_CN/class_inputmap.rst | 34 +- classes/zh_CN/class_instanceplaceholder.rst | 28 +- classes/zh_CN/class_int.rst | 86 +- classes/zh_CN/class_intervaltweener.rst | 20 +- classes/zh_CN/class_ip.rst | 36 +- classes/zh_CN/class_itemlist.rst | 54 +- classes/zh_CN/class_javaclass.rst | 18 +- classes/zh_CN/class_javaclasswrapper.rst | 28 +- classes/zh_CN/class_javascriptbridge.rst | 36 +- classes/zh_CN/class_javascriptobject.rst | 20 +- classes/zh_CN/class_jnisingleton.rst | 24 +- classes/zh_CN/class_joint2d.rst | 42 +- classes/zh_CN/class_joint3d.rst | 44 +- classes/zh_CN/class_json.rst | 36 +- classes/zh_CN/class_jsonrpc.rst | 36 +- classes/zh_CN/class_kinematiccollision2d.rst | 28 +- classes/zh_CN/class_kinematiccollision3d.rst | 28 +- classes/zh_CN/class_label.rst | 50 +- classes/zh_CN/class_label3d.rst | 46 +- classes/zh_CN/class_labelsettings.rst | 28 +- classes/zh_CN/class_light2d.rst | 46 +- classes/zh_CN/class_light3d.rst | 54 +- classes/zh_CN/class_lightmapgi.rst | 105 +- classes/zh_CN/class_lightmapgidata.rst | 63 +- classes/zh_CN/class_lightmapper.rst | 22 +- classes/zh_CN/class_lightmapperrd.rst | 20 +- classes/zh_CN/class_lightmapprobe.rst | 20 +- classes/zh_CN/class_lightoccluder2d.rst | 36 +- classes/zh_CN/class_line2d.rst | 116 +- classes/zh_CN/class_lineedit.rst | 58 +- classes/zh_CN/class_linkbutton.rst | 112 +- classes/zh_CN/class_mainloop.rst | 68 +- classes/zh_CN/class_margincontainer.rst | 40 +- classes/zh_CN/class_marker2d.rst | 28 +- classes/zh_CN/class_marker3d.rst | 28 +- classes/zh_CN/class_marshalls.rst | 28 +- classes/zh_CN/class_material.rst | 112 +- classes/zh_CN/class_menubar.rst | 122 +- classes/zh_CN/class_menubutton.rst | 269 +-- classes/zh_CN/class_mesh.rst | 202 +- .../class_meshconvexdecompositionsettings.rst | 32 +- classes/zh_CN/class_meshdatatool.rst | 50 +- classes/zh_CN/class_meshinstance2d.rst | 36 +- classes/zh_CN/class_meshinstance3d.rst | 52 +- classes/zh_CN/class_meshlibrary.rst | 32 +- classes/zh_CN/class_meshtexture.rst | 28 +- classes/zh_CN/class_methodtweener.rst | 34 +- classes/zh_CN/class_missingnode.rst | 30 +- classes/zh_CN/class_missingresource.rst | 30 +- classes/zh_CN/class_mobilevrinterface.rst | 28 +- classes/zh_CN/class_moviewriter.rst | 84 +- classes/zh_CN/class_multimesh.rst | 46 +- classes/zh_CN/class_multimeshinstance2d.rst | 32 +- classes/zh_CN/class_multimeshinstance3d.rst | 32 +- classes/zh_CN/class_multiplayerapi.rst | 46 +- .../zh_CN/class_multiplayerapiextension.rst | 93 +- classes/zh_CN/class_multiplayerpeer.rst | 54 +- .../zh_CN/class_multiplayerpeerextension.rst | 172 +- classes/zh_CN/class_multiplayerspawner.rst | 40 +- .../zh_CN/class_multiplayersynchronizer.rst | 44 +- classes/zh_CN/class_mutex.rst | 32 +- classes/zh_CN/class_navigationagent2d.rst | 64 +- classes/zh_CN/class_navigationagent3d.rst | 99 +- classes/zh_CN/class_navigationlink2d.rst | 40 +- classes/zh_CN/class_navigationlink3d.rst | 40 +- classes/zh_CN/class_navigationmesh.rst | 50 +- .../zh_CN/class_navigationmeshgenerator.rst | 32 +- ...ass_navigationmeshsourcegeometrydata2d.rst | 157 ++ ...ass_navigationmeshsourcegeometrydata3d.rst | 32 +- classes/zh_CN/class_navigationobstacle2d.rst | 42 +- classes/zh_CN/class_navigationobstacle3d.rst | 42 +- .../class_navigationpathqueryparameters2d.rst | 38 +- .../class_navigationpathqueryparameters3d.rst | 38 +- .../class_navigationpathqueryresult2d.rst | 44 +- .../class_navigationpathqueryresult3d.rst | 44 +- classes/zh_CN/class_navigationpolygon.rst | 326 +++- classes/zh_CN/class_navigationregion2d.rst | 91 +- classes/zh_CN/class_navigationregion3d.rst | 52 +- classes/zh_CN/class_navigationserver2d.rst | 488 ++--- classes/zh_CN/class_navigationserver3d.rst | 78 +- classes/zh_CN/class_ninepatchrect.rst | 44 +- classes/zh_CN/class_node.rst | 280 +-- classes/zh_CN/class_node2d.rst | 52 +- classes/zh_CN/class_node3d.rst | 94 +- classes/zh_CN/class_node3dgizmo.rst | 29 +- classes/zh_CN/class_nodepath.rst | 86 +- classes/zh_CN/class_noise.rst | 36 +- classes/zh_CN/class_noisetexture2d.rst | 34 +- classes/zh_CN/class_noisetexture3d.rst | 34 +- classes/zh_CN/class_object.rst | 167 +- classes/zh_CN/class_occluder3d.rst | 36 +- classes/zh_CN/class_occluderinstance3d.rst | 54 +- classes/zh_CN/class_occluderpolygon2d.rst | 32 +- .../zh_CN/class_offlinemultiplayerpeer.rst | 20 +- classes/zh_CN/class_oggpacketsequence.rst | 36 +- .../zh_CN/class_oggpacketsequenceplayback.rst | 18 +- classes/zh_CN/class_omnilight3d.rst | 38 +- classes/zh_CN/class_openxraction.rst | 32 +- classes/zh_CN/class_openxractionmap.rst | 36 +- classes/zh_CN/class_openxractionset.rst | 36 +- classes/zh_CN/class_openxrapiextension.rst | 82 +- .../class_openxrextensionwrapperextension.rst | 228 +-- classes/zh_CN/class_openxrhand.rst | 32 +- .../zh_CN/class_openxrinteractionprofile.rst | 40 +- ...class_openxrinteractionprofilemetadata.rst | 46 +- classes/zh_CN/class_openxrinterface.rst | 344 +++- classes/zh_CN/class_openxripbinding.rst | 36 +- classes/zh_CN/class_optimizedtranslation.rst | 28 +- classes/zh_CN/class_optionbutton.rst | 352 +--- classes/zh_CN/class_ormmaterial3d.rst | 26 +- classes/zh_CN/class_os.rst | 102 +- classes/zh_CN/class_packedbytearray.rst | 58 +- classes/zh_CN/class_packedcolorarray.rst | 44 +- classes/zh_CN/class_packeddatacontainer.rst | 28 +- .../zh_CN/class_packeddatacontainerref.rst | 28 +- classes/zh_CN/class_packedfloat32array.rst | 44 +- classes/zh_CN/class_packedfloat64array.rst | 44 +- classes/zh_CN/class_packedint32array.rst | 44 +- classes/zh_CN/class_packedint64array.rst | 44 +- classes/zh_CN/class_packedscene.rst | 48 +- classes/zh_CN/class_packedstringarray.rst | 48 +- classes/zh_CN/class_packedvector2array.rst | 54 +- classes/zh_CN/class_packedvector3array.rst | 50 +- classes/zh_CN/class_packetpeer.rst | 40 +- classes/zh_CN/class_packetpeerdtls.rst | 32 +- classes/zh_CN/class_packetpeerextension.rst | 60 +- classes/zh_CN/class_packetpeerstream.rst | 32 +- classes/zh_CN/class_packetpeerudp.rst | 28 +- classes/zh_CN/class_panel.rst | 32 +- classes/zh_CN/class_panelcontainer.rst | 38 +- classes/zh_CN/class_panoramaskymaterial.rst | 36 +- classes/zh_CN/class_parallaxbackground.rst | 30 +- classes/zh_CN/class_parallaxlayer.rst | 28 +- .../zh_CN/class_particleprocessmaterial.rst | 473 ++++- classes/zh_CN/class_path2d.rst | 28 +- classes/zh_CN/class_path3d.rst | 34 +- classes/zh_CN/class_pathfollow2d.rst | 28 +- classes/zh_CN/class_pathfollow3d.rst | 40 +- classes/zh_CN/class_pckpacker.rst | 28 +- classes/zh_CN/class_performance.rst | 34 +- classes/zh_CN/class_physicalbone2d.rst | 36 +- classes/zh_CN/class_physicalbone3d.rst | 84 +- classes/zh_CN/class_physicalskymaterial.rst | 30 +- classes/zh_CN/class_physicsbody2d.rst | 42 +- classes/zh_CN/class_physicsbody3d.rst | 46 +- .../zh_CN/class_physicsdirectbodystate2d.rst | 44 +- ...lass_physicsdirectbodystate2dextension.rst | 382 ++-- .../zh_CN/class_physicsdirectbodystate3d.rst | 46 +- ...lass_physicsdirectbodystate3dextension.rst | 398 ++-- .../zh_CN/class_physicsdirectspacestate2d.rst | 34 +- ...ass_physicsdirectspacestate2dextension.rst | 84 +- .../zh_CN/class_physicsdirectspacestate3d.rst | 54 +- ...ass_physicsdirectspacestate3dextension.rst | 92 +- classes/zh_CN/class_physicsmaterial.rst | 28 +- .../class_physicspointqueryparameters2d.rst | 28 +- .../class_physicspointqueryparameters3d.rst | 28 +- .../class_physicsrayqueryparameters2d.rst | 36 +- .../class_physicsrayqueryparameters3d.rst | 36 +- classes/zh_CN/class_physicsserver2d.rst | 130 +- .../zh_CN/class_physicsserver2dextension.rst | 1162 +++++------ .../zh_CN/class_physicsserver2dmanager.rst | 28 +- classes/zh_CN/class_physicsserver3d.rst | 106 +- .../zh_CN/class_physicsserver3dextension.rst | 1546 +++++++-------- .../zh_CN/class_physicsserver3dmanager.rst | 28 +- ..._physicsserver3drenderingserverhandler.rst | 74 +- .../class_physicsshapequeryparameters2d.rst | 28 +- .../class_physicsshapequeryparameters3d.rst | 28 +- .../class_physicstestmotionparameters2d.rst | 28 +- .../class_physicstestmotionparameters3d.rst | 28 +- .../zh_CN/class_physicstestmotionresult2d.rst | 28 +- .../zh_CN/class_physicstestmotionresult3d.rst | 28 +- classes/zh_CN/class_pinjoint2d.rst | 129 +- classes/zh_CN/class_pinjoint3d.rst | 42 +- classes/zh_CN/class_placeholdercubemap.rst | 30 +- .../zh_CN/class_placeholdercubemaparray.rst | 30 +- classes/zh_CN/class_placeholdermaterial.rst | 20 +- classes/zh_CN/class_placeholdermesh.rst | 28 +- classes/zh_CN/class_placeholdertexture2d.rst | 28 +- .../zh_CN/class_placeholdertexture2darray.rst | 20 +- classes/zh_CN/class_placeholdertexture3d.rst | 28 +- .../zh_CN/class_placeholdertexturelayered.rst | 30 +- classes/zh_CN/class_plane.rst | 62 +- classes/zh_CN/class_planemesh.rst | 34 +- classes/zh_CN/class_pointlight2d.rst | 32 +- classes/zh_CN/class_pointmesh.rst | 20 +- classes/zh_CN/class_polygon2d.rst | 48 +- classes/zh_CN/class_polygonoccluder3d.rst | 34 +- classes/zh_CN/class_polygonpathfinder.rst | 42 +- classes/zh_CN/class_popup.rst | 59 +- classes/zh_CN/class_popupmenu.rst | 102 +- classes/zh_CN/class_popuppanel.rst | 49 +- .../class_portablecompressedtexture2d.rst | 42 +- classes/zh_CN/class_primitivemesh.rst | 52 +- classes/zh_CN/class_prismmesh.rst | 28 +- classes/zh_CN/class_proceduralskymaterial.rst | 36 +- classes/zh_CN/class_progressbar.rst | 54 +- classes/zh_CN/class_projection.rst | 56 +- classes/zh_CN/class_projectsettings.rst | 556 ++++-- classes/zh_CN/class_propertytweener.rst | 28 +- classes/zh_CN/class_quadmesh.rst | 28 +- classes/zh_CN/class_quadoccluder3d.rst | 34 +- classes/zh_CN/class_quaternion.rst | 70 +- classes/zh_CN/class_randomnumbergenerator.rst | 42 +- classes/zh_CN/class_range.rst | 62 +- classes/zh_CN/class_raycast2d.rst | 52 +- classes/zh_CN/class_raycast3d.rst | 56 +- classes/zh_CN/class_rdattachmentformat.rst | 28 +- classes/zh_CN/class_rdframebufferpass.rst | 32 +- .../zh_CN/class_rdpipelinecolorblendstate.rst | 28 +- ...ss_rdpipelinecolorblendstateattachment.rst | 36 +- .../class_rdpipelinedepthstencilstate.rst | 68 +- .../class_rdpipelinemultisamplestate.rst | 30 +- .../class_rdpipelinerasterizationstate.rst | 40 +- ...class_rdpipelinespecializationconstant.rst | 28 +- classes/zh_CN/class_rdsamplerstate.rst | 32 +- classes/zh_CN/class_rdshaderfile.rst | 36 +- classes/zh_CN/class_rdshadersource.rst | 36 +- classes/zh_CN/class_rdshaderspirv.rst | 40 +- classes/zh_CN/class_rdtextureformat.rst | 40 +- classes/zh_CN/class_rdtextureview.rst | 28 +- classes/zh_CN/class_rduniform.rst | 42 +- classes/zh_CN/class_rdvertexattribute.rst | 38 +- classes/zh_CN/class_rect2.rst | 152 +- classes/zh_CN/class_rect2i.rst | 140 +- classes/zh_CN/class_rectangleshape2d.rst | 34 +- classes/zh_CN/class_refcounted.rst | 38 +- classes/zh_CN/class_referencerect.rst | 28 +- classes/zh_CN/class_reflectionprobe.rst | 36 +- classes/zh_CN/class_regex.rst | 60 +- classes/zh_CN/class_regexmatch.rst | 36 +- classes/zh_CN/class_remotetransform2d.rst | 36 +- classes/zh_CN/class_remotetransform3d.rst | 36 +- classes/zh_CN/class_renderingdevice.rst | 126 +- classes/zh_CN/class_renderingserver.rst | 306 ++- classes/zh_CN/class_renderscenebuffers.rst | 38 +- .../class_renderscenebuffersconfiguration.rst | 50 +- .../class_renderscenebuffersextension.rst | 66 +- classes/zh_CN/class_renderscenebuffersrd.rst | 90 +- classes/zh_CN/class_resource.rst | 91 +- classes/zh_CN/class_resourceformatloader.rst | 108 +- classes/zh_CN/class_resourceformatsaver.rst | 64 +- classes/zh_CN/class_resourceimporter.rst | 30 +- .../zh_CN/class_resourceimporterbitmap.rst | 44 +- .../zh_CN/class_resourceimporterbmfont.rst | 70 +- .../class_resourceimportercsvtranslation.rst | 44 +- .../class_resourceimporterdynamicfont.rst | 100 +- classes/zh_CN/class_resourceimporterimage.rst | 28 +- .../zh_CN/class_resourceimporterimagefont.rst | 72 +- .../class_resourceimporterlayeredtexture.rst | 90 +- classes/zh_CN/class_resourceimportermp3.rst | 64 +- classes/zh_CN/class_resourceimporterobj.rst | 82 +- .../zh_CN/class_resourceimporteroggvorbis.rst | 76 +- classes/zh_CN/class_resourceimporterscene.rst | 100 +- .../class_resourceimportershaderfile.rst | 24 +- .../zh_CN/class_resourceimportertexture.rst | 140 +- .../class_resourceimportertextureatlas.rst | 48 +- classes/zh_CN/class_resourceimporterwav.rst | 76 +- classes/zh_CN/class_resourceloader.rst | 46 +- classes/zh_CN/class_resourcepreloader.rst | 28 +- classes/zh_CN/class_resourcesaver.rst | 36 +- classes/zh_CN/class_resourceuid.rst | 32 +- classes/zh_CN/class_ribbontrailmesh.rst | 36 +- classes/zh_CN/class_richtexteffect.rst | 40 +- classes/zh_CN/class_richtextlabel.rst | 448 +++-- classes/zh_CN/class_rid.rst | 44 +- classes/zh_CN/class_rigidbody2d.rst | 76 +- classes/zh_CN/class_rigidbody3d.rst | 76 +- classes/zh_CN/class_rootmotionview.rst | 38 +- classes/zh_CN/class_scenemultiplayer.rst | 40 +- .../zh_CN/class_scenereplicationconfig.rst | 56 +- classes/zh_CN/class_scenestate.rst | 32 +- classes/zh_CN/class_scenetree.rst | 86 +- classes/zh_CN/class_scenetreetimer.rst | 34 +- classes/zh_CN/class_script.rst | 56 +- classes/zh_CN/class_scriptcreatedialog.rst | 36 +- classes/zh_CN/class_scripteditor.rst | 32 +- classes/zh_CN/class_scripteditorbase.rst | 32 +- classes/zh_CN/class_scriptextension.rst | 322 ++-- classes/zh_CN/class_scriptlanguage.rst | 20 +- .../zh_CN/class_scriptlanguageextension.rst | 482 ++--- classes/zh_CN/class_scrollbar.rst | 203 +- classes/zh_CN/class_scrollcontainer.rst | 70 +- classes/zh_CN/class_segmentshape2d.rst | 28 +- classes/zh_CN/class_semaphore.rst | 32 +- classes/zh_CN/class_separationrayshape2d.rst | 30 +- classes/zh_CN/class_separationrayshape3d.rst | 30 +- classes/zh_CN/class_separator.rst | 65 +- classes/zh_CN/class_shader.rst | 46 +- classes/zh_CN/class_shaderglobalsoverride.rst | 28 +- classes/zh_CN/class_shaderinclude.rst | 32 +- classes/zh_CN/class_shadermaterial.rst | 48 +- classes/zh_CN/class_shape2d.rst | 42 +- classes/zh_CN/class_shape3d.rst | 42 +- classes/zh_CN/class_shapecast2d.rst | 40 +- classes/zh_CN/class_shapecast3d.rst | 42 +- classes/zh_CN/class_shortcut.rst | 36 +- classes/zh_CN/class_signal.rst | 48 +- classes/zh_CN/class_skeleton2d.rst | 36 +- classes/zh_CN/class_skeleton3d.rst | 88 +- classes/zh_CN/class_skeletonik3d.rst | 40 +- .../zh_CN/class_skeletonmodification2d.rst | 56 +- .../class_skeletonmodification2dccdik.rst | 36 +- .../class_skeletonmodification2dfabrik.rst | 36 +- .../class_skeletonmodification2djiggle.rst | 36 +- .../class_skeletonmodification2dlookat.rst | 36 +- ...ss_skeletonmodification2dphysicalbones.rst | 36 +- ...lass_skeletonmodification2dstackholder.rst | 28 +- .../class_skeletonmodification2dtwoboneik.rst | 36 +- .../class_skeletonmodificationstack2d.rst | 36 +- classes/zh_CN/class_skeletonprofile.rst | 50 +- .../zh_CN/class_skeletonprofilehumanoid.rst | 28 +- classes/zh_CN/class_skin.rst | 48 +- classes/zh_CN/class_skinreference.rst | 30 +- classes/zh_CN/class_sky.rst | 36 +- classes/zh_CN/class_slider.rst | 175 +- classes/zh_CN/class_sliderjoint3d.rst | 44 +- classes/zh_CN/class_softbody3d.rst | 54 +- classes/zh_CN/class_spheremesh.rst | 28 +- classes/zh_CN/class_sphereoccluder3d.rst | 34 +- classes/zh_CN/class_sphereshape3d.rst | 32 +- classes/zh_CN/class_spinbox.rst | 52 +- classes/zh_CN/class_splitcontainer.rst | 72 +- classes/zh_CN/class_spotlight3d.rst | 34 +- classes/zh_CN/class_springarm3d.rst | 38 +- classes/zh_CN/class_sprite2d.rst | 44 +- classes/zh_CN/class_sprite3d.rst | 32 +- classes/zh_CN/class_spritebase3d.rst | 42 +- classes/zh_CN/class_spriteframes.rst | 28 +- classes/zh_CN/class_standardmaterial3d.rst | 26 +- classes/zh_CN/class_staticbody2d.rst | 36 +- classes/zh_CN/class_staticbody3d.rst | 40 +- classes/zh_CN/class_streampeer.rst | 38 +- classes/zh_CN/class_streampeerbuffer.rst | 36 +- classes/zh_CN/class_streampeerextension.rst | 68 +- classes/zh_CN/class_streampeergzip.rst | 28 +- classes/zh_CN/class_streampeertcp.rst | 32 +- classes/zh_CN/class_streampeertls.rst | 36 +- classes/zh_CN/class_string.rst | 60 +- classes/zh_CN/class_stringname.rst | 44 +- classes/zh_CN/class_stylebox.rst | 120 +- classes/zh_CN/class_styleboxempty.rst | 20 +- classes/zh_CN/class_styleboxflat.rst | 36 +- classes/zh_CN/class_styleboxline.rst | 28 +- classes/zh_CN/class_styleboxtexture.rst | 40 +- classes/zh_CN/class_subviewport.rst | 36 +- classes/zh_CN/class_subviewportcontainer.rst | 57 +- classes/zh_CN/class_surfacetool.rst | 38 +- classes/zh_CN/class_syntaxhighlighter.rst | 72 +- classes/zh_CN/class_systemfont.rst | 28 +- classes/zh_CN/class_tabbar.rst | 148 +- classes/zh_CN/class_tabcontainer.rst | 133 +- classes/zh_CN/class_tcpserver.rst | 28 +- classes/zh_CN/class_textedit.rst | 92 +- classes/zh_CN/class_textline.rst | 36 +- classes/zh_CN/class_textmesh.rst | 34 +- classes/zh_CN/class_textparagraph.rst | 36 +- classes/zh_CN/class_textserver.rst | 138 +- classes/zh_CN/class_textserveradvanced.rst | 20 +- classes/zh_CN/class_textserverdummy.rst | 20 +- classes/zh_CN/class_textserverextension.rst | 1704 +++++++++-------- classes/zh_CN/class_textserverfallback.rst | 20 +- classes/zh_CN/class_textservermanager.rst | 32 +- classes/zh_CN/class_texture.rst | 22 +- classes/zh_CN/class_texture2d.rst | 58 +- classes/zh_CN/class_texture2darray.rst | 28 +- classes/zh_CN/class_texture2darrayrd.rst | 24 +- classes/zh_CN/class_texture2drd.rst | 34 +- classes/zh_CN/class_texture3d.rst | 96 +- classes/zh_CN/class_texture3drd.rst | 34 +- classes/zh_CN/class_texturebutton.rst | 36 +- classes/zh_CN/class_texturecubemaparrayrd.rst | 24 +- classes/zh_CN/class_texturecubemaprd.rst | 24 +- classes/zh_CN/class_texturelayered.rst | 106 +- classes/zh_CN/class_texturelayeredrd.rst | 36 +- classes/zh_CN/class_textureprogressbar.rst | 46 +- classes/zh_CN/class_texturerect.rst | 36 +- classes/zh_CN/class_theme.rst | 44 +- classes/zh_CN/class_themedb.rst | 40 +- classes/zh_CN/class_thread.rst | 48 +- classes/zh_CN/class_tiledata.rst | 42 +- classes/zh_CN/class_tilemap.rst | 246 +-- classes/zh_CN/class_tilemappattern.rst | 30 +- classes/zh_CN/class_tileset.rst | 64 +- classes/zh_CN/class_tilesetatlassource.rst | 68 +- .../class_tilesetscenescollectionsource.rst | 28 +- classes/zh_CN/class_tilesetsource.rst | 30 +- classes/zh_CN/class_time.rst | 38 +- classes/zh_CN/class_timer.rst | 48 +- classes/zh_CN/class_tlsoptions.rst | 28 +- classes/zh_CN/class_torusmesh.rst | 28 +- classes/zh_CN/class_touchscreenbutton.rst | 44 +- classes/zh_CN/class_transform2d.rst | 96 +- classes/zh_CN/class_transform3d.rst | 70 +- classes/zh_CN/class_translation.rst | 88 +- classes/zh_CN/class_translationserver.rst | 40 +- classes/zh_CN/class_tree.rst | 68 +- classes/zh_CN/class_treeitem.rst | 60 +- classes/zh_CN/class_trianglemesh.rst | 20 +- classes/zh_CN/class_tubetrailmesh.rst | 32 +- classes/zh_CN/class_tween.rst | 92 +- classes/zh_CN/class_tweener.rst | 26 +- classes/zh_CN/class_udpserver.rst | 40 +- classes/zh_CN/class_undoredo.rst | 36 +- classes/zh_CN/class_upnp.rst | 40 +- classes/zh_CN/class_upnpdevice.rst | 40 +- classes/zh_CN/class_variant.rst | 30 +- classes/zh_CN/class_vboxcontainer.rst | 55 +- classes/zh_CN/class_vector2.rst | 84 +- classes/zh_CN/class_vector2i.rst | 62 +- classes/zh_CN/class_vector3.rst | 76 +- classes/zh_CN/class_vector3i.rst | 62 +- classes/zh_CN/class_vector4.rst | 60 +- classes/zh_CN/class_vector4i.rst | 58 +- classes/zh_CN/class_vehiclebody3d.rst | 32 +- classes/zh_CN/class_vehiclewheel3d.rst | 40 +- classes/zh_CN/class_vflowcontainer.rst | 67 +- classes/zh_CN/class_videostream.rst | 54 +- classes/zh_CN/class_videostreamplayback.rst | 94 +- classes/zh_CN/class_videostreamplayer.rst | 52 +- classes/zh_CN/class_videostreamtheora.rst | 20 +- classes/zh_CN/class_viewport.rst | 158 +- classes/zh_CN/class_viewporttexture.rst | 38 +- .../zh_CN/class_visibleonscreenenabler2d.rst | 44 +- .../zh_CN/class_visibleonscreenenabler3d.rst | 56 +- .../zh_CN/class_visibleonscreennotifier2d.rst | 56 +- .../zh_CN/class_visibleonscreennotifier3d.rst | 58 +- classes/zh_CN/class_visualinstance3d.rst | 44 +- classes/zh_CN/class_visualshader.rst | 52 +- classes/zh_CN/class_visualshadernode.rst | 54 +- .../zh_CN/class_visualshadernodebillboard.rst | 32 +- .../class_visualshadernodebooleanconstant.rst | 28 +- ...class_visualshadernodebooleanparameter.rst | 28 +- classes/zh_CN/class_visualshadernodeclamp.rst | 32 +- .../class_visualshadernodecolorconstant.rst | 28 +- .../zh_CN/class_visualshadernodecolorfunc.rst | 32 +- .../zh_CN/class_visualshadernodecolorop.rst | 32 +- .../class_visualshadernodecolorparameter.rst | 28 +- .../zh_CN/class_visualshadernodecomment.rst | 28 +- .../zh_CN/class_visualshadernodecompare.rst | 32 +- .../zh_CN/class_visualshadernodeconstant.rst | 22 +- .../zh_CN/class_visualshadernodecubemap.rst | 32 +- ...class_visualshadernodecubemapparameter.rst | 20 +- .../class_visualshadernodecurvetexture.rst | 28 +- .../class_visualshadernodecurvexyztexture.rst | 28 +- .../zh_CN/class_visualshadernodecustom.rst | 232 ++- .../class_visualshadernodederivativefunc.rst | 32 +- .../class_visualshadernodedeterminant.rst | 20 +- .../class_visualshadernodedistancefade.rst | 20 +- .../class_visualshadernodedotproduct.rst | 20 +- .../class_visualshadernodeexpression.rst | 30 +- .../class_visualshadernodefaceforward.rst | 20 +- .../class_visualshadernodefloatconstant.rst | 28 +- .../zh_CN/class_visualshadernodefloatfunc.rst | 32 +- .../zh_CN/class_visualshadernodefloatop.rst | 32 +- .../class_visualshadernodefloatparameter.rst | 32 +- .../zh_CN/class_visualshadernodefresnel.rst | 20 +- ...class_visualshadernodeglobalexpression.rst | 20 +- .../zh_CN/class_visualshadernodegroupbase.rst | 30 +- classes/zh_CN/class_visualshadernodeif.rst | 24 +- classes/zh_CN/class_visualshadernodeinput.rst | 44 +- .../class_visualshadernodeintconstant.rst | 28 +- .../zh_CN/class_visualshadernodeintfunc.rst | 32 +- classes/zh_CN/class_visualshadernodeintop.rst | 32 +- .../class_visualshadernodeintparameter.rst | 32 +- classes/zh_CN/class_visualshadernodeis.rst | 32 +- ...class_visualshadernodelinearscenedepth.rst | 20 +- classes/zh_CN/class_visualshadernodemix.rst | 32 +- .../class_visualshadernodemultiplyadd.rst | 32 +- .../class_visualshadernodeouterproduct.rst | 20 +- .../zh_CN/class_visualshadernodeoutput.rst | 22 +- .../zh_CN/class_visualshadernodeparameter.rst | 34 +- .../class_visualshadernodeparameterref.rst | 28 +- ...ss_visualshadernodeparticleaccelerator.rst | 32 +- ...ass_visualshadernodeparticleboxemitter.rst | 20 +- ...s_visualshadernodeparticleconevelocity.rst | 20 +- .../class_visualshadernodeparticleemit.rst | 32 +- .../class_visualshadernodeparticleemitter.rst | 30 +- ...ss_visualshadernodeparticlemeshemitter.rst | 28 +- ...lshadernodeparticlemultiplybyaxisangle.rst | 28 +- .../class_visualshadernodeparticleoutput.rst | 20 +- ...ass_visualshadernodeparticlerandomness.rst | 32 +- ...ss_visualshadernodeparticleringemitter.rst | 20 +- ..._visualshadernodeparticlesphereemitter.rst | 20 +- .../class_visualshadernodeproximityfade.rst | 20 +- .../class_visualshadernoderandomrange.rst | 20 +- classes/zh_CN/class_visualshadernoderemap.rst | 20 +- .../class_visualshadernoderesizablebase.rst | 30 +- .../class_visualshadernoderotationbyaxis.rst | 24 +- .../zh_CN/class_visualshadernodesample3d.rst | 34 +- ...visualshadernodescreennormalworldspace.rst | 24 +- .../class_visualshadernodescreenuvtosdf.rst | 20 +- .../class_visualshadernodesdfraymarch.rst | 20 +- .../class_visualshadernodesdftoscreenuv.rst | 20 +- .../class_visualshadernodesmoothstep.rst | 32 +- classes/zh_CN/class_visualshadernodestep.rst | 32 +- .../zh_CN/class_visualshadernodeswitch.rst | 34 +- .../zh_CN/class_visualshadernodetexture.rst | 32 +- .../class_visualshadernodetexture2darray.rst | 28 +- ...isualshadernodetexture2darrayparameter.rst | 20 +- ...ass_visualshadernodetexture2dparameter.rst | 20 +- .../zh_CN/class_visualshadernodetexture3d.rst | 28 +- ...ass_visualshadernodetexture3dparameter.rst | 20 +- ...class_visualshadernodetextureparameter.rst | 34 +- ...ualshadernodetextureparametertriplanar.rst | 20 +- .../class_visualshadernodetexturesdf.rst | 20 +- ...class_visualshadernodetexturesdfnormal.rst | 20 +- ...class_visualshadernodetransformcompose.rst | 20 +- ...lass_visualshadernodetransformconstant.rst | 28 +- ...ass_visualshadernodetransformdecompose.rst | 20 +- .../class_visualshadernodetransformfunc.rst | 32 +- .../class_visualshadernodetransformop.rst | 32 +- ...ass_visualshadernodetransformparameter.rst | 28 +- ...class_visualshadernodetransformvecmult.rst | 32 +- .../class_visualshadernodeuintconstant.rst | 28 +- .../zh_CN/class_visualshadernodeuintfunc.rst | 32 +- .../zh_CN/class_visualshadernodeuintop.rst | 32 +- .../class_visualshadernodeuintparameter.rst | 28 +- .../zh_CN/class_visualshadernodeuvfunc.rst | 32 +- .../class_visualshadernodeuvpolarcoord.rst | 20 +- .../zh_CN/class_visualshadernodevarying.rst | 30 +- .../class_visualshadernodevaryinggetter.rst | 20 +- .../class_visualshadernodevaryingsetter.rst | 20 +- .../class_visualshadernodevec2constant.rst | 28 +- .../class_visualshadernodevec2parameter.rst | 28 +- .../class_visualshadernodevec3constant.rst | 28 +- .../class_visualshadernodevec3parameter.rst | 28 +- .../class_visualshadernodevec4constant.rst | 28 +- .../class_visualshadernodevec4parameter.rst | 28 +- .../class_visualshadernodevectorbase.rst | 34 +- .../class_visualshadernodevectorcompose.rst | 20 +- .../class_visualshadernodevectordecompose.rst | 20 +- .../class_visualshadernodevectordistance.rst | 20 +- .../class_visualshadernodevectorfunc.rst | 32 +- .../zh_CN/class_visualshadernodevectorlen.rst | 20 +- .../zh_CN/class_visualshadernodevectorop.rst | 32 +- .../class_visualshadernodevectorrefract.rst | 20 +- ...visualshadernodeworldpositionfromdepth.rst | 24 +- classes/zh_CN/class_voxelgi.rst | 46 +- classes/zh_CN/class_voxelgidata.rst | 52 +- classes/zh_CN/class_vscrollbar.rst | 193 +- classes/zh_CN/class_vseparator.rst | 63 +- classes/zh_CN/class_vslider.rst | 165 +- classes/zh_CN/class_vsplitcontainer.rst | 95 +- classes/zh_CN/class_weakref.rst | 28 +- classes/zh_CN/class_webrtcdatachannel.rst | 40 +- .../class_webrtcdatachannelextension.rst | 172 +- classes/zh_CN/class_webrtcmultiplayerpeer.rst | 28 +- classes/zh_CN/class_webrtcpeerconnection.rst | 52 +- .../class_webrtcpeerconnectionextension.rst | 116 +- .../zh_CN/class_websocketmultiplayerpeer.rst | 36 +- classes/zh_CN/class_websocketpeer.rst | 40 +- classes/zh_CN/class_webxrinterface.rst | 48 +- classes/zh_CN/class_window.rst | 125 +- classes/zh_CN/class_workerthreadpool.rst | 32 +- classes/zh_CN/class_world2d.rst | 34 +- classes/zh_CN/class_world3d.rst | 34 +- classes/zh_CN/class_worldboundaryshape2d.rst | 30 +- classes/zh_CN/class_worldboundaryshape3d.rst | 28 +- classes/zh_CN/class_worldenvironment.rst | 32 +- classes/zh_CN/class_x509certificate.rst | 34 +- classes/zh_CN/class_xmlparser.rst | 92 +- classes/zh_CN/class_xranchor3d.rst | 32 +- classes/zh_CN/class_xrcamera3d.rst | 24 +- classes/zh_CN/class_xrcontroller3d.rst | 36 +- classes/zh_CN/class_xrinterface.rst | 52 +- classes/zh_CN/class_xrinterfaceextension.rst | 166 +- classes/zh_CN/class_xrnode3d.rst | 48 +- classes/zh_CN/class_xrorigin3d.rst | 32 +- classes/zh_CN/class_xrpose.rst | 44 +- classes/zh_CN/class_xrpositionaltracker.rst | 50 +- classes/zh_CN/class_xrserver.rst | 48 +- classes/zh_CN/class_zippacker.rst | 32 +- classes/zh_CN/class_zipreader.rst | 32 +- classes/zh_CN/index.rst | 7 +- 919 files changed, 29328 insertions(+), 27556 deletions(-) create mode 100644 classes/zh_CN/class_animationmixer.rst create mode 100644 classes/zh_CN/class_navigationmeshsourcegeometrydata2d.rst diff --git a/classes/zh_CN/class_@gdscript.rst b/classes/zh_CN/class_@gdscript.rst index 0c7280cb47..6539f2983a 100644 --- a/classes/zh_CN/class_@gdscript.rst +++ b/classes/zh_CN/class_@gdscript.rst @@ -14,8 +14,8 @@ .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- GDScript 专用的实用函数及注解列表,可在任何脚本中访问。 @@ -23,15 +23,15 @@ GDScript 专用的实用函数及注解列表,可在任何脚本中访问。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`GDScript的导出 <../tutorials/scripting/gdscript/gdscript_exports>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -74,8 +74,8 @@ Methods .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_@GDScript_constant_PI: @@ -126,14 +126,41 @@ Annotations **@export** **(** **)** -将以下属性标记为导出的(可在检查器窗口中进行编辑并保存到磁盘)。使用类型提示控制导出属性的类型。 +将后续的属性标记为导出属性(可以在检查器面板中编辑并保存至磁盘)。要控制导出属性的类型,请使用类型提示标记。 :: + extends Node + + enum Direction {LEFT, RIGHT, UP, DOWN} + + # 内置类型。 @export var string = "" @export var int_number = 5 @export var float_number: float = 5 - @export var image : Image + + # 枚举。 + @export var type: Variant.Type + @export var format: Image.Format + @export var direction: Direction + + # 资源。 + @export var image: Image + @export var custom_resource: CustomResource + + # 节点。 + @export var node: Node + @export var custom_node: CustomNode + + # 类型数组。 + @export var int_array: Array[int] + @export var direction_array: Array[Direction] + @export var image_array: Array[Image] + @export var node_array: Array[Node] + +\ **注意:**\ 自定义资源和自定义节点必须使用 ``class_name`` 注册为全局类。 + +\ **注意:**\ 节点的导出只有派生自 :ref:`Node` 的类才支持,并且还有一些其他限制。 .. rst-class:: classref-item-separator @@ -145,17 +172,17 @@ Annotations **@export_category** **(** :ref:`String` name **)** -为以下导出的属性定义一个新类别。这有助于在检查器面板中组织属性。 +为后续导出属性定义一个新类别。方便在检查器面板中组织属性。 -另请参见 :ref:`@GlobalScope.PROPERTY_USAGE_CATEGORY`\ 。 +另见 :ref:`@GlobalScope.PROPERTY_USAGE_CATEGORY`\ 。 :: - @export_category("My Properties") - @export var number = 3 - @export var string = "" + @export_category("Statistics") + @export var hp = 30 + @export var speed = 1.25 -\ **注意:**\ 检查器面板中的列表通常会按类别将来自不同类(如Node、Node2D、Sprite等)的属性分隔开来。详情请参阅 :ref:`@export_group` 和 :ref:`@export_subgroup`\ 。 +\ **注意:**\ 检查器面板中的列表通常会按类别将来自不同类(如 Node、Node2D、Sprite 等)的属性分隔开来。为了更明确,推荐改用 :ref:`@export_group` 和 :ref:`@export_subgroup`\ 。 .. rst-class:: classref-item-separator @@ -185,9 +212,9 @@ Annotations **@export_dir** **(** **)** -将 :ref:`String` 属性作为目录路径导出。该路径仅限于项目文件夹及其子文件夹。请参阅 :ref:`@export_global_dir`\ ,以允许从整个文件系统中进行选择。 +将 :ref:`String` 属性作为目录路径导出。该路径仅限于项目文件夹及其子文件夹。要允许在整个文件系统中进行选择,见 :ref:`@export_global_dir`\ 。 -另请参见 :ref:`@GlobalScope.PROPERTY_HINT_DIR`\ 。 +另见 :ref:`@GlobalScope.PROPERTY_HINT_DIR`\ 。 :: @@ -460,11 +487,11 @@ Annotations **@export_global_file** **(** :ref:`String` filter="", ... **)** |vararg| -将 :ref:`String` 属性作为文件路径导出。该路径可以从整个文件系统中选择。请参阅 :ref:`@export_file`\ ,以将其限制为项目文件夹及其子文件夹。 +将 :ref:`String` 属性作为文件路径导出。该路径可以在整个文件系统中进行选择。要将其限制为项目文件夹及其子文件夹,见 :ref:`@export_file`\ 。 如果提供了 ``filter``\ ,则只有匹配的文件可供选择。 -另请参见 :ref:`@GlobalScope.PROPERTY_HINT_GLOBAL_FILE`\ 。 +另见 :ref:`@GlobalScope.PROPERTY_HINT_GLOBAL_FILE`\ 。 :: @@ -530,15 +557,15 @@ Annotations **@export_node_path** **(** :ref:`String` type="", ... **)** |vararg| -Export a :ref:`NodePath` property with a filter for allowed node types. +导出具有过滤器,并允许节点类型为 :ref:`NodePath` 的属性。 -See also :ref:`@GlobalScope.PROPERTY_HINT_NODE_PATH_VALID_TYPES`. +参见 :ref:`@GlobalScope.PROPERTY_HINT_NODE_PATH_VALID_TYPES`\ 。 :: @export_node_path("Button", "TouchScreenButton") var some_button -\ **Note:** The type must be a native class or a globally registered script (using the ``class_name`` keyword) that inherits :ref:`Node`. +\ **注意:** 类型必须是本地类或全局注册的脚本(使用\ ``[class_name]``\ 关键字)且继承自 :ref:`Node` 。 .. rst-class:: classref-item-separator @@ -568,11 +595,11 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_NODE_PATH_VALID_TYPES` min, :ref:`float` max, :ref:`float` step=1.0, :ref:`String` extra_hints="", ... **)** |vararg| -将一个\ :ref:`int`\ 或\ :ref:`float`\ 属性导出为一个范围值。范围必须由 ``min`` 和 ``max`` 定义,以及一个可选的 ``step`` 和各种额外的提示。对于整数属性,\ ``step`` 的默认值是 ``1`` 。对于浮点数,这个值取决于你的 ``EditorSettings.interface/inspector/default_float_step`` 设置。 +将 :ref:`int` 或 :ref:`float` 属性导出为范围值。范围必须由 ``min`` 和 ``max`` 定义,还有一个可选的 ``step`` 和各种额外的提示。对于整数属性,\ ``step`` 的默认值是 ``1`` 。对于浮点数,这个值取决于你的 ``EditorSettings.interface/inspector/default_float_step`` 设置。 如果提供了提示 ``"or_greater"`` 和 ``"or_less"`` ,那么编辑器部件将不会在范围边界处对数值进行限制。\ ``"exp"`` 提示将使范围内的编辑值以指数形式变化。\ ``"hide_slider"`` 提示将隐藏编辑器部件中的滑块。 -提示还允许指示编辑的值的单位。使用 ``"radians"`` ,你可以指定实际值以弧度为单位,但在检查器中会以角度为单位显示。\ ``"degrees"`` 允许添加一个角度符号作为单位后缀。最后,可以使用 ``"suffix:单位"`` 提供一个自定义后缀,其中“单位”可以是任何字符串。 +提示还允许指示编辑的值的单位。使用 ``"radians_as_degrees"`` ,你可以指定实际值以弧度为单位,但在检查器中会以角度为单位显示(范围值也使用度数)。\ ``"degrees"`` 允许添加一个角度符号作为单位后缀。最后,可以使用 ``"suffix:单位"`` 提供一个自定义后缀,其中“单位”可以是任何字符串。 另见 :ref:`@GlobalScope.PROPERTY_HINT_RANGE`\ 。 @@ -585,9 +612,9 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_NODE_PATH_VALID_TYPES` icon_path **)** -Add a custom icon to the current script. The icon specified at ``icon_path`` is displayed in the Scene dock for every node of that class, as well as in various editor dialogs. +为当前脚本添加自定义图标。\ ``icon_path`` 所指定的图标会在“场景”面板中该类的所有节点上显示,也会显示在各种编辑器对话框中。 :: @icon("res://path/to/class/icon.svg") -\ **Note:** Only the script can have a custom icon. Inner classes are not supported. +\ **注意:**\ 只有脚本可以有自定义的图标。不支持内部类。 -\ **Note:** As annotations describe their subject, the ``@icon`` annotation must be placed before the class definition and inheritance. +\ **注意:**\ 由于注解描述的是它们的对象,\ :ref:`@icon` 注解必须放在类定义和继承之前。 -\ **Note:** Unlike other annotations, the argument of the ``@icon`` annotation must be a string literal (constant expressions are not supported). +\ **注意:**\ 不同于其他注解,\ :ref:`@icon` 注解的参数必须是字符串字面量(不支持常量表达式)。 .. rst-class:: classref-item-separator @@ -647,7 +674,7 @@ Add a custom icon to the current script. The icon specified at ``icon_path`` is **@onready** **(** **)** -标记后续属性会在 :ref:`Node` 的就绪状态时赋值。节点初始化(\ :ref:`Object._init`\ )时不会立即对这些属性赋值,而是会在即将调用 :ref:`Node._ready` 之前进行计算和保存。 +标记后续属性会在 :ref:`Node` 的就绪状态时赋值。节点初始化(\ :ref:`Object._init`\ )时不会立即对这些属性赋值,而是会在即将调用 :ref:`Node._ready` 之前进行计算和保存。 :: @@ -663,17 +690,17 @@ Add a custom icon to the current script. The icon specified at ``icon_path`` is **@rpc** **(** :ref:`String` mode="authority", :ref:`String` sync="call_remote", :ref:`String` transfer_mode="unreliable", :ref:`int` transfer_channel=0 **)** -Mark the following method for remote procedure calls. See :doc:`High-level multiplayer <../tutorials/networking/high_level_multiplayer>`. +将后续方法标记为远程过程调用。见\ :doc:`《高阶多人游戏》 <../tutorials/networking/high_level_multiplayer>`\ 。 -If ``mode`` is set as ``"any_peer"``, allows any peer to call this RPC function. Otherwise, only the authority peer is allowed to call it and ``mode`` should be kept as ``"authority"``. When configuring functions as RPCs with :ref:`Node.rpc_config`, each of these modes respectively corresponds to the :ref:`MultiplayerAPI.RPC_MODE_AUTHORITY` and :ref:`MultiplayerAPI.RPC_MODE_ANY_PEER` RPC modes. See :ref:`RPCMode`. If a peer that is not the authority tries to call a function that is only allowed for the authority, the function will not be executed. If the error can be detected locally (when the RPC configuration is consistent between the local and the remote peer), an error message will be displayed on the sender peer. Otherwise, the remote peer will detect the error and print an error there. +如果将 ``mode`` 设为 ``"any_peer"``\ ,则会允许所有对等体调用该 RPC 函数。否则就只允许该对等体的控制方调用,此时应该让 ``mode`` 保持为 ``"authority"``\ 。使用 :ref:`Node.rpc_config` 将函数配置为 RPC 时,这些模式对应的是 RPC 模式 :ref:`MultiplayerAPI.RPC_MODE_AUTHORITY` 和 :ref:`MultiplayerAPI.RPC_MODE_ANY_PEER`\ 。如果非控制方的对等体尝试调用仅限控制方调用的函数,则不会执行该函数。如果本地能够检测到错误(本地与远程对等体的 RPC 配置一致),则发送方对等体会显示错误消息。否则远程对等体会检测到该错误并输出错误。 -If ``sync`` is set as ``"call_remote"``, the function will only be executed on the remote peer, but not locally. To run this function locally too, set ``sync`` to ``"call_local"``. When configuring functions as RPCs with :ref:`Node.rpc_config`, this is equivalent to setting ``call_local`` to ``true``. +如果将 ``sync`` 设为 ``"call_remote"``\ ,则该函数只会在远程对等体上执行,不会在本地执行。要让这个函数在本地也执行,请将 ``sync`` 设置为 ``"call_local"``\ 。使用 :ref:`Node.rpc_config` 将函数配置为 RPC 时,等价于将 ``call_local`` 设置为 ``true``\ 。 -The ``transfer_mode`` accepted values are ``"unreliable"``, ``"unreliable_ordered"``, or ``"reliable"``. It sets the transfer mode of the underlying :ref:`MultiplayerPeer`. See :ref:`MultiplayerPeer.transfer_mode`. +\ ``transfer_mode`` 能够接受的值为 ``"unreliable"``\ 、\ ``"unreliable_ordered"``\ 、\ ``"reliable"``\ ,会设置底层 :ref:`MultiplayerPeer` 的传输模式。见 :ref:`MultiplayerPeer.transfer_mode`\ 。 -The ``transfer_channel`` defines the channel of the underlying :ref:`MultiplayerPeer`. See :ref:`MultiplayerPeer.transfer_channel`. +\ ``transfer_channel`` 定义的是底层 :ref:`MultiplayerPeer` 的通道。见 :ref:`MultiplayerPeer.transfer_channel`\ 。 -The order of ``mode``, ``sync`` and ``transfer_mode`` does not matter, but values related to the same argument must not be used more than once. ``transfer_channel`` always has to be the 4th argument (you must specify 3 preceding arguments). +\ ``mode``\ 、\ ``sync`` 和 ``transfer_mode`` 的顺序是无关的,但是相同参数的取值不能出现多次。\ ``transfer_channel`` 必须始终为第四个参数(前三个参数必须指定)。 :: @@ -683,7 +710,7 @@ The order of ``mode``, ``sync`` and ``transfer_mode`` does not matter, but value @rpc("any_peer", "unreliable_ordered") func fn_update_pos(): pass - @rpc("authority", "call_remote", "unreliable", 0) # Equivalent to @rpc + @rpc("authority", "call_remote", "unreliable", 0) # 等价于 @rpc func fn_default(): pass .. rst-class:: classref-item-separator @@ -715,7 +742,7 @@ The order of ``mode``, ``sync`` and ``transfer_mode`` does not matter, but value @tool extends Node -\ **注意:**\ 因为注解描述对象的关系,必须把 ``@tool`` 注解放在类定义和继承之前。 +\ **注意:**\ 因为注解描述对象的关系,必须把 :ref:`@tool` 注解放在类定义和继承之前。 .. rst-class:: classref-item-separator @@ -743,8 +770,8 @@ The order of ``mode``, ``sync`` and ``transfer_mode`` does not matter, but value .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_@GDScript_method_Color8: @@ -815,18 +842,18 @@ void **assert** **(** :ref:`bool` condition, :ref:`String` **convert** **(** :ref:`Variant` what, :ref:`int` type **)** -*Deprecated.* Use :ref:`@GlobalScope.type_convert` instead. +*已弃用。*\ 请改用 :ref:`@GlobalScope.type_convert`\ 。 -Converts ``what`` to ``type`` in the best way possible. The ``type`` uses the :ref:`Variant.Type` values. +在可能的情况下将 ``what`` 转换为 ``type`` 。 ``type`` 使用 :ref:`Variant.Type` 值。 :: var a = [4, 2.5, 1.2] - print(a is Array) # Prints true + print(a is Array) # 输出 true var b = convert(a, TYPE_PACKED_BYTE_ARRAY) - print(b) # Prints [4, 2, 1] - print(b is Array) # Prints false + print(b) # 输出 [4, 2, 1] + print(b is Array) # 输出 false .. rst-class:: classref-item-separator @@ -1123,10 +1150,10 @@ void **print_stack** **(** **)** type_exists("Sprite2D") # 返回 true type_exists("NonExistentClass") # 返回 false -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_@globalscope.rst b/classes/zh_CN/class_@globalscope.rst index 0e792c60d9..783d44741c 100644 --- a/classes/zh_CN/class_@globalscope.rst +++ b/classes/zh_CN/class_@globalscope.rst @@ -14,8 +14,8 @@ .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 全局范围的枚举常量和内置函数的列表。这是所有驻留在全局的,关于错误代码、键码、属性提示等的常量。 @@ -25,19 +25,19 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`随机数生成 <../tutorials/math/random_number_generation>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -120,8 +120,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -137,6 +137,8 @@ Methods +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`acosh` **(** :ref:`float` x **)** | +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angle_difference` **(** :ref:`float` from, :ref:`float` to **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`asin` **(** :ref:`float` x **)** | +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`asinh` **(** :ref:`float` x **)** | @@ -293,6 +295,8 @@ Methods +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`rid_from_int64` **(** :ref:`int` base **)** | +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rotate_toward` **(** :ref:`float` from, :ref:`float` to, :ref:`float` delta **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`round` **(** :ref:`Variant` x **)** | +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`roundf` **(** :ref:`float` x **)** | @@ -333,6 +337,8 @@ Methods +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`type_convert` **(** :ref:`Variant` variant, :ref:`int` type **)** | +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`type_string` **(** :ref:`int` type **)** | + +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`typeof` **(** :ref:`Variant` variable **)** | +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedByteArray` | :ref:`var_to_bytes` **(** :ref:`Variant` variable **)** | @@ -356,8 +362,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_@GlobalScope_Side: @@ -1707,7 +1713,7 @@ Mac / iPad 键盘上的“地球”键。 :ref:`Key` **KEY_KEYBOARD** = ``4194417`` -"On-screen keyboard" key on iPad keyboard. +iPad 键盘上的“屏幕键盘”键。 .. _class_@GlobalScope_constant_KEY_JIS_EISU: @@ -2579,7 +2585,7 @@ enum **JoyButton**: :ref:`JoyButton` **JOY_BUTTON_BACK** = ``4`` -游戏控制器 SDL back按钮。对应于 Sony Select、Xbox Back、Nintendo - 按钮。 +游戏控制器 SDL back 按钮。对应于 Sony Select、Xbox Back、Nintendo - 按钮。 .. _class_@GlobalScope_constant_JOY_BUTTON_GUIDE: @@ -2595,7 +2601,7 @@ enum **JoyButton**: :ref:`JoyButton` **JOY_BUTTON_START** = ``6`` -游戏控制器 SDL start 按钮。对应 Nintendo + 按钮。 +游戏控制器 SDL start 按钮。对应于 Sony Options、Xbox Menu、Nintendo + 按钮。 .. _class_@GlobalScope_constant_JOY_BUTTON_LEFT_STICK: @@ -3419,11 +3425,11 @@ enum **PropertyHint**: :ref:`PropertyHint` **PROPERTY_HINT_RANGE** = ``1`` -提示 :ref:`int` 或 :ref:`float` 属性应在提示字符串 ``"min,max"`` 或 ``"min,max,step"`` 指定的范围内。提示字符串可以选择包含 ``"or_greater"`` 和/或 ``"or_less"`` 以允许手动输入高于最大值或低于最小值的值。 +提示 :ref:`int` 或 :ref:`float` 属性应在提示字符串 ``"最小值,最大值"`` 或 ``"最小值,最大值,步长"`` 指定的范围内。提示字符串可以选择包含 ``"or_greater"`` 和/或 ``"or_less"``\ ,从而允许手动输入高于最大值或低于最小值的值。 \ **示例:**\ ``"-360,360,1,or_greater,or_less"``\ 。 -此外,还可以包含其他关键字:\ ``"exp"`` 用于指数范围编辑,\ ``"radians"`` 用于以度数编辑弧度角,\ ``"degrees"`` 提示一个角度,以及 ``"hide_slider"`` 隐藏滑块。 +此外,还可以包含其他关键字:\ ``"exp"`` 用于指数范围编辑,\ ``"radians_as_degrees"`` 用于以度数编辑弧度角(范围的取值也使用度数),\ ``"degrees"`` 提示角度,\ ``"hide_slider"`` 则会隐藏滑块。 .. _class_@GlobalScope_constant_PROPERTY_HINT_ENUM: @@ -3609,7 +3615,7 @@ enum **PropertyHint**: :ref:`PropertyHint` **PROPERTY_HINT_OBJECT_ID** = ``22`` - +提示该属性的值是一个被编码为对象 ID 的对象,其类型在提示字符串中指定。被用于调试器。 .. _class_@GlobalScope_constant_PROPERTY_HINT_TYPE_STRING: @@ -3692,7 +3698,7 @@ enum **PropertyHint**: :ref:`PropertyHint` **PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE** = ``24`` - +*已废弃。*\ 该提示未被用于任何地方,将来会被移除。 .. _class_@GlobalScope_constant_PROPERTY_HINT_OBJECT_TOO_BIG: @@ -3700,7 +3706,7 @@ enum **PropertyHint**: :ref:`PropertyHint` **PROPERTY_HINT_OBJECT_TOO_BIG** = ``25`` - +提示对象太大而无法通过调试器发送。 .. _class_@GlobalScope_constant_PROPERTY_HINT_NODE_PATH_VALID_TYPES: @@ -3708,7 +3714,7 @@ enum **PropertyHint**: :ref:`PropertyHint` **PROPERTY_HINT_NODE_PATH_VALID_TYPES** = ``26`` - +提示该提示字符串为类型 :ref:`NodePath` 的属性指定有效的节点类型。 .. _class_@GlobalScope_constant_PROPERTY_HINT_SAVE_FILE: @@ -3716,7 +3722,7 @@ enum **PropertyHint**: :ref:`PropertyHint` **PROPERTY_HINT_SAVE_FILE** = ``27`` - +提示 :ref:`String` 属性是文件的路径。编辑它将显示一个文件对话框,用于选择文件要保存的路径。该对话框可以访问项目的目录。该提示字符串可以是一组带有通配符的筛选器,例如 ``"*.png,*.jpg"``\ 。另请参阅 :ref:`FileDialog.filters`\ 。 .. _class_@GlobalScope_constant_PROPERTY_HINT_GLOBAL_SAVE_FILE: @@ -3724,7 +3730,7 @@ enum **PropertyHint**: :ref:`PropertyHint` **PROPERTY_HINT_GLOBAL_SAVE_FILE** = ``28`` - +提示 :ref:`String` 属性是文件的路径。编辑它将显示一个文件对话框,用于选择文件要保存的路径。该对话框可以访问整个文件系统。该提示字符串可以是一组带有通配符的筛选器,例如 ``"*.png,*.jpg"``\ 。另请参阅 :ref:`FileDialog.filters`\ 。 .. _class_@GlobalScope_constant_PROPERTY_HINT_INT_IS_OBJECTID: @@ -3732,7 +3738,9 @@ enum **PropertyHint**: :ref:`PropertyHint` **PROPERTY_HINT_INT_IS_OBJECTID** = ``29`` +提示 :ref:`int` 属性是对象 ID。 +\ *已废弃。*\ 该提示不会用于任何地方,将来会被移除。 .. _class_@GlobalScope_constant_PROPERTY_HINT_INT_IS_POINTER: @@ -3740,7 +3748,7 @@ enum **PropertyHint**: :ref:`PropertyHint` **PROPERTY_HINT_INT_IS_POINTER** = ``30`` - +提示 :ref:`int` 属性是一个指针。用于 GDExtension。 .. _class_@GlobalScope_constant_PROPERTY_HINT_ARRAY_TYPE: @@ -3748,7 +3756,7 @@ enum **PropertyHint**: :ref:`PropertyHint` **PROPERTY_HINT_ARRAY_TYPE** = ``31`` - +提示属性是一个 :ref:`Array`\ ,其存储类型在提示字符串中指定。 .. _class_@GlobalScope_constant_PROPERTY_HINT_LOCALE_ID: @@ -3772,7 +3780,7 @@ enum **PropertyHint**: :ref:`PropertyHint` **PROPERTY_HINT_NODE_TYPE** = ``34`` - +提示属性是 :ref:`Node` 派生类型的实例,可以选择通过提示字符串指定(例如 ``"Node2D"``\ )。编辑它将显示一个用于从场景中选取节点的对话框。 .. _class_@GlobalScope_constant_PROPERTY_HINT_HIDE_QUATERNION_EDIT: @@ -3886,7 +3894,7 @@ flags **PropertyUsageFlags**: :ref:`PropertyUsageFlags` **PROPERTY_USAGE_CLASS_IS_BITFIELD** = ``512`` - +该属性是一个位字段,即它包含多个被表示为位的标志。 .. _class_@GlobalScope_constant_PROPERTY_USAGE_NO_INSTANCE_STATE: @@ -3918,7 +3926,7 @@ flags **PropertyUsageFlags**: :ref:`PropertyUsageFlags` **PROPERTY_USAGE_STORE_IF_NULL** = ``8192`` - +即使 :ref:`Object` 类型的属性值为 ``null``\ ,也会被存储。 .. _class_@GlobalScope_constant_PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED: @@ -3926,7 +3934,7 @@ flags **PropertyUsageFlags**: :ref:`PropertyUsageFlags` **PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED** = ``16384`` - +如果该属性被修改,则所有检查器字段都将被刷新。 .. _class_@GlobalScope_constant_PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE: @@ -3934,7 +3942,9 @@ flags **PropertyUsageFlags**: :ref:`PropertyUsageFlags` **PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE** = ``32768`` +表示占位符脚本实例的默认值。 +\ *已废弃。*\ 该提示不会用于任何地方,将来会被移除。 .. _class_@GlobalScope_constant_PROPERTY_USAGE_CLASS_IS_ENUM: @@ -3942,7 +3952,7 @@ flags **PropertyUsageFlags**: :ref:`PropertyUsageFlags` **PROPERTY_USAGE_CLASS_IS_ENUM** = ``65536`` - +该属性是一个枚举,即它仅从其关联的枚举中获取被命名的整数常量。 .. _class_@GlobalScope_constant_PROPERTY_USAGE_NIL_IS_VARIANT: @@ -3950,7 +3960,7 @@ flags **PropertyUsageFlags**: :ref:`PropertyUsageFlags` **PROPERTY_USAGE_NIL_IS_VARIANT** = ``131072`` - +如果属性将 ``nil`` 作为默认值,则其类型将为 :ref:`Variant`\ 。 .. _class_@GlobalScope_constant_PROPERTY_USAGE_ARRAY: @@ -3990,7 +4000,7 @@ flags **PropertyUsageFlags**: :ref:`PropertyUsageFlags` **PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT** = ``4194304`` - +:ref:`NodePath` 属性将始终相对于场景根。对于本地资源来说最有用。 .. _class_@GlobalScope_constant_PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT: @@ -3998,7 +4008,7 @@ flags **PropertyUsageFlags**: :ref:`PropertyUsageFlags` **PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT** = ``8388608`` - +在动态创建资源时使用,即 Getter 将始终返回一个不同的实例。\ :ref:`ResourceSaver` 需要该信息来正确保存这种资源。 .. _class_@GlobalScope_constant_PROPERTY_USAGE_KEYING_INCREMENTS: @@ -4006,7 +4016,7 @@ flags **PropertyUsageFlags**: :ref:`PropertyUsageFlags` **PROPERTY_USAGE_KEYING_INCREMENTS** = ``16777216`` - +插入该属性的动画关键帧将自动增加该值,从而可以轻松地为一行中的多个值设置关键帧。 .. _class_@GlobalScope_constant_PROPERTY_USAGE_DEFERRED_SET_RESOURCE: @@ -4014,7 +4024,9 @@ flags **PropertyUsageFlags**: :ref:`PropertyUsageFlags` **PROPERTY_USAGE_DEFERRED_SET_RESOURCE** = ``33554432`` +加载时,可以在加载结束时设置该属性的资源。 +\ *已废弃。*\ 该提示不会用于任何地方,将来会被移除。 .. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT: @@ -4022,7 +4034,7 @@ flags **PropertyUsageFlags**: :ref:`PropertyUsageFlags` **PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT** = ``67108864`` - +当该属性为 :ref:`Resource` 且基础对象为 :ref:`Node` 时,则每当该节点是在编辑器中创建的,都会自动创建一个资源实例。 .. _class_@GlobalScope_constant_PROPERTY_USAGE_EDITOR_BASIC_SETTING: @@ -4030,7 +4042,7 @@ flags **PropertyUsageFlags**: :ref:`PropertyUsageFlags` **PROPERTY_USAGE_EDITOR_BASIC_SETTING** = ``134217728`` - +该属性被视为基本设置,即使禁用高级模式时也会显现。用于项目设置。 .. _class_@GlobalScope_constant_PROPERTY_USAGE_READ_ONLY: @@ -4128,7 +4140,7 @@ flags **MethodFlags**: :ref:`MethodFlags` **METHOD_FLAG_OBJECT_CORE** = ``64`` -内部使用。允许不将核心虚拟方法(例如 :ref:`Object._notification`\ )转储到 JSON API。 +内部使用。允许不将核心虚拟方法(例如 :ref:`Object._notification`\ )转储到 JSON API。 .. _class_@GlobalScope_constant_METHOD_FLAGS_DEFAULT: @@ -4684,8 +4696,8 @@ enum **Variant.Operator**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_@GlobalScope_property_AudioServer: @@ -4741,9 +4753,9 @@ Property Descriptions :ref:`EditorInterface` **EditorInterface** -The :ref:`EditorInterface` singleton. +:ref:`EditorInterface` 单例。 -\ **Note:** Only available in editor builds. +\ **注意:**\ 仅在编辑器构建中可用。 .. rst-class:: classref-item-separator @@ -5139,8 +5151,8 @@ The :ref:`EditorInterface` singleton. .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_@GlobalScope_method_abs: @@ -5233,14 +5245,26 @@ Method Descriptions :ref:`float` **acosh** **(** :ref:`float` x **)** -Returns the hyperbolic arc (also called inverse) cosine of ``x``, returning a value in radians. Use it to get the angle from an angle's cosine in hyperbolic space if ``x`` is larger or equal to 1. For values of ``x`` lower than 1, it will return 0, in order to prevent :ref:`acosh` from returning :ref:`@GDScript.NAN`. +返回参数 x 的双曲弧(也称为反余弦),返回弧度值。使用它来获取在双曲空间中,如果参数 x 大于或等于 1 ,角的余弦的角度。对于参数 x 小于 1 的值,将返回 0 ,以防止 :ref:`acosh` 返回 :ref:`@GDScript.NAN` 。 :: - var a = acosh(2) # Returns 1.31695789692482 - cosh(a) # Returns 2 + var a = acosh(2) # 返回 1.31695789692482 + cosh(a) # 返回 2 - var b = acosh(-1) # Returns 0 + var b = acosh(-1) # 返回 0 + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GlobalScope_method_angle_difference: + +.. rst-class:: classref-method + +:ref:`float` **angle_difference** **(** :ref:`float` from, :ref:`float` to **)** + +返回两个角度之间的差,范围为 ``[-PI, +PI]`` 。当 ``from`` 和 ``to`` 相反时,如果 ``from`` 小于 ``to``\ ,则返回 ``-PI`` ,否则返回 ``PI`` 。 .. rst-class:: classref-item-separator @@ -5269,12 +5293,12 @@ Returns the hyperbolic arc (also called inverse) cosine of ``x``, returning a va :ref:`float` **asinh** **(** :ref:`float` x **)** -Returns the hyperbolic arc (also called inverse) sine of ``x``, returning a value in radians. Use it to get the angle from an angle's sine in hyperbolic space. +返回参数 x 的双曲弧(也称为反正弦),返回弧度值。使用它来获取在双曲空间中,角的正弦角度。 :: - var a = asinh(0.9) # Returns 0.8088669356527824 - sinh(a) # Returns 0.9 + var a = asinh(0.9) # 返回 0.8088669356527824 + sinh(a) # 返回 0.9 .. rst-class:: classref-item-separator @@ -5324,17 +5348,17 @@ Returns the hyperbolic arc (also called inverse) sine of ``x``, returning a valu :ref:`float` **atanh** **(** :ref:`float` x **)** -Returns the hyperbolic arc (also called inverse) tangent of ``x``, returning a value in radians. Use it to get the angle from an angle's tangent in hyperbolic space if ``x`` is between -1 and 1 (non-inclusive). +返回 ``x`` 的双曲弧(也称为反正切),以弧度为单位。如果 ``x`` 在 -1 和 1 之间(不包括 -1 和 1 ),则使用它从双曲空间中的角度的正切值获取角度。 -In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` < 1 in the real set, so values equal or lower to -1 for ``x`` return negative :ref:`@GDScript.INF` and values equal or higher than 1 return positive :ref:`@GDScript.INF` in order to prevent :ref:`atanh` from returning :ref:`@GDScript.NAN`. +在数学中,只有在实数集中,-1 < ``x`` < 1 的情况下,双曲反正切才有意义。因此,为了预防 :ref:`atanh` 返回 :ref:`@GDScript.NAN` ,对于 ``x`` 等于或小于 -1 的值,返回负的 :ref:`@GDScript.NAN` ;对于\ ``x``\ 等于或大于 1 的值,返回正的 :ref:`@GDScript.INF` 。 :: - var a = atanh(0.9) # Returns 1.47221948958322 - tanh(a) # Returns 0.9 + var a = atanh(0.9) # 返回 1.47221948958322 + tanh(a) # 返回 0.9 - var b = atanh(-2) # Returns -inf - tanh(b) # Returns -1 + var b = atanh(-2) # 返回 -inf + tanh(b) # 返回 -1 .. rst-class:: classref-item-separator @@ -5398,14 +5422,14 @@ In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` < :ref:`Variant` **ceil** **(** :ref:`Variant` x **)** -向上舍入 ``x``\ (朝正无穷大),返回不小于 ``x`` 的最小整数。支持的类型:\ :ref:`int`\ 、\ :ref:`float`\ 、\ :ref:`Vector2`\ 、\ :ref:`Vector3`\ 、\ :ref:`Vector4`\ 。 +向上舍入 ``x``\ (朝正无穷大方向),返回不小于 ``x`` 的最小整数。支持的类型:\ :ref:`int`\ 、\ :ref:`float`\ 、\ :ref:`Vector2`\ 、\ :ref:`Vector2i`\ 、\ :ref:`Vector3`\ 、\ :ref:`Vector3i`\ 、\ :ref:`Vector4`\ 、\ :ref:`Vector4i`\ 。 :: - var i = ceil(1.45) # i 是 2.0 - i = ceil(1.001) # i 是 2.0 + var i = ceil(1.45) # i 为 2.0 + i = ceil(1.001) # i 为 2.0 -另请参见 :ref:`floor`\ 、\ :ref:`round`\ 、以及 :ref:`snapped`\ 。 +另见 :ref:`floor`\ 、\ :ref:`round`\ 、\ :ref:`snapped`\ 。 \ **注意:**\ 为了更好的类型安全,使用 :ref:`ceilf`\ 、\ :ref:`ceili`\ 、\ :ref:`Vector2.ceil`\ 、\ :ref:`Vector3.ceil` 或 :ref:`Vector4.ceil`\ 。 @@ -5555,7 +5579,7 @@ In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` < :ref:`float` **cubic_interpolate** **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight **)** -根据 ``weight`` 中定义的因子以及 ``pre`` 和 ``post`` 值,在两个值之间进行三次插值。 +根据 ``weight`` 定义的系数,以及 ``pre`` 和 ``post`` 值,在两个值之间进行三次插值。 .. rst-class:: classref-item-separator @@ -5567,7 +5591,7 @@ In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` < :ref:`float` **cubic_interpolate_angle** **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight **)** -根据 ``weight`` 中定义的因子以及 ``pre`` 和 ``post`` 值,在具有最短路径的两个旋转值之间三次插值 。另见 :ref:`lerp_angle`\ 。 +根据 ``weight`` 定义的系数,以及 ``pre`` 和 ``post`` 值,在两个旋转值之间的最短路径进行三次插值 。另见 :ref:`lerp_angle`\ 。 .. rst-class:: classref-item-separator @@ -5579,9 +5603,9 @@ In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` < :ref:`float` **cubic_interpolate_angle_in_time** **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight, :ref:`float` to_t, :ref:`float` pre_t, :ref:`float` post_t **)** -根据 ``weight`` 中定义的因子以及 ``pre`` 和 ``post`` 值,在具有最短路径的两个旋转值之间进行三次插值。另见 :ref:`lerp_angle`\ 。 +根据 ``weight`` 定义的系数,以及 ``pre`` 和 ``post`` 值,在两个旋转值之间的最短路径进行三次插值。另见 :ref:`lerp_angle`\ 。 -它可以根据时间值执行比 ``cubic_interpolate()`` 更平滑的插值。 +它可以根据时间值执行比 :ref:`cubic_interpolate` 更平滑的插值。 .. rst-class:: classref-item-separator @@ -5593,7 +5617,7 @@ In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` < :ref:`float` **cubic_interpolate_in_time** **(** :ref:`float` from, :ref:`float` to, :ref:`float` pre, :ref:`float` post, :ref:`float` weight, :ref:`float` to_t, :ref:`float` pre_t, :ref:`float` post_t **)** -根据 ``weight`` 中定义的因子以及 ``pre`` 和 ``post`` 值,在两个值之间进行三次插值。 +根据 ``weight`` 定义的系数,以及 ``pre`` 和 ``post`` 值,在两个值之间进行三次插值。 它可以根据时间值执行比 :ref:`cubic_interpolate` 更平滑的插值。 @@ -5635,21 +5659,21 @@ In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` < :ref:`float` **ease** **(** :ref:`float` x, :ref:`float` curve **)** -Returns an "eased" value of ``x`` based on an easing function defined with ``curve``. This easing function is based on an exponent. The ``curve`` can be any floating-point number, with specific values leading to the following behaviors: +基于用 ``curve`` 定义的缓动函数返回 ``x`` 的“缓动后”的值。该缓动函数是基于指数的。\ ``curve`` 可以是任意浮点数,具体数值会导致以下行为: :: - - Lower than -1.0 (exclusive): Ease in-out - - 1.0: Linear - - Between -1.0 and 0.0 (exclusive): Ease out-in - - 0.0: Constant - - Between 0.0 to 1.0 (exclusive): Ease out - - 1.0: Linear - - Greater than 1.0 (exclusive): Ease in + - 低于 -1.0(开区间):缓入缓出 + - -1.0:线性 + - 在 -1.0 和 0.0 之间(开区间):缓出缓入 + - 0.0:恒定 + - 在 0.0 到 1.0 之间(开区间):缓出 + - 1.0:线性 + - 大于 1.0(开区间):缓入 -\ `ease() curve values cheatsheet `__\ +\ `ease() 曲线值速查表 `__\ -See also :ref:`smoothstep`. If you need to perform more advanced transitions, use :ref:`Tween.interpolate_value`. +另见 :ref:`smoothstep`\ 。如果你需要执行更高级的过渡,请使用 :ref:`Tween.interpolate_value`\ 。 .. rst-class:: classref-item-separator @@ -5680,15 +5704,15 @@ See also :ref:`smoothstep`. If you need to :ref:`float` **exp** **(** :ref:`float` x **)** -The natural exponential function. It raises the mathematical constant *e* to the power of ``x`` and returns it. +自然指数函数。计算数学常数 *e* 的 ``x`` 次方并返回它。 -\ *e* has an approximate value of 2.71828, and can be obtained with ``exp(1)``. +\ *e* 的近似值为 2.71828,可以使用 ``exp(1)`` 获得。 -For exponents to other bases use the method :ref:`pow`. +求其他底数的指数应使用 :ref:`pow` 方法。 :: - var a = exp(2) # Approximately 7.39 + var a = exp(2) # 大约是 7.39 .. rst-class:: classref-item-separator @@ -5700,14 +5724,14 @@ For exponents to other bases use the method :ref:`pow` **floor** **(** :ref:`Variant` x **)** -向下舍入 ``x``\ (朝负无穷大),返回不大于 ``x`` 的最大整数。支持的类型:\ :ref:`int`\ 、\ :ref:`float`\ 、\ :ref:`Vector2`\ 、\ :ref:`Vector3`\ 、\ :ref:`Vector4`\ 。 +向下舍入 ``x``\ (朝负无穷大),返回不大于 ``x`` 的最大整数。支持的类型:\ :ref:`int`\ 、\ :ref:`float`\ 、\ :ref:`Vector2`\ 、\ :ref:`Vector2i`\ 、\ :ref:`Vector3`\ 、\ :ref:`Vector3i`\ 、\ :ref:`Vector4`\ 、\ :ref:`Vector4i`\ 。 :: - var a = floor(2.99) # a 是 2.0 - a = floor(-2.99) # a 是 -3.0 + var a = floor(2.99) # a 为 2.0 + a = floor(-2.99) # a 为 -3.0 -另请参阅 :ref:`ceil`\ 、\ :ref:`round`\ 、以及 :ref:`snapped`\ 。 +另见 :ref:`ceil`\ 、\ :ref:`round`\ 、\ :ref:`snapped`\ 。 \ **注意:**\ 为了更好的类型安全,请使用 :ref:`floorf`\ 、\ :ref:`floori`\ 、\ :ref:`Vector2.floor`\ 、\ :ref:`Vector3.floor` 或 :ref:`Vector4.floor`\ 。 @@ -6240,18 +6264,18 @@ For exponents to other bases use the method :ref:`pow` **nearest_po2** **(** :ref:`int` value **)** -Returns the smallest integer power of 2 that is greater than or equal to ``value``. +返回大于等于 ``value`` 的最小的 2 的幂。 :: - nearest_po2(3) # Returns 4 - nearest_po2(4) # Returns 4 - nearest_po2(5) # Returns 8 + nearest_po2(3) # 返回 4 + nearest_po2(4) # 返回 4 + nearest_po2(5) # 返回 8 - nearest_po2(0) # Returns 0 (this may not be expected) - nearest_po2(-1) # Returns 0 (this may not be expected) + nearest_po2(0) # 返回 0(可能出乎意料) + nearest_po2(-1) # 返回 0(可能出乎意料) -\ **Warning:** Due to its implementation, this method returns ``0`` rather than ``1`` for values less than or equal to ``0``, with an exception for ``value`` being the smallest negative 64-bit integer (``-9223372036854775808``) in which case the ``value`` is returned unchanged. +\ **警告:**\ 由于其实现方式,该函数会对小于等于 ``0`` 的值返回 ``0`` 而不是 ``1``\ ,例外是 ``value`` 为最小的负 64 位整数(\ ``-9223372036854775808``\ )时,会将 ``value`` 原样返回。 .. rst-class:: classref-item-separator @@ -6785,13 +6809,29 @@ void **randomize** **(** **)** ---- +.. _class_@GlobalScope_method_rotate_toward: + +.. rst-class:: classref-method + +:ref:`float` **rotate_toward** **(** :ref:`float` from, :ref:`float` to, :ref:`float` delta **)** + +将 ``from`` 朝 ``to`` 旋转,旋转的量为 ``delta``\ 。不会越过 ``to``\ 。 + +与 :ref:`move_toward` 类似,但是能够让夹角正确绕过 :ref:`@GDScript.TAU`\ 。 + +如果 ``delta`` 为负,则该函数会进行远离 ``to`` 的旋转,朝向相反的角度,但不会越过该角度。 + +.. rst-class:: classref-item-separator + +---- + .. _class_@GlobalScope_method_round: .. rst-class:: classref-method :ref:`Variant` **round** **(** :ref:`Variant` x **)** -将 ``x`` 舍入到最接近的整数,中间情况远离 0 舍入。支持的类型:\ :ref:`int`\ 、\ :ref:`float`\ 、\ :ref:`Vector2`\ 、\ :ref:`Vector3`\ 、\ :ref:`Vector4`\ 。 +将 ``x`` 舍入到最接近的整数,中间情况远离 0 舍入。支持的类型:\ :ref:`int`\ 、\ :ref:`float`\ 、\ :ref:`Vector2`\ 、\ :ref:`Vector2i`\ 、\ :ref:`Vector3`\ 、\ :ref:`Vector3i`\ 、\ :ref:`Vector4`\ 、\ :ref:`Vector4i`\ 。 :: @@ -6799,7 +6839,7 @@ void **randomize** **(** **)** round(2.5) # 返回 3 round(2.6) # 返回 3 -另请参见 :ref:`floor`\ 、\ :ref:`ceil` 和 :ref:`snapped`\ 。 +另见 :ref:`floor`\ 、\ :ref:`ceil`\ 、\ :ref:`snapped`\ 。 \ **注意:**\ 为了更好的类型安全,使用 :ref:`roundf`\ 、\ :ref:`roundi`\ 、\ :ref:`Vector2.round`\ 、\ :ref:`Vector3.round` 或 :ref:`Vector4.round`\ 。 @@ -6876,20 +6916,20 @@ void **seed** **(** :ref:`int` base **)** :ref:`Variant` **sign** **(** :ref:`Variant` x **)** -Returns the same type of :ref:`Variant` as ``x``, with ``-1`` for negative values, ``1`` for positive values, and ``0`` for zeros. For ``nan`` values it returns 0. +返回与 ``x`` 相同类型的 :ref:`Variant`\ ,负值返回 ``-1``\ 、正值返回 ``1``\ ,零则返回 ``0``\ 。如果是 ``nan`` 则返回 0。 -Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector2i`, :ref:`Vector3`, :ref:`Vector3i`, :ref:`Vector4`, :ref:`Vector4i`. +支持的类型有:\ :ref:`int`\ 、\ :ref:`float`\ 、\ :ref:`Vector2`\ 、\ :ref:`Vector2i`\ 、\ :ref:`Vector3`\ 、\ :ref:`Vector3i`\ 、\ :ref:`Vector4`\ 、\ :ref:`Vector4i`\ 。 :: - sign(-6.0) # Returns -1 - sign(0.0) # Returns 0 - sign(6.0) # Returns 1 - sign(NAN) # Returns 0 + sign(-6.0) # 返回 -1 + sign(0.0) # 返回 0 + sign(6.0) # 返回 1 + sign(NAN) # 返回 0 - sign(Vector3(-6.0, 0.0, 6.0)) # Returns (-1, 0, 1) + sign(Vector3(-6.0, 0.0, 6.0)) # 返回 (-1, 0, 1) -\ **Note:** For better type safety, use :ref:`signf`, :ref:`signi`, :ref:`Vector2.sign`, :ref:`Vector2i.sign`, :ref:`Vector3.sign`, :ref:`Vector3i.sign`, :ref:`Vector4.sign`, or :ref:`Vector4i.sign`. +\ **注意:**\ 为了更好的类型安全,请使用 :ref:`signf`\ 、\ :ref:`signi`\ 、\ :ref:`Vector2.sign`\ 、\ :ref:`Vector2i.sign`\ 、\ :ref:`Vector3.sign`\ 、\ :ref:`Vector3i.sign`\ 、\ :ref:`Vector4.sign` 或 :ref:`Vector4i.sign`\ 。 .. rst-class:: classref-item-separator @@ -6901,14 +6941,14 @@ Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2 :ref:`float` **signf** **(** :ref:`float` x **)** -Returns ``-1.0`` if ``x`` is negative, ``1.0`` if ``x`` is positive, and ``0.0`` if ``x`` is zero. For ``nan`` values of ``x`` it returns 0.0. +如果 ``x`` 为负,则返回 ``-1.0``\ ;如果 ``x`` 为正,则返回 ``1.0``\ ;如果 ``x`` 为零,则返回 ``0.0``\ 。如果 ``x`` 为 ``nan`` 则返回 0.0。 :: - signf(-6.5) # Returns -1.0 - signf(0.0) # Returns 0.0 - signf(6.5) # Returns 1.0 - signf(NAN) # Returns 0.0 + signf(-6.5) # 返回 -1.0 + signf(0.0) # 返回 0.0 + signf(6.5) # 返回 1.0 + signf(NAN) # 返回 0.0 .. rst-class:: classref-item-separator @@ -6972,22 +7012,22 @@ Returns ``-1.0`` if ``x`` is negative, ``1.0`` if ``x`` is positive, and ``0.0`` :ref:`float` **smoothstep** **(** :ref:`float` from, :ref:`float` to, :ref:`float` x **)** -Returns the result of smoothly interpolating the value of ``x`` between ``0`` and ``1``, based on the where ``x`` lies with respect to the edges ``from`` and ``to``. +返回 ``x`` 在 ``0`` 和 ``1`` 之间平滑插值的结果,基于 ``x`` 相对于边 ``from`` 和 ``to`` 的位置。 -The return value is ``0`` if ``x <= from``, and ``1`` if ``x >= to``. If ``x`` lies between ``from`` and ``to``, the returned value follows an S-shaped curve that maps ``x`` between ``0`` and ``1``. +如果 ``x <= from``\ ,则返回值为 ``0``\ ;如果 ``x >= to``\ ,则返回值为 ``1``\ 。如果 ``x`` 位于 ``from`` 和 ``to`` 之间,则返回值遵循一条将 ``x`` 映射到 ``0`` 和 ``1`` 之间的 S 形曲线。 -This S-shaped curve is the cubic Hermite interpolator, given by ``f(y) = 3*y^2 - 2*y^3`` where ``y = (x-from) / (to-from)``. +这条 S 形曲线是三次 Hermite 插值器,由 ``f(y) = 3*y^2 - 2*y^3`` 给出,其中 ``y = (x-from) / (to-from)``\ 。 :: - smoothstep(0, 2, -5.0) # Returns 0.0 - smoothstep(0, 2, 0.5) # Returns 0.15625 - smoothstep(0, 2, 1.0) # Returns 0.5 - smoothstep(0, 2, 2.0) # Returns 1.0 + smoothstep(0, 2, -5.0) # 返回 0.0 + smoothstep(0, 2, 0.5) # 返回 0.15625 + smoothstep(0, 2, 1.0) # 返回 0.5 + smoothstep(0, 2, 2.0) # 返回 1.0 -Compared to :ref:`ease` with a curve value of ``-1.6521``, :ref:`smoothstep` returns the smoothest possible curve with no sudden changes in the derivative. If you need to perform more advanced transitions, use :ref:`Tween` or :ref:`AnimationPlayer`. +与曲线值为 ``-1.6521`` 的 :ref:`ease` 相比,\ :ref:`smoothstep` 返回最平滑的曲线,导数没有突然变化。如果需要执行更高级的过渡,请使用 :ref:`Tween` 或 :ref:`AnimationPlayer`\ 。 -\ `Comparison between smoothstep() and ease(x, -1.6521) return values `__ +\ `smoothstep() 与 ease(x, -1.6521) 返回值的比较 `__ .. rst-class:: classref-item-separator @@ -7181,19 +7221,39 @@ Compared to :ref:`ease` with a curve value of `` :ref:`Variant` **type_convert** **(** :ref:`Variant` variant, :ref:`int` type **)** -Converts the given ``variant`` to the given ``type``, using the :ref:`Variant.Type` values. This method is generous with how it handles types, it can automatically convert between array types, convert numeric :ref:`String`\ s to :ref:`int`, and converting most things to :ref:`String`. +使用 :ref:`Variant.Type` 值将给定的 ``variant`` 转换为给定的 ``type``\ 。此方法对类型的处理十分宽松,可以在数组类型之间自动转换,将数值的 :ref:`String` 转换为 :ref:`int`\ ,也可以将大多数内容转换为 :ref:`String`\ 。 -If the type conversion cannot be done, this method will return the default value for that type, for example converting :ref:`Rect2` to :ref:`Vector2` will always return ``Vector2.ZERO``. This method will never show error messages as long as ``type`` is a valid Variant type. +如果无法完成类型转换,此方法将返回该类型的默认值,例如 :ref:`Rect2` 转换为 :ref:`Vector2` 时将总是返回 :ref:`Vector2.ZERO`\ 。只要 ``type`` 是一个有效的 Variant 类型,此方法就永远不会显示错误消息。 -The returned value is a :ref:`Variant`, but the data inside and the :ref:`Variant.Type` will be the same as the requested type. +返回的值是一个 :ref:`Variant`\ ,但是其中的数据以及 :ref:`Variant.Type` 将会与请求的类型相同。 :: - type_convert("Hi!", TYPE_INT) # Returns 0 - type_convert("123", TYPE_INT) # Returns 123 - type_convert(123.4, TYPE_INT) # Returns 123 - type_convert(5, TYPE_VECTOR2) # Returns (0, 0) - type_convert("Hi!", TYPE_NIL) # Returns null + type_convert("Hi!", TYPE_INT) # 返回 0 + type_convert("123", TYPE_INT) # 返回 123 + type_convert(123.4, TYPE_INT) # 返回 123 + type_convert(5, TYPE_VECTOR2) # 返回 (0, 0) + type_convert("Hi!", TYPE_NIL) # 返回 null + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GlobalScope_method_type_string: + +.. rst-class:: classref-method + +:ref:`String` **type_string** **(** :ref:`int` type **)** + +返回类型 ``type`` 的人类可读名称,参数使用 :ref:`Variant.Type` 的值。 + +:: + + print(TYPE_INT) # 输出 2。 + print(type_string(TYPE_INT)) # 输出“int”。 + print(type_string(TYPE_STRING)) # 输出“String”。 + +另见 :ref:`typeof`\ 。 .. rst-class:: classref-item-separator @@ -7205,7 +7265,7 @@ The returned value is a :ref:`Variant`, but the data inside and t :ref:`int` **typeof** **(** :ref:`Variant` variable **)** -使用 :ref:`Variant.Type` 值返回给定 ``variable`` 的内部类型。 +返回变量 ``variable`` 的内部类型,使用的是 :ref:`Variant.Type` 中的值。 :: @@ -7217,6 +7277,8 @@ The returned value is a :ref:`Variant`, but the data inside and t else: print("出乎意料的结果") +另见 :ref:`type_string`\ 。 + .. rst-class:: classref-item-separator ---- @@ -7291,7 +7353,7 @@ The returned value is a :ref:`Variant`, but the data inside and t :ref:`Variant` **weakref** **(** :ref:`Variant` obj **)** -返回对某个对象的弱引用,如果 ``obj`` 无效,则返回 ``null``\ 。 +返回一个 :ref:`WeakRef` 实例,其中包含对 ``obj`` 的弱引用。如果 ``obj`` 为 ``null``\ ,则返回空的 :ref:`WeakRef` 实例。如果 ``obj`` 既不是 :ref:`Object` 派生实例,也不是 ``null``\ ,则打印错误并返回 ``null``\ 。 对对象的弱引用不足以使对象保持存活:当对引用对象的剩余引用都是弱引用时,垃圾回收可以自由销毁该引用对象并将其内存重新用于其他用途。但是,在对象实际被销毁之前,弱引用可能会返回该对象,即使不存在对它的强引用也是如此。 @@ -7349,7 +7411,7 @@ The returned value is a :ref:`Variant`, but the data inside and t \ **注意:**\ 如果 ``min`` 为 ``0``\ ,则相当于 :ref:`fposmod`\ ,因此请改用它。 -通过让用户控制最小值,\ ``wrapf`` 比使用 :ref:`fposmod` 方法更灵活。 +通过让用户控制最小值,\ :ref:`wrapf` 比使用 :ref:`fposmod` 方法更灵活。 .. rst-class:: classref-item-separator @@ -7373,10 +7435,10 @@ The returned value is a :ref:`Variant`, but the data inside and t # result 是 -2 var result = wrapi(-6, -5, -1) -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_aabb.rst b/classes/zh_CN/class_aabb.rst index 0560c0f947..a7f5d71790 100644 --- a/classes/zh_CN/class_aabb.rst +++ b/classes/zh_CN/class_aabb.rst @@ -14,8 +14,8 @@ AABB .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **AABB** 由一个位置、一个大小和若干实用函数组成。通常用于快速重叠测试。 @@ -27,12 +27,12 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`数学文档索引 <../tutorials/math/index>` @@ -42,8 +42,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -74,8 +74,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -134,8 +134,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -154,8 +154,8 @@ Operators .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AABB_property_end: @@ -197,8 +197,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_AABB_constructor_AABB: @@ -234,8 +234,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AABB_method_abs: @@ -396,7 +396,7 @@ Method Descriptions :ref:`Vector3` **get_support** **(** :ref:`Vector3` dir **)** |const| -Returns the vertex of the AABB that's the farthest in a given direction. This point is commonly known as the support point in collision detection algorithms. +返回指定方向上最远的 AABB 顶点。该点通常称为碰撞检测算法的支撑点。 .. rst-class:: classref-item-separator @@ -562,8 +562,8 @@ Returns the vertex of the AABB that's the farthest in a given direction. This po .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_AABB_operator_neq_AABB: @@ -585,7 +585,11 @@ Operator Descriptions :ref:`AABB` **operator *** **(** :ref:`Transform3D` right **)** -通过给定的 :ref:`Transform3D` 变换矩阵对该 **AABB** 进行逆变换(相乘)。 +假设该变换的基是正交的(即旋转/反射可以,缩放/倾斜则不行),将 **AABB** 逆向变换(乘以)给定的 :ref:`Transform3D` 变换矩阵。 + +\ ``aabb * transform`` 相当于 ``transform.inverse() * aabb``\ 。见 :ref:`Transform3D.inverse`\ 。 + +对于通过仿射变换的逆进行的变换(例如,缩放),可以使用 ``transform.affine_inverse() * aabb`` 代替。见 :ref:`Transform3D.affine_inverse`\ 。 .. rst-class:: classref-item-separator @@ -601,10 +605,10 @@ Operator Descriptions \ **注意:**\ 由于浮点数精度误差,请考虑改用 :ref:`is_equal_approx`\ ,会更可靠。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_acceptdialog.rst b/classes/zh_CN/class_acceptdialog.rst index 9285f095e7..7036b53092 100644 --- a/classes/zh_CN/class_acceptdialog.rst +++ b/classes/zh_CN/class_acceptdialog.rst @@ -10,53 +10,55 @@ AcceptDialog ============ -**Inherits:** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`ConfirmationDialog` +**派生:** :ref:`ConfirmationDialog` 用于用户通知的基本对话框。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **AcceptDialog** 的默认用途是允许它只被接受或关闭,结果相同。但是,\ :ref:`confirmed` 和 :ref:`canceled` 信号允许使两个动作不同,\ :ref:`add_button` 方法允许添加自定义按钮和动作。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`dialog_autowrap` | ``false`` | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`dialog_close_on_escape` | ``true`` | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`dialog_hide_on_ok` | ``true`` | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`String` | :ref:`dialog_text` | ``""`` | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`bool` | exclusive | ``true`` (overrides :ref:`Window`) | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`String` | :ref:`ok_button_text` | ``"OK"`` | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`String` | title | ``"Alert!"`` (overrides :ref:`Window`) | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`bool` | transient | ``true`` (overrides :ref:`Window`) | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`bool` | visible | ``false`` (overrides :ref:`Window`) | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ - | :ref:`bool` | wrap_controls | ``true`` (overrides :ref:`Window`) | - +-----------------------------+-----------------------------------------------------------------------------------+-------------------------------------------------------------------------+ + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`dialog_autowrap` | ``false`` | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`dialog_close_on_escape` | ``true`` | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`dialog_hide_on_ok` | ``true`` | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`dialog_text` | ``""`` | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | exclusive | ``true`` (overrides :ref:`Window`) | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | keep_title_visible | ``true`` (overrides :ref:`Window`) | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ok_button_text` | ``"OK"`` | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | title | ``"Alert!"`` (overrides :ref:`Window`) | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | transient | ``true`` (overrides :ref:`Window`) | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | visible | ``false`` (overrides :ref:`Window`) | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | wrap_controls | ``true`` (overrides :ref:`Window`) | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -77,8 +79,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -95,8 +97,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_AcceptDialog_signal_canceled: @@ -136,8 +138,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AcceptDialog_property_dialog_autowrap: @@ -228,8 +230,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AcceptDialog_method_add_button: @@ -315,8 +317,8 @@ void **remove_button** **(** :ref:`Control` button **)** .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_AcceptDialog_theme_constant_buttons_separation: @@ -338,10 +340,10 @@ Theme Property Descriptions 填充窗口背景的面板。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_aescontext.rst b/classes/zh_CN/class_aescontext.rst index 7a1ebf0e93..e85942ff84 100644 --- a/classes/zh_CN/class_aescontext.rst +++ b/classes/zh_CN/class_aescontext.rst @@ -10,14 +10,14 @@ AESContext ========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 提供对原始数据的 AES 加密/解密的访问。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类存放的是进行 AES(Advanced Encryption Standard,高级加密标准)加解密所需的上下文信息。支持 AES-ECB 和 AES-CBC 两种模式。 @@ -98,8 +98,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -120,8 +120,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AESContext_Mode: @@ -175,8 +175,8 @@ AES 密码封锁器链式解密模式。 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AESContext_method_finish: @@ -226,10 +226,10 @@ void **finish** **(** **)** \ **注意:**\ ``src`` 的大小必须是 16 倍的倍数。如果需要,应用一些填充。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animatablebody2d.rst b/classes/zh_CN/class_animatablebody2d.rst index 63062101c4..757162c04e 100644 --- a/classes/zh_CN/class_animatablebody2d.rst +++ b/classes/zh_CN/class_animatablebody2d.rst @@ -10,23 +10,23 @@ AnimatableBody2D ================ -**Inherits:** :ref:`StaticBody2D` **<** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`StaticBody2D` **<** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 无法被外力移动的 2D 物理物体。手动移动时会影响路径上的其他物体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -An animatable 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to :ref:`AnimationPlayer.ANIMATION_PROCESS_PHYSICS`), and :ref:`RemoteTransform2D`. +可动画的 2D 物理物体。无法因外力和接触而移动,但可以通过代码、\ :ref:`AnimationMixer`\ (\ :ref:`AnimationMixer.callback_mode_process` 设为 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS`\ )、\ :ref:`RemoteTransform2D` 等方法手动移动。 -When **AnimatableBody2D** is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects. +\ **AnimatableBody2D** 发生移动时,会对线速度和角速度进行估算,并用于影响其路径上的其他物理物体。因此适用于移动平台、门等移动的对象。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AnimatableBody2D_property_sync_to_physics: @@ -57,10 +57,10 @@ Property Descriptions 如果为 ``true``\ ,则物体的运动将与物理帧同步。当通过 :ref:`AnimationPlayer` 为运动设置动画时,例如在移动的平台上,这个功能很有用。\ **不要**\ 与\ :ref:`PhysicsBody2D.move_and_collide`\ 一起使用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animatablebody3d.rst b/classes/zh_CN/class_animatablebody3d.rst index 79a7444722..a633539c65 100644 --- a/classes/zh_CN/class_animatablebody3d.rst +++ b/classes/zh_CN/class_animatablebody3d.rst @@ -10,23 +10,23 @@ AnimatableBody3D ================ -**Inherits:** :ref:`StaticBody3D` **<** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`StaticBody3D` **<** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 无法被外力移动的 3D 物理物体。手动移动时会影响路径上的其他物体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -An animatable 3D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to :ref:`AnimationPlayer.ANIMATION_PROCESS_PHYSICS`), and :ref:`RemoteTransform3D`. +可动画的 3D 物理物体。无法因外力或接触而移动,但可以通过代码、\ :ref:`AnimationMixer`\ (\ :ref:`AnimationMixer.callback_mode_process` 设为 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS`\ )、\ :ref:`RemoteTransform3D` 等方法手动移动。 -When **AnimatableBody3D** is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects. +\ **AnimatableBody3D** 发生移动时,会对线速度和角速度进行估算,并用于影响其路径上的其他物理物体。因此适用于移动平台、门等移动的对象。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 物理测试演示 `__ @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AnimatableBody3D_property_sync_to_physics: @@ -68,10 +68,10 @@ Property Descriptions 如果为 ``true``\ ,则实体的运动将与物理帧同步。当通过 :ref:`AnimationPlayer` 为运动设置动画时,例如在移动的平台上,这个功能很有用。请\ **不要**\ 与 :ref:`PhysicsBody3D.move_and_collide` 函数一起使用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animatedsprite2d.rst b/classes/zh_CN/class_animatedsprite2d.rst index c5b1a6353e..94852c5569 100644 --- a/classes/zh_CN/class_animatedsprite2d.rst +++ b/classes/zh_CN/class_animatedsprite2d.rst @@ -10,21 +10,21 @@ AnimatedSprite2D ================ -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 包含多个纹理作为动画播放帧的 Sprite 节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **AnimatedSprite2D** 与 :ref:`Sprite2D` 节点类似,但是包含多张纹理,可用作动画帧。动画使用 :ref:`SpriteFrames` 资源创建,可以导入图像文件(或包含此类文件的文件夹)为该精灵提供动画帧。可以在编辑器的“动画帧”底部面板中配置 :ref:`SpriteFrames` 资源。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`2D 精灵动画 <../tutorials/2d/2d_sprite_animation>` @@ -32,8 +32,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -62,8 +62,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -90,8 +90,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_AnimatedSprite2D_signal_animation_changed: @@ -155,8 +155,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AnimatedSprite2D_property_animation: @@ -332,8 +332,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AnimatedSprite2D_method_get_playing_speed: @@ -440,10 +440,10 @@ void **stop** **(** **)** 停止当前正在播放的动画。会将动画的位置重置为 ``0``\ ,并将 ``custom_speed`` 重置为 ``1.0``\ 。另见 :ref:`pause`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animatedsprite3d.rst b/classes/zh_CN/class_animatedsprite3d.rst index b610d40395..491681ba3d 100644 --- a/classes/zh_CN/class_animatedsprite3d.rst +++ b/classes/zh_CN/class_animatedsprite3d.rst @@ -10,28 +10,28 @@ AnimatedSprite3D ================ -**Inherits:** :ref:`SpriteBase3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`SpriteBase3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 3D 世界中的 2D 精灵节点,可以使用多个 2D 纹理进行动画处理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **AnimatedSprite3D** 与 :ref:`Sprite3D` 节点类似,但是包含多张纹理,可用作动画 :ref:`sprite_frames`\ 。动画使用 :ref:`SpriteFrames` 资源创建,可以导入图像文件(或包含此类文件的文件夹)为该精灵提供动画帧。可以在编辑器的“动画帧”底部面板中配置 :ref:`SpriteFrames` 资源。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`2D 精灵动画(也适用于 3D) <../tutorials/2d/2d_sprite_animation>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -80,8 +80,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_AnimatedSprite3D_signal_animation_changed: @@ -145,8 +145,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AnimatedSprite3D_property_animation: @@ -254,8 +254,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AnimatedSprite3D_method_get_playing_speed: @@ -362,10 +362,10 @@ void **stop** **(** **)** 停止当前正在播放的动画。会将动画的位置重置为 ``0``\ ,并将 ``custom_speed`` 重置为 ``1.0``\ 。另见 :ref:`pause`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animatedtexture.rst b/classes/zh_CN/class_animatedtexture.rst index b7b7ef2f8d..d5259d7f76 100644 --- a/classes/zh_CN/class_animatedtexture.rst +++ b/classes/zh_CN/class_animatedtexture.rst @@ -10,14 +10,14 @@ AnimatedTexture =============== -**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于简单帧动画的代理纹理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **AnimatedTexture** 是一种用于帧动画的资源格式,其中多个纹理可以自动链接,每个帧都有预定义的延迟。与 :ref:`AnimationPlayer` 或 :ref:`AnimatedSprite2D` 不同,它不是 :ref:`Node`\ ,但具有可在任何可以使用 :ref:`Texture2D` 资源的地方使用的优势,例如在 :ref:`TileSet` 中。 @@ -33,8 +33,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -77,8 +77,8 @@ Methods .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_AnimatedTexture_constant_MAX_FRAMES: @@ -94,8 +94,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AnimatedTexture_property_current_frame: @@ -184,8 +184,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AnimatedTexture_method_get_frame_duration: @@ -233,10 +233,10 @@ void **set_frame_texture** **(** :ref:`int` frame, :ref:`Texture2D` 个纹理,但要记住,只有 0 到 :ref:`frames` - 1 的帧会成为动画的一部分。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animation.rst b/classes/zh_CN/class_animation.rst index c5fa24b3b2..85ad122bc0 100644 --- a/classes/zh_CN/class_animation.rst +++ b/classes/zh_CN/class_animation.rst @@ -10,14 +10,14 @@ Animation ========= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 存放的是用于对引擎中的任何对象进行动画处理的数据。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个资源存放的是用于对引擎中的任何对象进行动画处理的数据。动画分为轨道,轨道必须与节点关联。向轨道添加定时关键帧(事件)后,节点的状态可以随时间变化。 @@ -52,15 +52,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`动画教程索引 <../tutorials/animation/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -75,8 +75,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -223,8 +223,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Animation_TrackType: @@ -500,8 +500,8 @@ enum **FindMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Animation_property_length: @@ -558,8 +558,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Animation_method_add_track: @@ -877,7 +877,7 @@ void **compress** **(** :ref:`int` page_size=8192, :ref:`int` track_idx, :ref:`Animation` to_animation **)** -添加一个新的轨道,这个轨道是给定轨道 ``to_animation`` 的副本。 +向 ``to_animation`` 添加一个新轨道,该轨道是该动画中给定轨道的副本。 .. rst-class:: classref-item-separator @@ -1373,10 +1373,10 @@ void **value_track_set_update_mode** **(** :ref:`int` track_idx, :ref 设置值轨道的更新模式(请参阅 :ref:`UpdateMode`\ )。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationlibrary.rst b/classes/zh_CN/class_animationlibrary.rst index 7a10de067a..9c423d4ba8 100644 --- a/classes/zh_CN/class_animationlibrary.rst +++ b/classes/zh_CN/class_animationlibrary.rst @@ -10,40 +10,28 @@ AnimationLibrary ================ -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`Animation` 资源的容器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 动画库存储一组可通过 :ref:`StringName` 键访问的动画,可用于 :ref:`AnimationPlayer` 节点。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`动画教程索引 <../tutorials/animation/index>` .. rst-class:: classref-reftable-group -Properties ----------- - -.. table:: - :widths: auto - - +-------------------------------------+-----------------------------------------------------+--------+ - | :ref:`Dictionary` | :ref:`_data` | ``{}`` | - +-------------------------------------+-----------------------------------------------------+--------+ - -.. rst-class:: classref-reftable-group - -Methods -------- +方法 +---- .. table:: :widths: auto @@ -68,8 +56,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_AnimationLibrary_signal_animation_added: @@ -123,27 +111,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- - -.. _class_AnimationLibrary_property__data: - -.. rst-class:: classref-property - -:ref:`Dictionary` **_data** = ``{}`` - -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Method Descriptions -------------------- +方法说明 +-------- .. _class_AnimationLibrary_method_add_animation: @@ -213,10 +182,10 @@ void **rename_animation** **(** :ref:`StringName` name, :ref:` 将与键 ``name`` 关联的 :ref:`Animation` 的键更改为 ``newname``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationmixer.rst b/classes/zh_CN/class_animationmixer.rst new file mode 100644 index 0000000000..f020a3d953 --- /dev/null +++ b/classes/zh_CN/class_animationmixer.rst @@ -0,0 +1,809 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AnimationMixer.xml. + +.. _class_AnimationMixer: + +AnimationMixer +============== + +**继承:** :ref:`Node` **<** :ref:`Object` + +**派生:** :ref:`AnimationPlayer`, :ref:`AnimationTree` + +:ref:`AnimationPlayer` 和 :ref:`AnimationTree` 的基类。 + +.. rst-class:: classref-introduction-group + +描述 +---- + +:ref:`AnimationPlayer` 和 :ref:`AnimationTree` 的基类,用于管理动画列表。同时还提供了用于播放和混合的常用属性和方法。 + +在扩展后的类中实例化播放信息数据后,就会由 **AnimationMixer** 负责处理混合。 + +.. rst-class:: classref-reftable-group + +属性 +---- + +.. table:: + :widths: auto + + +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`active` | ``true`` | + +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ + | :ref:`int` | :ref:`audio_max_polyphony` | ``32`` | + +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ + | :ref:`AnimationCallbackModeMethod` | :ref:`callback_mode_method` | ``0`` | + +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ + | :ref:`AnimationCallbackModeProcess` | :ref:`callback_mode_process` | ``1`` | + +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`deterministic` | ``false`` | + +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ + | :ref:`bool` | :ref:`reset_on_save` | ``true`` | + +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ + | :ref:`NodePath` | :ref:`root_motion_track` | ``NodePath("")`` | + +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ + | :ref:`NodePath` | :ref:`root_node` | ``NodePath("..")`` | + +---------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------+ + +.. rst-class:: classref-reftable-group + +方法 +---- + +.. table:: + :widths: auto + + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_post_process_key_value` **(** :ref:`Animation` animation, :ref:`int` track, :ref:`Variant` value, :ref:`Object` object, :ref:`int` object_idx **)** |virtual| |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`add_animation_library` **(** :ref:`StringName` name, :ref:`AnimationLibrary` library **)** | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`advance` **(** :ref:`float` delta **)** | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_caches` **(** **)** | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`find_animation` **(** :ref:`Animation` animation **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`find_animation_library` **(** :ref:`Animation` animation **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Animation` | :ref:`get_animation` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationLibrary` | :ref:`get_animation_library` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName[]` | :ref:`get_animation_library_list` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_animation_list` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_root_motion_position` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_root_motion_position_accumulator` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`get_root_motion_rotation` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`get_root_motion_rotation_accumulator` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_root_motion_scale` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_root_motion_scale_accumulator` **(** **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_animation` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_animation_library` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_animation_library` **(** :ref:`StringName` name **)** | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`rename_animation_library` **(** :ref:`StringName` name, :ref:`StringName` newname **)** | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +信号 +---- + +.. _class_AnimationMixer_signal_animation_finished: + +.. rst-class:: classref-signal + +**animation_finished** **(** :ref:`StringName` anim_name **)** + +动画播放结束时通知。 + +\ **注意:**\ 如果动画正在循环播放,则不会发出此信号。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_signal_animation_libraries_updated: + +.. rst-class:: classref-signal + +**animation_libraries_updated** **(** **)** + +当动画库发生更改时发出通知。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_signal_animation_list_changed: + +.. rst-class:: classref-signal + +**animation_list_changed** **(** **)** + +当动画列表发生更改时发出通知。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_signal_animation_started: + +.. rst-class:: classref-signal + +**animation_started** **(** :ref:`StringName` anim_name **)** + +当动画开始播放时发出通知。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_signal_caches_cleared: + +.. rst-class:: classref-signal + +**caches_cleared** **(** **)** + +当缓存被清除时通知,可以是自动清除,也可以是通过 :ref:`clear_caches` 手动清除。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_signal_mixer_updated: + +.. rst-class:: classref-signal + +**mixer_updated** **(** **)** + +仅用于编辑器。当属性已完成更新进而更新动画播放编辑器中的虚拟 :ref:`AnimationPlayer` 时发出通知。 + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +枚举 +---- + +.. _enum_AnimationMixer_AnimationCallbackModeProcess: + +.. rst-class:: classref-enumeration + +enum **AnimationCallbackModeProcess**: + +.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationCallbackModeProcess` **ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS** = ``0`` + +在物理帧中处理动画(见 :ref:`Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS`\ )。尤其适用于对物理体进行动画处理。 + +.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_IDLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationCallbackModeProcess` **ANIMATION_CALLBACK_MODE_PROCESS_IDLE** = ``1`` + +在处理帧中处理动画(见 :ref:`Node.NOTIFICATION_INTERNAL_PROCESS`\ )。 + +.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_PROCESS_MANUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationCallbackModeProcess` **ANIMATION_CALLBACK_MODE_PROCESS_MANUAL** = ``2`` + +不处理动画。使用\ :ref:`advance`\ 手动处理动画。 + +.. rst-class:: classref-item-separator + +---- + +.. _enum_AnimationMixer_AnimationCallbackModeMethod: + +.. rst-class:: classref-enumeration + +enum **AnimationCallbackModeMethod**: + +.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_METHOD_DEFERRED: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationCallbackModeMethod` **ANIMATION_CALLBACK_MODE_METHOD_DEFERRED** = ``0`` + +在动画过程中批量调用方法,然后在处理完事件后再进行调用。这样就避免了在播放过程中涉及删除节点或修改AnimationPlayer的错误。 + +.. _class_AnimationMixer_constant_ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AnimationCallbackModeMethod` **ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE** = ``1`` + +在动画中达到时立即进行方法调用。 + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +属性说明 +-------- + +.. _class_AnimationMixer_property_active: + +.. rst-class:: classref-property + +:ref:`bool` **active** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_active** **(** :ref:`bool` value **)** +- :ref:`bool` **is_active** **(** **)** + +如果 ``true`` 时,\ **AnimationMixer** 将执行逻辑处理。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_property_audio_max_polyphony: + +.. rst-class:: classref-property + +:ref:`int` **audio_max_polyphony** = ``32`` + +.. rst-class:: classref-property-setget + +- void **set_audio_max_polyphony** **(** :ref:`int` value **)** +- :ref:`int` **get_audio_max_polyphony** **(** **)** + +每个指定的 AudioStreamPlayer 可能同时发出的声音的数量。 + +例如,如果该值为 ``32`` 并且动画有两个音轨,则分配的两个 :ref:`AudioStreamPlayer` 可以同时播放最多 ``32`` 个声音。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_property_callback_mode_method: + +.. rst-class:: classref-property + +:ref:`AnimationCallbackModeMethod` **callback_mode_method** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_callback_mode_method** **(** :ref:`AnimationCallbackModeMethod` value **)** +- :ref:`AnimationCallbackModeMethod` **get_callback_mode_method** **(** **)** + +方法调用轨道所使用的调用模式。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_property_callback_mode_process: + +.. rst-class:: classref-property + +:ref:`AnimationCallbackModeProcess` **callback_mode_process** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_callback_mode_process** **(** :ref:`AnimationCallbackModeProcess` value **)** +- :ref:`AnimationCallbackModeProcess` **get_callback_mode_process** **(** **)** + +更新动画的过程通知。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_property_deterministic: + +.. rst-class:: classref-property + +:ref:`bool` **deterministic** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_deterministic** **(** :ref:`bool` value **)** +- :ref:`bool` **is_deterministic** **(** **)** + +如果为 ``true``\ ,则混合使用确定性算法。总权重不进行归一化,在初始值的基础上进行累加(初始值为 ``0``\ ,表示可能存在的 ``"RESET"`` 动画)。 + +这意味着如果混合总权重为 ``0.0``\ ,则结果等于 ``"RESET"`` 动画。 + +如果混合动画之间的轨道数量不同,则缺少轨道的动画将被视为具有初始值。 + +如果为 ``false``\ ,则混合不会使用确定性算法。总权重将归一化且始终为 ``1.0``\ 。如果混合动画之间的轨道数量不同,则不会对缺少轨道的动画执行任何操作。 + +\ ** 注意:** 在 :ref:`AnimationTree` 中,与 :ref:`AnimationNodeAdd2` 、 :ref:`AnimationNodeAdd3` 、 :ref:`AnimationNodeSub2` 或权重大于 ``1.0`` 混合可能产生意想不到的结果。 + +例如,如果 :ref:`AnimationNodeAdd2` 混合了两个取值为 ``1.0`` 的节点,则总权重为 ``2.0``\ ,但它将被归一化使总权重保持 ``1.0``\ ,且结果将等于取值为 ``0.5`` 的 :ref:`AnimationNodeBlend2`\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_property_reset_on_save: + +.. rst-class:: classref-property + +:ref:`bool` **reset_on_save** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_reset_on_save_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_reset_on_save_enabled** **(** **)** + +由编辑器使用。如果设置为 ``true``\ ,场景将被保存,并应用重置动画(带有键 ``"RESET"`` 的动画)的效果,就好像它已被定位到时间 0 一样,编辑器保留场景在保存之前的值。 + +这使得在编辑器中预览和编辑动画更加方便,因为对场景的更改,只要在重置动画中被设置,就不会被保存。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_property_root_motion_track: + +.. rst-class:: classref-property + +:ref:`NodePath` **root_motion_track** = ``NodePath("")`` + +.. rst-class:: classref-property-setget + +- void **set_root_motion_track** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_root_motion_track** **(** **)** + +用于根部运动的动画轨道的路径。路径必须是指向节点的场景树有效路径,必须从将实现动画的节点的父节点开始指定。要指定控件属性或骨骼的轨道,请在路径后附加其名称,用 ``":"`` 隔开。例如,\ ``"character/skeleton:ankle"`` 或 ``"character/mesh:transform/local"``\ 。 + +如果轨道的类型是 :ref:`Animation.TYPE_POSITION_3D`\ 、\ :ref:`Animation.TYPE_ROTATION_3D`\ 、或者 :ref:`Animation.TYPE_SCALE_3D`\ ,那么将取消视觉上的变换,其动画看起来将是留在原地。参阅 :ref:`get_root_motion_position`\ 、\ :ref:`get_root_motion_rotation`\ 、\ :ref:`get_root_motion_scale`\ 、和 :ref:`RootMotionView`\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_property_root_node: + +.. rst-class:: classref-property + +:ref:`NodePath` **root_node** = ``NodePath("..")`` + +.. rst-class:: classref-property-setget + +- void **set_root_node** **(** :ref:`NodePath` value **)** +- :ref:`NodePath` **get_root_node** **(** **)** + +节点路径引用将从其运行的节点。 + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +方法说明 +-------- + +.. _class_AnimationMixer_private_method__post_process_key_value: + +.. rst-class:: classref-method + +:ref:`Variant` **_post_process_key_value** **(** :ref:`Animation` animation, :ref:`int` track, :ref:`Variant` value, :ref:`Object` object, :ref:`int` object_idx **)** |virtual| |const| + +虚函数,用于播放期间在获取关键帧之后的处理。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_add_animation_library: + +.. rst-class:: classref-method + +:ref:`Error` **add_animation_library** **(** :ref:`StringName` name, :ref:`AnimationLibrary` library **)** + +将 ``library`` 添加到该动画播放器的键 ``name`` 下。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_advance: + +.. rst-class:: classref-method + +void **advance** **(** :ref:`float` delta **)** + +手动将动画前进指定的时间(单位为秒)。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_clear_caches: + +.. rst-class:: classref-method + +void **clear_caches** **(** **)** + +**AnimationMixer** 会缓存动画节点。如果一个节点消失,它可能不会注意到;\ :ref:`clear_caches` 能够强制它再次更新缓存。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_find_animation: + +.. rst-class:: classref-method + +:ref:`StringName` **find_animation** **(** :ref:`Animation` animation **)** |const| + +返回 ``animation`` 的键;如果未找到,则返回一个空的 :ref:`StringName`\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_find_animation_library: + +.. rst-class:: classref-method + +:ref:`StringName` **find_animation_library** **(** :ref:`Animation` animation **)** |const| + +返回包含 ``animation`` 的 :ref:`AnimationLibrary` 的键;如果找不到,则返回一个空的 :ref:`StringName`\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_animation: + +.. rst-class:: classref-method + +:ref:`Animation` **get_animation** **(** :ref:`StringName` name **)** |const| + +返回带有键 ``name`` 的 :ref:`Animation`\ 。如果动画不存在,则返回 ``null`` 并记录错误。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_animation_library: + +.. rst-class:: classref-method + +:ref:`AnimationLibrary` **get_animation_library** **(** :ref:`StringName` name **)** |const| + +返回第一个键为 ``name`` 的 :ref:`AnimationLibrary`\ ,如果没有找到则返回 ``null``\ 。 + +要获得 :ref:`AnimationPlayer` 的全局动画库,请使用 ``get_animation_library("")``\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_animation_library_list: + +.. rst-class:: classref-method + +:ref:`StringName[]` **get_animation_library_list** **(** **)** |const| + +返回存储库的键名列表。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_animation_list: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **get_animation_list** **(** **)** |const| + +返回存储的动画键列表。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_root_motion_position: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_root_motion_position** **(** **)** |const| + +将具有 :ref:`root_motion_track` 的位置的运动增量,检索为一个可以在其他地方使用的 :ref:`Vector3`\ 。 + +如果 :ref:`root_motion_track` 不是 :ref:`Animation.TYPE_POSITION_3D` 类型轨道的路径,则返回 ``Vector3(0, 0, 0)``\ 。 + +另见 :ref:`root_motion_track` 和 :ref:`RootMotionView`\ 。 + +最基本的示例是将位置应用于 :ref:`CharacterBody3D`\ : + + +.. tabs:: + + .. code-tab:: gdscript + + var current_rotation: Quaternion + + func _process(delta): + if Input.is_action_just_pressed("animate"): + current_rotation = get_quaternion() + state_machine.travel("Animate") + var velocity: Vector3 = current_rotation * animation_tree.get_root_motion_position() / delta + set_velocity(velocity) + move_and_slide() + + + +通过将其与 :ref:`get_root_motion_position_accumulator` 结合使用,你可以更正确地应用根运动位置来考虑节点的旋转。 + + +.. tabs:: + + .. code-tab:: gdscript + + func _process(delta): + if Input.is_action_just_pressed("animate"): + state_machine.travel("Animate") + set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation()) + var velocity: Vector3 = (animation_tree.get_root_motion_rotation_accumulator().inverse() * get_quaternion()) * animation_tree.get_root_motion_position() / delta + set_velocity(velocity) + move_and_slide() + + + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_root_motion_position_accumulator: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_root_motion_position_accumulator** **(** **)** |const| + +检索具有 :ref:`root_motion_track` 的位置轨道的混合值,返回的是可以在其他地方使用的 :ref:`Vector3`\ 。 + +在想要遵循动画的初始动画帧值的情况下很有用。 + +例如,如果前一帧播放的是一个只有单个动画帧 ``Vector3(0, 0, 0)`` 的动画,然后下一帧播放的是一个只有单个动画帧\ ``Vector3(1, 0, 1)`` 的动画,它们之间的差异可以这样计算: + + +.. tabs:: + + .. code-tab:: gdscript + + var prev_root_motion_position_accumulator: Vector3 + + func _process(delta): + if Input.is_action_just_pressed("animate"): + state_machine.travel("Animate") + var current_root_motion_position_accumulator: Vector3 = animation_tree.get_root_motion_position_accumulator() + var difference: Vector3 = current_root_motion_position_accumulator - prev_root_motion_position_accumulator + prev_root_motion_position_accumulator = current_root_motion_position_accumulator + transform.origin += difference + + + +不过,如果动画是循环播放的,就可能会发生预料之外的不连续变化,所以这只对一些简单的情况有用。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_root_motion_rotation: + +.. rst-class:: classref-method + +:ref:`Quaternion` **get_root_motion_rotation** **(** **)** |const| + +检索带有 :ref:`root_motion_track` 的旋转运动,作为一个 :ref:`Quaternion`\ ,可以在其他地方使用。 + +如果 :ref:`root_motion_track` 不是 :ref:`Animation.TYPE_ROTATION_3D` 类型的轨迹的路径,返回 ``Quaternion(0, 0, 0, 1)`` 。 + +另见 :ref:`root_motion_track` 和 :ref:`RootMotionView`\ 。 + +最基本的例子是对 :ref:`CharacterBody3D` 应用旋转。 + + +.. tabs:: + + .. code-tab:: gdscript + + func _process(delta): + if Input.is_action_just_pressed("animate"): + state_machine.travel("Animate") + set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation() ) + + + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_root_motion_rotation_accumulator: + +.. rst-class:: classref-method + +:ref:`Quaternion` **get_root_motion_rotation_accumulator** **(** **)** |const| + +检索带有 :ref:`root_motion_track` 的旋转轨道的混合值,作为一个 :ref:`Quaternion`\ ,可以在其他地方使用。 + +这里必须正确地结合根运动位置,并且要考虑到旋转。参考 :ref:`get_root_motion_position`\ 。 + +并且,当你想重视动画的初始动画帧的值时,这会很有用。 + +比如说,如果一个动画在上一帧只播放一个 ``Quaternion(0, 0, 0, 1)`` 动画帧,并且一个动画在下一帧只播放了一个动画帧的 ``Quaternion(0, 0.707, 0, 0.707)`` 时,它们相差的值可以这样求出: + + +.. tabs:: + + .. code-tab:: gdscript + + var prev_root_motion_rotation_accumulator: Quaternion + + func _process(delta): + if Input.is_action_just_pressed("animate"): + state_machine.travel("Animate") + var current_root_motion_rotation_accumulator: Quaternion = animation_tree.get_root_motion_Quaternion_accumulator() + var difference: Quaternion = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator + prev_root_motion_rotation_accumulator = current_root_motion_rotation_accumulator + transform.basis *= difference + + + +然而,当一个动画循环时,可能会得到一个意料之外的变化,所以这个只在一些简单情况下才有用。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_root_motion_scale: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_root_motion_scale** **(** **)** |const| + +获取 :ref:`root_motion_track` 的缩放运动增量,类型为 :ref:`Vector3`\ ,可以在其他地方使用。 + +如果 :ref:`root_motion_track` 不是类型为 :ref:`Animation.TYPE_SCALE_3D` 的轨道的路径,则返回 ``Vector3(0, 0, 0)`` 。 + +另见 :ref:`root_motion_track` 和 :ref:`RootMotionView`\ 。 + +最基本的例子是对 :ref:`CharacterBody3D` 应用缩放。 + + +.. tabs:: + + .. code-tab:: gdscript + + var current_scale: Vector3 = Vector3(1, 1, 1) + var scale_accum: Vector3 = Vector3(1, 1, 1) + + func _process(delta): + if Input.is_action_just_pressed("animate"): + current_scale = get_scale() + scale_accum = Vector3(1, 1, 1) + state_machine.travel("Animate") + scale_accum += animation_tree.get_root_motion_scale() + set_scale(current_scale * scale_accum) + + + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_get_root_motion_scale_accumulator: + +.. rst-class:: classref-method + +:ref:`Vector3` **get_root_motion_scale_accumulator** **(** **)** |const| + +检索带有 :ref:`root_motion_track` 的缩放轨道的混合值,作为一个 :ref:`Vector3`\ ,可以在其他地方使用。 + +例如,如果一个动画在前一帧只播放了一个动画帧 ``Vector3(1, 1, 1)``\ ,并且一个动画在后一帧只播放了一个动画帧 ``Vector3(2, 2, 2)``\ ,他们之间相差的值可以这样求出: + + +.. tabs:: + + .. code-tab:: gdscript + + var prev_root_motion_scale_accumulator: Vector3 + + func _process(delta): + if Input.is_action_just_pressed("animate"): + state_machine.travel("Animate") + var current_root_motion_scale_accumulator: Vector3 = animation_tree.get_root_motion_scale_accumulator() + var difference: Vector3 = current_root_motion_scale_accumulator - prev_root_motion_scale_accumulator + prev_root_motion_scale_accumulator = current_root_motion_scale_accumulator + transform.basis = transform.basis.scaled(difference) + + + +然而,当一个动画循环时,可能会得到一个意料之外的变化,所以这个只在一些简单情况下才有用。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_has_animation: + +.. rst-class:: classref-method + +:ref:`bool` **has_animation** **(** :ref:`StringName` name **)** |const| + +如果该 :ref:`AnimationPlayer` 使用键 ``name`` 存储 :ref:`Animation`\ ,则返回 ``true``\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_has_animation_library: + +.. rst-class:: classref-method + +:ref:`bool` **has_animation_library** **(** :ref:`StringName` name **)** |const| + +如果该 :ref:`AnimationPlayer` 使用键 ``name`` 存储 :ref:`AnimationLibrary`\ ,则返回 ``true``\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_remove_animation_library: + +.. rst-class:: classref-method + +void **remove_animation_library** **(** :ref:`StringName` name **)** + +移除与键 ``name`` 关联的 :ref:`AnimationLibrary`\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationMixer_method_rename_animation_library: + +.. rst-class:: classref-method + +void **rename_animation_library** **(** :ref:`StringName` name, :ref:`StringName` newname **)** + +将与键 ``name`` 关联的 :ref:`AnimationLibrary` 移动到键 ``newname``\ 。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnode.rst b/classes/zh_CN/class_animationnode.rst index 747f1c64ae..b34604127f 100644 --- a/classes/zh_CN/class_animationnode.rst +++ b/classes/zh_CN/class_animationnode.rst @@ -10,16 +10,16 @@ AnimationNode ============= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AnimationNodeOutput`, :ref:`AnimationNodeSync`, :ref:`AnimationNodeTimeScale`, :ref:`AnimationNodeTimeSeek`, :ref:`AnimationRootNode` +**派生:** :ref:`AnimationNodeOutput`, :ref:`AnimationNodeSync`, :ref:`AnimationNodeTimeScale`, :ref:`AnimationNodeTimeSeek`, :ref:`AnimationRootNode` :ref:`AnimationTree` 节点的基类。与场景节点无关。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`AnimationTree` 节点的基础资源。通常不会直接使用,但你可以使用自定义混合公式创建自定义节点。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,28 +46,28 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_caption` **(** **)** |virtual| |const| | + | :ref:`String` | :ref:`_get_caption` **(** **)** |virtual| |const| | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AnimationNode` | :ref:`_get_child_by_name` **(** :ref:`StringName` name **)** |virtual| |const| | + | :ref:`AnimationNode` | :ref:`_get_child_by_name` **(** :ref:`StringName` name **)** |virtual| |const| | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_child_nodes` **(** **)** |virtual| |const| | + | :ref:`Dictionary` | :ref:`_get_child_nodes` **(** **)** |virtual| |const| | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_parameter_default_value` **(** :ref:`StringName` parameter **)** |virtual| |const| | + | :ref:`Variant` | :ref:`_get_parameter_default_value` **(** :ref:`StringName` parameter **)** |virtual| |const| | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`_get_parameter_list` **(** **)** |virtual| |const| | + | :ref:`Array` | :ref:`_get_parameter_list` **(** **)** |virtual| |const| | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_filter` **(** **)** |virtual| |const| | + | :ref:`bool` | :ref:`_has_filter` **(** **)** |virtual| |const| | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_parameter_read_only` **(** :ref:`StringName` parameter **)** |virtual| |const| | + | :ref:`bool` | :ref:`_is_parameter_read_only` **(** :ref:`StringName` parameter **)** |virtual| |const| | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_process` **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`bool` test_only **)** |virtual| |const| | + | :ref:`float` | :ref:`_process` **(** :ref:`float` time, :ref:`bool` seek, :ref:`bool` is_external_seeking, :ref:`bool` test_only **)** |virtual| |const| | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`add_input` **(** :ref:`String` name **)** | +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -102,8 +102,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_AnimationNode_signal_animation_node_removed: @@ -143,8 +143,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AnimationNode_FilterAction: @@ -190,8 +190,8 @@ enum **FilterAction**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AnimationNode_property_filter_enabled: @@ -212,10 +212,10 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_AnimationNode_method__get_caption: +.. _class_AnimationNode_private_method__get_caption: .. rst-class:: classref-method @@ -227,7 +227,7 @@ Method Descriptions ---- -.. _class_AnimationNode_method__get_child_by_name: +.. _class_AnimationNode_private_method__get_child_by_name: .. rst-class:: classref-method @@ -239,7 +239,7 @@ Method Descriptions ---- -.. _class_AnimationNode_method__get_child_nodes: +.. _class_AnimationNode_private_method__get_child_nodes: .. rst-class:: classref-method @@ -251,7 +251,7 @@ Method Descriptions ---- -.. _class_AnimationNode_method__get_parameter_default_value: +.. _class_AnimationNode_private_method__get_parameter_default_value: .. rst-class:: classref-method @@ -263,7 +263,7 @@ Method Descriptions ---- -.. _class_AnimationNode_method__get_parameter_list: +.. _class_AnimationNode_private_method__get_parameter_list: .. rst-class:: classref-method @@ -275,7 +275,7 @@ Method Descriptions ---- -.. _class_AnimationNode_method__has_filter: +.. _class_AnimationNode_private_method__has_filter: .. rst-class:: classref-method @@ -287,7 +287,7 @@ Method Descriptions ---- -.. _class_AnimationNode_method__is_parameter_read_only: +.. _class_AnimationNode_private_method__is_parameter_read_only: .. rst-class:: classref-method @@ -299,7 +299,7 @@ Method Descriptions ---- -.. _class_AnimationNode_method__process: +.. _class_AnimationNode_private_method__process: .. rst-class:: classref-method @@ -469,10 +469,10 @@ void **set_parameter** **(** :ref:`StringName` name, :ref:`Var 设置一个自定义参数。这些参数被用作本地内存,因为资源可以在树或场景中重复使用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodeadd2.rst b/classes/zh_CN/class_animationnodeadd2.rst index 05b8712624..7b50762981 100644 --- a/classes/zh_CN/class_animationnodeadd2.rst +++ b/classes/zh_CN/class_animationnodeadd2.rst @@ -10,14 +10,14 @@ AnimationNodeAdd2 ================= -**Inherits:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在 :ref:`AnimationNodeBlendTree` 中加法地混合两个动画。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 可添加到 :ref:`AnimationNodeBlendTree` 的资源。根据取值将两个动画加法混合在一起。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodeadd3.rst b/classes/zh_CN/class_animationnodeadd3.rst index b032eecb1c..d138a03a21 100644 --- a/classes/zh_CN/class_animationnodeadd3.rst +++ b/classes/zh_CN/class_animationnodeadd3.rst @@ -10,14 +10,14 @@ AnimationNodeAdd3 ================= -**Inherits:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在 :ref:`AnimationNodeBlendTree` 中将三个动画中的两个动画相加。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 可添加到 :ref:`AnimationNodeBlendTree` 的资源。根据取值将三个动画中的两个进行加法混合。 @@ -33,17 +33,17 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` - `第三人称射击演示 `__ -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodeanimation.rst b/classes/zh_CN/class_animationnodeanimation.rst index 99876980e3..dcdca98737 100644 --- a/classes/zh_CN/class_animationnodeanimation.rst +++ b/classes/zh_CN/class_animationnodeanimation.rst @@ -10,21 +10,21 @@ AnimationNodeAnimation ====================== -**Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`AnimationNodeBlendTree` 的输入动画。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 一种添加到 :ref:`AnimationNodeBlendTree` 的资源。只有一个输出端口,使用的是 :ref:`animation` 属性。可用作 :ref:`AnimationNode` 的输入,将动画混合在一起。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` @@ -34,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AnimationNodeAnimation_PlayMode: @@ -83,8 +83,8 @@ enum **PlayMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AnimationNodeAnimation_property_animation: @@ -116,10 +116,10 @@ Property Descriptions 确定动画的播放方向。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodeblend2.rst b/classes/zh_CN/class_animationnodeblend2.rst index 461e52682a..b5887a1d6d 100644 --- a/classes/zh_CN/class_animationnodeblend2.rst +++ b/classes/zh_CN/class_animationnodeblend2.rst @@ -10,14 +10,14 @@ AnimationNodeBlend2 =================== -**Inherits:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在 :ref:`AnimationNodeBlendTree` 中将两个动画进行线性混合。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 添加到 :ref:`AnimationNodeBlendTree` 的资源。根据取值将两个动画进行线性混合。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` @@ -34,10 +34,10 @@ Tutorials - `第三人称射击演示 `__ -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodeblend3.rst b/classes/zh_CN/class_animationnodeblend3.rst index f05f88427b..d41d48dccf 100644 --- a/classes/zh_CN/class_animationnodeblend3.rst +++ b/classes/zh_CN/class_animationnodeblend3.rst @@ -10,14 +10,14 @@ AnimationNodeBlend3 =================== -**Inherits:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在 :ref:`AnimationNodeBlendTree` 中将三个动画中的两个进行线性混合。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 可添加到 :ref:`AnimationNodeBlendTree` 的资源。根据取值将三个动画中的两个进行线性混合。 @@ -33,15 +33,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodeblendspace1d.rst b/classes/zh_CN/class_animationnodeblendspace1d.rst index b19f26c0f9..8ff655548d 100644 --- a/classes/zh_CN/class_animationnodeblendspace1d.rst +++ b/classes/zh_CN/class_animationnodeblendspace1d.rst @@ -10,14 +10,14 @@ AnimationNodeBlendSpace1D ========================= -**Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 一组放置在一个虚拟轴上的 :ref:`AnimationRootNode`\ ,在两个相邻节点之间交叉淡化。被 :ref:`AnimationTree` 使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 可添加到 :ref:`AnimationNodeBlendTree` 的资源。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -84,8 +84,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AnimationNodeBlendSpace1D_BlendMode: @@ -123,8 +123,8 @@ enum **BlendMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AnimationNodeBlendSpace1D_property_blend_mode: @@ -232,8 +232,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AnimationNodeBlendSpace1D_method_add_blend_point: @@ -315,10 +315,10 @@ void **set_blend_point_position** **(** :ref:`int` point, :ref:`float 更新混合轴上索引 ``point`` 处的点的位置。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodeblendspace2d.rst b/classes/zh_CN/class_animationnodeblendspace2d.rst index be41b42914..471a44568b 100644 --- a/classes/zh_CN/class_animationnodeblendspace2d.rst +++ b/classes/zh_CN/class_animationnodeblendspace2d.rst @@ -10,14 +10,14 @@ AnimationNodeBlendSpace2D ========================= -**Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 一组放置在 2D 坐标上的 :ref:`AnimationRootNode`\ ,在三个相邻节点之间交叉淡化。被 :ref:`AnimationTree` 使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`AnimationNodeBlendTree` 使用的资源。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -62,8 +62,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -98,8 +98,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_AnimationNodeBlendSpace2D_signal_triangles_updated: @@ -115,8 +115,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AnimationNodeBlendSpace2D_BlendMode: @@ -154,8 +154,8 @@ enum **BlendMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AnimationNodeBlendSpace2D_property_auto_triangles: @@ -297,8 +297,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AnimationNodeBlendSpace2D_method_add_blend_point: @@ -428,10 +428,10 @@ void **set_blend_point_position** **(** :ref:`int` point, :ref:`Vecto 更新混合轴上索引 ``point`` 处的点的位置。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodeblendtree.rst b/classes/zh_CN/class_animationnodeblendtree.rst index 220104f07a..d97c0d578f 100644 --- a/classes/zh_CN/class_animationnodeblendtree.rst +++ b/classes/zh_CN/class_animationnodeblendtree.rst @@ -10,14 +10,14 @@ AnimationNodeBlendTree ====================== -**Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于复杂动画的许多类型 :ref:`AnimationNode` 的子树。由 :ref:`AnimationTree` 使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个动画节点可以包含任何其他类型动画节点的子树,例如 :ref:`AnimationNodeTransition`\ 、\ :ref:`AnimationNodeBlend2`\ 、\ :ref:`AnimationNodeBlend3`\ 、\ :ref:`AnimationNodeOneShot` 等。这是最常用的动画节点根之一。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -44,8 +44,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -76,8 +76,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_AnimationNodeBlendTree_signal_node_changed: @@ -93,8 +93,8 @@ Signals .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_AnimationNodeBlendTree_constant_CONNECTION_OK: @@ -150,8 +150,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AnimationNodeBlendTree_property_graph_offset: @@ -172,8 +172,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AnimationNodeBlendTree_method_add_node: @@ -279,10 +279,10 @@ void **set_node_position** **(** :ref:`StringName` name, :ref: 修改子动画节点的位置。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodeoneshot.rst b/classes/zh_CN/class_animationnodeoneshot.rst index 5bfea95a7d..a8be4e5aca 100644 --- a/classes/zh_CN/class_animationnodeoneshot.rst +++ b/classes/zh_CN/class_animationnodeoneshot.rst @@ -10,14 +10,14 @@ AnimationNodeOneShot ==================== -**Inherits:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在 :ref:`AnimationNodeBlendTree` 中播放一次动画。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 添加到 :ref:`AnimationNodeBlendTree` 的资源。这个动画节点将执行子动画并在完成后返回。可以自定义淡入和淡出的混合时间以及过滤器。 @@ -74,8 +74,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` @@ -83,8 +83,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -113,8 +113,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AnimationNodeOneShot_OneShotRequest: @@ -186,8 +186,8 @@ enum **MixMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AnimationNodeOneShot_property_autorestart: @@ -323,10 +323,10 @@ Property Descriptions 混合类型。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodeoutput.rst b/classes/zh_CN/class_animationnodeoutput.rst index f2de21cdef..abb093f4e1 100644 --- a/classes/zh_CN/class_animationnodeoutput.rst +++ b/classes/zh_CN/class_animationnodeoutput.rst @@ -10,21 +10,21 @@ AnimationNodeOutput =================== -**Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`AnimationNodeBlendTree` 的动画输出节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 在输出最终动画的 :ref:`AnimationNodeBlendTree` 中自动创建的节点。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` @@ -32,10 +32,10 @@ Tutorials - `第三人称射击演示 `__ -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodestatemachine.rst b/classes/zh_CN/class_animationnodestatemachine.rst index 2a06d46902..55e1c3e214 100644 --- a/classes/zh_CN/class_animationnodestatemachine.rst +++ b/classes/zh_CN/class_animationnodestatemachine.rst @@ -10,14 +10,14 @@ AnimationNodeStateMachine ========================= -**Inherits:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationRootNode` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 带有多个 :ref:`AnimationRootNode` 的状态机,用于 :ref:`AnimationTree`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 包含表示动画状态的多个 :ref:`AnimationRootNode`\ ,以图的形式连接。可以使用最短路径算法,将节点过渡配置为自动发生或通过代码发生。要以编程的方式控制过渡,请从 :ref:`AnimationTree` 节点获取 :ref:`AnimationNodeStateMachinePlayback` 对象。 @@ -40,15 +40,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -63,8 +63,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -115,8 +115,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AnimationNodeStateMachine_StateMachineType: @@ -154,8 +154,8 @@ enum **StateMachineType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AnimationNodeStateMachine_property_allow_transition_to_self: @@ -212,8 +212,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AnimationNodeStateMachine_method_add_node: @@ -415,7 +415,7 @@ void **replace_node** **(** :ref:`StringName` name, :ref:`Anim .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -441,10 +441,10 @@ void **set_node_position** **(** :ref:`StringName` name, :ref: 设置动画节点的坐标。用于在编辑器中显示。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodestatemachineplayback.rst b/classes/zh_CN/class_animationnodestatemachineplayback.rst index dfcd555f26..db3232f448 100644 --- a/classes/zh_CN/class_animationnodestatemachineplayback.rst +++ b/classes/zh_CN/class_animationnodestatemachineplayback.rst @@ -10,14 +10,14 @@ AnimationNodeStateMachinePlayback ================================= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 为 :ref:`AnimationNodeStateMachine` 提供播放控制。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 允许控制使用 :ref:`AnimationNodeStateMachine` 创建的 :ref:`AnimationTree` 状态机。使用 ``$AnimationTree.get("parameters/playback")`` 检索。 @@ -40,15 +40,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -59,8 +59,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -93,8 +93,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AnimationNodeStateMachinePlayback_method_get_current_length: @@ -222,10 +222,10 @@ void **travel** **(** :ref:`StringName` to_node, :ref:`bool` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`AnimationNodeStateMachine` 中连接两个 :ref:`AnimationRootNode` 的过渡。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 使用 :ref:`AnimationNodeStateMachinePlayback.travel` 时生成的路径,仅限于通过 **AnimationNodeStateMachineTransition** 连接的节点。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -62,8 +62,8 @@ Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_AnimationNodeStateMachineTransition_signal_advance_condition_changed: @@ -79,8 +79,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AnimationNodeStateMachineTransition_SwitchMode: @@ -152,8 +152,8 @@ enum **AdvanceMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AnimationNodeStateMachineTransition_property_advance_condition: @@ -300,10 +300,10 @@ Property Descriptions 这个状态和下一个状态之间的交叉渐变时间。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodesub2.rst b/classes/zh_CN/class_animationnodesub2.rst index 7e1c097934..f6dfc60013 100644 --- a/classes/zh_CN/class_animationnodesub2.rst +++ b/classes/zh_CN/class_animationnodesub2.rst @@ -10,14 +10,14 @@ AnimationNodeSub2 ================= -**Inherits:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在 :ref:`AnimationNodeBlendTree` 中对两个动画进行减法混合。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 要添加到 :ref:`AnimationNodeBlendTree` 的资源。根据数量值以减法方式混合两个动画。 @@ -29,15 +29,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`AnimationTree <../tutorials/animation/animation_tree>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodesync.rst b/classes/zh_CN/class_animationnodesync.rst index a20f9a4f07..0b85ce25e2 100644 --- a/classes/zh_CN/class_animationnodesync.rst +++ b/classes/zh_CN/class_animationnodesync.rst @@ -10,30 +10,30 @@ AnimationNodeSync ================= -**Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AnimationNodeAdd2`, :ref:`AnimationNodeAdd3`, :ref:`AnimationNodeBlend2`, :ref:`AnimationNodeBlend3`, :ref:`AnimationNodeOneShot`, :ref:`AnimationNodeSub2`, :ref:`AnimationNodeTransition` +**派生:** :ref:`AnimationNodeAdd2`, :ref:`AnimationNodeAdd3`, :ref:`AnimationNodeBlend2`, :ref:`AnimationNodeBlend3`, :ref:`AnimationNodeOneShot`, :ref:`AnimationNodeSub2`, :ref:`AnimationNodeTransition` 带有两个以上输入端口的 :ref:`AnimationNode` 基类,必须对这两个端口进行同步。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 一种动画节点,用于将两个或多个动画组合、混合、或混合在一起,同时使它们在 :ref:`AnimationTree` 中保持同步。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AnimationNodeSync_property_sync: @@ -66,10 +66,10 @@ Property Descriptions 如果为 ``true``\ ,则强制混合动画以前进帧。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodetimescale.rst b/classes/zh_CN/class_animationnodetimescale.rst index 14298cdec7..5f66e06bf0 100644 --- a/classes/zh_CN/class_animationnodetimescale.rst +++ b/classes/zh_CN/class_animationnodetimescale.rst @@ -10,30 +10,30 @@ AnimationNodeTimeScale ====================== -**Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 对时间进行缩放的动画节点,在 :ref:`AnimationTree` 中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 允许缩放任何子节点中动画的速度(或反转)。将其设置为 ``0.0`` 将暂停动画。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` - `3D 平台跳跃演示 `__ -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodetimeseek.rst b/classes/zh_CN/class_animationnodetimeseek.rst index 49dd9f8936..135f0f7d71 100644 --- a/classes/zh_CN/class_animationnodetimeseek.rst +++ b/classes/zh_CN/class_animationnodetimeseek.rst @@ -10,14 +10,14 @@ AnimationNodeTimeSeek ===================== -**Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 对时间进行检索的动画节点,在 :ref:`AnimationTree` 中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个动画节点可用于使检索命令发生在动画图的任何次级子节点上。用于从 :ref:`AnimationNodeBlendTree` 的开头或某个特定播放位置开始播放 :ref:`Animation`\ 。 @@ -50,15 +50,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationnodetransition.rst b/classes/zh_CN/class_animationnodetransition.rst index abebc412e1..a57c06cbfa 100644 --- a/classes/zh_CN/class_animationnodetransition.rst +++ b/classes/zh_CN/class_animationnodetransition.rst @@ -10,14 +10,14 @@ AnimationNodeTransition ======================= -**Inherits:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationNodeSync` **<** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`AnimationTree` 中连接两个 :ref:`AnimationNode` 的过渡。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 适用于不需要更高级 :ref:`AnimationNodeStateMachine` 的情况的简单状态机。可以将动画连接到输入,还可以指定过渡时间。 @@ -60,8 +60,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` @@ -71,8 +71,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -89,8 +89,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -111,8 +111,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AnimationNodeTransition_property_allow_transition_to_self: @@ -184,8 +184,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AnimationNodeTransition_method_is_input_reset: @@ -231,10 +231,10 @@ void **set_input_reset** **(** :ref:`int` input, :ref:`bool` **<** :ref:`Object` +**继承:** :ref:`AnimationMixer` **<** :ref:`Node` **<** :ref:`Object` 用于播放动画的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 动画播放器用于动画的通用播放。它包含 :ref:`AnimationLibrary` 资源的字典和动画过渡之间的自定义混合时间。 @@ -29,8 +29,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`2D 精灵动画 <../tutorials/2d/2d_sprite_animation>` @@ -40,107 +40,79 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`String` | :ref:`assigned_animation` | | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`int` | :ref:`audio_max_polyphony` | ``32`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`String` | :ref:`autoplay` | ``""`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`String` | :ref:`current_animation` | ``""`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`float` | :ref:`current_animation_length` | | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`float` | :ref:`current_animation_position` | | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`AnimationMethodCallMode` | :ref:`method_call_mode` | ``0`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`bool` | :ref:`movie_quit_on_finish` | ``false`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`bool` | :ref:`playback_active` | | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`float` | :ref:`playback_default_blend_time` | ``0.0`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`AnimationProcessCallback` | :ref:`playback_process_mode` | ``1`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`bool` | :ref:`reset_on_save` | ``true`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`NodePath` | :ref:`root_node` | ``NodePath("..")`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ - | :ref:`float` | :ref:`speed_scale` | ``1.0`` | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+ + +-----------------------------+------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`assigned_animation` | | + +-----------------------------+------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`autoplay` | ``""`` | + +-----------------------------+------------------------------------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`current_animation` | ``""`` | + +-----------------------------+------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`current_animation_length` | | + +-----------------------------+------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`current_animation_position` | | + +-----------------------------+------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`movie_quit_on_finish` | ``false`` | + +-----------------------------+------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`playback_default_blend_time` | ``0.0`` | + +-----------------------------+------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`speed_scale` | ``1.0`` | + +-----------------------------+------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_post_process_key_value` **(** :ref:`Animation` animation, :ref:`int` track, :ref:`Variant` value, :ref:`Object` object, :ref:`int` object_idx **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`add_animation_library` **(** :ref:`StringName` name, :ref:`AnimationLibrary` library **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`advance` **(** :ref:`float` delta **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`animation_get_next` **(** :ref:`StringName` anim_from **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`animation_set_next` **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_caches` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_queue` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`find_animation` **(** :ref:`Animation` animation **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`find_animation_library` **(** :ref:`Animation` animation **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Animation` | :ref:`get_animation` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AnimationLibrary` | :ref:`get_animation_library` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName[]` | :ref:`get_animation_library_list` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_animation_list` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_blend_time` **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_playing_speed` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_queue` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_animation` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_animation_library` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_playing` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pause` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play` **(** :ref:`StringName` name="", :ref:`float` custom_blend=-1, :ref:`float` custom_speed=1.0, :ref:`bool` from_end=false **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play_backwards` **(** :ref:`StringName` name="", :ref:`float` custom_blend=-1 **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`queue` **(** :ref:`StringName` name **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_animation_library` **(** :ref:`StringName` name **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`rename_animation_library` **(** :ref:`StringName` name, :ref:`StringName` newname **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`seek` **(** :ref:`float` seconds, :ref:`bool` update=false **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_blend_time` **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to, :ref:`float` sec **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop` **(** :ref:`bool` keep_state=false **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`animation_get_next` **(** :ref:`StringName` animation_from **)** |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`animation_set_next` **(** :ref:`StringName` animation_from, :ref:`StringName` animation_to **)** | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_queue` **(** **)** | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_blend_time` **(** :ref:`StringName` animation_from, :ref:`StringName` animation_to **)** |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationMethodCallMode` | :ref:`get_method_call_mode` **(** **)** |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_playing_speed` **(** **)** |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationProcessCallback` | :ref:`get_process_callback` **(** **)** |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_queue` **(** **)** | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`get_root` **(** **)** |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing` **(** **)** |const| | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`pause` **(** **)** | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`play` **(** :ref:`StringName` name="", :ref:`float` custom_blend=-1, :ref:`float` custom_speed=1.0, :ref:`bool` from_end=false **)** | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`play_backwards` **(** :ref:`StringName` name="", :ref:`float` custom_blend=-1 **)** | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`queue` **(** :ref:`StringName` name **)** | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`seek` **(** :ref:`float` seconds, :ref:`bool` update=false, :ref:`bool` update_only=false **)** | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_blend_time` **(** :ref:`StringName` animation_from, :ref:`StringName` animation_to, :ref:`float` sec **)** | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_method_call_mode` **(** :ref:`AnimationMethodCallMode` mode **)** | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_process_callback` **(** :ref:`AnimationProcessCallback` mode **)** | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_root` **(** :ref:`NodePath` path **)** | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`stop` **(** :ref:`bool` keep_state=false **)** | + +--------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -148,8 +120,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_AnimationPlayer_signal_animation_changed: @@ -157,7 +129,7 @@ Signals **animation_changed** **(** :ref:`StringName` old_name, :ref:`StringName` new_name **)** -在前一个动画完成后,播放队列中的动画时发出。请参阅 :ref:`queue`\ 。 +在前一个动画完成后,队列中的动画播放时发出。另见 :ref:`queue`\ 。 \ **注意:**\ 通过 :ref:`play` 或 :ref:`AnimationTree` 改变动画时,不会发出此信号。 @@ -165,63 +137,13 @@ Signals ---- -.. _class_AnimationPlayer_signal_animation_finished: +.. _class_AnimationPlayer_signal_current_animation_changed: .. rst-class:: classref-signal -**animation_finished** **(** :ref:`StringName` anim_name **)** +**current_animation_changed** **(** :ref:`String` name **)** -动画播放结束时通知。 - -\ **注意:**\ 如果动画正在循环播放,则不会发出此信号。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_signal_animation_libraries_updated: - -.. rst-class:: classref-signal - -**animation_libraries_updated** **(** **)** - -当动画库发生更改时发出通知。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_signal_animation_list_changed: - -.. rst-class:: classref-signal - -**animation_list_changed** **(** **)** - -当动画列表发生更改时发出通知。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_signal_animation_started: - -.. rst-class:: classref-signal - -**animation_started** **(** :ref:`StringName` anim_name **)** - -当动画开始播放时发出通知。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_signal_caches_cleared: - -.. rst-class:: classref-signal - -**caches_cleared** **(** **)** - -当缓存被清除时通知,可以是自动清除,也可以是通过 :ref:`clear_caches` 手动清除。 +当 :ref:`current_animation` 更改时发出。 .. rst-class:: classref-section-separator @@ -229,8 +151,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AnimationPlayer_AnimationProcessCallback: @@ -244,7 +166,7 @@ enum **AnimationProcessCallback**: :ref:`AnimationProcessCallback` **ANIMATION_PROCESS_PHYSICS** = ``0`` -在物理帧中处理动画(见 :ref:`Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS`\ )。尤其适用于对物理体进行动画处理。 +用于向后兼容。见 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS`\ 。 .. _class_AnimationPlayer_constant_ANIMATION_PROCESS_IDLE: @@ -252,7 +174,7 @@ enum **AnimationProcessCallback**: :ref:`AnimationProcessCallback` **ANIMATION_PROCESS_IDLE** = ``1`` -在处理帧中处理动画(见 :ref:`Node.NOTIFICATION_INTERNAL_PROCESS`\ )。 +用于向后兼容。见 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_IDLE`\ 。 .. _class_AnimationPlayer_constant_ANIMATION_PROCESS_MANUAL: @@ -260,7 +182,7 @@ enum **AnimationProcessCallback**: :ref:`AnimationProcessCallback` **ANIMATION_PROCESS_MANUAL** = ``2`` -不处理动画。使用\ :ref:`advance`\ 手动处理动画。 +用于向后兼容。见 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_MANUAL`\ 。 .. rst-class:: classref-item-separator @@ -278,7 +200,7 @@ enum **AnimationMethodCallMode**: :ref:`AnimationMethodCallMode` **ANIMATION_METHOD_CALL_DEFERRED** = ``0`` -在动画过程中批量调用方法,然后在处理完事件后再进行调用。这样就避免了在播放过程中涉及删除节点或修改AnimationPlayer的错误。 +用于向后兼容。见 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_METHOD_DEFERRED`\ 。 .. _class_AnimationPlayer_constant_ANIMATION_METHOD_CALL_IMMEDIATE: @@ -286,7 +208,7 @@ enum **AnimationMethodCallMode**: :ref:`AnimationMethodCallMode` **ANIMATION_METHOD_CALL_IMMEDIATE** = ``1`` -在动画中达到时立即进行方法调用。 +用于向后兼容。见 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE`\ 。 .. rst-class:: classref-section-separator @@ -294,8 +216,8 @@ enum **AnimationMethodCallMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AnimationPlayer_property_assigned_animation: @@ -314,25 +236,6 @@ Property Descriptions ---- -.. _class_AnimationPlayer_property_audio_max_polyphony: - -.. rst-class:: classref-property - -:ref:`int` **audio_max_polyphony** = ``32`` - -.. rst-class:: classref-property-setget - -- void **set_audio_max_polyphony** **(** :ref:`int` value **)** -- :ref:`int` **get_audio_max_polyphony** **(** **)** - -每个指定的 AudioStreamPlayer 可能同时发出的声音的数量。 - -例如,如果该值为 ``32`` 并且动画有两个音轨,则分配的两个 :ref:`AudioStreamPlayer` 可以同时播放最多 ``32`` 个声音。 - -.. rst-class:: classref-item-separator - ----- - .. _class_AnimationPlayer_property_autoplay: .. rst-class:: classref-property @@ -401,23 +304,6 @@ Property Descriptions ---- -.. _class_AnimationPlayer_property_method_call_mode: - -.. rst-class:: classref-property - -:ref:`AnimationMethodCallMode` **method_call_mode** = ``0`` - -.. rst-class:: classref-property-setget - -- void **set_method_call_mode** **(** :ref:`AnimationMethodCallMode` value **)** -- :ref:`AnimationMethodCallMode` **get_method_call_mode** **(** **)** - -方法调用轨道所使用的调用模式。 - -.. rst-class:: classref-item-separator - ----- - .. _class_AnimationPlayer_property_movie_quit_on_finish: .. rst-class:: classref-property @@ -429,26 +315,9 @@ Property Descriptions - void **set_movie_quit_on_finish_enabled** **(** :ref:`bool` value **)** - :ref:`bool` **is_movie_quit_on_finish_enabled** **(** **)** -如果为 ``true``\ ,并且引擎在 Movie Maker 模式下运行(请参阅 :ref:`MovieWriter`\ ),则在此 **AnimationPlayer** 中播放完动画后,立即使用 :ref:`SceneTree.quit` 退出引擎。当引擎因此而退出时,会打印一条消息。 +如果为 ``true``\ ,并且引擎在 Movie Maker 模式下运行(见 :ref:`MovieWriter`\ ),则会在此 **AnimationPlayer** 中播放完动画后,立即使用 :ref:`SceneTree.quit` 退出引擎。当引擎因此而退出时,会打印一条消息。 -\ **注意:**\ 这与 :ref:`animation_finished` 信号遵循相同的逻辑,因此如果动画被设置为循环,它不会退出引擎。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_property_playback_active: - -.. rst-class:: classref-property - -:ref:`bool` **playback_active** - -.. rst-class:: classref-property-setget - -- void **set_active** **(** :ref:`bool` value **)** -- :ref:`bool` **is_active** **(** **)** - -如果为 ``true``\ ,根据流程相关通知更新动画。 +\ **注意:**\ 这与 :ref:`AnimationMixer.animation_finished` 信号遵循相同的逻辑,因此如果动画被设置为循环,它不会退出引擎。 .. rst-class:: classref-item-separator @@ -471,59 +340,6 @@ Property Descriptions ---- -.. _class_AnimationPlayer_property_playback_process_mode: - -.. rst-class:: classref-property - -:ref:`AnimationProcessCallback` **playback_process_mode** = ``1`` - -.. rst-class:: classref-property-setget - -- void **set_process_callback** **(** :ref:`AnimationProcessCallback` value **)** -- :ref:`AnimationProcessCallback` **get_process_callback** **(** **)** - -更新动画的过程通知。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_property_reset_on_save: - -.. rst-class:: classref-property - -:ref:`bool` **reset_on_save** = ``true`` - -.. rst-class:: classref-property-setget - -- void **set_reset_on_save_enabled** **(** :ref:`bool` value **)** -- :ref:`bool` **is_reset_on_save_enabled** **(** **)** - -由编辑器使用。如果设置为 ``true``\ ,场景将被保存,并应用重置动画(带有键 ``"RESET"`` 的动画)的效果,就好像它已被定位到时间 0 一样,编辑器保留场景在保存之前的值。 - -这使得在编辑器中预览和编辑动画更加方便,因为对场景的更改,只要在重置动画中被设置,就不会被保存。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_property_root_node: - -.. rst-class:: classref-property - -:ref:`NodePath` **root_node** = ``NodePath("..")`` - -.. rst-class:: classref-property-setget - -- void **set_root** **(** :ref:`NodePath` value **)** -- :ref:`NodePath` **get_root** **(** **)** - -节点路径引用将从其运行的节点。 - -.. rst-class:: classref-item-separator - ----- - .. _class_AnimationPlayer_property_speed_scale: .. rst-class:: classref-property @@ -545,52 +361,16 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- - -.. _class_AnimationPlayer_method__post_process_key_value: - -.. rst-class:: classref-method - -:ref:`Variant` **_post_process_key_value** **(** :ref:`Animation` animation, :ref:`int` track, :ref:`Variant` value, :ref:`Object` object, :ref:`int` object_idx **)** |virtual| |const| - -一个用于播放期间键获取之后的处理的虚函数。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_method_add_animation_library: - -.. rst-class:: classref-method - -:ref:`Error` **add_animation_library** **(** :ref:`StringName` name, :ref:`AnimationLibrary` library **)** - -将 ``library`` 添加到该动画播放器的键 ``name`` 下。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_method_advance: - -.. rst-class:: classref-method - -void **advance** **(** :ref:`float` delta **)** - -移动动画时间轴上的位置并立即更新动画。\ ``delta`` 是要移动的时间,单位为秒。会处理位于当前帧和 ``delta`` 之间的事件。 - -.. rst-class:: classref-item-separator - ----- +方法说明 +-------- .. _class_AnimationPlayer_method_animation_get_next: .. rst-class:: classref-method -:ref:`StringName` **animation_get_next** **(** :ref:`StringName` anim_from **)** |const| +:ref:`StringName` **animation_get_next** **(** :ref:`StringName` animation_from **)** |const| -返回在 ``anim_from`` 动画之后排队播放的动画的键。 +返回在 ``animation_from`` 动画之后排队播放的动画的键。 .. rst-class:: classref-item-separator @@ -600,21 +380,9 @@ void **advance** **(** :ref:`float` delta **)** .. rst-class:: classref-method -void **animation_set_next** **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to **)** +void **animation_set_next** **(** :ref:`StringName` animation_from, :ref:`StringName` animation_to **)** -当 ``anim_from`` 动画完成时,触发 ``anim_to`` 动画。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_method_clear_caches: - -.. rst-class:: classref-method - -void **clear_caches** **(** **)** - -**AnimationPlayer** 缓存动画节点。如果一个节点消失,它可能不会注意到;\ :ref:`clear_caches` 强制它再次更新缓存。 +当 ``animation_from`` 动画完成时,触发 ``animation_to`` 动画。 .. rst-class:: classref-item-separator @@ -632,85 +400,11 @@ void **clear_queue** **(** **)** ---- -.. _class_AnimationPlayer_method_find_animation: - -.. rst-class:: classref-method - -:ref:`StringName` **find_animation** **(** :ref:`Animation` animation **)** |const| - -返回 ``animation`` 的键;如果未找到,则返回一个空的 :ref:`StringName`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_method_find_animation_library: - -.. rst-class:: classref-method - -:ref:`StringName` **find_animation_library** **(** :ref:`Animation` animation **)** |const| - -返回包含 ``animation`` 的 :ref:`AnimationLibrary` 的键;如果找不到,则返回一个空的 :ref:`StringName`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_method_get_animation: - -.. rst-class:: classref-method - -:ref:`Animation` **get_animation** **(** :ref:`StringName` name **)** |const| - -返回带有键 ``name`` 的 :ref:`Animation`\ 。如果动画不存在,则返回 ``null`` 并记录错误。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_method_get_animation_library: - -.. rst-class:: classref-method - -:ref:`AnimationLibrary` **get_animation_library** **(** :ref:`StringName` name **)** |const| - -返回第一个键为 ``name`` 的 :ref:`AnimationLibrary`\ ,如果没有找到则返回 ``null``\ 。 - -要获得 **AnimationPlayer** 的全局动画库,请使用 ``get_animation_library("")``\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_method_get_animation_library_list: - -.. rst-class:: classref-method - -:ref:`StringName[]` **get_animation_library_list** **(** **)** |const| - -返回存储库的键名列表。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_method_get_animation_list: - -.. rst-class:: classref-method - -:ref:`PackedStringArray` **get_animation_list** **(** **)** |const| - -返回存储的动画键列表。 - -.. rst-class:: classref-item-separator - ----- - .. _class_AnimationPlayer_method_get_blend_time: .. rst-class:: classref-method -:ref:`float` **get_blend_time** **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to **)** |const| +:ref:`float` **get_blend_time** **(** :ref:`StringName` animation_from, :ref:`StringName` animation_to **)** |const| 返回两个动画之间的混合时间(以秒为单位),由它们的键引用。 @@ -718,6 +412,18 @@ void **clear_queue** **(** **)** ---- +.. _class_AnimationPlayer_method_get_method_call_mode: + +.. rst-class:: classref-method + +:ref:`AnimationMethodCallMode` **get_method_call_mode** **(** **)** |const| + +用于向后兼容。见 :ref:`AnimationCallbackModeMethod`\ 。 + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationPlayer_method_get_playing_speed: .. rst-class:: classref-method @@ -732,6 +438,18 @@ void **clear_queue** **(** **)** ---- +.. _class_AnimationPlayer_method_get_process_callback: + +.. rst-class:: classref-method + +:ref:`AnimationProcessCallback` **get_process_callback** **(** **)** |const| + +用于向后兼容。见 :ref:`AnimationCallbackModeProcess`\ 。 + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationPlayer_method_get_queue: .. rst-class:: classref-method @@ -744,25 +462,13 @@ void **clear_queue** **(** **)** ---- -.. _class_AnimationPlayer_method_has_animation: +.. _class_AnimationPlayer_method_get_root: .. rst-class:: classref-method -:ref:`bool` **has_animation** **(** :ref:`StringName` name **)** |const| +:ref:`NodePath` **get_root** **(** **)** |const| -如果该 **AnimationPlayer** 使用键 ``name`` 存储 :ref:`Animation`\ ,则返回 ``true``\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_method_has_animation_library: - -.. rst-class:: classref-method - -:ref:`bool` **has_animation_library** **(** :ref:`StringName` name **)** |const| - -如果该 **AnimationPlayer** 使用键 ``name`` 存储 :ref:`AnimationLibrary`\ ,则返回 ``true``\ 。 +用于向后兼容。见 :ref:`AnimationMixer.root_node`\ 。 .. rst-class:: classref-item-separator @@ -840,39 +546,17 @@ void **queue** **(** :ref:`StringName` name **)** ---- -.. _class_AnimationPlayer_method_remove_animation_library: - -.. rst-class:: classref-method - -void **remove_animation_library** **(** :ref:`StringName` name **)** - -移除与键 ``name`` 关联的 :ref:`AnimationLibrary`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationPlayer_method_rename_animation_library: - -.. rst-class:: classref-method - -void **rename_animation_library** **(** :ref:`StringName` name, :ref:`StringName` newname **)** - -将与键 ``name`` 关联的 :ref:`AnimationLibrary` 移动到键 ``newname``\ 。 - -.. rst-class:: classref-item-separator - ----- - .. _class_AnimationPlayer_method_seek: .. rst-class:: classref-method -void **seek** **(** :ref:`float` seconds, :ref:`bool` update=false **)** +void **seek** **(** :ref:`float` seconds, :ref:`bool` update=false, :ref:`bool` update_only=false **)** 将动画寻道到时间点 ``seconds``\ (单位为秒)。\ ``update`` 为 ``true`` 时会同时更新动画,否则会在处理时更新。当前帧和 ``seconds`` 之间的事件会被跳过。 -\ **注意:**\ 寻道至动画的末尾不会触发 :ref:`animation_finished`\ 。如果想要跳过动画并触发该信号,请使用 :ref:`advance`\ 。 +如果 ``update_only`` 为 true,则不会处理方法轨道、音频轨道、动画播放轨道。 + +\ **注意:**\ 寻道至动画的末尾不会触发 :ref:`AnimationMixer.animation_finished`\ 。如果想要跳过动画并触发该信号,请使用 :ref:`AnimationMixer.advance`\ 。 .. rst-class:: classref-item-separator @@ -882,7 +566,7 @@ void **seek** **(** :ref:`float` seconds, :ref:`bool` u .. rst-class:: classref-method -void **set_blend_time** **(** :ref:`StringName` anim_from, :ref:`StringName` anim_to, :ref:`float` sec **)** +void **set_blend_time** **(** :ref:`StringName` animation_from, :ref:`StringName` animation_to, :ref:`float` sec **)** 指定两个动画(由它们的键所引用)之间的混合时间(以秒为单位)。 @@ -890,6 +574,42 @@ void **set_blend_time** **(** :ref:`StringName` anim_from, :re ---- +.. _class_AnimationPlayer_method_set_method_call_mode: + +.. rst-class:: classref-method + +void **set_method_call_mode** **(** :ref:`AnimationMethodCallMode` mode **)** + +用于向后兼容。见 :ref:`AnimationCallbackModeMethod`\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationPlayer_method_set_process_callback: + +.. rst-class:: classref-method + +void **set_process_callback** **(** :ref:`AnimationProcessCallback` mode **)** + +用于向后兼容。见 :ref:`AnimationCallbackModeProcess`\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationPlayer_method_set_root: + +.. rst-class:: classref-method + +void **set_root** **(** :ref:`NodePath` path **)** + +用于向后兼容。见 :ref:`AnimationMixer.root_node`\ 。 + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationPlayer_method_stop: .. rst-class:: classref-method @@ -902,10 +622,10 @@ void **stop** **(** :ref:`bool` keep_state=false **)** \ **注意:**\ 方法/音频/动画播放轨道不会被该方法处理。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationrootnode.rst b/classes/zh_CN/class_animationrootnode.rst index 87ad3f7d9e..9ece1b0a32 100644 --- a/classes/zh_CN/class_animationrootnode.rst +++ b/classes/zh_CN/class_animationrootnode.rst @@ -10,16 +10,16 @@ AnimationRootNode ================= -**Inherits:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AnimationNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AnimationNodeAnimation`, :ref:`AnimationNodeBlendSpace1D`, :ref:`AnimationNodeBlendSpace2D`, :ref:`AnimationNodeBlendTree`, :ref:`AnimationNodeStateMachine` +**派生:** :ref:`AnimationNodeAnimation`, :ref:`AnimationNodeBlendSpace1D`, :ref:`AnimationNodeBlendSpace2D`, :ref:`AnimationNodeBlendTree`, :ref:`AnimationNodeStateMachine` 包含一个或多个复合动画的 :ref:`AnimationNode` 的基类。通常用于 :ref:`AnimationTree.tree_root`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **AnimationRootNode** 是存放完整动画的 :ref:`AnimationNode` 的基类。完整动画指的是 :ref:`AnimationNodeBlendTree` 中 :ref:`AnimationNodeOutput` 的输出,或者其他 **AnimationRootNode** 的输出。可以在 :ref:`AnimationTree.tree_root` 或其他 **AnimationRootNode** 中使用。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_animationtree.rst b/classes/zh_CN/class_animationtree.rst index 41e57c426b..9851f1b48a 100644 --- a/classes/zh_CN/class_animationtree.rst +++ b/classes/zh_CN/class_animationtree.rst @@ -10,14 +10,14 @@ AnimationTree ============= -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`AnimationMixer` **<** :ref:`Node` **<** :ref:`Object` 用于 :ref:`AnimationPlayer` 中高级动画过渡的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于 :ref:`AnimationPlayer` 中高级动画过渡的节点。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 AnimationTree <../tutorials/animation/animation_tree>` @@ -34,53 +34,35 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto - +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ - | :ref:`bool` | :ref:`active` | ``false`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`advance_expression_base_node` | ``NodePath(".")`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`anim_player` | ``NodePath("")`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ - | :ref:`int` | :ref:`audio_max_polyphony` | ``32`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ - | :ref:`AnimationProcessCallback` | :ref:`process_callback` | ``1`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ - | :ref:`NodePath` | :ref:`root_motion_track` | ``NodePath("")`` | - +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ - | :ref:`AnimationNode` | :ref:`tree_root` | | - +------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------+ + +---------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`advance_expression_base_node` | ``NodePath(".")`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`anim_player` | ``NodePath("")`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`bool` | deterministic | ``true`` (overrides :ref:`AnimationMixer`) | + +---------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ + | :ref:`AnimationRootNode` | :ref:`tree_root` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_post_process_key_value` **(** :ref:`Animation` animation, :ref:`int` track, :ref:`Variant` value, :ref:`Object` object, :ref:`int` object_idx **)** |virtual| |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`advance` **(** :ref:`float` delta **)** | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_root_motion_position` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_root_motion_position_accumulator` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`get_root_motion_rotation` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`get_root_motion_rotation_accumulator` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_root_motion_scale` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_root_motion_scale_accumulator` **(** **)** |const| | - +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationProcessCallback` | :ref:`get_process_callback` **(** **)** |const| | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_process_callback` **(** :ref:`AnimationProcessCallback` mode **)** | + +------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -88,21 +70,7 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- - -.. _class_AnimationTree_signal_animation_finished: - -.. rst-class:: classref-signal - -**animation_finished** **(** :ref:`StringName` anim_name **)** - -某个动画完成播放时发出通知。 - -\ **注意:**\ 如果动画需要循环或者是被中止的,则不会发出该信号。另外请意识到可能存在同步和过渡所导致的不可见的播放。 - -.. rst-class:: classref-item-separator - +信号 ---- .. _class_AnimationTree_signal_animation_player_changed: @@ -111,21 +79,7 @@ Signals **animation_player_changed** **(** **)** -当 :ref:`anim_player` 被改变时触发。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_signal_animation_started: - -.. rst-class:: classref-signal - -**animation_started** **(** :ref:`StringName` anim_name **)** - -某个动画完成播放时发出通知。 - -\ **注意:**\ 如果动画需要循环或者是被中止的,则不会发出该信号。另外请意识到可能存在同步和过渡所导致的不可见的播放。 +当 :ref:`anim_player` 被改变时发出。 .. rst-class:: classref-section-separator @@ -133,8 +87,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AnimationTree_AnimationProcessCallback: @@ -148,7 +102,7 @@ enum **AnimationProcessCallback**: :ref:`AnimationProcessCallback` **ANIMATION_PROCESS_PHYSICS** = ``0`` -动画将在物理帧期间推进(见 :ref:`Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS`\ )。 +用于向后兼容。见 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS`\ 。 .. _class_AnimationTree_constant_ANIMATION_PROCESS_IDLE: @@ -156,7 +110,7 @@ enum **AnimationProcessCallback**: :ref:`AnimationProcessCallback` **ANIMATION_PROCESS_IDLE** = ``1`` -动画将在处理帧期间推进(见 :ref:`Node.NOTIFICATION_INTERNAL_PROCESS`\ )。 +用于向后兼容。见 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_IDLE`\ 。 .. _class_AnimationTree_constant_ANIMATION_PROCESS_MANUAL: @@ -164,7 +118,7 @@ enum **AnimationProcessCallback**: :ref:`AnimationProcessCallback` **ANIMATION_PROCESS_MANUAL** = ``2`` -只能手动行进动画(见 :ref:`advance`\ )。 +用于向后兼容。见 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_MANUAL`\ 。 .. rst-class:: classref-section-separator @@ -172,25 +126,8 @@ enum **AnimationProcessCallback**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- - -.. _class_AnimationTree_property_active: - -.. rst-class:: classref-property - -:ref:`bool` **active** = ``false`` - -.. rst-class:: classref-property-setget - -- void **set_active** **(** :ref:`bool` value **)** -- :ref:`bool` **is_active** **(** **)** - -如果 ``true`` 时,\ **AnimationTree** 将执行逻辑处理。 - -.. rst-class:: classref-item-separator - ----- +属性说明 +-------- .. _class_AnimationTree_property_advance_expression_base_node: @@ -203,7 +140,7 @@ Property Descriptions - void **set_advance_expression_base_node** **(** :ref:`NodePath` value **)** - :ref:`NodePath` **get_advance_expression_base_node** **(** **)** -用于评估 AnimationNode :ref:`Expression` 的 :ref:`Node` 的路径,如果内部未明确指定路径时使用。 +用于评估 :ref:`AnimationNode` :ref:`Expression` 的 :ref:`Node` 的路径,内部未明确指定路径时使用。 .. rst-class:: classref-item-separator @@ -226,73 +163,18 @@ Property Descriptions ---- -.. _class_AnimationTree_property_audio_max_polyphony: - -.. rst-class:: classref-property - -:ref:`int` **audio_max_polyphony** = ``32`` - -.. rst-class:: classref-property-setget - -- void **set_audio_max_polyphony** **(** :ref:`int` value **)** -- :ref:`int` **get_audio_max_polyphony** **(** **)** - -每个指定的 AudioStreamPlayer 可能同时发出的声音的数量。 - -例如,如果该值为 ``32`` 并且动画有两个音轨,则分配的两个 :ref:`AudioStreamPlayer` 可以同时播放最多 ``32`` 个声音。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_property_process_callback: - -.. rst-class:: classref-property - -:ref:`AnimationProcessCallback` **process_callback** = ``1`` - -.. rst-class:: classref-property-setget - -- void **set_process_callback** **(** :ref:`AnimationProcessCallback` value **)** -- :ref:`AnimationProcessCallback` **get_process_callback** **(** **)** - -该 **AnimationTree** 的处理模式。可用的模式见 :ref:`AnimationProcessCallback`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_property_root_motion_track: - -.. rst-class:: classref-property - -:ref:`NodePath` **root_motion_track** = ``NodePath("")`` - -.. rst-class:: classref-property-setget - -- void **set_root_motion_track** **(** :ref:`NodePath` value **)** -- :ref:`NodePath` **get_root_motion_track** **(** **)** - -用于根部运动的动画轨道的路径。路径必须是指向节点的场景树有效路径,必须从将实现动画的节点的父节点开始指定。要指定控件属性或骨骼的轨道,请在路径后附加其名称,用 ``":"`` 隔开。例如,\ ``"character/skeleton:ankle"`` 或 ``"character/mesh:transform/local"``\ 。 - -如果轨道的类型是 :ref:`Animation.TYPE_POSITION_3D`\ 、\ :ref:`Animation.TYPE_ROTATION_3D`\ 、或者 :ref:`Animation.TYPE_SCALE_3D`\ ,那么将取消视觉上的变换,其动画看起来将是留在原地。参阅 :ref:`get_root_motion_position`\ 、\ :ref:`get_root_motion_rotation`\ 、\ :ref:`get_root_motion_scale`\ 、和 :ref:`RootMotionView`\ 。 - -.. rst-class:: classref-item-separator - ----- - .. _class_AnimationTree_property_tree_root: .. rst-class:: classref-property -:ref:`AnimationNode` **tree_root** +:ref:`AnimationRootNode` **tree_root** .. rst-class:: classref-property-setget -- void **set_tree_root** **(** :ref:`AnimationNode` value **)** -- :ref:`AnimationNode` **get_tree_root** **(** **)** +- void **set_tree_root** **(** :ref:`AnimationRootNode` value **)** +- :ref:`AnimationRootNode` **get_tree_root** **(** **)** -该 **AnimationTree** 的根动画节点。见 :ref:`AnimationNode`\ 。 +该 **AnimationTree** 的根动画节点。见 :ref:`AnimationRootNode`\ 。 .. rst-class:: classref-section-separator @@ -300,256 +182,33 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_AnimationTree_method__post_process_key_value: +.. _class_AnimationTree_method_get_process_callback: .. rst-class:: classref-method -:ref:`Variant` **_post_process_key_value** **(** :ref:`Animation` animation, :ref:`int` track, :ref:`Variant` value, :ref:`Object` object, :ref:`int` object_idx **)** |virtual| |const| +:ref:`AnimationProcessCallback` **get_process_callback** **(** **)** |const| -一个用于播放期间键获取之后的处理的虚函数。 +用于向后兼容。见 :ref:`AnimationCallbackModeProcess`\ 。 .. rst-class:: classref-item-separator ---- -.. _class_AnimationTree_method_advance: +.. _class_AnimationTree_method_set_process_callback: .. rst-class:: classref-method -void **advance** **(** :ref:`float` delta **)** +void **set_process_callback** **(** :ref:`AnimationProcessCallback` mode **)** -手动将动画前进指定的时间(单位为秒)。 +用于向后兼容。见 :ref:`AnimationCallbackModeProcess`\ 。 -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_method_get_root_motion_position: - -.. rst-class:: classref-method - -:ref:`Vector3` **get_root_motion_position** **(** **)** |const| - -将具有 :ref:`root_motion_track` 的位置的运动增量,检索为一个可以在其他地方使用的 :ref:`Vector3`\ 。 - -如果 :ref:`root_motion_track` 不是 :ref:`Animation.TYPE_POSITION_3D` 类型轨道的路径,则返回 ``Vector3(0, 0, 0)``\ 。 - -另见 :ref:`root_motion_track` 和 :ref:`RootMotionView`\ 。 - -最基本的示例是将位置应用于 :ref:`CharacterBody3D`\ : - - -.. tabs:: - - .. code-tab:: gdscript - - var current_rotation: Quaternion - - func _process(delta): - if Input.is_action_just_pressed("animate"): - current_rotation = get_quaternion() - state_machine.travel("Animate") - var velocity: Vector3 = current_rotation * animation_tree.get_root_motion_position() / delta - set_velocity(velocity) - move_and_slide() - - - -通过将其与 :ref:`get_root_motion_position_accumulator` 结合使用,你可以更正确地应用根运动位置来考虑节点的旋转。 - - -.. tabs:: - - .. code-tab:: gdscript - - func _process(delta): - if Input.is_action_just_pressed("animate"): - state_machine.travel("Animate") - set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation()) - var velocity: Vector3 = (animation_tree.get_root_motion_rotation_accumulator().inverse() * get_quaternion()) * animation_tree.get_root_motion_position() / delta - set_velocity(velocity) - move_and_slide() - - - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_method_get_root_motion_position_accumulator: - -.. rst-class:: classref-method - -:ref:`Vector3` **get_root_motion_position_accumulator** **(** **)** |const| - -检索具有 :ref:`root_motion_track` 的位置轨道的混合值,返回的是可以在其他地方使用的 :ref:`Vector3`\ 。 - -在想要遵循动画的初始动画帧值的情况下很有用。 - -例如,如果前一帧播放的是一个只有单个动画帧 ``Vector3(0, 0, 0)`` 的动画,然后下一帧播放的是一个只有单个动画帧\ ``Vector3(1, 0, 1)`` 的动画,它们之间的差异可以这样计算: - - -.. tabs:: - - .. code-tab:: gdscript - - var prev_root_motion_position_accumulator: Vector3 - - func _process(delta): - if Input.is_action_just_pressed("animate"): - state_machine.travel("Animate") - var current_root_motion_position_accumulator: Vector3 = animation_tree.get_root_motion_position_accumulator() - var difference: Vector3 = current_root_motion_position_accumulator - prev_root_motion_position_accumulator - prev_root_motion_position_accumulator = current_root_motion_position_accumulator - transform.origin += difference - - - -不过,如果动画是循环播放的,就可能会发生预料之外的不连续变化,所以这只对一些简单的情况有用。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_method_get_root_motion_rotation: - -.. rst-class:: classref-method - -:ref:`Quaternion` **get_root_motion_rotation** **(** **)** |const| - -检索带有 :ref:`root_motion_track` 的旋转运动,作为一个 :ref:`Quaternion`\ ,可以在其他地方使用。 - -如果 :ref:`root_motion_track` 不是 :ref:`Animation.TYPE_ROTATION_3D` 类型的轨迹的路径,返回 ``Quaternion(0, 0, 0, 1)`` 。 - -另见 :ref:`root_motion_track` 和 :ref:`RootMotionView`\ 。 - -最基本的例子是对 :ref:`CharacterBody3D` 应用旋转。 - - -.. tabs:: - - .. code-tab:: gdscript - - func _process(delta): - if Input.is_action_just_pressed("animate"): - state_machine.travel("Animate") - set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation() ) - - - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_method_get_root_motion_rotation_accumulator: - -.. rst-class:: classref-method - -:ref:`Quaternion` **get_root_motion_rotation_accumulator** **(** **)** |const| - -检索带有 :ref:`root_motion_track` 的旋转轨道的混合值,作为一个 :ref:`Quaternion`\ ,可以在其他地方使用。 - -这里必须正确地结合根运动位置,并且要考虑到旋转。参考 :ref:`get_root_motion_position`\ 。 - -并且,当你想重视动画的初始动画帧的值时,这会很有用。 - -比如说,如果一个动画在上一帧只播放一个 ``Quaternion(0, 0, 0, 1)`` 动画帧,并且一个动画在下一帧只播放了一个动画帧的 ``Quaternion(0, 0.707, 0, 0.707)`` 时,它们相差的值可以这样求出: - - -.. tabs:: - - .. code-tab:: gdscript - - var prev_root_motion_rotation_accumulator: Quaternion - - func _process(delta): - if Input.is_action_just_pressed("animate"): - state_machine.travel("Animate") - var current_root_motion_rotation_accumulator: Quaternion = animation_tree.get_root_motion_Quaternion_accumulator() - var difference: Quaternion = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator - prev_root_motion_rotation_accumulator = current_root_motion_rotation_accumulator - transform.basis *= difference - - - -然而,当一个动画循环时,可能会得到一个意料之外的变化,所以这个只在一些简单情况下才有用。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_method_get_root_motion_scale: - -.. rst-class:: classref-method - -:ref:`Vector3` **get_root_motion_scale** **(** **)** |const| - -获取 :ref:`root_motion_track` 的缩放运动增量,类型为 :ref:`Vector3`\ ,可以在其他地方使用。 - -如果 :ref:`root_motion_track` 不是类型为 :ref:`Animation.TYPE_SCALE_3D` 的轨道的路径,则返回 ``Vector3(0, 0, 0)`` 。 - -另见 :ref:`root_motion_track` 和 :ref:`RootMotionView`\ 。 - -最基本的例子是对 :ref:`CharacterBody3D` 应用缩放。 - - -.. tabs:: - - .. code-tab:: gdscript - - var current_scale: Vector3 = Vector3(1, 1, 1) - var scale_accum: Vector3 = Vector3(1, 1, 1) - - func _process(delta): - if Input.is_action_just_pressed("animate"): - current_scale = get_scale() - scale_accum = Vector3(1, 1, 1) - state_machine.travel("Animate") - scale_accum += animation_tree.get_root_motion_scale() - set_scale(current_scale * scale_accum) - - - -.. rst-class:: classref-item-separator - ----- - -.. _class_AnimationTree_method_get_root_motion_scale_accumulator: - -.. rst-class:: classref-method - -:ref:`Vector3` **get_root_motion_scale_accumulator** **(** **)** |const| - -检索带有 :ref:`root_motion_track` 的缩放轨道的混合值,作为一个 :ref:`Vector3`\ ,可以在其他地方使用。 - -例如,如果一个动画在前一帧只播放了一个动画帧 ``Vector3(1, 1, 1)``\ ,并且一个动画在后一帧只播放了一个动画帧 ``Vector3(2, 2, 2)``\ ,他们之间相差的值可以这样求出: - - -.. tabs:: - - .. code-tab:: gdscript - - var prev_root_motion_scale_accumulator: Vector3 - - func _process(delta): - if Input.is_action_just_pressed("animate"): - state_machine.travel("Animate") - var current_root_motion_scale_accumulator: Vector3 = animation_tree.get_root_motion_scale_accumulator() - var difference: Vector3 = current_root_motion_scale_accumulator - prev_root_motion_scale_accumulator - prev_root_motion_scale_accumulator = current_root_motion_scale_accumulator - transform.basis = transform.basis.scaled(difference) - - - -然而,当一个动画循环时,可能会得到一个意料之外的变化,所以这个只在一些简单情况下才有用。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_area2d.rst b/classes/zh_CN/class_area2d.rst index 440660a5c7..00a309cbdd 100644 --- a/classes/zh_CN/class_area2d.rst +++ b/classes/zh_CN/class_area2d.rst @@ -10,14 +10,14 @@ Area2D ====== -**Inherits:** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -2D 空间的一个区块,用于检测其他 :ref:`CollisionObject2D` 进入或退出它。 +2D 空间中的一个区域,能够检测到其他 :ref:`CollisionObject2D` 的进入或退出。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **Area2D** 是 2D 空间中的一个区域,由一个或多个 :ref:`CollisionShape2D` 或 :ref:`CollisionPolygon2D` 子节点定义,能够检测到其他 :ref:`CollisionObject2D` 进入或退出该区域,同时也会记录哪些碰撞对象尚未退出(即哪些对象与其存在重叠)。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 Area2D <../tutorials/physics/using_area_2d>` @@ -38,8 +38,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -78,8 +78,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -104,8 +104,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Area2D_signal_area_entered: @@ -243,8 +243,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Area2D_SpaceOverride: @@ -298,8 +298,8 @@ enum **SpaceOverride**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Area2D_property_angular_damp: @@ -564,8 +564,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Area2D_method_get_overlapping_areas: @@ -649,10 +649,10 @@ Method Descriptions 参数 ``body`` 可以是 :ref:`PhysicsBody2D` 实例,也可以是 :ref:`TileMap` 实例。TileMap 虽然不是物理物体,但会把图块的碰撞形状注册为虚拟物理物体。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_area3d.rst b/classes/zh_CN/class_area3d.rst index 02050b115c..0043154647 100644 --- a/classes/zh_CN/class_area3d.rst +++ b/classes/zh_CN/class_area3d.rst @@ -10,25 +10,25 @@ Area3D ====== -**Inherits:** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -3D 空间的一个区块,用于检测其他 :ref:`CollisionObject3D` 进入或退出它。 +3D 空间中的一个区域,能够检测到其他 :ref:`CollisionObject3D` 的进入或退出。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**Area3D** is a region of 3D space defined by one or multiple :ref:`CollisionShape3D` or :ref:`CollisionPolygon3D` child nodes. It detects when other :ref:`CollisionObject3D`\ s enter or exit it, and it also keeps track of which collision objects haven't exited it yet (i.e. which one are overlapping it). +**Area3D** 是 3D 空间中的一个区域,由一个或多个 :ref:`CollisionShape3D` 或 :ref:`CollisionPolygon3D` 子节点定义,能够检测到其他 :ref:`CollisionObject3D` 进入或退出该区域,同时也会记录哪些碰撞对象尚未退出(即哪些对象与其存在重叠)。 -This node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses. +这个节点也可以在局部修改或覆盖物理参数(重力、阻尼),将音频引导至自定义音频总线。 -\ **Warning:** Using a :ref:`ConcavePolygonShape3D` inside a :ref:`CollisionShape3D` child of this node (created e.g. by using the **Create Trimesh Collision Sibling** option in the **Mesh** menu that appears when selecting a :ref:`MeshInstance3D` node) may give unexpected results, since this collision shape is hollow. If this is not desired, it has to be split into multiple :ref:`ConvexPolygonShape3D`\ s or primitive shapes like :ref:`BoxShape3D`, or in some cases it may be replaceable by a :ref:`CollisionPolygon3D`. +\ **警告:**\ 在这个节点的 :ref:`CollisionShape3D` 子节点中使用 :ref:`ConcavePolygonShape3D`\ (创建方法是在选中 :ref:`MeshInstance3D` 节点后,在出现的 **Mesh** 菜单中选择\ **创建三角网格碰撞同级**\ 选项)可能得到意外的结果,因为碰撞形状是空心的。如果不想要这种行为,则应该将其拆分为多个 :ref:`ConvexPolygonShape3D` 或 :ref:`BoxShape3D` 等基础网格,有些情况下也可以用 :ref:`CollisionPolygon3D` 代替。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 Area2D <../tutorials/physics/using_area_2d>` @@ -38,8 +38,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -92,8 +92,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -118,8 +118,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Area3D_signal_area_entered: @@ -194,7 +194,7 @@ Signals **body_entered** **(** :ref:`Node3D` body **)** -当接收到的 ``body`` 进入这个区域时触发。\ ``body`` 可以是一个 :ref:`PhysicsBody3D` 或一个 :ref:`GridMap`\ 。如果 :ref:`GridMap` 的 :ref:`MeshLibrary` 配置了碰撞形状,就会被检测到。需要将 :ref:`monitoring` 设置为 ``true`` 。 +当接收到的 ``body`` 进入这个区域时发出。\ ``body`` 可以是一个 :ref:`PhysicsBody3D` 或一个 :ref:`GridMap`\ 。如果 :ref:`GridMap` 的 :ref:`MeshLibrary` 配置了碰撞形状就会被检测到。需要将 :ref:`monitoring` 设置为 ``true`` 。 .. rst-class:: classref-item-separator @@ -257,8 +257,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Area3D_SpaceOverride: @@ -312,8 +312,8 @@ enum **SpaceOverride**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Area3D_property_angular_damp: @@ -697,8 +697,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Area3D_method_get_overlapping_areas: @@ -782,10 +782,10 @@ Method Descriptions 参数 ``body`` 可以是 :ref:`PhysicsBody3D` 实例,也可以是 :ref:`GridMap` 实例。GridMap 虽然不是物理物体,但会把图块的碰撞形状注册为虚拟物理物体。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_array.rst b/classes/zh_CN/class_array.rst index 79d76fa4bd..a5c78167df 100644 --- a/classes/zh_CN/class_array.rst +++ b/classes/zh_CN/class_array.rst @@ -14,8 +14,8 @@ Array .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 通用数组,可以包含任意类型的多个元素,可以通过从 0 开始的数字索引进行访问。负数索引可以用来从后面数起,就像在 Python 中一样(-1 是最后一个元素、-2 是倒数第二,以此类推)。 @@ -70,12 +70,12 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -108,8 +108,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -210,8 +210,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -240,8 +240,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_Array_constructor_Array: @@ -367,8 +367,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Array_method_all: @@ -565,13 +565,13 @@ void **clear** **(** **)** void **erase** **(** :ref:`Variant` value **)** -Removes the first occurrence of a value from the array. If the value does not exist in the array, nothing happens. To remove an element by index, use :ref:`remove_at` instead. +从数组中移除第一个匹配的值。如果数组中不存在该值,则什么也不会发生。要通过索引移除元素,请改用 :ref:`remove_at`\ 。 -\ **Note:** This method acts in-place and doesn't return a modified array. +\ **注意:**\ 这个方法是就地操作的,不返回修改后的数组。 -\ **Note:** On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed. +\ **注意:**\ 在大型数组上,如果移除的元素靠近数组的开头(索引 0),则此方法会较慢。这是因为所有放置在移除元素之后的元素都必须重新索引。 -\ **Note:** Do not erase entries while iterating over the array. +\ **注意:**\ 在遍历数组时不要移除条目。 .. rst-class:: classref-item-separator @@ -770,11 +770,11 @@ void **fill** **(** :ref:`Variant` value **)** :ref:`int` **insert** **(** :ref:`int` position, :ref:`Variant` value **)** -Inserts a new element at a given position in the array. The position must be valid, or at the end of the array (``pos == size()``). Returns :ref:`@GlobalScope.OK` on success, or one of the other :ref:`Error` values if the operation failed. +在给定的数组位置插入一个新值。位置必须合法,或者是在数组末尾(\ ``pos == size()``\ )。操作成功时返回 :ref:`@GlobalScope.OK`\ ,而如果操作失败则返回其他任意一个 :ref:`Error` 值。 -\ **Note:** This method acts in-place and doesn't return a modified array. +\ **注意:**\ 该方法在原地执行,不会返回修改过的数组。 -\ **Note:** On large arrays, this method will be slower if the inserted element is close to the beginning of the array (index 0). This is because all elements placed after the newly inserted element have to be reindexed. +\ **注意:**\ 在较大的数组中,如果插入值的位置在数组偏前的位置,这个方法的运行速度会比较慢,因为在插入值后面所有的元素都要被重新索引。 .. rst-class:: classref-item-separator @@ -909,7 +909,7 @@ void **make_read_only** **(** **)** :ref:`Variant` **pick_random** **(** **)** |const| -Returns a random value from the target array. Prints an error and returns ``null`` if the array is empty. +从目标数组中返回一个随机值。如果数组为空,则打印一个错误并返回 ``null``\ 。 .. tabs:: @@ -917,12 +917,12 @@ Returns a random value from the target array. Prints an error and returns ``null .. code-tab:: gdscript var array: Array[int] = [1, 2, 3, 4] - print(array.pick_random()) # Prints either of the four numbers. + print(array.pick_random()) # 打印四个数字中的任何一个。 .. code-tab:: csharp var array = new Godot.Collections.Array { 1, 2, 3, 4 }; - GD.Print(array.PickRandom()); // Prints either of the four numbers. + GD.Print(array.PickRandom()); // 打印四个数字中的任何一个。 @@ -1027,13 +1027,13 @@ void **push_front** **(** :ref:`Variant` value **)** void **remove_at** **(** :ref:`int` position **)** -Removes an element from the array by index. If the index does not exist in the array, nothing happens. To remove an element by searching for its value, use :ref:`erase` instead. +通过索引从数组中移除元素。如果索引在数组中不存在,则什么也不会发生。要通过搜索一个元素的值来移除,请改用 :ref:`erase`\ 。 -\ **Note:** This method acts in-place and doesn't return a modified array. +\ **注意:**\ 这个方法是就地操作的,不返回修改后的数组。 -\ **Note:** On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed. +\ **注意:**\ 在大数组中,如果被删除的元素靠近数组的开头(索引 0),这个方法会比较慢。这是因为所有放置在被移除元素之后的元素都要被重新索引。 -\ **Note:** ``position`` cannot be negative. To remove an element relative to the end of the array, use ``arr.remove_at(arr.size() - (i + 1))``. To remove the last element from the array without returning the value, use ``arr.resize(arr.size() - 1)``. +\ **注意:**\ ``position`` 不能为负。要移除数组末尾的元素,请使用 ``arr.remove_at(arr.size() - (i + 1))``\ 。要移除数组末尾的元素并不返回值,请使用 ``arr.resize(arr.size() - 1)``\ 。 .. rst-class:: classref-item-separator @@ -1045,9 +1045,9 @@ Removes an element from the array by index. If the index does not exist in the a :ref:`int` **resize** **(** :ref:`int` size **)** -Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are ``null``. Returns :ref:`@GlobalScope.OK` on success, or one of the other :ref:`Error` values if the operation failed. +调整数组的大小,让包含的元素数量发生变化。如果数组变小则清除多余元素,变大则新元素为 ``null``\ 。成功时返回 :ref:`@GlobalScope.OK`\ ,操作失败时返回其他 :ref:`Error` 值。 -\ **Note:** This method acts in-place and doesn't return a modified array. +\ **注意:**\ 这个方法是就地操作的,不返回修改后的数组。 .. rst-class:: classref-item-separator @@ -1107,17 +1107,17 @@ void **shuffle** **(** **)** :ref:`Array` **slice** **(** :ref:`int` begin, :ref:`int` end=2147483647, :ref:`int` step=1, :ref:`bool` deep=false **)** |const| -Returns the slice of the **Array**, from ``begin`` (inclusive) to ``end`` (exclusive), as a new **Array**. +返回该 **Array** 的切片,是从 ``begin``\ (含)到 ``end``\ (不含)的全新 **Array**\ 。 -The absolute value of ``begin`` and ``end`` will be clamped to the array size, so the default value for ``end`` makes it slice to the size of the array by default (i.e. ``arr.slice(1)`` is a shorthand for ``arr.slice(1, arr.size())``). +\ ``begin`` 和 ``end`` 的绝对值会按数组大小进行限制,所以 ``end`` 的默认值会切到数组大小为止(即 ``arr.slice(1)`` 是 ``arr.slice(1, arr.size())`` 的简写)。 -If either ``begin`` or ``end`` are negative, they will be relative to the end of the array (i.e. ``arr.slice(0, -2)`` is a shorthand for ``arr.slice(0, arr.size() - 2)``). +如果 ``begin`` 或 ``end`` 为负,则表示相对于数组的末尾(即 ``arr.slice(0, -2)`` 是 ``arr.slice(0, arr.size() - 2)`` 的简写)。 -If specified, ``step`` is the relative index between source elements. It can be negative, then ``begin`` must be higher than ``end``. For example, ``[0, 1, 2, 3, 4, 5].slice(5, 1, -2)`` returns ``[5, 3]``. +如果指定了 ``step``\ ,则会用作原始元素的索引间距。这个参数可以为负,此时 ``begin`` 必须大于 ``end``\ 。例如,\ ``[0, 1, 2, 3, 4, 5].slice(5, 1, -2)`` 会返回 ``[5, 3]``\ 。 -If ``deep`` is true, each element will be copied by value rather than by reference. +如果 ``deep`` 为 true,则每个元素都会按值复制,而不是按引用复制。 -\ **Note:** To include the first element when ``step`` is negative, use ``arr.slice(begin, -arr.size() - 1, step)`` (i.e. ``[0, 1, 2].slice(1, -4, -1)`` returns ``[1, 0]``). +\ **注意:**\ 要在 ``step`` 为负时包含第一个元素,请使用 ``arr.slice(begin, -arr.size() - 1, step)``\ (即 ``[0, 1, 2].slice(1, -4, -1)`` 返回 ``[1, 0]``\ )。 .. rst-class:: classref-item-separator @@ -1207,8 +1207,8 @@ void **sort_custom** **(** :ref:`Callable` func **)** .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Array_operator_neq_Array: @@ -1302,10 +1302,10 @@ Operator Descriptions 该函数返回指定位置的 :ref:`Variant` 类型元素的引用。数组从索引0开始。 ``index`` 可以是一个从头开始的零或正值,也可以是一个从末尾开始的负值。访问越界的数组会导致运行时错误,这将导致在编辑器中运行时打印错误并暂停项目执行。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_arraymesh.rst b/classes/zh_CN/class_arraymesh.rst index a891030b32..c6dfc77722 100644 --- a/classes/zh_CN/class_arraymesh.rst +++ b/classes/zh_CN/class_arraymesh.rst @@ -10,14 +10,14 @@ ArrayMesh ========= -**Inherits:** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`Mesh` 网格类型,提供了用于从数组构造表面的工具。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **ArrayMesh** 是用来构造 :ref:`Mesh` 的,其属性指定为数组。 @@ -74,15 +74,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 ArrayMesh 的程序化几何体 <../tutorials/3d/procedural_geometry/arraymesh>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -97,8 +97,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -149,8 +149,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ArrayMesh_property_blend_shape_mode: @@ -205,8 +205,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ArrayMesh_method_add_blend_shape: @@ -420,7 +420,7 @@ void **surface_update_attribute_region** **(** :ref:`int` surf_idx, : .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -434,7 +434,7 @@ void **surface_update_skin_region** **(** :ref:`int` surf_idx, :ref:` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -448,12 +448,12 @@ void **surface_update_vertex_region** **(** :ref:`int` surf_idx, :ref .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_arrayoccluder3d.rst b/classes/zh_CN/class_arrayoccluder3d.rst index 66cf18b9e2..c56914e3e5 100644 --- a/classes/zh_CN/class_arrayoccluder3d.rst +++ b/classes/zh_CN/class_arrayoccluder3d.rst @@ -10,14 +10,14 @@ ArrayOccluder3D =============== -**Inherits:** :ref:`Occluder3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Occluder3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于与 :ref:`OccluderInstance3D` 中的遮挡剔除一起使用的 3D 多边形形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **ArrayOccluder3D** 存储一个任意的 3D 多边形形状,可供引擎的遮挡剔除系统使用。这类似于 :ref:`ArrayMesh`\ ,但适用于遮挡物。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Occlusion culling <../tutorials/3d/occlusion_culling>` +- :doc:`遮挡剔除 <../tutorials/3d/occlusion_culling>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +46,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -62,8 +62,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ArrayOccluder3D_property_indices: @@ -105,8 +105,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ArrayOccluder3D_method_set_arrays: @@ -116,10 +116,10 @@ void **set_arrays** **(** :ref:`PackedVector3Array` ve 设置 :ref:`indices` 和 :ref:`vertices`\ ,同时会在两个值都被设置后仅更新一次最终遮挡物。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_aspectratiocontainer.rst b/classes/zh_CN/class_aspectratiocontainer.rst index 3bfc80f0e0..6c1856a582 100644 --- a/classes/zh_CN/class_aspectratiocontainer.rst +++ b/classes/zh_CN/class_aspectratiocontainer.rst @@ -10,28 +10,28 @@ AspectRatioContainer ==================== -**Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 保留子控件长宽比的容器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 一种容器类型,它以一种在调整容器大小时自动保持其比例的方式排列其子控件。当容器具有动态大小,并且子节点必须相应地调整其大小而不丢失其长宽比时很有用。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AspectRatioContainer_StretchMode: @@ -135,8 +135,8 @@ enum **AlignmentMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AspectRatioContainer_property_alignment_horizontal: @@ -202,10 +202,10 @@ Property Descriptions 用来对齐子控件的拉伸模式。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_astar2d.rst b/classes/zh_CN/class_astar2d.rst index d3385fba95..ed4347fc42 100644 --- a/classes/zh_CN/class_astar2d.rst +++ b/classes/zh_CN/class_astar2d.rst @@ -10,14 +10,14 @@ AStar2D ======= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` A\* 的一种实现,用于查找 2D 空间中连通图上两个顶点之间的最短路径。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- A\* 算法的一种实现,用于在 2D 空间中的连通图上找到两个顶点之间的最短路径。 @@ -25,16 +25,16 @@ A\* 算法的一种实现,用于在 2D 空间中的连通图上找到两个顶 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_compute_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | + | :ref:`float` | :ref:`_compute_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_estimate_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | + | :ref:`float` | :ref:`_estimate_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_point` **(** :ref:`int` id, :ref:`Vector2` position, :ref:`float` weight_scale=1.0 **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -89,10 +89,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_AStar2D_method__compute_cost: +.. _class_AStar2D_private_method__compute_cost: .. rst-class:: classref-method @@ -106,7 +106,7 @@ Method Descriptions ---- -.. _class_AStar2D_method__estimate_cost: +.. _class_AStar2D_private_method__estimate_cost: .. rst-class:: classref-method @@ -128,7 +128,7 @@ void **add_point** **(** :ref:`int` id, :ref:`Vector2` 在具有给定标识符的给定位置添加一个新点。\ ``id`` 必须为 0 或更大,\ ``weight_scale`` 必须为 0.0 或更大。 -在确定从相邻点到此点的一段路程的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost` 的结果。因此,在其他条件相同的情况下,算法优先选择 ``weight_scale`` 较低的点来形成路径。 +在确定从相邻点到此点的一段路程的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost` 的结果。因此,在其他条件相同的情况下,算法优先选择 ``weight_scale`` 较低的点来形成路径。 .. tabs:: @@ -522,12 +522,12 @@ void **set_point_position** **(** :ref:`int` id, :ref:`Vector2` id, :ref:`float` weight_scale **)** -为给定的 ``id`` 的点设置 ``weight_scale``\ 。在确定从邻接点到这个点的一段路程的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost` 的结果。 +为给定的 ``id`` 的点设置 ``weight_scale``\ 。在确定从邻接点到这个点的一段路程的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost` 的结果。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_astar3d.rst b/classes/zh_CN/class_astar3d.rst index 21430cc568..88257a37b8 100644 --- a/classes/zh_CN/class_astar3d.rst +++ b/classes/zh_CN/class_astar3d.rst @@ -10,20 +10,20 @@ AStar3D ======= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` A\* 的一种实现,用于寻找 3D 空间中连接图中的两个顶点之间的最短路径。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A\*(A 星)是一种计算机算法,用于寻路和图遍历,是通过一组给定的边(线段),在顶点(点)之间绘制短路径的过程。由于其性能和准确性,它被广泛使用。Godot 的 A\* 实现默认使用 3D 空间中的点和欧几里得距离。 +A\*(A 星)是一种计算机算法,用于寻路和图遍历,即穿过一组给定的边(线段),在顶点(点)之间绘制短路径的过程。由于其性能和准确性,它被广泛使用。Godot 的 A\* 实现默认使用 3D 空间中的点和欧几里德距离。 你需要使用 :ref:`add_point` 手动添加点,并使用 :ref:`connect_points` 手动创建线段。完成后,可以使用 :ref:`are_points_connected` 函数,测试两点之间是否存在路径,通过 :ref:`get_id_path` 获取包含索引的路径,或使用 :ref:`get_point_path` 获取包含实际坐标的路径。 -也可以使用非欧几里得距离。为此,创建一个扩展 ``AStar3D`` 的类,并覆盖方法 :ref:`_compute_cost` 和 :ref:`_estimate_cost`\ 。两者都接受两个索引并返回一个长度,如以下示例所示。 +也可以使用非欧几里德距离。为此,创建一个扩展 **AStar3D** 的类,并覆盖方法 :ref:`_compute_cost` 和 :ref:`_estimate_cost`\ 。两者都接受两个索引并返回一个长度,如以下示例所示。 .. tabs:: @@ -56,22 +56,22 @@ A\*(A 星)是一种计算机算法,用于寻路和图遍历,是通过一 -\ :ref:`_estimate_cost` 应该返回距离的下限,即 ``_estimate_cost(u, v) <= _compute_cost(u, v)``\ 。这可以作为算法的提示,因为自定义 ``_compute_cost`` 可能计算量很大。如果不是这种情况,请使 :ref:`_estimate_cost` 返回与 :ref:`_compute_cost` 相同的值,以便为算法提供最准确的信息。 +\ :ref:`_estimate_cost` 应该返回距离的下限,即 ``_estimate_cost(u, v) <= _compute_cost(u, v)``\ 。这可以作为算法的提示,因为自定义 :ref:`_compute_cost` 可能计算量很大。如果不是这种情况,请使 :ref:`_estimate_cost` 返回与 :ref:`_compute_cost` 相同的值,以便为算法提供最准确的信息。 -如果使用默认的 :ref:`_estimate_cost` 和 :ref:`_compute_cost` 方法,或者如果提供的 :ref:`_estimate_cost` 方法返回成本的下限,则 A\* 返回的路径将是成本最低的路径。这里,路径的代价等于路径中所有段的 :ref:`_compute_cost` 结果乘以各个段端点的权重 ``weight_scale`` 之和。如果使用默认方法,并且所有点的 ``weight_scale`` 设置为 ``1.0``\ ,则这等于路径中所有段的欧几里得距离之和。 +如果使用默认的 :ref:`_estimate_cost` 和 :ref:`_compute_cost` 方法,或者如果提供的 :ref:`_estimate_cost` 方法返回成本的下限,则 A\* 返回的路径将是成本最低的路径。这里,路径的代价等于路径中所有段的 :ref:`_compute_cost` 结果乘以各个段端点的权重 ``weight_scale`` 之和。如果使用默认方法,并且所有点的 ``weight_scale`` 设置为 ``1.0``\ ,则这等于路径中所有段的欧几里德距离之和。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_compute_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | + | :ref:`float` | :ref:`_compute_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_estimate_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | + | :ref:`float` | :ref:`_estimate_cost` **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_point` **(** :ref:`int` id, :ref:`Vector3` position, :ref:`float` weight_scale=1.0 **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -126,32 +126,32 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_AStar3D_method__compute_cost: +.. _class_AStar3D_private_method__compute_cost: .. rst-class:: classref-method :ref:`float` **_compute_cost** **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| -在计算两个连接点之间的成本时调用。 +计算两个连接点之间的成本时调用。 -请注意,此函数隐藏在默认的 ``AStar3D`` 类中。 +注意这个函数隐藏在默认的 **AStar3D** 类中。 .. rst-class:: classref-item-separator ---- -.. _class_AStar3D_method__estimate_cost: +.. _class_AStar3D_private_method__estimate_cost: .. rst-class:: classref-method :ref:`float` **_estimate_cost** **(** :ref:`int` from_id, :ref:`int` to_id **)** |virtual| |const| -在估算一个点和路径终点之间的成本时调用。 +估计一个点和路径终点之间的成本时调用。 -请注意,此函数隐藏在默认的 ``AStar3D`` 类中。 +注意这个函数隐藏在默认的 **AStar3D** 类中。 .. rst-class:: classref-item-separator @@ -165,7 +165,7 @@ void **add_point** **(** :ref:`int` id, :ref:`Vector3` 在给定的位置添加一个新的点,并使用给定的标识符。\ ``id`` 必须大于等于 0,\ ``weight_scale`` 必须大于等于 0.0。 -在确定从邻点到此点的一段路程的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost` 的结果。因此,在其他条件相同的情况下,算法优先选择 ``weight_scale`` 较低的点来形成路径。 +在确定从邻点到此点的一段路程的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost` 的结果。因此,在其他条件相同的情况下,算法优先选择 ``weight_scale`` 较低的点来形成路径。 .. tabs:: @@ -369,7 +369,7 @@ void **disconnect_points** **(** :ref:`int` id, :ref:`int` :ref:`int` **get_point_capacity** **(** **)** |const| -返回支持点的结构的容量,与 ``reserve_space`` 配合使用。 +该函数返回支持点的数据结构的容量,可以与 :ref:`reserve_space` 方法一起使用。 .. rst-class:: classref-item-separator @@ -557,12 +557,12 @@ void **set_point_position** **(** :ref:`int` id, :ref:`Vector3` id, :ref:`float` weight_scale **)** -为给定的 ``id`` 的点设置 ``weight_scale``\ 。在确定从邻接点到这个点的一段路程的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost` 的结果。 +为给定的 ``id`` 的点设置 ``weight_scale``\ 。在确定从邻接点到这个点的一段路程的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost` 的结果。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_astargrid2d.rst b/classes/zh_CN/class_astargrid2d.rst index 3e9623f254..519ec2ee8a 100644 --- a/classes/zh_CN/class_astargrid2d.rst +++ b/classes/zh_CN/class_astargrid2d.rst @@ -10,18 +10,18 @@ AStarGrid2D =========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` A\* 的一种实现,用于寻找疏松 2D 网格中两点之间的最短路径。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**AStarGrid2D** is a variant of :ref:`AStar2D` that is specialized for partial 2D grids. It is simpler to use because it doesn't require you to manually create points and connect them together. This class also supports multiple types of heuristics, modes for diagonal movement, and a jumping mode to speed up calculations. +**AStarGrid2D** 是 :ref:`AStar2D` 的变种,针对疏松 2D 网格进行了优化。因为不需要手动创建点并进行连接,所以用起来更加简单。这个类还支持使用不同的启发方法、斜向移动模式、跳跃模式,从而加速运算。 -To use **AStarGrid2D**, you only need to set the :ref:`region` of the grid, optionally set the :ref:`cell_size`, and then call the :ref:`update` method: +要使用 **AStarGrid2D**\ ,你只需要设置网格的 :ref:`region`\ ,\ :ref:`cell_size` 可以不设置,最后调用 :ref:`update` 方法即可: .. tabs:: @@ -32,8 +32,8 @@ To use **AStarGrid2D**, you only need to set the :ref:`region`. +要从寻路网格中移除某个点,必须使用 :ref:`set_point_solid` 将其设置为“实心”。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -76,45 +76,45 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_compute_cost` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_estimate_cost` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear` **(** **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill_solid_region` **(** :ref:`Rect2i` region, :ref:`bool` solid=true **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`fill_weight_scale_region` **(** :ref:`Rect2i` region, :ref:`float` weight_scale **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i[]` | :ref:`get_id_path` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`get_point_path` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`Vector2i` id **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_point_weight_scale` **(** :ref:`Vector2i` id **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_dirty` **(** **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_in_bounds` **(** :ref:`int` x, :ref:`int` y **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_in_boundsv` **(** :ref:`Vector2i` id **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_point_solid` **(** :ref:`Vector2i` id **)** |const| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_solid` **(** :ref:`Vector2i` id, :ref:`bool` solid=true **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_point_weight_scale` **(** :ref:`Vector2i` id, :ref:`float` weight_scale **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update` **(** **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_compute_cost` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_estimate_cost` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill_solid_region` **(** :ref:`Rect2i` region, :ref:`bool` solid=true **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`fill_weight_scale_region` **(** :ref:`Rect2i` region, :ref:`float` weight_scale **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i[]` | :ref:`get_id_path` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`get_point_path` **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_point_position` **(** :ref:`Vector2i` id **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_point_weight_scale` **(** :ref:`Vector2i` id **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_dirty` **(** **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_in_bounds` **(** :ref:`int` x, :ref:`int` y **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_in_boundsv` **(** :ref:`Vector2i` id **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_point_solid` **(** :ref:`Vector2i` id **)** |const| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_point_solid` **(** :ref:`Vector2i` id, :ref:`bool` solid=true **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_point_weight_scale` **(** :ref:`Vector2i` id, :ref:`float` weight_scale **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update` **(** **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -122,8 +122,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AStarGrid2D_Heuristic: @@ -256,8 +256,8 @@ enum **DiagonalMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AStarGrid2D_property_cell_size: @@ -287,7 +287,7 @@ Property Descriptions - void **set_default_compute_heuristic** **(** :ref:`Heuristic` value **)** - :ref:`Heuristic` **get_default_compute_heuristic** **(** **)** -默认 :ref:`Heuristic`\ ,用于在没有覆盖 :ref:`_compute_cost` 时计算两点之间的消耗。 +默认 :ref:`Heuristic`\ ,用于在没有覆盖 :ref:`_compute_cost` 时计算两点之间的消耗。 .. rst-class:: classref-item-separator @@ -304,7 +304,7 @@ Property Descriptions - void **set_default_estimate_heuristic** **(** :ref:`Heuristic` value **)** - :ref:`Heuristic` **get_default_estimate_heuristic** **(** **)** -默认 :ref:`Heuristic`\ ,用于在没有覆盖 :ref:`_estimate_cost` 时计算该点和终点之间的消耗。 +默认 :ref:`Heuristic`\ ,用于在没有覆盖 :ref:`_estimate_cost` 时计算该点和终点之间的消耗。 .. rst-class:: classref-item-separator @@ -401,32 +401,32 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_AStarGrid2D_method__compute_cost: +.. _class_AStarGrid2D_private_method__compute_cost: .. rst-class:: classref-method :ref:`float` **_compute_cost** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| -当计算两个连接点之间的代价时调用该函数。 +计算两个连接点之间的成本时调用。 -请注意,该函数在默认的 ``AStarGrid2D`` 类中是隐藏的。 +注意这个函数隐藏在默认的 **AStarGrid2D** 类中。 .. rst-class:: classref-item-separator ---- -.. _class_AStarGrid2D_method__estimate_cost: +.. _class_AStarGrid2D_private_method__estimate_cost: .. rst-class:: classref-method :ref:`float` **_estimate_cost** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** |virtual| |const| -当估算一个点和路径结束点之间的代价时,调用该函数。 +估计一个点和路径终点之间的成本时调用。 -请注意,该函数在默认的 ``AStarGrid2D`` 类中是隐藏的。 +注意这个函数隐藏在默认的 **AStarGrid2D** 类中。 .. rst-class:: classref-item-separator @@ -450,9 +450,9 @@ void **clear** **(** **)** void **fill_solid_region** **(** :ref:`Rect2i` region, :ref:`bool` solid=true **)** -Fills the given ``region`` on the grid with the specified value for the solid flag. +使用指定的值填充网格上 ``region`` 区域的实心标志。 -\ **Note:** Calling :ref:`update` is not needed after the call of this function. +\ **注意:**\ 调用该函数后不需要调用 :ref:`update`\ 。 .. rst-class:: classref-item-separator @@ -464,9 +464,9 @@ Fills the given ``region`` on the grid with the specified value for the solid fl void **fill_weight_scale_region** **(** :ref:`Rect2i` region, :ref:`float` weight_scale **)** -Fills the given ``region`` on the grid with the specified value for the weight scale. +使用指定的值填充网格上 ``region`` 区域的权重缩放。 -\ **Note:** Calling :ref:`update` is not needed after the call of this function. +\ **注意:**\ 调用该函数后不需要调用 :ref:`update`\ 。 .. rst-class:: classref-item-separator @@ -490,9 +490,9 @@ Fills the given ``region`` on the grid with the specified value for the weight s :ref:`PackedVector2Array` **get_point_path** **(** :ref:`Vector2i` from_id, :ref:`Vector2i` to_id **)** -返回一个数组,其中包含 AStarGrid2D 在给定点之间找到的路径上的点。数组从路径的起点到终点排序。 +返回一个数组,其中包含 **AStarGrid2D** 在给定点之间找到的路径上的点。数组从路径的起点到终点排序。 -\ **注意:**\ 该方法不是线程安全的。如果从 :ref:`Thread` 中调用它,它将返回一个空的 :ref:`PackedVector3Array` 并打印一个错误消息。 +\ **注意:**\ 该方法不是线程安全的。如果从 :ref:`Thread` 中调用它,它将返回一个空的 :ref:`PackedVector3Array` 并打印一条错误消息。 .. rst-class:: classref-item-separator @@ -540,7 +540,7 @@ Fills the given ``region`` on the grid with the specified value for the weight s :ref:`bool` **is_in_bounds** **(** :ref:`int` x, :ref:`int` y **)** |const| -如果 ``x`` 和 ``y`` 是有效的网格坐标(ID),则返回 ``true``\ 。 +如果 ``x`` 和 ``y`` 是有效的网格坐标(ID),即如果它位于 :ref:`region` 内部,则返回 ``true``\ 。相当于 ``region.has_point(Vector2i(x, y))``\ 。 .. rst-class:: classref-item-separator @@ -552,7 +552,7 @@ Fills the given ``region`` on the grid with the specified value for the weight s :ref:`bool` **is_in_boundsv** **(** :ref:`Vector2i` id **)** |const| -如果 ``id`` 向量是有效的网格坐标,则返回 ``true``\ 。 +如果 ``id`` 向量是有效的网格坐标,即如果它位于 :ref:`region` 内部,则返回 ``true``\ 。相当于 ``region.has_point(id)``\ 。 .. rst-class:: classref-item-separator @@ -590,7 +590,7 @@ void **set_point_solid** **(** :ref:`Vector2i` id, :ref:`bool` id, :ref:`float` weight_scale **)** -为具有给定 ``id`` 的点设置 ``weight_scale``\ 。在确定从相邻点到该点穿越路段的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost` 的结果。 +为具有给定 ``id`` 的点设置 ``weight_scale``\ 。在确定从相邻点到该点穿越路段的总成本时,\ ``weight_scale`` 要乘以 :ref:`_compute_cost` 的结果。 \ **注意:**\ 调用该函数后不需要调用 :ref:`update`\ 。 @@ -608,10 +608,10 @@ void **update** **(** **)** \ **注意:**\ 会清空所有点的数据(坚固以及权重比例)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_atlastexture.rst b/classes/zh_CN/class_atlastexture.rst index 046a5f6599..217b75fbc3 100644 --- a/classes/zh_CN/class_atlastexture.rst +++ b/classes/zh_CN/class_atlastexture.rst @@ -10,14 +10,14 @@ AtlasTexture ============ -**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 裁剪其他 Texture2D 的纹理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`Texture2D` 资源,只绘制其 :ref:`atlas` 纹理中的由 :ref:`region` 所定义的那部分。还可以设置一个额外的 :ref:`margin`\ ,这对于小的调整很有用。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -51,8 +51,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AtlasTexture_property_atlas: @@ -118,10 +118,10 @@ Property Descriptions 用于绘制 :ref:`atlas` 的区域。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiobuslayout.rst b/classes/zh_CN/class_audiobuslayout.rst index d0b8811e8b..14098d12bf 100644 --- a/classes/zh_CN/class_audiobuslayout.rst +++ b/classes/zh_CN/class_audiobuslayout.rst @@ -10,21 +10,21 @@ AudioBusLayout ============== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 存储有关音频总线的信息。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 存储位置、静音、独奏、旁通、效果、效果位置、音量以及总线之间的连接。使用方法见 :ref:`AudioServer` 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffect.rst b/classes/zh_CN/class_audioeffect.rst index a45c421d3e..5ca104f4cd 100644 --- a/classes/zh_CN/class_audioeffect.rst +++ b/classes/zh_CN/class_audioeffect.rst @@ -10,37 +10,37 @@ AudioEffect =========== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AudioEffectAmplify`, :ref:`AudioEffectCapture`, :ref:`AudioEffectChorus`, :ref:`AudioEffectCompressor`, :ref:`AudioEffectDelay`, :ref:`AudioEffectDistortion`, :ref:`AudioEffectEQ`, :ref:`AudioEffectFilter`, :ref:`AudioEffectLimiter`, :ref:`AudioEffectPanner`, :ref:`AudioEffectPhaser`, :ref:`AudioEffectPitchShift`, :ref:`AudioEffectRecord`, :ref:`AudioEffectReverb`, :ref:`AudioEffectSpectrumAnalyzer`, :ref:`AudioEffectStereoEnhance` +**派生:** :ref:`AudioEffectAmplify`, :ref:`AudioEffectCapture`, :ref:`AudioEffectChorus`, :ref:`AudioEffectCompressor`, :ref:`AudioEffectDelay`, :ref:`AudioEffectDistortion`, :ref:`AudioEffectEQ`, :ref:`AudioEffectFilter`, :ref:`AudioEffectLimiter`, :ref:`AudioEffectPanner`, :ref:`AudioEffectPhaser`, :ref:`AudioEffectPitchShift`, :ref:`AudioEffectRecord`, :ref:`AudioEffectReverb`, :ref:`AudioEffectSpectrumAnalyzer`, :ref:`AudioEffectStereoEnhance` 用于音频的音频效果。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 音频总线的基础资源。在该资源所应用的总线上应用音频效果。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `音频麦克风录音演示 `__ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------------------------------+----------------------------------------------------------------------------------+ - | :ref:`AudioEffectInstance` | :ref:`_instantiate` **(** **)** |virtual| | - +-------------------------------------------------------+----------------------------------------------------------------------------------+ + +-------------------------------------------------------+------------------------------------------------------------------------------------------+ + | :ref:`AudioEffectInstance` | :ref:`_instantiate` **(** **)** |virtual| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -48,10 +48,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_AudioEffect_method__instantiate: +.. _class_AudioEffect_private_method__instantiate: .. rst-class:: classref-method @@ -59,12 +59,12 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectamplify.rst b/classes/zh_CN/class_audioeffectamplify.rst index 4c151ea768..bc682df238 100644 --- a/classes/zh_CN/class_audioeffectamplify.rst +++ b/classes/zh_CN/class_audioeffectamplify.rst @@ -10,28 +10,28 @@ AudioEffectAmplify ================== -**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 向音频总线添加一个放大的音频效果。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 增加或减少通过音频总线传送的音量。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +46,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioEffectAmplify_property_volume_db: @@ -62,10 +62,10 @@ Property Descriptions 以分贝为单位的放大量。正值使声音更响亮,负值使声音更安静。数值范围从 -80 到 24。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectbandlimitfilter.rst b/classes/zh_CN/class_audioeffectbandlimitfilter.rst index 47f64ba42b..3b52180fe1 100644 --- a/classes/zh_CN/class_audioeffectbandlimitfilter.rst +++ b/classes/zh_CN/class_audioeffectbandlimitfilter.rst @@ -10,28 +10,28 @@ AudioEffectBandLimitFilter ========================== -**Inherits:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 为音频总线添加一个带限滤波器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 限制 :ref:`AudioEffectFilter.cutoff_hz` 周围范围内的频率,允许这个范围外的频率通过。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectbandpassfilter.rst b/classes/zh_CN/class_audioeffectbandpassfilter.rst index bb42b81967..9d565eecd6 100644 --- a/classes/zh_CN/class_audioeffectbandpassfilter.rst +++ b/classes/zh_CN/class_audioeffectbandpassfilter.rst @@ -10,28 +10,28 @@ AudioEffectBandPassFilter ========================= -**Inherits:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 为音频总线添加一个带通滤波器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 衰减 :ref:`AudioEffectFilter.cutoff_hz` 周围范围内的频率,并切断这个频段之外的频率。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectcapture.rst b/classes/zh_CN/class_audioeffectcapture.rst index bbd5e78db1..05a909ae2c 100644 --- a/classes/zh_CN/class_audioeffectcapture.rst +++ b/classes/zh_CN/class_audioeffectcapture.rst @@ -10,14 +10,14 @@ AudioEffectCapture ================== -**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 从音频总线上实时捕捉音频。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- AudioEffectCapture 是一种 AudioEffect,可将所有音频帧从附加的音频效果总线复制到其内部的环形缓冲区中。 @@ -27,8 +27,8 @@ AudioEffectCapture 是一种 AudioEffect,可将所有音频帧从附加的音 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -76,8 +76,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioEffectCapture_property_buffer_length: @@ -98,8 +98,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AudioEffectCapture_method_can_get_buffer: @@ -183,10 +183,10 @@ void **clear_buffer** **(** **)** 返回从音频总线插入的音频帧的数量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectchorus.rst b/classes/zh_CN/class_audioeffectchorus.rst index 29d5507008..ef3e2d52b9 100644 --- a/classes/zh_CN/class_audioeffectchorus.rst +++ b/classes/zh_CN/class_audioeffectchorus.rst @@ -10,28 +10,28 @@ AudioEffectChorus ================= -**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 添加合唱音频效果。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 添加一个合唱音频效果。该效果复制音频源,并应用声音滤波器进行操作。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -94,8 +94,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -132,8 +132,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioEffectChorus_property_dry: @@ -596,8 +596,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AudioEffectChorus_method_get_voice_cutoff_hz: @@ -607,7 +607,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -621,7 +621,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -635,7 +635,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -649,7 +649,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -663,7 +663,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -677,7 +677,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -691,7 +691,7 @@ void **set_voice_cutoff_hz** **(** :ref:`int` voice_idx, :ref:`float< .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -705,7 +705,7 @@ void **set_voice_delay_ms** **(** :ref:`int` voice_idx, :ref:`float`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -719,7 +719,7 @@ void **set_voice_depth_ms** **(** :ref:`int` voice_idx, :ref:`float`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -733,7 +733,7 @@ void **set_voice_level_db** **(** :ref:`int` voice_idx, :ref:`float`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -747,7 +747,7 @@ void **set_voice_pan** **(** :ref:`int` voice_idx, :ref:`float`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -761,12 +761,12 @@ void **set_voice_rate_hz** **(** :ref:`int` voice_idx, :ref:`float`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectcompressor.rst b/classes/zh_CN/class_audioeffectcompressor.rst index 00044c9738..1604b55ad2 100644 --- a/classes/zh_CN/class_audioeffectcompressor.rst +++ b/classes/zh_CN/class_audioeffectcompressor.rst @@ -10,7 +10,7 @@ AudioEffectCompressor ===================== -**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 为音频总线添加压缩音频效果。 @@ -18,8 +18,8 @@ AudioEffectCompressor .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 动态范围压缩器在振幅超过一定的阈值(以分贝为单位)时,降低声音的电平。压缩器的主要用途之一是通过尽可能少的削波(当声音超过 0dB 时)来增加动态范围。 @@ -35,15 +35,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -70,8 +70,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioEffectCompressor_property_attack_us: @@ -188,10 +188,10 @@ Property Descriptions 超过该电平,压缩将应用于音频。值的范围可以从 -60 到 0。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectdelay.rst b/classes/zh_CN/class_audioeffectdelay.rst index eb6556bb18..efa714575b 100644 --- a/classes/zh_CN/class_audioeffectdelay.rst +++ b/classes/zh_CN/class_audioeffectdelay.rst @@ -10,7 +10,7 @@ AudioEffectDelay ================ -**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 为音频总线添加延迟音频效果。在一段时间后回放输入信号。 @@ -18,22 +18,22 @@ AudioEffectDelay .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 在一段时间后回放输入信号。延迟的信号可以多次回放,以产生重复、衰减的回声。延迟效果的范围是从微弱回声效果到明显的以前声音和新声音的混合。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -72,8 +72,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioEffectDelay_property_dry: @@ -137,7 +137,7 @@ Property Descriptions - void **set_feedback_level_db** **(** :ref:`float` value **)** - :ref:`float` **get_feedback_level_db** **(** **)** -Sound level for feedback. +反馈的声级。 .. rst-class:: classref-item-separator @@ -171,7 +171,7 @@ Sound level for feedback. - void **set_tap1_active** **(** :ref:`bool` value **)** - :ref:`bool` **is_tap1_active** **(** **)** -If ``true``, the first tap will be enabled. +如果为 ``true``\ ,将启用第一拍。 .. rst-class:: classref-item-separator @@ -188,7 +188,7 @@ If ``true``, the first tap will be enabled. - void **set_tap1_delay_ms** **(** :ref:`float` value **)** - :ref:`float` **get_tap1_delay_ms** **(** **)** -First tap delay time in milliseconds. +第一拍延迟时间,单位为毫秒。 .. rst-class:: classref-item-separator @@ -205,7 +205,7 @@ First tap delay time in milliseconds. - void **set_tap1_level_db** **(** :ref:`float` value **)** - :ref:`float` **get_tap1_level_db** **(** **)** -Sound level for the first tap. +第一拍的声级。 .. rst-class:: classref-item-separator @@ -222,7 +222,7 @@ Sound level for the first tap. - void **set_tap1_pan** **(** :ref:`float` value **)** - :ref:`float` **get_tap1_pan** **(** **)** -Pan position for the first tap. Value can range from -1 (fully left) to 1 (fully right). +第一拍的声像位置。取值范围为 -1(完全向左)到 1(完全向右)。 .. rst-class:: classref-item-separator @@ -239,7 +239,7 @@ Pan position for the first tap. Value can range from -1 (fully left) to 1 (fully - void **set_tap2_active** **(** :ref:`bool` value **)** - :ref:`bool` **is_tap2_active** **(** **)** -If ``true``, the second tap will be enabled. +如果为 ``true``\ ,将启用第二拍。 .. rst-class:: classref-item-separator @@ -256,7 +256,7 @@ If ``true``, the second tap will be enabled. - void **set_tap2_delay_ms** **(** :ref:`float` value **)** - :ref:`float` **get_tap2_delay_ms** **(** **)** -Second tap delay time in milliseconds. +第二拍的延迟时间,单位为毫秒。 .. rst-class:: classref-item-separator @@ -273,7 +273,7 @@ Second tap delay time in milliseconds. - void **set_tap2_level_db** **(** :ref:`float` value **)** - :ref:`float` **get_tap2_level_db** **(** **)** -Sound level for the second tap. +第二拍的声级。 .. rst-class:: classref-item-separator @@ -290,12 +290,12 @@ Sound level for the second tap. - void **set_tap2_pan** **(** :ref:`float` value **)** - :ref:`float` **get_tap2_pan** **(** **)** -Pan position for the second tap. Value can range from -1 (fully left) to 1 (fully right). +第二拍的声像位置。取值范围为 -1(完全向左)到 1(完全向右)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectdistortion.rst b/classes/zh_CN/class_audioeffectdistortion.rst index 0a54ef60dd..8e8c675ba3 100644 --- a/classes/zh_CN/class_audioeffectdistortion.rst +++ b/classes/zh_CN/class_audioeffectdistortion.rst @@ -10,7 +10,7 @@ AudioEffectDistortion ===================== -**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 为音频总线添加失真音频效果。 @@ -18,8 +18,8 @@ AudioEffectDistortion .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 可以使用不同的类型:削波、正切、低保真(位破碎)、过载、波形。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AudioEffectDistortion_Mode: @@ -113,8 +113,8 @@ enum **Mode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioEffectDistortion_property_drive: @@ -197,10 +197,10 @@ Property Descriptions 在效果前增加或减少的音量,单位为分贝。取值范围从 -60 到 60。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffecteq.rst b/classes/zh_CN/class_audioeffecteq.rst index 72fbb4d968..e0b91668c8 100644 --- a/classes/zh_CN/class_audioeffecteq.rst +++ b/classes/zh_CN/class_audioeffecteq.rst @@ -10,9 +10,9 @@ AudioEffectEQ ============= -**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AudioEffectEQ10`, :ref:`AudioEffectEQ21`, :ref:`AudioEffectEQ6` +**派生:** :ref:`AudioEffectEQ10`, :ref:`AudioEffectEQ21`, :ref:`AudioEffectEQ6` 音频均衡器的基类。让你可以控制频率。 @@ -20,22 +20,22 @@ AudioEffectEQ .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- AudioEffectEQ 可用于频率控制。用它来弥补音频中不足之处。AudioEffectEQ 在 Master 总线上很有用,可以完全掌控一个混音,并赋予它更多的特性。当游戏在移动设备上运行时,它们也很有用,可以根据那种扬声器来调整混音(可以被添加,但在插入耳机时禁用)。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AudioEffectEQ_method_get_band_count: @@ -89,10 +89,10 @@ void **set_band_gain_db** **(** :ref:`int` band_idx, :ref:`float` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffectEQ` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 为音频总线添加 10 段均衡器音频效果。让你控制 31Hz 到 16000Hz 的频率。 @@ -18,8 +18,8 @@ AudioEffectEQ10 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 频段: @@ -47,15 +47,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffecteq21.rst b/classes/zh_CN/class_audioeffecteq21.rst index ed9373f0e5..6456422425 100644 --- a/classes/zh_CN/class_audioeffecteq21.rst +++ b/classes/zh_CN/class_audioeffecteq21.rst @@ -10,7 +10,7 @@ AudioEffectEQ21 =============== -**Inherits:** :ref:`AudioEffectEQ` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffectEQ` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 向音频总线添加一个 21 频段均衡器音频效果。可以控制从 22 Hz 到 22000 Hz 的频率。 @@ -18,8 +18,8 @@ AudioEffectEQ21 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 频段: @@ -69,15 +69,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffecteq6.rst b/classes/zh_CN/class_audioeffecteq6.rst index 69f3fef0c3..0d5282fd80 100644 --- a/classes/zh_CN/class_audioeffecteq6.rst +++ b/classes/zh_CN/class_audioeffecteq6.rst @@ -10,7 +10,7 @@ AudioEffectEQ6 ============== -**Inherits:** :ref:`AudioEffectEQ` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffectEQ` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 向音频总线添加一个 6 频段均衡器音频效果。可以控制从 32 Hz 到 10000 Hz 的频率。 @@ -18,8 +18,8 @@ AudioEffectEQ6 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 频段: @@ -39,15 +39,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectfilter.rst b/classes/zh_CN/class_audioeffectfilter.rst index 3463f24899..68a01da983 100644 --- a/classes/zh_CN/class_audioeffectfilter.rst +++ b/classes/zh_CN/class_audioeffectfilter.rst @@ -10,30 +10,30 @@ AudioEffectFilter ================= -**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AudioEffectBandLimitFilter`, :ref:`AudioEffectBandPassFilter`, :ref:`AudioEffectHighPassFilter`, :ref:`AudioEffectHighShelfFilter`, :ref:`AudioEffectLowPassFilter`, :ref:`AudioEffectLowShelfFilter`, :ref:`AudioEffectNotchFilter` +**派生:** :ref:`AudioEffectBandLimitFilter`, :ref:`AudioEffectBandPassFilter`, :ref:`AudioEffectHighPassFilter`, :ref:`AudioEffectHighShelfFilter`, :ref:`AudioEffectLowPassFilter`, :ref:`AudioEffectLowShelfFilter`, :ref:`AudioEffectNotchFilter` 为音频总线添加一个滤波器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 允许通过 :ref:`cutoff_hz` 以外的频率。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AudioEffectFilter_FilterDB: @@ -101,8 +101,8 @@ enum **FilterDB**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioEffectFilter_property_cutoff_hz: @@ -134,7 +134,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -170,10 +170,10 @@ Property Descriptions 在截断频率附近的频率范围内的提升量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffecthighpassfilter.rst b/classes/zh_CN/class_audioeffecthighpassfilter.rst index de0dc4b838..64d39b90ef 100644 --- a/classes/zh_CN/class_audioeffecthighpassfilter.rst +++ b/classes/zh_CN/class_audioeffecthighpassfilter.rst @@ -10,28 +10,28 @@ AudioEffectHighPassFilter ========================= -**Inherits:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 向音频总线添加一个高通滤波器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 削减比 :ref:`AudioEffectFilter.cutoff_hz` 更低的频率,允许更高的频率通过。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffecthighshelffilter.rst b/classes/zh_CN/class_audioeffecthighshelffilter.rst index 1f029484d2..f1152a9b65 100644 --- a/classes/zh_CN/class_audioeffecthighshelffilter.rst +++ b/classes/zh_CN/class_audioeffecthighshelffilter.rst @@ -10,28 +10,28 @@ AudioEffectHighShelfFilter ========================== -**Inherits:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 向音频总线添加一个高架滤波器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 降低所有高于 :ref:`AudioEffectFilter.cutoff_hz` 的频率。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectinstance.rst b/classes/zh_CN/class_audioeffectinstance.rst index d513421de3..7d1e9441e7 100644 --- a/classes/zh_CN/class_audioeffectinstance.rst +++ b/classes/zh_CN/class_audioeffectinstance.rst @@ -10,27 +10,27 @@ AudioEffectInstance =================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AudioEffectSpectrumAnalyzerInstance` +**派生:** :ref:`AudioEffectSpectrumAnalyzerInstance` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_process` **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_process_silence` **(** **)** |virtual| |const| | - +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_process` **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_process_silence` **(** **)** |virtual| |const| | + +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -38,10 +38,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_AudioEffectInstance_method__process: +.. _class_AudioEffectInstance_private_method__process: .. rst-class:: classref-method @@ -49,13 +49,13 @@ void **_process** **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`in .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_AudioEffectInstance_method__process_silence: +.. _class_AudioEffectInstance_private_method__process_silence: .. rst-class:: classref-method @@ -63,12 +63,12 @@ void **_process** **(** const void* src_buffer, AudioFrame* dst_buffer, :ref:`in .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectlimiter.rst b/classes/zh_CN/class_audioeffectlimiter.rst index 79cd24f29f..9a631ecf7d 100644 --- a/classes/zh_CN/class_audioeffectlimiter.rst +++ b/classes/zh_CN/class_audioeffectlimiter.rst @@ -10,14 +10,14 @@ AudioEffectLimiter ================== -**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 为音频总线添加一个软剪辑限制器音频效果。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 限制器类似于压缩器,但灵活性较差,并且设计为不允许声音超过给定的 dB 阈值。始终建议在主总线中添加一个以减少削波的影响。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioEffectLimiter_property_ceiling_db: @@ -104,7 +104,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -123,10 +123,10 @@ Property Descriptions 限制器开始生效的阈值,以分贝为单位。值的范围可以从 -30 到 0。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectlowpassfilter.rst b/classes/zh_CN/class_audioeffectlowpassfilter.rst index 06170e889d..85bd79e7c3 100644 --- a/classes/zh_CN/class_audioeffectlowpassfilter.rst +++ b/classes/zh_CN/class_audioeffectlowpassfilter.rst @@ -10,28 +10,28 @@ AudioEffectLowPassFilter ======================== -**Inherits:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 向音频总线添加一个低通滤波器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 削减比 :ref:`AudioEffectFilter.cutoff_hz` 更低的频率,允许更高的频率通过。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectlowshelffilter.rst b/classes/zh_CN/class_audioeffectlowshelffilter.rst index 58a468cba1..65cc4e48b6 100644 --- a/classes/zh_CN/class_audioeffectlowshelffilter.rst +++ b/classes/zh_CN/class_audioeffectlowshelffilter.rst @@ -10,28 +10,28 @@ AudioEffectLowShelfFilter ========================= -**Inherits:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 向音频总线添加一个低架滤波器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 降低 :ref:`AudioEffectFilter.cutoff_hz` 以下的所有频率。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectnotchfilter.rst b/classes/zh_CN/class_audioeffectnotchfilter.rst index 7db5264578..f60b203e7b 100644 --- a/classes/zh_CN/class_audioeffectnotchfilter.rst +++ b/classes/zh_CN/class_audioeffectnotchfilter.rst @@ -10,28 +10,28 @@ AudioEffectNotchFilter ====================== -**Inherits:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffectFilter` **<** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在音频总线上添加一个陷波滤波器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 衰减 :ref:`AudioEffectFilter.cutoff_hz` 周围窄带的频率,并切断这个范围以外的频率。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectpanner.rst b/classes/zh_CN/class_audioeffectpanner.rst index 4f23f505a8..1ce9bd7b79 100644 --- a/classes/zh_CN/class_audioeffectpanner.rst +++ b/classes/zh_CN/class_audioeffectpanner.rst @@ -10,28 +10,28 @@ AudioEffectPanner ================= -**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 向音频总线添加一个声像器音频效果。向左或向右声像移动声音。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 决定向左右总线发送的音频信号量。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +46,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioEffectPanner_property_pan: @@ -62,10 +62,10 @@ Property Descriptions 声像位置。值的范围可以从 -1(完全左)到1(完全右)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectphaser.rst b/classes/zh_CN/class_audioeffectphaser.rst index 07c41bafda..a2843dd98d 100644 --- a/classes/zh_CN/class_audioeffectphaser.rst +++ b/classes/zh_CN/class_audioeffectphaser.rst @@ -10,7 +10,7 @@ AudioEffectPhaser ================= -**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 向音频总线添加一个移相器音频效果。 @@ -18,22 +18,22 @@ AudioEffectPhaser .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 将相移信号与原始信号相结合。使用低频振荡器控制相移信号的移动。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioEffectPhaser_property_depth: @@ -140,10 +140,10 @@ Property Descriptions 以 Hz 为单位调整效果在整个频率范围内上下扫描的速度。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectpitchshift.rst b/classes/zh_CN/class_audioeffectpitchshift.rst index 292c259aad..9a1bd62a83 100644 --- a/classes/zh_CN/class_audioeffectpitchshift.rst +++ b/classes/zh_CN/class_audioeffectpitchshift.rst @@ -10,7 +10,7 @@ AudioEffectPitchShift ===================== -**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 为音频总线添加音高变换的音频效果。 @@ -18,22 +18,22 @@ AudioEffectPitchShift .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 允许独立于速度调制音高。所有频率都可以增加或减少,而对瞬态的影响最小。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AudioEffectPitchShift_FFTSize: @@ -115,8 +115,8 @@ enum **FFTSize**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioEffectPitchShift_property_fft_size: @@ -165,10 +165,10 @@ Property Descriptions 要使用的音高缩放。\ ``1.0`` 是默认的音高,声音会按原样播放。\ :ref:`pitch_scale` 的范围从 ``0.0``\ (无限低的音高,听不见)到 ``16``\ (比初始音高要高 16 倍)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectrecord.rst b/classes/zh_CN/class_audioeffectrecord.rst index e4f08f7baf..da9458df0e 100644 --- a/classes/zh_CN/class_audioeffectrecord.rst +++ b/classes/zh_CN/class_audioeffectrecord.rst @@ -10,14 +10,14 @@ AudioEffectRecord ================= -**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于录制来自音频总线的声音的音频效果。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 允许用户录制来自音频总线的声音。在“Master”音频总线上使用时会包含所有 Godot 输出的音频。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用麦克风录音 <../tutorials/audio/recording_with_microphone>` @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -68,8 +68,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioEffectRecord_property_format: @@ -90,8 +90,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AudioEffectRecord_method_get_recording: @@ -125,10 +125,10 @@ void **set_recording_active** **(** :ref:`bool` record **)** 如果为 ``true``\ ,将录制声音。请注意,重新开始录音将移除先前录音的样本。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectreverb.rst b/classes/zh_CN/class_audioeffectreverb.rst index 1d94571f2a..a3f84788dc 100644 --- a/classes/zh_CN/class_audioeffectreverb.rst +++ b/classes/zh_CN/class_audioeffectreverb.rst @@ -10,21 +10,21 @@ AudioEffectReverb ================= -**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 向音频总线添加一个混响音频效果。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 模拟房间、音乐厅、洞穴或开放空间等声学环境的声音。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` @@ -32,8 +32,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -62,8 +62,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioEffectReverb_property_damping: @@ -197,10 +197,10 @@ Property Descriptions 修改后声音的输出百分比。为 0 时,只输出原始声音。取值范围是 0 到 1。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectspectrumanalyzer.rst b/classes/zh_CN/class_audioeffectspectrumanalyzer.rst index d69cd42893..70ccd2f71a 100644 --- a/classes/zh_CN/class_audioeffectspectrumanalyzer.rst +++ b/classes/zh_CN/class_audioeffectspectrumanalyzer.rst @@ -10,14 +10,14 @@ AudioEffectSpectrumAnalyzer =========================== -**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 可用于实时音频可视化的音频效果。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这种音频效果不影响声音输出,但可以用于实时音频可视化。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `音频频谱演示 `__ @@ -34,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AudioEffectSpectrumAnalyzer_FFTSize: @@ -117,8 +117,8 @@ enum **FFTSize**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioEffectSpectrumAnalyzer_property_buffer_length: @@ -167,12 +167,12 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectspectrumanalyzerinstance.rst b/classes/zh_CN/class_audioeffectspectrumanalyzerinstance.rst index 441e86f4e2..1878543e70 100644 --- a/classes/zh_CN/class_audioeffectspectrumanalyzerinstance.rst +++ b/classes/zh_CN/class_audioeffectspectrumanalyzerinstance.rst @@ -10,16 +10,16 @@ AudioEffectSpectrumAnalyzerInstance =================================== -**Inherits:** :ref:`AudioEffectInstance` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffectInstance` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -34,8 +34,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AudioEffectSpectrumAnalyzerInstance_MagnitudeMode: @@ -65,8 +65,8 @@ enum **MagnitudeMode**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AudioEffectSpectrumAnalyzerInstance_method_get_magnitude_for_frequency_range: @@ -76,12 +76,12 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioeffectstereoenhance.rst b/classes/zh_CN/class_audioeffectstereoenhance.rst index cdb6060e6a..b4a76172e9 100644 --- a/classes/zh_CN/class_audioeffectstereoenhance.rst +++ b/classes/zh_CN/class_audioeffectstereoenhance.rst @@ -10,28 +10,28 @@ AudioEffectStereoEnhance ======================== -**Inherits:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioEffect` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 一种可用于调整立体声声像强度的音频效果。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 一种可用于调整立体声声像强度的音频效果。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioEffectStereoEnhance_property_pan_pullout: @@ -83,7 +83,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -102,12 +102,12 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiolistener2d.rst b/classes/zh_CN/class_audiolistener2d.rst index 72253c8bb8..d22692a203 100644 --- a/classes/zh_CN/class_audiolistener2d.rst +++ b/classes/zh_CN/class_audiolistener2d.rst @@ -10,14 +10,14 @@ AudioListener2D =============== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 覆盖听到声音的位置。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 一旦被添加到场景树并使用 :ref:`make_current` 启用,此节点将覆盖听到声音的位置。只有一个 **AudioListener2D** 可以是当前的。使用 :ref:`make_current` 将禁用之前的 **AudioListener2D**\ 。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AudioListener2D_method_clear_current: @@ -82,10 +82,10 @@ void **make_current** **(** **)** 如果 **AudioListener2D** 未添加到 :ref:`SceneTree`\ ,则该方法无效。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiolistener3d.rst b/classes/zh_CN/class_audiolistener3d.rst index 4e5b7a269e..4bae6fc144 100644 --- a/classes/zh_CN/class_audiolistener3d.rst +++ b/classes/zh_CN/class_audiolistener3d.rst @@ -10,21 +10,21 @@ AudioListener3D =============== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 覆盖听到声音的位置。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 一旦添加到场景树并使用 :ref:`make_current` 启用,该节点将覆盖听到声音的位置。这可用于从与 :ref:`Camera3D` 不同的位置聆听。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AudioListener3D_method_clear_current: @@ -94,10 +94,10 @@ void **make_current** **(** **)** 启用该监听器。将覆盖当前相机的监听器。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audioserver.rst b/classes/zh_CN/class_audioserver.rst index b3527d8912..8a5ef65b09 100644 --- a/classes/zh_CN/class_audioserver.rst +++ b/classes/zh_CN/class_audioserver.rst @@ -10,21 +10,21 @@ AudioServer =========== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 低级音频访问的服务器接口。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **AudioServer** 是用于音频访问的底层服务器接口。它负责创建样本数据(可播放的音频)以及通过语音接口进行播放。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频总线 <../tutorials/audio/audio_buses>` @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -146,8 +146,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_AudioServer_signal_bus_layout_changed: @@ -155,7 +155,7 @@ Signals **bus_layout_changed** **(** **)** -Emitted when an audio bus is added, deleted, or moved. +添加、修改、删除音频总线时发出。 .. rst-class:: classref-item-separator @@ -167,7 +167,7 @@ Emitted when an audio bus is added, deleted, or moved. **bus_renamed** **(** :ref:`int` bus_index, :ref:`StringName` old_name, :ref:`StringName` new_name **)** -Emitted when the audio bus at ``bus_index`` is renamed from ``old_name`` to ``new_name``. +当索引为 ``bus_index`` 的音频总线的名称从 ``old_name`` 更改为 ``new_name`` 时发出。 .. rst-class:: classref-section-separator @@ -175,8 +175,8 @@ Emitted when the audio bus at ``bus_index`` is renamed from ``old_name`` to ``ne .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AudioServer_SpeakerMode: @@ -222,8 +222,8 @@ enum **SpeakerMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioServer_property_bus_count: @@ -297,8 +297,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AudioServer_method_add_bus: @@ -500,9 +500,9 @@ void **add_bus_effect** **(** :ref:`int` bus_idx, :ref:`AudioEffect` **get_output_latency** **(** **)** |const| -Returns the audio driver's effective output latency. This is based on :ref:`ProjectSettings.audio/driver/output_latency`, but the exact returned value will differ depending on the operating system and audio driver. +返回音频驱动的实际输出延迟。基于 :ref:`ProjectSettings.audio/driver/output_latency`\ ,但实际的返回值取决于操作系统和音频驱动。 -\ **Note:** This can be expensive; it is not recommended to call :ref:`get_output_latency` every frame. +\ **注意:**\ 可能开销较大;不建议每帧都调用 :ref:`get_output_latency`\ 。 .. rst-class:: classref-item-separator @@ -746,7 +746,7 @@ void **set_enable_tagging_used_audio_streams** **(** :ref:`bool` ena .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -772,10 +772,10 @@ void **unlock** **(** **)** 解锁音频驱动程序的主循环。(锁定后,你始终需要手动解锁它。) -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiostream.rst b/classes/zh_CN/class_audiostream.rst index 36d001539d..80d671e119 100644 --- a/classes/zh_CN/class_audiostream.rst +++ b/classes/zh_CN/class_audiostream.rst @@ -10,23 +10,23 @@ AudioStream =========== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AudioStreamGenerator`, :ref:`AudioStreamMicrophone`, :ref:`AudioStreamMP3`, :ref:`AudioStreamOggVorbis`, :ref:`AudioStreamPolyphonic`, :ref:`AudioStreamRandomizer`, :ref:`AudioStreamWAV` +**派生:** :ref:`AudioStreamGenerator`, :ref:`AudioStreamMicrophone`, :ref:`AudioStreamMP3`, :ref:`AudioStreamOggVorbis`, :ref:`AudioStreamPolyphonic`, :ref:`AudioStreamRandomizer`, :ref:`AudioStreamWAV` 音频流的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 音频流的基类。音频流用于播放音效和音乐,支持 WAV(通过 :ref:`AudioStreamWAV`\ )和 Ogg(通过 :ref:`AudioStreamOggVorbis`\ )文件格式。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频流 <../tutorials/audio/audio_streams>` @@ -38,31 +38,31 @@ Tutorials .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_beat_count` **(** **)** |virtual| |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_bpm` **(** **)** |virtual| |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_length` **(** **)** |virtual| |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_stream_name` **(** **)** |virtual| |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStreamPlayback` | :ref:`_instantiate_playback` **(** **)** |virtual| |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_monophonic` **(** **)** |virtual| |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_length` **(** **)** |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStreamPlayback` | :ref:`instantiate_playback` **(** **)** | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_monophonic` **(** **)** |const| | - +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_beat_count` **(** **)** |virtual| |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_bpm` **(** **)** |virtual| |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_length` **(** **)** |virtual| |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_stream_name` **(** **)** |virtual| |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamPlayback` | :ref:`_instantiate_playback` **(** **)** |virtual| |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_monophonic` **(** **)** |virtual| |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_length` **(** **)** |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamPlayback` | :ref:`instantiate_playback` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_monophonic` **(** **)** |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -70,10 +70,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_AudioStream_method__get_beat_count: +.. _class_AudioStream_private_method__get_beat_count: .. rst-class:: classref-method @@ -81,13 +81,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_AudioStream_method__get_bpm: +.. _class_AudioStream_private_method__get_bpm: .. rst-class:: classref-method @@ -95,13 +95,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_AudioStream_method__get_length: +.. _class_AudioStream_private_method__get_length: .. rst-class:: classref-method @@ -109,13 +109,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_AudioStream_method__get_stream_name: +.. _class_AudioStream_private_method__get_stream_name: .. rst-class:: classref-method @@ -123,13 +123,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_AudioStream_method__instantiate_playback: +.. _class_AudioStream_private_method__instantiate_playback: .. rst-class:: classref-method @@ -137,13 +137,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_AudioStream_method__is_monophonic: +.. _class_AudioStream_private_method__is_monophonic: .. rst-class:: classref-method @@ -151,7 +151,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -175,7 +175,7 @@ Method Descriptions :ref:`AudioStreamPlayback` **instantiate_playback** **(** **)** -返回一个 AudioStreamPlayback。当想要扩展 :ref:`_instantiate_playback`\ ,但从一个内部持有的 AudioStream 子资源调用 :ref:`instantiate_playback` 时很有用。在 ``AudioStreamRandomPitch::instantiate_playback`` 的源文件中可以找到这方面的示例。 +返回一个 AudioStreamPlayback。当想要扩展 :ref:`_instantiate_playback`\ ,但从一个内部持有的 AudioStream 子资源调用 :ref:`instantiate_playback` 时很有用。在 ``AudioStreamRandomPitch::instantiate_playback`` 的源文件中可以找到这方面的示例。 .. rst-class:: classref-item-separator @@ -189,10 +189,10 @@ Method Descriptions 如果该音频流仅支持单声道播放,则返回 true;如果音频流支持复调,则返回 false。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiostreamgenerator.rst b/classes/zh_CN/class_audiostreamgenerator.rst index eb01da88aa..d8ce711555 100644 --- a/classes/zh_CN/class_audiostreamgenerator.rst +++ b/classes/zh_CN/class_audiostreamgenerator.rst @@ -10,20 +10,23 @@ AudioStreamGenerator ==================== -**Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 提供程序式声音生成工具的音频流。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **AudioStreamGenerator** 是一种音频流,它自己并不播放声音,而是要用脚本来为它生成音频数据。另见 :ref:`AudioStreamGeneratorPlayback`\ 。 以下是用它来生成正弦波的例子: -:: + +.. tabs:: + + .. code-tab:: gdscript var playback # 存放 AudioStreamGeneratorPlayback。 @onready var sample_hz = $AudioStreamPlayer.stream.mix_rate @@ -43,6 +46,40 @@ Description playback.push_frame(Vector2.ONE * sin(phase * TAU)) phase = fmod(phase + increment, 1.0) + .. code-tab:: csharp + + [Export] public AudioStreamPlayer Player { get; set; } + + private AudioStreamGeneratorPlayback _playback; // 存放 AudioStreamGeneratorPlayback。 + private float _sampleHz; + private float _pulseHz = 440.0f; // 音频波形的频率。 + + public override void _Ready() + { + if (Player.Stream is AudioStreamGenerator generator) // Type as a generator to access MixRate. + { + _sampleHz = generator.MixRate; + Player.Play(); + _playback = (AudioStreamGeneratorPlayback)Player.GetStreamPlayback(); + FillBuffer(); + } + } + + public void FillBuffer() + { + double phase = 0.0; + float increment = _pulseHz / _sampleHz; + int framesAvailable = _playback.GetFramesAvailable(); + + for (int i = 0; i < framesAvailable; i++) + { + _playback.PushFrame(Vector2.One * (float)Mathf.Sin(phase * Mathf.Tau)); + phase = Mathf.PosMod(phase + increment, 1.0); + } + } + + + 上面的例子中,“AudioStreamPlayer”节点必须使用 **AudioStreamGenerator** 作为其流。\ ``fill_buffer`` 函数负责提供模拟正弦波的音频数据。 要执行实时音频频谱分析,见 :ref:`AudioEffectSpectrumAnalyzer`\ 。 @@ -51,15 +88,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `音频生成器演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -76,8 +113,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioStreamGenerator_property_buffer_length: @@ -113,10 +150,10 @@ Property Descriptions 根据\ `奈奎斯特–香农采样定理 `__\ ,当超过 40000 赫兹时,人类的听觉没有质量上的差别(因为大多数人最多只能听到 ~20000 赫兹,往往更少)。如果你要生成语音等音高较低的声音,则可以使用 ``32000`` 或 ``22050`` 等较低的采样率,不会降低质量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiostreamgeneratorplayback.rst b/classes/zh_CN/class_audiostreamgeneratorplayback.rst index 32e687a790..55bdcbf808 100644 --- a/classes/zh_CN/class_audiostreamgeneratorplayback.rst +++ b/classes/zh_CN/class_audiostreamgeneratorplayback.rst @@ -10,21 +10,21 @@ AudioStreamGeneratorPlayback ============================ -**Inherits:** :ref:`AudioStreamPlaybackResampled` **<** :ref:`AudioStreamPlayback` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioStreamPlaybackResampled` **<** :ref:`AudioStreamPlayback` **<** :ref:`RefCounted` **<** :ref:`Object` 播放使用 :ref:`AudioStreamGenerator` 生成的音频。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 此类旨在与 :ref:`AudioStreamGenerator` 一起使用以实时播放生成的音频。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `音频生成器演示 `__ @@ -32,8 +32,8 @@ Tutorials .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AudioStreamGeneratorPlayback_method_can_push_buffer: @@ -103,9 +103,7 @@ void **clear_buffer** **(** **)** :ref:`int` **get_skips** **(** **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +返回由于音频样本数据中缓冲区不足而导致播放跳过的次数。该值在播放开始时重置。 .. rst-class:: classref-item-separator @@ -131,10 +129,10 @@ void **clear_buffer** **(** **)** 将单个音频数据帧推送到缓冲区。这通常比 C# 中的以及通过 GDExtension 编译的语言中的 :ref:`push_buffer` 效率更低,但在 GDScript 中的 :ref:`push_frame` 的效率可能\ *更高*\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiostreammicrophone.rst b/classes/zh_CN/class_audiostreammicrophone.rst index 05e7d66cfe..7e58b34f46 100644 --- a/classes/zh_CN/class_audiostreammicrophone.rst +++ b/classes/zh_CN/class_audiostreammicrophone.rst @@ -10,14 +10,14 @@ AudioStreamMicrophone ===================== -**Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 播放实时音频输入数据。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 当直接在 :ref:`AudioStreamPlayer` 节点中使用时,\ **AudioStreamMicrophone** 会实时播放麦克风的输入。这可以配合 :ref:`AudioEffectCapture` 使用,以处理数据或保存数据。 @@ -25,17 +25,17 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用麦克风录音 <../tutorials/audio/recording_with_microphone>` - `音频麦克风录音演示 `__ -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiostreammp3.rst b/classes/zh_CN/class_audiostreammp3.rst index 7d755cb4e6..97c68e0d79 100644 --- a/classes/zh_CN/class_audiostreammp3.rst +++ b/classes/zh_CN/class_audiostreammp3.rst @@ -10,21 +10,21 @@ AudioStreamMP3 ============== -**Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` MP3 音频流驱动程序。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- MP3 音频流驱动程序。如果要在运行时加载 MP3 文件,请参阅 :ref:`data`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioStreamMP3_property_bar_beats: @@ -65,7 +65,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -84,7 +84,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -103,7 +103,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -181,10 +181,10 @@ Property Descriptions 循环时,流开始的时间,单位为秒。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiostreamoggvorbis.rst b/classes/zh_CN/class_audiostreamoggvorbis.rst index 708b58ebb0..bfe5bbaee4 100644 --- a/classes/zh_CN/class_audiostreamoggvorbis.rst +++ b/classes/zh_CN/class_audiostreamoggvorbis.rst @@ -10,21 +10,28 @@ AudioStreamOggVorbis ==================== -**Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A class representing an Ogg Vorbis audio stream. +代表 Ogg Vorbis 音频流的类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -The AudioStreamOggVorbis class is a specialized :ref:`AudioStream` for handling Ogg Vorbis file formats. It offers functionality for loading and playing back Ogg Vorbis files, as well as managing looping and other playback properties. This class is part of the audio stream system, which also supports WAV files through the :ref:`AudioStreamWAV` class. +AudioStreamOggVorbis 类是专用于处理 Ogg Vorbis 文件格式的 :ref:`AudioStream` 类。它提供加载和播放 Ogg Vorbis 文件以及管理循环和其他播放属性的功能。该类是音频流系统的一部分,该系统还通过 :ref:`AudioStreamWAV` 类支持 WAV 系统。 + +.. rst-class:: classref-introduction-group + +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +52,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -63,8 +70,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioStreamOggVorbis_property_bar_beats: @@ -79,7 +86,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -98,7 +105,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -117,7 +124,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -134,7 +141,7 @@ Property Descriptions - void **set_loop** **(** :ref:`bool` value **)** - :ref:`bool` **has_loop** **(** **)** -If ``true``, the audio will play again from the specified :ref:`loop_offset` once it is done playing. Useful for ambient sounds and background music. +如果为 ``true``\ ,则音频播放完成后将从 :ref:`loop_offset` 指定的位置再次播放。可用于环境声音和背景音乐。 .. rst-class:: classref-item-separator @@ -176,8 +183,8 @@ If ``true``, the audio will play again from the specified :ref:`loop_offset` **load_from_buffer** **(** :ref:`PackedByteArray` buffer **)** |static| -Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer must contain Ogg Vorbis data. +从给定缓冲区创建一个新的 AudioStreamOggVorbis 实例。缓冲区必须包含 Ogg Vorbis 数据。 .. rst-class:: classref-item-separator @@ -197,12 +204,12 @@ Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer mu :ref:`AudioStreamOggVorbis` **load_from_file** **(** :ref:`String` path **)** |static| -Creates a new AudioStreamOggVorbis instance from the given file path. The file must be in Ogg Vorbis format. +从给定文件路径创建新的 AudioStreamOggVorbis 实例。文件必须采用 Ogg Vorbis 格式。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiostreamplayback.rst b/classes/zh_CN/class_audiostreamplayback.rst index 35f9e7e1e2..7cf3d8ac85 100644 --- a/classes/zh_CN/class_audiostreamplayback.rst +++ b/classes/zh_CN/class_audiostreamplayback.rst @@ -10,51 +10,51 @@ AudioStreamPlayback =================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AudioStreamPlaybackPolyphonic`, :ref:`AudioStreamPlaybackResampled` +**派生:** :ref:`AudioStreamPlaybackPolyphonic`, :ref:`AudioStreamPlaybackResampled` 播放音频的元类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 可以播放、循环播放、暂停滚动播放音频。有关用法,请参阅 :ref:`AudioStream` 和 :ref:`AudioStreamOggVorbis`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `音频生成器演示 `__ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_loop_count` **(** **)** |virtual| |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_playback_position` **(** **)** |virtual| |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_playing` **(** **)** |virtual| |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_mix` **(** AudioFrame* buffer, :ref:`float` rate_scale, :ref:`int` frames **)** |virtual| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_seek` **(** :ref:`float` position **)** |virtual| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_start` **(** :ref:`float` from_pos **)** |virtual| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_stop` **(** **)** |virtual| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_tag_used_streams` **(** **)** |virtual| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_loop_count` **(** **)** |virtual| |const| | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_playback_position` **(** **)** |virtual| |const| | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_playing` **(** **)** |virtual| |const| | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_mix` **(** AudioFrame* buffer, :ref:`float` rate_scale, :ref:`int` frames **)** |virtual| | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_seek` **(** :ref:`float` position **)** |virtual| | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_start` **(** :ref:`float` from_pos **)** |virtual| | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_stop` **(** **)** |virtual| | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_tag_used_streams` **(** **)** |virtual| | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -62,10 +62,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_AudioStreamPlayback_method__get_loop_count: +.. _class_AudioStreamPlayback_private_method__get_loop_count: .. rst-class:: classref-method @@ -73,13 +73,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_AudioStreamPlayback_method__get_playback_position: +.. _class_AudioStreamPlayback_private_method__get_playback_position: .. rst-class:: classref-method @@ -87,13 +87,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_AudioStreamPlayback_method__is_playing: +.. _class_AudioStreamPlayback_private_method__is_playing: .. rst-class:: classref-method @@ -101,13 +101,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_AudioStreamPlayback_method__mix: +.. _class_AudioStreamPlayback_private_method__mix: .. rst-class:: classref-method @@ -115,13 +115,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_AudioStreamPlayback_method__seek: +.. _class_AudioStreamPlayback_private_method__seek: .. rst-class:: classref-method @@ -129,13 +129,13 @@ void **_seek** **(** :ref:`float` position **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_AudioStreamPlayback_method__start: +.. _class_AudioStreamPlayback_private_method__start: .. rst-class:: classref-method @@ -143,13 +143,13 @@ void **_start** **(** :ref:`float` from_pos **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_AudioStreamPlayback_method__stop: +.. _class_AudioStreamPlayback_private_method__stop: .. rst-class:: classref-method @@ -157,13 +157,13 @@ void **_stop** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_AudioStreamPlayback_method__tag_used_streams: +.. _class_AudioStreamPlayback_private_method__tag_used_streams: .. rst-class:: classref-method @@ -171,12 +171,12 @@ void **_tag_used_streams** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiostreamplaybackoggvorbis.rst b/classes/zh_CN/class_audiostreamplaybackoggvorbis.rst index 173b7775fd..438dc9134f 100644 --- a/classes/zh_CN/class_audiostreamplaybackoggvorbis.rst +++ b/classes/zh_CN/class_audiostreamplaybackoggvorbis.rst @@ -10,16 +10,16 @@ AudioStreamPlaybackOggVorbis ============================ -**Inherits:** :ref:`AudioStreamPlaybackResampled` **<** :ref:`AudioStreamPlayback` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioStreamPlaybackResampled` **<** :ref:`AudioStreamPlayback` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiostreamplaybackpolyphonic.rst b/classes/zh_CN/class_audiostreamplaybackpolyphonic.rst index 168b2bc266..62de2b8efe 100644 --- a/classes/zh_CN/class_audiostreamplaybackpolyphonic.rst +++ b/classes/zh_CN/class_audiostreamplaybackpolyphonic.rst @@ -10,21 +10,21 @@ AudioStreamPlaybackPolyphonic ============================= -**Inherits:** :ref:`AudioStreamPlayback` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioStreamPlayback` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`AudioStreamPolyphonic` 的播放实例。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`AudioStreamPolyphonic` 的播放实例。设置 :ref:`AudioStreamPlayer`\ 、\ :ref:`AudioStreamPlayer2D` 或 :ref:`AudioStreamPlayer3D` 的 ``stream`` 属性后,可以通过调用 :ref:`AudioStreamPlayer.get_stream_playback`\ 、\ :ref:`AudioStreamPlayer2D.get_stream_playback` 或 :ref:`AudioStreamPlayer3D.get_stream_playback` 方法获取播放实例。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Methods .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_AudioStreamPlaybackPolyphonic_constant_INVALID_ID: @@ -64,8 +64,8 @@ Constants .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AudioStreamPlaybackPolyphonic_method_is_stream_playing: @@ -129,10 +129,10 @@ void **stop_stream** **(** :ref:`int` stream **)** 停止某个流。\ ``stream`` 参数是由 :ref:`play_stream` 返回的整数 ID,在调用这个函数后失效。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiostreamplaybackresampled.rst b/classes/zh_CN/class_audiostreamplaybackresampled.rst index 9d8b879a71..a6ab91734a 100644 --- a/classes/zh_CN/class_audiostreamplaybackresampled.rst +++ b/classes/zh_CN/class_audiostreamplaybackresampled.rst @@ -10,29 +10,29 @@ AudioStreamPlaybackResampled ============================ -**Inherits:** :ref:`AudioStreamPlayback` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioStreamPlayback` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AudioStreamGeneratorPlayback`, :ref:`AudioStreamPlaybackOggVorbis` +**派生:** :ref:`AudioStreamGeneratorPlayback`, :ref:`AudioStreamPlaybackOggVorbis` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_stream_sampling_rate` **(** **)** |virtual| |const| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_mix_resampled` **(** AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`begin_resample` **(** **)** | - +---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_stream_sampling_rate` **(** **)** |virtual| |const| | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_mix_resampled` **(** AudioFrame* dst_buffer, :ref:`int` frame_count **)** |virtual| | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`begin_resample` **(** **)** | + +---------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -40,10 +40,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_AudioStreamPlaybackResampled_method__get_stream_sampling_rate: +.. _class_AudioStreamPlaybackResampled_private_method__get_stream_sampling_rate: .. rst-class:: classref-method @@ -51,13 +51,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_AudioStreamPlaybackResampled_method__mix_resampled: +.. _class_AudioStreamPlaybackResampled_private_method__mix_resampled: .. rst-class:: classref-method @@ -65,7 +65,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -79,12 +79,12 @@ void **begin_resample** **(** **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiostreamplayer.rst b/classes/zh_CN/class_audiostreamplayer.rst index b788d18d5d..1282cbf632 100644 --- a/classes/zh_CN/class_audiostreamplayer.rst +++ b/classes/zh_CN/class_audiostreamplayer.rst @@ -10,14 +10,14 @@ AudioStreamPlayer ================= -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` 播放音频,不考虑所处位置。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 以非位置方式支持播放音频流。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频流 <../tutorials/audio/audio_streams>` @@ -42,8 +42,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -70,8 +70,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -96,8 +96,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_AudioStreamPlayer_signal_finished: @@ -113,8 +113,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AudioStreamPlayer_MixTarget: @@ -152,8 +152,8 @@ enum **MixTarget**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioStreamPlayer_property_autoplay: @@ -286,7 +286,7 @@ Property Descriptions - void **set_stream_paused** **(** :ref:`bool` value **)** - :ref:`bool` **get_stream_paused** **(** **)** -如果为 ``true``\ ,则暂停播放。你可以通过将 ``stream_paused`` 设置为 ``false`` 来恢复播放。 +如果为 ``true``\ ,则播放会暂停。你可以通过将 :ref:`stream_paused` 设置为 ``false``\ 来恢复它。 .. rst-class:: classref-item-separator @@ -311,8 +311,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AudioStreamPlayer_method_get_playback_position: @@ -382,10 +382,10 @@ void **stop** **(** **)** 停止音频。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiostreamplayer2d.rst b/classes/zh_CN/class_audiostreamplayer2d.rst index 58e00a0a9b..5e5b8689bb 100644 --- a/classes/zh_CN/class_audiostreamplayer2d.rst +++ b/classes/zh_CN/class_audiostreamplayer2d.rst @@ -10,14 +10,14 @@ AudioStreamPlayer2D =================== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 在 2D 空间中播放与位置相关的声音。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 播放随与监听者的距离增大而衰减的音频。 @@ -29,15 +29,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频流 <../tutorials/audio/audio_streams>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -70,8 +70,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -96,8 +96,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_AudioStreamPlayer2D_signal_finished: @@ -113,8 +113,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioStreamPlayer2D_property_area_mask: @@ -298,7 +298,7 @@ Property Descriptions - void **set_stream_paused** **(** :ref:`bool` value **)** - :ref:`bool` **get_stream_paused** **(** **)** -如果为 ``true``\ ,则暂停播放。你可以通过将 ``stream_paused`` 设置为 ``false`` 来恢复播放。 +如果为 ``true``\ ,则播放会暂停。你可以通过将 :ref:`stream_paused` 设置为 ``false``\ 来恢复它。 .. rst-class:: classref-item-separator @@ -323,8 +323,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AudioStreamPlayer2D_method_get_playback_position: @@ -394,10 +394,10 @@ void **stop** **(** **)** 停止音频。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiostreamplayer3d.rst b/classes/zh_CN/class_audiostreamplayer3d.rst index e820c5b9d0..7d337118cb 100644 --- a/classes/zh_CN/class_audiostreamplayer3d.rst +++ b/classes/zh_CN/class_audiostreamplayer3d.rst @@ -10,14 +10,14 @@ AudioStreamPlayer3D =================== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 在 3D 空间中播放与位置相关的声音。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 根据音频收听者的相对位置播放具有位置音效的音频。位置效应包括距离衰减、方向性、和多普勒效应。为了更逼真,低通滤波器会自动应用于远处的声音。这可以通过将 :ref:`attenuation_filter_cutoff_hz` 设置为 ``20500`` 来禁用。 @@ -29,15 +29,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`音频流 <../tutorials/audio/audio_streams>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -86,8 +86,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -112,8 +112,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_AudioStreamPlayer3D_signal_finished: @@ -129,8 +129,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AudioStreamPlayer3D_AttenuationModel: @@ -210,8 +210,8 @@ enum **DopplerTracking**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioStreamPlayer3D_property_area_mask: @@ -396,7 +396,7 @@ Property Descriptions - void **set_max_db** **(** :ref:`float` value **)** - :ref:`float` **get_max_db** **(** **)** -Sets the absolute maximum of the sound level, in decibels. +设置声级的绝对最大值,以分贝为单位。 .. rst-class:: classref-item-separator @@ -556,8 +556,8 @@ Sets the absolute maximum of the sound level, in decibels. .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AudioStreamPlayer3D_method_get_playback_position: @@ -627,10 +627,10 @@ void **stop** **(** **)** 停止音频。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiostreampolyphonic.rst b/classes/zh_CN/class_audiostreampolyphonic.rst index a46a8feaf0..136327c9ae 100644 --- a/classes/zh_CN/class_audiostreampolyphonic.rst +++ b/classes/zh_CN/class_audiostreampolyphonic.rst @@ -10,14 +10,14 @@ AudioStreamPolyphonic ===================== -**Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 音频流 AudioStream,允许用户从代码中随时播放自定义流,可以使用单个播放器同时播放。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- AudioStream 允许用户随时通过代码,同时使用单个播放器播放自定义流。 @@ -25,8 +25,8 @@ AudioStream 允许用户随时通过代码,同时使用单个播放器播放 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioStreamPolyphonic_property_polyphony: @@ -57,10 +57,10 @@ Property Descriptions 可以同时播放的流的最大数量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiostreamrandomizer.rst b/classes/zh_CN/class_audiostreamrandomizer.rst index 2829bdb0d5..f73c53893c 100644 --- a/classes/zh_CN/class_audiostreamrandomizer.rst +++ b/classes/zh_CN/class_audiostreamrandomizer.rst @@ -10,21 +10,21 @@ AudioStreamRandomizer ===================== -**Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用音高和音量偏移,包装一个音频流池。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 根据播放模式,从池中随机选择一个 AudioStream,并在播放期间应用随机音高偏移和音量偏移。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -69,8 +69,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AudioStreamRandomizer_PlaybackMode: @@ -108,8 +108,8 @@ enum **PlaybackMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioStreamRandomizer_property_playback_mode: @@ -181,8 +181,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AudioStreamRandomizer_method_add_stream: @@ -264,10 +264,10 @@ void **set_stream_probability_weight** **(** :ref:`int` index, :ref:` 设置流在指定索引处的概率权重。该值越高,随机化器在随机播放模式下选择该流的可能性就越大。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_audiostreamwav.rst b/classes/zh_CN/class_audiostreamwav.rst index 5e35cbae55..0ae3a87a8a 100644 --- a/classes/zh_CN/class_audiostreamwav.rst +++ b/classes/zh_CN/class_audiostreamwav.rst @@ -10,23 +10,30 @@ AudioStreamWAV ============== -**Inherits:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`AudioStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 存储从 WAV 文件加载的音频数据。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- AudioStreamWAV 存储从 WAV 文件加载的声音样本。要播放存储的声音,请使用 :ref:`AudioStreamPlayer`\ (用于非空间定位音频)或 :ref:`AudioStreamPlayer2D`/:ref:`AudioStreamPlayer3D`\ (用于空间定位音频)。声音可以循环播放。 这个类还可用于存储动态生成的 PCM 音频数据。另请参阅 :ref:`AudioStreamGenerator` 以了解程序化音频生成。 +.. rst-class:: classref-introduction-group + +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` + .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +56,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -65,8 +72,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_AudioStreamWAV_Format: @@ -146,8 +153,8 @@ enum **LoopMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_AudioStreamWAV_property_data: @@ -276,8 +283,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_AudioStreamWAV_method_save_to_wav: @@ -289,10 +296,10 @@ Method Descriptions \ **注意:**\ 如果缺少 ``.wav`` 扩展名,则会自动将其追加到 ``path``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_backbuffercopy.rst b/classes/zh_CN/class_backbuffercopy.rst index 87cc4edf7a..42384a1cdd 100644 --- a/classes/zh_CN/class_backbuffercopy.rst +++ b/classes/zh_CN/class_backbuffercopy.rst @@ -10,23 +10,23 @@ BackBufferCopy ============== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -A node that copies a region of the screen to a buffer for access in shader code. +这种节点能够将屏幕中的某个区域复制到缓冲中,方便从着色器代码中访问。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Node for back-buffering the currently-displayed screen. The region defined in the **BackBufferCopy** node is buffered with the content of the screen it covers, or the entire screen according to the :ref:`copy_mode`. It can be accessed in shader scripts using the screen texture (i.e. a uniform sampler with ``hint_screen_texture``). +用于后台缓冲当前显示屏幕的节点。会根据 :ref:`copy_mode` 对 **BackBufferCopy** 节点中定义的区域所覆盖的屏幕内容或整个屏幕进行缓冲。可以在着色器脚本中使用屏幕纹理来访问(即带有 ``hint_screen_texture`` 的 uniform 采样器)。 -\ **Note:** Since this node inherits from :ref:`Node2D` (and not :ref:`Control`), anchors and margins won't apply to child :ref:`Control`-derived nodes. This can be problematic when resizing the window. To avoid this, add :ref:`Control`-derived nodes as *siblings* to the **BackBufferCopy** node instead of adding them as children. +\ **注意:**\ 由于该节点继承自 :ref:`Node2D`\ (而非 :ref:`Control`\ ),因此锚点和边距不适用于子 :ref:`Control` 派生节点。这在调整窗口大小时可能会出现问题。为避免这种情况,请将 :ref:`Control` 派生节点添加为 **BackBufferCopy** 节点的\ *同级*\ 节点,而不是将它们添加为子节点。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_BackBufferCopy_CopyMode: @@ -82,8 +82,8 @@ enum **CopyMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_BackBufferCopy_property_copy_mode: @@ -115,10 +115,10 @@ Property Descriptions 该 **BackBufferCopy** 所覆盖的区域。只有当 :ref:`copy_mode` 为 :ref:`COPY_MODE_RECT` 时才使用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_basebutton.rst b/classes/zh_CN/class_basebutton.rst index a885d0df36..05fc19c340 100644 --- a/classes/zh_CN/class_basebutton.rst +++ b/classes/zh_CN/class_basebutton.rst @@ -10,23 +10,23 @@ BaseButton ========== -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`Button`, :ref:`LinkButton`, :ref:`TextureButton` +**派生:** :ref:`Button`, :ref:`LinkButton`, :ref:`TextureButton` GUI 按钮的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **BaseButton** 是 GUI 按钮的抽象基类。本身不显示任何东西。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -57,16 +57,16 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pressed` **(** **)** |virtual| | + | void | :ref:`_pressed` **(** **)** |virtual| | +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_toggled` **(** :ref:`bool` toggled_on **)** |virtual| | + | void | :ref:`_toggled` **(** :ref:`bool` toggled_on **)** |virtual| | +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ | :ref:`DrawMode` | :ref:`get_draw_mode` **(** **)** |const| | +-------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ @@ -81,8 +81,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_BaseButton_signal_button_down: @@ -128,7 +128,7 @@ Signals **toggled** **(** :ref:`bool` toggled_on **)** -Emitted when the button was just toggled between pressed and normal states (only if :ref:`toggle_mode` is active). The new state is contained in the ``toggled_on`` argument. +当按钮刚刚在按下和正常状态之间切换时发出(仅当 :ref:`toggle_mode` 处于活动状态时)。新状态包含在 ``toggled_on`` 参数中。 .. rst-class:: classref-section-separator @@ -136,8 +136,8 @@ Emitted when the button was just toggled between pressed and normal states (only .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_BaseButton_DrawMode: @@ -217,8 +217,8 @@ enum **ActionMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_BaseButton_property_action_mode: @@ -400,22 +400,22 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_BaseButton_method__pressed: +.. _class_BaseButton_private_method__pressed: .. rst-class:: classref-method void **_pressed** **(** **)** |virtual| -当按钮被按下时调用。如果你需要知道按钮被按下的状态(并且 :ref:`toggle_mode` is active]是活动状态),请使用\ :ref:`_toggled`\ 代替。 +当按钮被按下时调用。如果你需要知道按钮被按下的状态(并且 :ref:`toggle_mode` is active]是活动状态),请使用\ :ref:`_toggled`\ 代替。 .. rst-class:: classref-item-separator ---- -.. _class_BaseButton_method__toggled: +.. _class_BaseButton_private_method__toggled: .. rst-class:: classref-method @@ -461,10 +461,10 @@ void **set_pressed_no_signal** **(** :ref:`bool` pressed **)** \ **注意:**\ 该方法不会取消按下 :ref:`button_group` 中的其他按钮。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_basematerial3d.rst b/classes/zh_CN/class_basematerial3d.rst index 5852db6248..9933c58b24 100644 --- a/classes/zh_CN/class_basematerial3d.rst +++ b/classes/zh_CN/class_basematerial3d.rst @@ -10,30 +10,30 @@ BaseMaterial3D ============== -**Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`ORMMaterial3D`, :ref:`StandardMaterial3D` +**派生:** :ref:`ORMMaterial3D`, :ref:`StandardMaterial3D` -Abstract base class for defining the 3D rendering properties of meshes. +用于定义网格 3D 渲染属性的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This class serves as a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details. +这个类提供了默认的材质,具有多种渲染功能和属性,无需编写着色器代码。详情见下面的教程。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`标准 3D 材质与 ORM 3D 材质 <../tutorials/3d/standard_material_3d>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -276,8 +276,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -302,8 +302,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_BaseMaterial3D_TextureParam: @@ -1101,7 +1101,7 @@ enum **Flags**: :ref:`Flags` **FLAG_DISABLE_FOG** = ``21`` -Disables receiving depth-based or volumetric fog. +禁用接收基于深度或体积雾。 .. _class_BaseMaterial3D_constant_FLAG_MAX: @@ -1227,7 +1227,7 @@ enum **BillboardMode**: :ref:`BillboardMode` **BILLBOARD_PARTICLES** = ``3`` -分配给 :ref:`GPUParticles3D` 和 :ref:`CPUParticles3D` 节点时被用于粒子系统。启用 ``particles_anim_*`` 属性。 +分配给 :ref:`GPUParticles3D` 和 :ref:`CPUParticles3D` 节点时被用于粒子系统(翻页动画)。启用 ``particles_anim_*`` 属性。 \ :ref:`ParticleProcessMaterial.anim_speed_min` 或 :ref:`CPUParticles3D.anim_speed_min` 也应设置为大于零的值,以便播放动画。 @@ -1355,8 +1355,8 @@ enum **DistanceFadeMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_BaseMaterial3D_property_albedo_color: @@ -2003,7 +2003,7 @@ Alpha 剪刀将丢弃值的阈值。较高的值将导致更多像素被丢弃 - void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enable **)** - :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| -If ``true``, the object will not be affected by fog (neither volumetric nor depth fog). This is useful for unshaded or transparent materials (e.g. particles), which without this setting will be affected even if fully transparent. +如果为 ``true``\ ,则对象不会受到雾的影响(包括体积雾和深度雾)。可用于不着色材质和透明材质(例如例子),不开启时即便完全透明也会受到影响。 .. rst-class:: classref-item-separator @@ -2039,7 +2039,7 @@ If ``true``, the object will not be affected by fog (neither volumetric nor dept 物体看起来完全不透明的距离。 -\ **注意:**\ 如果 ``distance_fade_max_distance`` 小于 ``distance_fade_min_distance``\ ,则行为相反。物体将在 ``distance_fade_max_distance`` 处开始逐渐消失,并在到达 ``distance_fade_min_distance`` 时完全消失。 +\ **注意:**\ 如果 :ref:`distance_fade_max_distance` 小于 :ref:`distance_fade_min_distance`\ ,则行为相反。物体将在 :ref:`distance_fade_max_distance` 处开始逐渐消失,并在到达 :ref:`distance_fade_min_distance` 时完全消失。 .. rst-class:: classref-item-separator @@ -2058,7 +2058,7 @@ If ``true``, the object will not be affected by fog (neither volumetric nor dept 物体开始变得可见的距离。如果物体的距离小于这个距离,它将是不可见的。 -\ **注意:**\ 如果 ``distance_fade_min_distance`` 大于 ``distance_fade_max_distance``\ ,则行为将相反。物体将在 ``distance_fade_max_distance`` 处开始逐渐消失,并在到达 ``distance_fade_min_distance`` 时完全消失。 +\ **注意:**\ 如果 :ref:`distance_fade_min_distance` 大于 :ref:`distance_fade_max_distance`\ ,则行为将相反。物体将在 :ref:`distance_fade_max_distance` 处开始逐渐消失,并在到达 :ref:`distance_fade_min_distance` 时完全消失。 .. rst-class:: classref-item-separator @@ -2501,7 +2501,7 @@ If ``true``, the object will not be affected by fog (neither volumetric nor dept - void **set_msdf_outline_size** **(** :ref:`float` value **)** - :ref:`float` **get_msdf_outline_size** **(** **)** -The width of the shape outline. +形状轮廓的宽度。 .. rst-class:: classref-item-separator @@ -3415,8 +3415,8 @@ The width of the shape outline. .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_BaseMaterial3D_method_get_feature: @@ -3486,10 +3486,10 @@ void **set_texture** **(** :ref:`TextureParam` 设置由 ``param`` 指定的插槽的纹理。有关可用插槽,请参阅 :ref:`TextureParam`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_basis.rst b/classes/zh_CN/class_basis.rst index f89daa821f..37761c62e1 100644 --- a/classes/zh_CN/class_basis.rst +++ b/classes/zh_CN/class_basis.rst @@ -14,8 +14,8 @@ Basis .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于表示 3D 旋转和缩放的 3×3 矩阵。通常用作 :ref:`Transform3D` 的正交基。 @@ -27,12 +27,12 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`数学文档索引 <../tutorials/math/index>` @@ -50,8 +50,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -66,8 +66,8 @@ Properties .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -86,8 +86,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -107,6 +107,8 @@ Methods +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Basis` | :ref:`inverse` **(** **)** |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_conformal` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Basis` b **)** |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | @@ -132,8 +134,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -160,8 +162,8 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Basis_constant_IDENTITY: @@ -171,7 +173,7 @@ Constants 恒等基,未应用旋转或缩放。 -这与不带任何参数调用 ``Basis()`` 是一样的。这个常量可以用来让你的代码更清晰,并与 C# 保持一致。 +这与不带任何参数调用 :ref:`Basis` 来创建是一样的。这个常量可以用来让你的代码更清晰,并与 C# 保持一致。 .. _class_Basis_constant_FLIP_X: @@ -203,8 +205,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Basis_property_x: @@ -244,8 +246,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_Basis_constructor_Basis: @@ -301,8 +303,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Basis_method_determinant: @@ -392,6 +394,18 @@ Method Descriptions ---- +.. _class_Basis_method_is_conformal: + +.. rst-class:: classref-method + +:ref:`bool` **is_conformal** **(** **)** |const| + +如果该基是共形的,则返回\ ``true``\ ,这意味着它保留角度和距离比率,并且只能由旋转和均匀缩放组成。如果该基具有不均匀的缩放或剪切/倾斜,则返回 ``false``\ 。这可以用来验证该基是否不失真,这对于物理和其他用例很重要。 + +.. rst-class:: classref-item-separator + +---- + .. _class_Basis_method_is_equal_approx: .. rst-class:: classref-method @@ -530,8 +544,8 @@ Method Descriptions .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Basis_operator_neq_Basis: @@ -617,10 +631,10 @@ Operator Descriptions 使用索引访问基的分量。\ ``b[0]`` 相当于 ``b.x``\ 、\ ``b[1]`` 相当于 ``b.y``\ 、\ ``b[2]`` 相当于 ``b.z``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_bitmap.rst b/classes/zh_CN/class_bitmap.rst index 30d9a3140c..eab3672b66 100644 --- a/classes/zh_CN/class_bitmap.rst +++ b/classes/zh_CN/class_bitmap.rst @@ -10,21 +10,21 @@ BitMap ====== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 布尔矩阵。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 布尔值二维数组,可以用来高效存储二进制矩阵(每个矩阵元素只占一个比特位),并使用自然的笛卡尔坐标查询数值。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -63,8 +63,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_BitMap_method_convert_to_image: @@ -226,10 +226,10 @@ void **set_bitv** **(** :ref:`Vector2i` position, :ref:`bool` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 与 :ref:`Skeleton2D` 一起使用的关节,能够控制并动画其他节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **Bone2D** 层级结构可以绑定到 :ref:`Skeleton2D` 上,控制并动画其他 :ref:`Node2D` 节点。 @@ -29,8 +29,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -73,8 +73,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Bone2D_property_rest: @@ -95,8 +95,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Bone2D_method_apply_rest: @@ -166,7 +166,7 @@ void **apply_rest** **(** **)** :ref:`Transform2D` **get_skeleton_rest** **(** **)** |const| -如果节点没有父节点,返回节点的 :ref:`rest` ``Transform2D``\ ,或者返回它相对于父节点的放松姿势。 +如果节点没有父节点,返回节点的 :ref:`rest` :ref:`Transform2D`\ ,或者返回它相对于父节点的放松姿势。 .. rst-class:: classref-item-separator @@ -190,9 +190,9 @@ void **set_autocalculate_length_and_angle** **(** :ref:`bool` auto_c void **set_bone_angle** **(** :ref:`float` angle **)** -Sets the bone angle for the **Bone2D**. This is typically set to the rotation from the **Bone2D** to a child **Bone2D** node. +设置 **Bone2D** 节点的骨骼角度。这通常设置为从 **Bone2D** 节点到子 **Bone2D** 节点的旋转。 -\ **Note:** This is different from the **Bone2D**'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the **Bone2D**'s :ref:`Node2D.transform`. +\ **注意:**\ 这与 **Bone2D** 的旋转不同。骨骼角度是 **Bone2D** 小工具显示的骨骼旋转,不受 **Bone2D** 的 :ref:`Node2D.transform` 的影响。 .. rst-class:: classref-item-separator @@ -206,10 +206,10 @@ void **set_length** **(** :ref:`float` length **)** 设置该 **Bone2D** 中骨骼的长度。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_boneattachment3d.rst b/classes/zh_CN/class_boneattachment3d.rst index 2ccfaf36c4..97947f4642 100644 --- a/classes/zh_CN/class_boneattachment3d.rst +++ b/classes/zh_CN/class_boneattachment3d.rst @@ -10,21 +10,21 @@ BoneAttachment3D ================ -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 对父级 :ref:`Skeleton3D` 中某个骨骼的 3D 变换进行复制或覆盖的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个节点能够选中 :ref:`Skeleton3D` 中的某个骨骼并附加到这个骨骼上。这样 **BoneAttachment3D** 节点就能够动态复制或覆盖所选骨骼的 3D 变换。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -63,8 +63,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_BoneAttachment3D_property_bone_idx: @@ -119,8 +119,8 @@ BoneAttachment3D 节点是否将覆盖它所附着到的骨骼的骨骼姿势。 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_BoneAttachment3D_method_get_external_skeleton: @@ -178,10 +178,10 @@ void **set_use_external_skeleton** **(** :ref:`bool` use_external_sk 设置该 BoneAttachment3D 节点是否将使用外部 :ref:`Skeleton3D` 节点,而不是尝试使用其父节点作为 :ref:`Skeleton3D`\ 。当设置为 ``true`` 时,BoneAttachment3D 节点将使用 :ref:`set_external_skeleton` 中设置的外部 :ref:`Skeleton3D` 节点。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_bonemap.rst b/classes/zh_CN/class_bonemap.rst index 5d81ff59e7..0847a35a12 100644 --- a/classes/zh_CN/class_bonemap.rst +++ b/classes/zh_CN/class_bonemap.rst @@ -10,14 +10,14 @@ BoneMap ======= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 描述骨骼名称的映射,用于将 :ref:`Skeleton3D` 重定向至 :ref:`SkeletonProfile` 中定义的通用名称。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类中有一个字典,使用 :ref:`SkeletonProfile` 中的骨骼名称作为键名。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`重定向 3D 骨架 <../tutorials/assets_pipeline/retargeting_3d_skeletons>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -44,8 +44,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_BoneMap_signal_bone_map_updated: @@ -93,8 +93,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_BoneMap_property_profile: @@ -115,8 +115,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_BoneMap_method_find_profile_bone_name: @@ -156,10 +156,10 @@ void **set_skeleton_bone_name** **(** :ref:`StringName` profil 在重定向过程中,设置的骨骼名称是源骨架中骨骼的名称。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_bool.rst b/classes/zh_CN/class_bool.rst index 7a7ae21d68..6d968fb1f4 100644 --- a/classes/zh_CN/class_bool.rst +++ b/classes/zh_CN/class_bool.rst @@ -14,12 +14,12 @@ bool .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -The **bool** is a built-in :ref:`Variant` type that may only store one of two values: ``true`` or ``false``. You can imagine it as a switch that can be either turned on or off, or as a binary digit that can either be 1 or 0. +布尔类型 **bool** 是内置的 :ref:`Variant` 类型,只能存储 ``true``\ (真)和 ``false``\ (假)的其中之一。你可以把它理解为开关,要么处于打开状态,要么处于关闭状态。也可以理解为二进制所使用的数字,只有 1 或者 0。 -Booleans can be directly used in ``if``, and other conditional statements: +\ ``if`` 等条件语句中可以直接使用布尔值: .. tabs:: @@ -40,9 +40,9 @@ Booleans can be directly used in ``if``, and other conditional statements: -All comparison operators return booleans (``==``, ``>``, ``<=``, etc.). As such, it is not necessary to compare booleans themselves. You do not need to add ``== true`` or ``== false``. +比较运算符返回的都是布尔值(\ ``==``\ 、\ ``>``\ 、\ ``<=`` 等)。没有必要比较布尔值本身,因此不需要在这些比较后面加上 ``== true`` 或 ``== false``\ 。 -Booleans can be combined with the logical operators ``and``, ``or``, ``not`` to create complex conditions: +布尔值可以和逻辑运算符 ``and``\ 、\ ``or``\ 、\ ``not`` 组合,构成复杂的条件: .. tabs:: @@ -69,14 +69,14 @@ Booleans can be combined with the logical operators ``and``, ``or``, ``not`` to -\ **Note:** In modern programming languages, logical operators are evaluated in order. All remaining conditions are skipped if their result would have no effect on the final value. This concept is known as `short-circuit evaluation `__ and can be useful to avoid evaluating expensive conditions in some performance-critical cases. +\ **注意:**\ 在现代编程语言中,逻辑运算符是按顺序求值的。如果后续条件不会对最终结果产生影响,那么就会跳过对这些条件的求值。这种行为叫作\ `短路求值 `__\ ,在注重性能的场合能够避免对开销较大的条件进行求值。 -\ **Note:** By convention, built-in methods and properties that return booleans are usually defined as yes-no questions, single adjectives, or similar (:ref:`String.is_empty`, :ref:`Node.can_process`, :ref:`Camera2D.enabled`, etc.). +\ **注意:**\ 根据惯例,返回布尔值的内置方法和属性通常都以判断题、形容词等形式命名(\ :ref:`String.is_empty`\ 、\ :ref:`Node.can_process`\ 、\ :ref:`Camera2D.enabled` 等)。 .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -93,8 +93,8 @@ Constructors .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -115,8 +115,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_bool_constructor_bool: @@ -124,7 +124,7 @@ Constructor Descriptions :ref:`bool` **bool** **(** **)** -Constructs a **bool** set to ``false``. +构造设置为 ``false`` 的 **bool**\ 。 .. rst-class:: classref-item-separator @@ -144,7 +144,7 @@ Constructs a **bool** set to ``false``. :ref:`bool` **bool** **(** :ref:`float` from **)** -Cast a :ref:`float` value to a boolean value. Returns ``false`` if ``from`` is equal to ``0.0`` (including ``-0.0``), and ``true`` for all other values (including :ref:`@GDScript.INF` and :ref:`@GDScript.NAN`). +将 :ref:`float` 值转换为布尔值。如果 ``from`` 等于 ``0.0``\ (包括 ``-0.0``\ )则返回 ``false``\ ,其他值则返回 ``true``\ (包括 :ref:`@GDScript.INF` 和 :ref:`@GDScript.NAN`\ )。 .. rst-class:: classref-item-separator @@ -154,7 +154,7 @@ Cast a :ref:`float` value to a boolean value. Returns ``false`` if :ref:`bool` **bool** **(** :ref:`int` from **)** -Cast an :ref:`int` value to a boolean value. Returns ``false`` if ``from`` is equal to ``0``, and ``true`` for all other values. +将 :ref:`int` 值转换为布尔值。如果 ``from`` 等于 ``0`` 则返回 ``false``\ ,其他值则返回 ``true``\ 。 .. rst-class:: classref-section-separator @@ -162,8 +162,8 @@ Cast an :ref:`int` value to a boolean value. Returns ``false`` if ``f .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_bool_operator_neq_bool: @@ -171,7 +171,7 @@ Operator Descriptions :ref:`bool` **operator !=** **(** :ref:`bool` right **)** -Returns ``true`` if the two booleans are not equal. That is, one is ``true`` and the other is ``false``. This operation can be seen as a logical XOR. +如果两个布尔值不同则返回 ``true``\ ,即一个是 ``true``\ 、一个是 ``false`` 的情况。这个运算可以视为逻辑异或(XOR)。 .. rst-class:: classref-item-separator @@ -195,7 +195,7 @@ Returns ``true`` if the two booleans are not equal. That is, one is ``true`` and :ref:`bool` **operator ==** **(** :ref:`bool` right **)** -Returns ``true`` if the two booleans are equal. That is, both are ``true`` or both are ``false``. This operation can be seen as a logical EQ or XNOR. +如果两个布尔值相同则返回 ``true``\ ,即都是 ``true`` 或都是 ``false`` 的情况。这个运算可以视为逻辑相等(EQ)或者同或(XNOR)。 .. rst-class:: classref-item-separator @@ -209,10 +209,10 @@ Returns ``true`` if the two booleans are equal. That is, both are ``true`` or bo 如果左操作数为 ``true`` 且右操作数为 ``false``\ ,则返回 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_boxcontainer.rst b/classes/zh_CN/class_boxcontainer.rst index 8f6042062a..57c66c858b 100644 --- a/classes/zh_CN/class_boxcontainer.rst +++ b/classes/zh_CN/class_boxcontainer.rst @@ -10,30 +10,30 @@ BoxContainer ============ -**Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`HBoxContainer`, :ref:`VBoxContainer` +**派生:** :ref:`HBoxContainer`, :ref:`VBoxContainer` 将子控件横向或纵向排列的容器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 将子控件横向或纵向排列的容器,会在这些控件的最小尺寸发生改变时自动重排。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +46,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -74,8 +74,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_BoxContainer_AlignmentMode: @@ -113,8 +113,8 @@ enum **AlignmentMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_BoxContainer_property_alignment: @@ -154,8 +154,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_BoxContainer_method_add_spacer: @@ -171,8 +171,8 @@ Method Descriptions .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_BoxContainer_theme_constant_separation: @@ -182,10 +182,10 @@ Theme Property Descriptions **BoxContainer** 元素之间的距离,单位为像素。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_boxmesh.rst b/classes/zh_CN/class_boxmesh.rst index d9f1535942..f2fdd4e5d8 100644 --- a/classes/zh_CN/class_boxmesh.rst +++ b/classes/zh_CN/class_boxmesh.rst @@ -10,14 +10,14 @@ BoxMesh ======= -**Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 生成轴对齐盒 :ref:`PrimitiveMesh`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 生成轴对齐盒 :ref:`PrimitiveMesh`\ 。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_BoxMesh_property_size: @@ -116,10 +116,10 @@ Property Descriptions 沿 X 轴插入的额外边缘环的数量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_boxoccluder3d.rst b/classes/zh_CN/class_boxoccluder3d.rst index de85c35ac7..33ba776214 100644 --- a/classes/zh_CN/class_boxoccluder3d.rst +++ b/classes/zh_CN/class_boxoccluder3d.rst @@ -10,14 +10,14 @@ BoxOccluder3D ============= -**Inherits:** :ref:`Occluder3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Occluder3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 与 :ref:`OccluderInstance3D` 中的遮挡剔除一起使用的长方体形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **BoxOccluder3D** 存储一个长方体形状,可供引擎的遮挡剔除系统使用。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Occlusion culling <../tutorials/3d/occlusion_culling>` +- :doc:`遮挡剔除 <../tutorials/3d/occlusion_culling>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_BoxOccluder3D_property_size: @@ -64,10 +64,10 @@ Property Descriptions 以 3D 单位表示的盒子大小。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_boxshape3d.rst b/classes/zh_CN/class_boxshape3d.rst index 372e2f0cd4..9f2d8e174e 100644 --- a/classes/zh_CN/class_boxshape3d.rst +++ b/classes/zh_CN/class_boxshape3d.rst @@ -10,14 +10,14 @@ BoxShape3D ========== -**Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于物理碰撞的 3D 盒形资源。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 3D 盒子形状,旨在用于物理学。通常用于为 :ref:`CollisionShape3D` 提供形状。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 物理测试演示 `__ @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_BoxShape3D_property_size: @@ -68,10 +68,10 @@ Property Descriptions 该盒子的宽度、高度和深度。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_button.rst b/classes/zh_CN/class_button.rst index 622457d822..a0b16e597e 100644 --- a/classes/zh_CN/class_button.rst +++ b/classes/zh_CN/class_button.rst @@ -10,16 +10,16 @@ Button ====== -**Inherits:** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`CheckBox`, :ref:`CheckButton`, :ref:`ColorPickerButton`, :ref:`MenuButton`, :ref:`OptionButton` +**派生:** :ref:`CheckBox`, :ref:`CheckButton`, :ref:`ColorPickerButton`, :ref:`MenuButton`, :ref:`OptionButton` 按钮,支持主题,能够包含文本和图标。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **Button** 是标准的主题按钮,可以包含文字和图标,显示样式会根据当前的 :ref:`Theme` 改变。 @@ -62,8 +62,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `2D Dodge The Creeps 演示 `__ @@ -71,8 +71,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -103,59 +103,73 @@ Properties .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_focus_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_hover_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`icon_disabled_color` | ``Color(1, 1, 1, 0.4)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`icon_focus_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`icon_hover_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`icon_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`icon_normal_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`icon_pressed_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`h_separation` | ``4`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`icon_max_width` | ``0`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`outline_size` | ``0`` | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Font` | :ref:`font` | | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`font_size` | | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`disabled` | | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`focus` | | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`hover` | | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`normal` | | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`pressed` | | - +---------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_focus_color` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_hover_color` | ``Color(0.95, 0.95, 0.95, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`icon_disabled_color` | ``Color(1, 1, 1, 0.4)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`icon_focus_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`icon_hover_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`icon_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`icon_normal_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Color` | :ref:`icon_pressed_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`h_separation` | ``4`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`icon_max_width` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Font` | :ref:`font` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`font_size` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`Texture2D` | :ref:`icon` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`disabled` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`disabled_mirrored` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`focus` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`hover` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`hover_mirrored` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`hover_pressed` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`hover_pressed_mirrored` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`normal` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`normal_mirrored` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`pressed` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`pressed_mirrored` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ .. rst-class:: classref-section-separator @@ -163,8 +177,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Button_property_alignment: @@ -357,8 +371,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_Button_theme_color_font_color: @@ -578,6 +592,18 @@ Theme Property Descriptions ---- +.. _class_Button_theme_icon_icon: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **icon** + +该 **Button** 的默认图标。仅在未指定 :ref:`icon` 时显示。 + +.. rst-class:: classref-item-separator + +---- + .. _class_Button_theme_style_disabled: .. rst-class:: classref-themeproperty @@ -590,13 +616,25 @@ Theme Property Descriptions ---- +.. _class_Button_theme_style_disabled_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **disabled_mirrored** + +该 **Button** 处于禁用状态时使用的 :ref:`StyleBox`\ (用于从右至左布局)。 + +.. rst-class:: classref-item-separator + +---- + .. _class_Button_theme_style_focus: .. rst-class:: classref-themeproperty :ref:`StyleBox` **focus** -该 **Button** 处于聚焦状态时使用的 :ref:`StyleBox`\ 。\ ``focus`` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,所以应该使用部分透明的 :ref:`StyleBox`\ ,确保基础 :ref:`StyleBox` 仍然可见。代表轮廓或下划线的 :ref:`StyleBox` 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 :ref:`StyleBoxEmpty` 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的可用性,所以出于可访问性的原因,不建议这样做。 +该 **Button** 处于聚焦状态时使用的 :ref:`StyleBox`\ 。\ :ref:`focus` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,所以应该使用部分透明的 :ref:`StyleBox`\ ,确保基础 :ref:`StyleBox` 仍然可见。代表轮廓或下划线的 :ref:`StyleBox` 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 :ref:`StyleBoxEmpty` 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的可用性,所以出于可访问性的原因,不建议这样做。 .. rst-class:: classref-item-separator @@ -614,6 +652,42 @@ Theme Property Descriptions ---- +.. _class_Button_theme_style_hover_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **hover_mirrored** + +该 **Button** 处于悬停状态时使用的 :ref:`StyleBox`\ (用于从右至左布局)。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_Button_theme_style_hover_pressed: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **hover_pressed** + +该 **Button** 同时处于按下和悬停状态时使用的 :ref:`StyleBox`\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_Button_theme_style_hover_pressed_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **hover_pressed_mirrored** + +该 **Button** 同时处于按下和悬停状态时使用的 :ref:`StyleBox`\ (用于从右至左布局)。 + +.. rst-class:: classref-item-separator + +---- + .. _class_Button_theme_style_normal: .. rst-class:: classref-themeproperty @@ -626,6 +700,18 @@ Theme Property Descriptions ---- +.. _class_Button_theme_style_normal_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **normal_mirrored** + +该 **Button** 的默认 :ref:`StyleBox`\ (用于从右至左布局)。 + +.. rst-class:: classref-item-separator + +---- + .. _class_Button_theme_style_pressed: .. rst-class:: classref-themeproperty @@ -634,10 +720,22 @@ Theme Property Descriptions 该 **Button** 处于按下状态时使用的 :ref:`StyleBox`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. rst-class:: classref-item-separator + +---- + +.. _class_Button_theme_style_pressed_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **pressed_mirrored** + +该 **Button** 处于按下状态时使用的 :ref:`StyleBox`\ (用于从右至左布局)。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_buttongroup.rst b/classes/zh_CN/class_buttongroup.rst index 24f5e3fcd7..925082dd6b 100644 --- a/classes/zh_CN/class_buttongroup.rst +++ b/classes/zh_CN/class_buttongroup.rst @@ -10,14 +10,14 @@ ButtonGroup =========== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 不允许同时按下多个按钮的按钮的一个分组。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`BaseButton` 派生按钮的分组。\ **ButtonGroup** 中的按钮被视为单选按钮:同一时间最多只能按下一个按钮。某些类型的按钮(例如 :ref:`CheckBox`\ )在该状态下可能会有特殊的外观。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -57,8 +57,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_ButtonGroup_signal_pressed: @@ -66,7 +66,7 @@ Signals **pressed** **(** :ref:`BaseButton` button **)** -当该组中的一个按钮被按下时触发。 +当该组中的某个按钮被按下时发出。 .. rst-class:: classref-section-separator @@ -74,8 +74,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ButtonGroup_property_allow_unpress: @@ -96,8 +96,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ButtonGroup_method_get_buttons: @@ -119,10 +119,10 @@ Method Descriptions 返回当前按下的按钮。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_callable.rst b/classes/zh_CN/class_callable.rst index 888ed00624..ff02480bc9 100644 --- a/classes/zh_CN/class_callable.rst +++ b/classes/zh_CN/class_callable.rst @@ -14,8 +14,8 @@ Callable .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 可调用体 **Callable** 是内置的 :ref:`Variant` 类型,代表某个函数。可以是 :ref:`Object` 实例中的某个方法,也可以是与对象无关的独立函数,比如 lambda 函数。和所有 :ref:`Variant` 类型一样可以保存在变量里,传递给其他函数。最常用于信号回调。 @@ -83,12 +83,12 @@ GDScript 中可以在方法里创建 lambda 函数。Lambda 函数是自定义 .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -103,8 +103,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -149,8 +149,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -167,8 +167,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_Callable_constructor_Callable: @@ -204,8 +204,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Callable_method_bind: @@ -308,7 +308,7 @@ void **call_deferred** **(** ... **)** |vararg| |const| :ref:`StringName` **get_method** **(** **)** |const| -Returns the name of the method represented by this **Callable**. If the callable is a GDScript lambda function, returns the function's name or ``""``. +返回该 **Callable** 所代表的方法的名称。如果该可调用体是 GDScript lambda 函数,则返回该函数的名称或 ``""``\ 。 .. rst-class:: classref-item-separator @@ -446,8 +446,8 @@ void **rpc_id** **(** :ref:`int` peer_id, ... **)** |vararg| |const| .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Callable_operator_neq_Callable: @@ -469,10 +469,10 @@ Operator Descriptions 如果两个 **Callable** 调用的自定义目标相同,则返回 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_callbacktweener.rst b/classes/zh_CN/class_callbacktweener.rst index 40804dd7cc..36b9e0f8bc 100644 --- a/classes/zh_CN/class_callbacktweener.rst +++ b/classes/zh_CN/class_callbacktweener.rst @@ -10,25 +10,25 @@ CallbackTweener =============== -**Inherits:** :ref:`Tweener` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Tweener` **<** :ref:`RefCounted` **<** :ref:`Object` 在可选的延迟之后调用指定的方法。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**CallbackTweener** is used to call a method in a tweening sequence. See :ref:`Tween.tween_callback` for more usage information. +**CallbackTweener** 可用于在补间序列中调用方法。更多用法信息请参阅 :ref:`Tween.tween_callback`\ 。 -The tweener will finish automatically if the callback's target object is freed. +如果回调的目标对象被释放,该补间将自动结束。 -\ **Note:** :ref:`Tween.tween_callback` is the only correct way to create **CallbackTweener**. Any **CallbackTweener** created manually will not function correctly. +\ **注意:**\ 创建 **CallbackTweener** 的唯一正确方法是 :ref:`Tween.tween_callback`\ 。任何手动创建的 **CallbackTweener** 都无法正常工作。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CallbackTweener_method_set_delay: @@ -61,10 +61,10 @@ Method Descriptions var tween = get_tree().create_tween() tween.tween_callback(queue_free).set_delay(2) # 会在 2 秒后调用 queue_free() -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_camera2d.rst b/classes/zh_CN/class_camera2d.rst index 2b73fa3139..12aa613144 100644 --- a/classes/zh_CN/class_camera2d.rst +++ b/classes/zh_CN/class_camera2d.rst @@ -10,14 +10,14 @@ Camera2D ======== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 2D 场景的相机节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于 2D 场景的相机节点。它强制屏幕(当前层)跟随该节点滚动。与手动改变基于 :ref:`CanvasItem` 节点的坐标相比,这使得对可滚动场景进行编程更加容易和快捷。 @@ -29,8 +29,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `2D 平台跳跃演示 `__ @@ -40,8 +40,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -104,8 +104,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -140,8 +140,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Camera2D_AnchorMode: @@ -197,8 +197,8 @@ enum **Camera2DProcessCallback**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Camera2D_property_anchor_mode: @@ -561,7 +561,7 @@ Camera2D 的锚点。见 :ref:`AnchorMode` 常量。 - void **set_offset** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_offset** **(** **)** -相机的相对偏移量。用于环顾四周或相机抖动动画。偏移的相机可以超过 :ref:`limit_top`\ 、\ :ref:`limit_bottom`\ 、\ :ref:`limit_left` 和 :ref:`limit_right` 中定义的限制。 +相机的相对偏移量。用于环顾四周或相机抖动动画。偏移后的相机可以超过 :ref:`limit_top`\ 、\ :ref:`limit_bottom`\ 、\ :ref:`limit_left` 和 :ref:`limit_right` 中定义的限制。 .. rst-class:: classref-item-separator @@ -675,8 +675,8 @@ Camera2D 的锚点。见 :ref:`AnchorMode` 常量。 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Camera2D_method_align: @@ -812,10 +812,10 @@ void **set_limit** **(** :ref:`Side` margin, :ref:`int` 的相机极限。另见 :ref:`limit_bottom`\ 、\ :ref:`limit_top`\ 、\ :ref:`limit_left` 和 :ref:`limit_right`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_camera3d.rst b/classes/zh_CN/class_camera3d.rst index 49abe3ae8e..22c7088d84 100644 --- a/classes/zh_CN/class_camera3d.rst +++ b/classes/zh_CN/class_camera3d.rst @@ -10,30 +10,30 @@ Camera3D ======== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`XRCamera3D` +**派生:** :ref:`XRCamera3D` 相机节点,会从某个角度进行显示。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **Camera3D** 是一个特殊节点,用于显示从其当前位置可见的内容。相机在最近的 :ref:`Viewport` 节点中注册自己(当树上行)。每个视口中只能有一个激活的相机。如果在树上没有可用的视口,相机将在全局视口中注册。换句话说,相机只是用来为 :ref:`Viewport` 提供 3D 显示能力的,如果没有,则在该 :ref:`Viewport`\ (或更高层视口)中注册的场景无法显示。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `第三人称射击演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -70,8 +70,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -122,8 +122,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Camera3D_ProjectionType: @@ -221,8 +221,8 @@ enum **DopplerTracking**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Camera3D_property_attributes: @@ -345,7 +345,7 @@ Property Descriptions - void **set_fov** **(** :ref:`float` value **)** - :ref:`float` **get_fov** **(** **)** -相机的视野角度(单位为度)。仅适用于透视模式。由于 :ref:`keep_aspect` 锁定一个轴,因此 ``fov`` 设置另一个轴的视角。 +相机的视野角度(单位为度)。仅适用于透视模式。由于 :ref:`keep_aspect` 锁定一个轴,因此 :ref:`fov` 设置另一个轴的视角。 作为参考,默认的垂直视野值(\ ``70.0``\ )相当于以下水平 FOV: @@ -484,8 +484,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Camera3D_method_clear_current: @@ -577,9 +577,9 @@ void **clear_current** **(** :ref:`bool` enable_next=true **)** :ref:`bool` **is_position_behind** **(** :ref:`Vector3` world_point **)** |const| -Returns ``true`` if the given position is behind the camera (the blue part of the linked diagram). `See this diagram `__ for an overview of position query methods. +如果给定位置在相机后面(链接图的蓝色部分),则返回 ``true``\ 。\ `查看此图 `__\ 以了解位置查询方法的概述。 -\ **Note:** A position which returns ``false`` may still be outside the camera's field of view. +\ **注意:**\ 返回 ``false`` 的位置可能仍然在相机的视野之外。 .. rst-class:: classref-item-separator @@ -591,7 +591,7 @@ Returns ``true`` if the given position is behind the camera (the blue part of th :ref:`bool` **is_position_in_frustum** **(** :ref:`Vector3` world_point **)** |const| -Returns ``true`` if the given position is inside the camera's frustum (the green part of the linked diagram). `See this diagram `__ for an overview of position query methods. +如果给定位置在相机的视锥内(位于链接图中的绿色部分),则返回 ``true``\ 。\ `查看此图 `__\ 以了解位置查询方法的概述。 .. rst-class:: classref-item-separator @@ -675,7 +675,7 @@ void **set_cull_mask_value** **(** :ref:`int` layer_number, :ref:`boo void **set_frustum** **(** :ref:`float` size, :ref:`Vector2` offset, :ref:`float` z_near, :ref:`float` z_far **)** -通过指定的以世界空间单位为单位的 ``size``\ 、\ ``offset``\ 、以及 ``z_near`` 和 ``z_far`` 裁剪平面,将相机投影设置为视锥模式(参见 :ref:`PROJECTION_FRUSTUM`\ )。另请参见 :ref:`frustum_offset`\ 。 +通过指定的以世界空间单位为单位的 ``size``\ 、\ ``offset``\ 、以及 ``z_near`` 和 ``z_far`` 裁剪平面,将相机投影设置为视锥模式(见 :ref:`PROJECTION_FRUSTUM`\ )。另见 :ref:`frustum_offset`\ 。 .. rst-class:: classref-item-separator @@ -722,10 +722,10 @@ void **set_perspective** **(** :ref:`float` fov, :ref:`float` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`CameraAttributesPhysical`, :ref:`CameraAttributesPractical` +**派生:** :ref:`CameraAttributesPhysical`, :ref:`CameraAttributesPractical` 相机设置的父类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 控制相机的特定属性,如景深和曝光覆盖。 @@ -31,8 +31,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CameraAttributes_property_auto_exposure_enabled: @@ -139,10 +139,10 @@ Property Descriptions 相机传感器的灵敏度,以 ISO 测量。灵敏度越高,图像越亮。仅在启用 :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units` 时可用。当 :ref:`auto_exposure_enabled` 启用时,这可以用作曝光补偿的方法,将该值加倍将使曝光值(以 EV100 测量)增加 1 档。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_cameraattributesphysical.rst b/classes/zh_CN/class_cameraattributesphysical.rst index 05f6ba8eae..086ae1b16d 100644 --- a/classes/zh_CN/class_cameraattributesphysical.rst +++ b/classes/zh_CN/class_cameraattributesphysical.rst @@ -10,14 +10,14 @@ CameraAttributesPhysical ======================== -**Inherits:** :ref:`CameraAttributes` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`CameraAttributes` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 基于物理的相机设置。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **CameraAttributesPhysical** 用于根据基于物理的相机的设置来设置渲染设置。它负责曝光、自动曝光、以及景深。 @@ -29,15 +29,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Physical light and camera units <../tutorials/3d/physical_light_and_camera_units>` +- :doc:`物理灯光与相机单位 <../tutorials/3d/physical_light_and_camera_units>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -62,8 +62,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -78,8 +78,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CameraAttributesPhysical_property_auto_exposure_max_exposure_value: @@ -223,8 +223,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CameraAttributesPhysical_method_get_fov: @@ -234,10 +234,10 @@ Method Descriptions 返回对应于 :ref:`frustum_focal_length` 的垂直视野。每当 :ref:`frustum_focal_length` 发生变化时,该值都会在内部计算。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_cameraattributespractical.rst b/classes/zh_CN/class_cameraattributespractical.rst index c8e7c5e722..0b4d487cbb 100644 --- a/classes/zh_CN/class_cameraattributespractical.rst +++ b/classes/zh_CN/class_cameraattributespractical.rst @@ -10,14 +10,14 @@ CameraAttributesPractical ========================= -**Inherits:** :ref:`CameraAttributes` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`CameraAttributes` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 相机设置,格式比较易用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 控制相机的特定属性,如自动曝光、景深、以及曝光覆盖。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -57,8 +57,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CameraAttributesPractical_property_auto_exposure_max_sensitivity: @@ -213,10 +213,10 @@ Property Descriptions 当为正数时,距离超过该值且截止到 :ref:`dof_blur_near_distance` 时,模糊效果将从 0 缩放到 :ref:`dof_blur_amount`\ 。当为负数时,使用基于物理的缩放,因此景深效果将在 :ref:`dof_blur_near_distance` 处从 0 开始缩放,并且随着对象靠近该 :ref:`Camera3D`\ ,将以物理上准确的方式增加该效果。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_camerafeed.rst b/classes/zh_CN/class_camerafeed.rst index f5137df804..7b1789f4ac 100644 --- a/classes/zh_CN/class_camerafeed.rst +++ b/classes/zh_CN/class_camerafeed.rst @@ -10,14 +10,14 @@ CameraFeed ========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 通过相机源,你可以访问连接到设备的单个物理相机。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 通过相机源,你可以访问连接到设备的单个物理相机。启用后,Godot 将开始从相机捕获帧,然后使用。另请参阅 :ref:`CameraServer`\ 。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -61,8 +61,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_CameraFeed_FeedDataType: @@ -142,8 +142,8 @@ enum **FeedPosition**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CameraFeed_property_feed_is_active: @@ -181,8 +181,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CameraFeed_method_get_datatype: @@ -228,10 +228,10 @@ Method Descriptions 返回设备上的相机位置。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_cameraserver.rst b/classes/zh_CN/class_cameraserver.rst index bf0e5d29c8..0119b53d9a 100644 --- a/classes/zh_CN/class_cameraserver.rst +++ b/classes/zh_CN/class_cameraserver.rst @@ -10,25 +10,25 @@ CameraServer ============ -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 跟踪 Godot 中可访问的不同摄像头的服务器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**CameraServer** 记录了 Godot 中可访问的不同摄像机。这些是外部摄像机,如网络摄像头或手机上的摄像机。 +**CameraServer** 记录了 Godot 中可访问的不同相机。此处的相机指外部相机,例如网络摄像头或手机上的摄像头。 -它主要用于为 AR 模块提供来自摄像机的视频源。 +主要用于为 AR 模块提供来自相机的视频源。 \ **注意:**\ 这个类目前只在 macOS 和 iOS 上实现。在其他平台上没有可用的 :ref:`CameraFeed`\ 。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -51,8 +51,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_CameraServer_signal_camera_feed_added: @@ -60,7 +60,7 @@ Signals **camera_feed_added** **(** :ref:`int` id **)** -当添加 :ref:`CameraFeed` 时触发(例如插入网络摄像头时)。 +当添加 :ref:`CameraFeed` 时发出(例如插入网络摄像头时)。 .. rst-class:: classref-item-separator @@ -72,7 +72,7 @@ Signals **camera_feed_removed** **(** :ref:`int` id **)** -当移除 :ref:`CameraFeed` 时触发(例如拔掉网络摄像头时)。 +当移除 :ref:`CameraFeed` 时发出(例如拔掉网络摄像头时)。 .. rst-class:: classref-section-separator @@ -80,8 +80,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_CameraServer_FeedImage: @@ -103,7 +103,7 @@ RGBA 相机图像。 :ref:`FeedImage` **FEED_YCBCR_IMAGE** = ``0`` -`YCbCr `__ 摄像机图像。 +`YCbCr `__ 相机图像。 .. _class_CameraServer_constant_FEED_Y_IMAGE: @@ -127,8 +127,8 @@ CbCr 分量相机图像。 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CameraServer_method_add_feed: @@ -186,10 +186,10 @@ void **remove_feed** **(** :ref:`CameraFeed` feed **)** 移除指定的相机源 ``feed``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_cameratexture.rst b/classes/zh_CN/class_cameratexture.rst index 359473c55c..8ced6c2a55 100644 --- a/classes/zh_CN/class_cameratexture.rst +++ b/classes/zh_CN/class_cameratexture.rst @@ -10,14 +10,14 @@ CameraTexture ============= -**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 由 :ref:`CameraFeed` 提供的纹理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该纹理可以访问 :ref:`CameraFeed` 提供的相机纹理。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CameraTexture_property_camera_feed_id: @@ -97,10 +97,10 @@ Property Descriptions 我们要访问 :ref:`CameraFeed` 中的哪个图像,如果相机图像被分割成 Y 和 CbCr 分量,这一点很重要。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_canvasgroup.rst b/classes/zh_CN/class_canvasgroup.rst index 798de61f25..2bf9a0ed22 100644 --- a/classes/zh_CN/class_canvasgroup.rst +++ b/classes/zh_CN/class_canvasgroup.rst @@ -10,14 +10,14 @@ CanvasGroup =========== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 将若干 2D 节点合并至单次绘制操作。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **CanvasGroup** 的所有子 :ref:`CanvasItem` 节点会作为一个单独的对象绘制。它允许在不混合的情况下绘制重叠的半透明 2D 节点(设置 **CanvasGroup** 的 :ref:`CanvasItem.self_modulate` 属性来实现这一效果)。 @@ -44,8 +44,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CanvasGroup_property_clear_margin: @@ -114,10 +114,10 @@ Property Descriptions 如果为 ``true``\ ,则会在绘制该 **CanvasGroup** 之前为其后台缓冲计算 mipmap,附加到该 **CanvasGroup** 的自定义 :ref:`ShaderMaterial` 就可以使用 mipmap。Mipmap 的生成会造成性能消耗,所以应在必要时才启用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_canvasitem.rst b/classes/zh_CN/class_canvasitem.rst index ea61bb5c0b..056b3d886c 100644 --- a/classes/zh_CN/class_canvasitem.rst +++ b/classes/zh_CN/class_canvasitem.rst @@ -10,29 +10,29 @@ CanvasItem ========== -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`Control`, :ref:`Node2D` +**派生:** :ref:`Control`, :ref:`Node2D` 2D 空间中所有对象的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -2D 空间中所有对象的抽象基类。画布项目(Canvas Item)以树状排列;子节点继承并扩展其父节点的变换。\ **CanvasItem** 由 :ref:`Control` 扩展为 GUI 相关的节点,由 :ref:`Node2D` 扩展为 2D 游戏对象。 +2D 空间中所有对象的抽象基类。画布项目以树状排列;子节点继承并扩展其父节点的变换。\ **CanvasItem** 由 :ref:`Control` 扩展为 GUI 相关的节点,由 :ref:`Node2D` 扩展为 2D 游戏对象。 -任何 **CanvasItem** 都可以进行绘图。绘图时,引擎会调用 :ref:`queue_redraw`\ ,然后节点就会在空闲时接收到请求重绘的 :ref:`NOTIFICATION_DRAW`\ 。因此画布项目不需要每一帧都重绘,显著提升了性能。这个类还提供了几个用于在 **CanvasItem** 上绘图的函数(见 ``draw_*`` 函数)。不过这些函数都只能在 :ref:`_draw` 及其对应的 :ref:`Object._notification` 或连接到 :ref:`draw` 的方法内使用。 +任何 **CanvasItem** 都可以进行绘图。绘图时,引擎会调用 :ref:`queue_redraw`\ ,然后 :ref:`NOTIFICATION_DRAW` 就会在空闲时被接收到以请求重绘。因此,画布项目不需要每一帧都重绘,这显著提升了性能。这个类还提供了几个用于在 **CanvasItem** 上绘图的函数(见 ``draw_*`` 函数)。不过这些函数都只能在 :ref:`_draw` 及其对应的 :ref:`Object._notification` 或连接到 :ref:`draw` 的方法内使用。 -画布项目是按树状顺序绘制的。默认情况下,子项目位于父项目的上方,因此根 **CanvasItem** 将被画在所有项目的后面。这种行为可以针对单个画布项目进行更改。 +画布项目在其画布层上是按树状顺序绘制的。默认情况下,子项目位于其父项目的上方,因此根 **CanvasItem** 将被画在所有项目的后面。这种行为可以针对每个画布项目进行更改。 -\ **CanvasItem** 可以隐藏,隐藏时也会隐藏其子项目。通过调整画布项目的各种其它属性,你还可以调制它的颜色(通过 :ref:`modulate` 或 :ref:`self_modulate`\ )、更改 Z 索引、混合模式等。 +\ **CanvasItem** 可以隐藏,隐藏时也会隐藏其子项目。通过调整 **CanvasItem** 的各种其它属性,你还可以调制它的颜色(通过 :ref:`modulate` 或 :ref:`self_modulate`\ )、更改 Z 索引、混合模式等。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`Viewport 和画布变换 <../tutorials/2d/2d_transforms>` @@ -42,8 +42,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -82,14 +82,14 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw` **(** **)** |virtual| | + | void | :ref:`_draw` **(** **)** |virtual| | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw_animation_slice` **(** :ref:`float` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -210,8 +210,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_CanvasItem_signal_draw: @@ -219,7 +219,7 @@ Signals **draw** **(** **)** -当该 **CanvasItem** 必须重绘时发出,发生在相关的 :ref:`NOTIFICATION_DRAW` 通知\ *之后*\ ,调用 :ref:`_draw` *之前*\ 。 +当该 **CanvasItem** 必须重绘时发出,发生在相关的 :ref:`NOTIFICATION_DRAW` 通知\ *之后*\ ,调用 :ref:`_draw` *之前*\ 。 \ **注意:**\ 延迟连接无法使用 ``draw_*`` 方法进行绘制。 @@ -265,8 +265,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_CanvasItem_TextureFilter: @@ -440,8 +440,8 @@ enum **ClipChildrenMode**: .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_CanvasItem_constant_NOTIFICATION_TRANSFORM_CHANGED: @@ -465,7 +465,7 @@ Constants **NOTIFICATION_DRAW** = ``30`` -要求绘制该 **CanvasItem**\ (见 :ref:`_draw`\ )。 +要求绘制该 **CanvasItem**\ (见 :ref:`_draw`\ )。 .. _class_CanvasItem_constant_NOTIFICATION_VISIBILITY_CHANGED: @@ -505,8 +505,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CanvasItem_property_clip_children: @@ -773,10 +773,10 @@ Z 索引。控制节点的渲染顺序。具有较高 Z 索引的节点将显示 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_CanvasItem_method__draw: +.. _class_CanvasItem_private_method__draw: .. rst-class:: classref-method @@ -784,7 +784,7 @@ void **_draw** **(** **)** |virtual| 当 **CanvasItem** 被请求重绘时调用(手动调用或者引擎调用 :ref:`queue_redraw` 之后)。 -对应于 :ref:`Object._notification` 中的 :ref:`NOTIFICATION_DRAW` 通知。 +对应于 :ref:`Object._notification` 中的 :ref:`NOTIFICATION_DRAW` 通知。 .. rst-class:: classref-item-separator @@ -808,9 +808,9 @@ void **draw_animation_slice** **(** :ref:`float` animation_length, void **draw_arc** **(** :ref:`Vector2` center, :ref:`float` radius, :ref:`float` start_angle, :ref:`float` end_angle, :ref:`int` point_count, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** -使用一个 uniform ``color`` 和 ``width`` 以及可选的抗锯齿(仅支持正 ``width`` ),在给定的角度之间绘制一条未填充的弧线。\ ``point_count`` 的值越大,该曲线越平滑。另请参见 :ref:`draw_circle`\ 。 +使用一个 uniform ``color`` 和 ``width`` 以及可选的抗锯齿(仅支持正 ``width`` ),在给定的角度之间绘制一条未填充的弧线。\ ``point_count`` 的值越大,该曲线越平滑。另见 :ref:`draw_circle`\ 。 -如果 ``width`` 为负,则使用 :ref:`RenderingServer.PRIMITIVE_LINE_STRIP` 绘制弧线。这意味着当缩放 CanvasItem 时,弧线将保持细长。如果不需要此行为,请传递一个正的 ``width``\ ,如 ``1.0``\ 。 +如果 ``width`` 为负,则它将被忽略,并使用 :ref:`RenderingServer.PRIMITIVE_LINE_STRIP` 绘制该弧线。这意味着当缩放 CanvasItem 时,弧线将保持细长。如果不需要此行为,请传递一个正的 ``width``\ ,如 ``1.0``\ 。 如果 ``start_angle < end_angle`` ,则圆弧是从 ``start_angle`` 朝向 ``end_angle`` 的值绘制的,即是顺时针方向;否则为逆时针方向。以相反的顺序传递相同的角度,将产生相同的弧线。如果 ``start_angle`` 和 ``end_angle`` 的差的绝对值大于 :ref:`@GDScript.TAU` 弧度,则绘制一个完整的圆弧(即弧线不会与自身重叠)。 @@ -872,7 +872,7 @@ void **draw_colored_polygon** **(** :ref:`PackedVector2Array` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`float` dash=2.0, :ref:`bool` aligned=true **)** -使用给定的颜色和宽度,从一个 2D 点到另一个点绘制一条虚线。另请参见 :ref:`draw_multiline` 和 :ref:`draw_polyline`\ 。 +使用给定的颜色和宽度,从一个 2D 点到另一个点绘制一条虚线。另见 :ref:`draw_multiline` 和 :ref:`draw_polyline`\ 。 如果 ``width`` 为负,则将绘制一个两点图元而不是一个四点图元。这意味着当缩放 CanvasItem 时,线条部分将保持细长。如果不需要此行为,请传递一个正的 ``width``\ ,如 ``1.0``\ 。 @@ -1037,9 +1037,9 @@ void **draw_polygon** **(** :ref:`PackedVector2Array` void **draw_polyline** **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** -使用一个 uniform ``color`` 和 ``width`` 以及可选的抗锯齿(仅支持正 ``width`` ),绘制相互连接的线段。绘制大量线条时,这比使用单独的 :ref:`draw_line` 调用更快。要绘制不相连的的线段,请改用 :ref:`draw_multiline`\ 。另见 :ref:`draw_polygon`\ 。 +使用一致的 ``color`` 和 ``width`` 以及可选的抗锯齿(仅支持正 ``width`` ),绘制相互连接的线段。绘制大量线条时,这比使用单独的 :ref:`draw_line` 调用更快。要绘制不相连的的线段,请改用 :ref:`draw_multiline`\ 。另见 :ref:`draw_polygon`\ 。 -如果 ``width`` 为负,则使用 :ref:`RenderingServer.PRIMITIVE_LINE_STRIP` 绘制折线。这意味着当缩放 CanvasItem 时,多段线将保持为细线。如果不需要该行为,请传递一个正的 ``width``\ ,如 ``1.0``\ 。 +如果 ``width`` 为负,则它将被忽略,并使用 :ref:`RenderingServer.PRIMITIVE_LINE_STRIP` 绘制该折线。这意味着当 CanvasItem 被缩放时,折线将保持为细线。如果不需要该行为,请传入一个正的 ``width``\ ,如 ``1.0``\ 。 .. rst-class:: classref-item-separator @@ -1053,7 +1053,7 @@ void **draw_polyline_colors** **(** :ref:`PackedVector2Array` 一条条画要快。要绘制不相连的线段,请改用 :ref:`draw_multiline_colors`\ 。另见 :ref:`draw_polygon`\ 。 -如果 ``width`` 为负数,则折线使用 :ref:`RenderingServer.PRIMITIVE_LINE_STRIP` 绘制。此时如果 CanvasItem 发生缩放,则线段仍然会很细。如果不想要这样的行为,请传入 ``1.0`` 等正数 ``width``\ 。 +如果 ``width`` 为负,则它将被忽略,并使用 :ref:`RenderingServer.PRIMITIVE_LINE_STRIP` 绘制该折线。这意味着当 CanvasItem 被缩放时,折线将保持为细线。如果不需要该行为,请传入一个正的 ``width``\ ,如 ``1.0``\ 。 .. rst-class:: classref-item-separator @@ -1428,7 +1428,7 @@ void **hide** **(** **)** :ref:`bool` **is_visible_in_tree** **(** **)** |const| -如果该节点位于 :ref:`SceneTree` 中,并且其 :ref:`visible` 属性为 ``true``\ ,并且其所有上层节点也均可见,则返回 ``true``\ 。如果任何上层节点被隐藏,则该节点在场景树中将不可见,因此也不会进行绘制(见 :ref:`_draw`\ )。 +如果该节点位于 :ref:`SceneTree` 中,并且其 :ref:`visible` 属性为 ``true``\ ,并且其所有上层节点也均可见,则返回 ``true``\ 。如果任何上层节点被隐藏,则该节点在场景树中将不可见,因此也不会进行绘制(见 :ref:`_draw`\ )。 .. rst-class:: classref-item-separator @@ -1478,7 +1478,7 @@ void **move_to_front** **(** **)** void **queue_redraw** **(** **)** -将该 **CanvasItem** 加入重绘队列。空闲时,如果 **CanvasItem** 可见,则会发送 :ref:`NOTIFICATION_DRAW` 并调用 :ref:`_draw`\ 。即便多次调用这个方法,每帧也都只会发生\ **一次**\ 绘制。 +将该 **CanvasItem** 加入重绘队列。空闲时,如果 **CanvasItem** 可见,则会发送 :ref:`NOTIFICATION_DRAW` 并调用 :ref:`_draw`\ 。即便多次调用这个方法,每帧也都只会发生\ **一次**\ 绘制。 .. rst-class:: classref-item-separator @@ -1528,10 +1528,10 @@ void **show** **(** **)** 如果该 **CanvasItem** 目前是隐藏的,则将其显示。相当于将 :ref:`visible` 设为 ``true``\ 。对于继承自 :ref:`Popup` 的控件,让它们可见的正确做法是换成调用各种 ``popup*()`` 函数的其中之一。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_canvasitemmaterial.rst b/classes/zh_CN/class_canvasitemmaterial.rst index 52bb510570..89ef24ea22 100644 --- a/classes/zh_CN/class_canvasitemmaterial.rst +++ b/classes/zh_CN/class_canvasitemmaterial.rst @@ -10,21 +10,21 @@ CanvasItemMaterial ================== -**Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`CanvasItem`\ 的材质。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **CanvasItemMaterial**\ 提供了一种修改与CanvasItem相关联的纹理的方法。他们专注于描述纹理的混合和照明行为。使用\ :ref:`ShaderMaterial`\ 可以更全面地自定义材质与\ :ref:`CanvasItem`\ 的交互。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_CanvasItemMaterial_BlendMode: @@ -138,8 +138,8 @@ enum **LightMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CanvasItemMaterial_property_blend_mode: @@ -247,10 +247,10 @@ Property Descriptions 这个属性(以及其他依赖它的 ``particles_anim_*`` 属性)对其他类型的节点没有影响。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_canvaslayer.rst b/classes/zh_CN/class_canvaslayer.rst index aeec04f1c9..7bfe9680fb 100644 --- a/classes/zh_CN/class_canvaslayer.rst +++ b/classes/zh_CN/class_canvaslayer.rst @@ -10,16 +10,16 @@ CanvasLayer =========== -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`ParallaxBackground` +**派生:** :ref:`ParallaxBackground` 用于 2D 场景中的对象的独立渲染的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **CanvasLayer** 的直接或间接子节点中,派生自 :ref:`CanvasItem` 的节点会在该图层中进行绘制。图层是定义绘制顺序的数字索引。默认 2D 场景使用的索引为 ``0``\ ,因此索引为 ``-1`` 的 **CanvasLayer** 会在下方绘制,而索引为 ``1`` 的 **CanvasLayer** 会在上方绘制。无论节点在图层中的 :ref:`CanvasItem.z_index` 是多少,这一顺序都成立。 @@ -31,8 +31,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`Viewport 和画布变换 <../tutorials/2d/2d_transforms>` @@ -42,8 +42,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -70,8 +70,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -92,8 +92,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_CanvasLayer_signal_visibility_changed: @@ -109,8 +109,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CanvasLayer_property_custom_viewport: @@ -176,7 +176,9 @@ Property Descriptions - void **set_layer** **(** :ref:`int` value **)** - :ref:`int` **get_layer** **(** **)** -绘制顺序的图层索引。较低值绘制在较高值之后。 +画布层的索引,用于确定绘制顺序。索引值小的画布层绘制在索引值大的画布层后面。 + +\ **注意:**\ 如果多个 CanvasLayer 的画布层索引相同,一个 CanvasLayer 的 :ref:`CanvasItem` 子节点都会绘制在另一个 CanvasLayer 的 :ref:`CanvasItem` 子节点之后。哪个 CanvasLayer 画在前面并不一定。 .. rst-class:: classref-item-separator @@ -271,8 +273,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CanvasLayer_method_get_canvas: @@ -318,10 +320,10 @@ void **show** **(** **)** 显示该 **CanvasLayer** 下的所有 :ref:`CanvasItem`\ 。相当于将 :ref:`visible` 设为 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_canvasmodulate.rst b/classes/zh_CN/class_canvasmodulate.rst index 7c0d6e53d9..f56f03291e 100644 --- a/classes/zh_CN/class_canvasmodulate.rst +++ b/classes/zh_CN/class_canvasmodulate.rst @@ -10,21 +10,21 @@ CanvasModulate ============== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 将一种色调应用于一张画布的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **CanvasModulate** 将一种色调应用于一张画布上的所有节点。一张画布只有一个可用于为画布着色,但 :ref:`CanvasLayer` 可用于独立渲染事物。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CanvasModulate_property_color: @@ -55,10 +55,10 @@ Property Descriptions 要应用的色调颜色。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_canvastexture.rst b/classes/zh_CN/class_canvastexture.rst index aa7a9cb6cf..28381bae4d 100644 --- a/classes/zh_CN/class_canvastexture.rst +++ b/classes/zh_CN/class_canvastexture.rst @@ -10,14 +10,14 @@ CanvasTexture ============= -**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于 2D 渲染的纹理,带有可选的法线和镜面贴图。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **CanvasTexture** 是用于 2D 渲染的 :ref:`ImageTexture` 的替代品。它允许在任何继承自 :ref:`CanvasItem` 的节点中使用法线贴图和镜面贴图。\ **CanvasTexture** 还允许独立于节点的属性(或项目设置)覆盖纹理的过滤模式和重复模式。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`2D Lights and Shadows <../tutorials/2d/2d_lights_and_shadows>` +- :doc:`2D 灯光和阴影 <../tutorials/2d/2d_lights_and_shadows>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -62,8 +62,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CanvasTexture_property_diffuse_texture: @@ -182,10 +182,10 @@ Property Descriptions 绘制该 **CanvasTexture** 时所使用的纹理重复模式。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_capsulemesh.rst b/classes/zh_CN/class_capsulemesh.rst index 74ff82def8..885d0bb6cf 100644 --- a/classes/zh_CN/class_capsulemesh.rst +++ b/classes/zh_CN/class_capsulemesh.rst @@ -10,21 +10,21 @@ CapsuleMesh =========== -**Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 表示胶囊状 :ref:`PrimitiveMesh` 的类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 表示胶囊状 :ref:`PrimitiveMesh` 的类。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CapsuleMesh_property_height: @@ -112,10 +112,10 @@ Property Descriptions 沿胶囊高度的环数。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_capsuleshape2d.rst b/classes/zh_CN/class_capsuleshape2d.rst index a69c2b0f23..6b656250ce 100644 --- a/classes/zh_CN/class_capsuleshape2d.rst +++ b/classes/zh_CN/class_capsuleshape2d.rst @@ -10,14 +10,14 @@ CapsuleShape2D ============== -**Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于物理碰撞的 2D 胶囊形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 2D 胶囊形状,旨在用于物理学。通常用于为 :ref:`CollisionShape2D` 提供形状。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CapsuleShape2D_property_height: @@ -76,10 +76,10 @@ Property Descriptions 胶囊体的半径。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_capsuleshape3d.rst b/classes/zh_CN/class_capsuleshape3d.rst index ab3275dcbb..54f9e0bdc4 100644 --- a/classes/zh_CN/class_capsuleshape3d.rst +++ b/classes/zh_CN/class_capsuleshape3d.rst @@ -10,14 +10,14 @@ CapsuleShape3D ============== -**Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于物理碰撞的 3D 胶囊形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 3D 胶囊形状,旨在用于物理学。通常用于为 :ref:`CollisionShape3D` 提供形状。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 物理测试演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CapsuleShape3D_property_height: @@ -83,10 +83,10 @@ Property Descriptions 胶囊体的半径。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_centercontainer.rst b/classes/zh_CN/class_centercontainer.rst index 28eb6746fc..41a7356fd4 100644 --- a/classes/zh_CN/class_centercontainer.rst +++ b/classes/zh_CN/class_centercontainer.rst @@ -10,28 +10,28 @@ CenterContainer =============== -**Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 将子控件保持在其中心的容器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **CenterContainer** 是一种容器,它将其所有子控件以最小尺寸保持在其中心。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +46,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CenterContainer_property_use_top_left: @@ -62,10 +62,10 @@ Property Descriptions 如果为 ``true``\ ,会将子节点相对于 **CenterContainer** 的左上角居中。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_characterbody2d.rst b/classes/zh_CN/class_characterbody2d.rst index 523b75e981..ba8e1f5046 100644 --- a/classes/zh_CN/class_characterbody2d.rst +++ b/classes/zh_CN/class_characterbody2d.rst @@ -10,14 +10,14 @@ CharacterBody2D =============== -**Inherits:** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 专门用于通过脚本移动的角色的 2D 物理物体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **CharacterBody2D** 是针对用户控制的物理体的特化类。它们不会受到物理的影响,但会影响路径上的其他物理体。除了由 :ref:`PhysicsBody2D.move_and_collide` 提供的常见的碰撞检测之外,它们主要用于提供移动对象的高阶 API,能够检测墙壁和斜坡(\ :ref:`move_and_slide` 方法)。因此适用于需要高度可配置的物理体,因为通常是用户控制的角色,所以必须按照特定的方式移动、与世界发生碰撞。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`运动学角色(2D) <../tutorials/physics/kinematic_character_2d>` @@ -38,8 +38,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -78,8 +78,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -128,8 +128,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_CharacterBody2D_MotionMode: @@ -193,8 +193,8 @@ enum **PlatformOnLeave**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CharacterBody2D_property_floor_block_on_wall: @@ -423,7 +423,7 @@ Property Descriptions - void **set_up_direction** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_up_direction** **(** **)** -指向上方的向量,用于在调用 :ref:`move_and_slide` 时决定什么是墙壁、什么是地板(或者天花板)。默认为 ``Vector2.UP``\ 。因为会对该向量进行归一化,所以不能等于 :ref:`Vector2.ZERO`\ ,如果你想要让所有碰撞都被报告为墙壁,请考虑使用 :ref:`MOTION_MODE_FLOATING` 作为 :ref:`motion_mode`\ 。 +指向上方的向量,用于在调用 :ref:`move_and_slide` 时决定什么是墙壁、什么是地板(或者天花板)。默认为 :ref:`Vector2.UP`\ 。因为会对该向量进行归一化,所以不能等于 :ref:`Vector2.ZERO`\ ,如果你想要让所有碰撞都被报告为墙壁,请考虑使用 :ref:`MOTION_MODE_FLOATING` 作为 :ref:`motion_mode`\ 。 .. rst-class:: classref-item-separator @@ -457,7 +457,7 @@ Property Descriptions - void **set_wall_min_slide_angle** **(** :ref:`float` value **)** - :ref:`float` **get_wall_min_slide_angle** **(** **)** -该物体遇到斜坡时,允许滑动的最小角度(单位为弧度)。默认值等于 15 度。仅在 :ref:`motion_mode` 为 :ref:`MOTION_MODE_FLOATING` 时,该属性才会影响运动。 +该物体遇到斜面时,允许滑动的最小角度(单位为弧度)。默认值等于 15 度。只有在 :ref:`motion_mode` 为 :ref:`MOTION_MODE_FLOATING` 时,该属性才会影响运动。 .. rst-class:: classref-section-separator @@ -465,8 +465,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CharacterBody2D_method_apply_floor_snap: @@ -486,7 +486,7 @@ void **apply_floor_snap** **(** **)** :ref:`float` **get_floor_angle** **(** :ref:`Vector2` up_direction=Vector2(0, -1) **)** |const| -返回地板在最近一次碰撞点的碰撞角度,依据为 ``up_direction``\ ,默认为 ``Vector2.UP``\ 。该值始终为正数,只有在调用了 :ref:`move_and_slide` 并且 :ref:`is_on_floor` 返回值为 ``true`` 时才有效。 +返回地板在最近一次碰撞点的碰撞角度,依据为 ``up_direction``\ ,默认为 :ref:`Vector2.UP`\ 。该值始终为正数,只有在调用了 :ref:`move_and_slide` 并且 :ref:`is_on_floor` 返回值为 ``true`` 时才有效。 .. rst-class:: classref-item-separator @@ -709,10 +709,10 @@ void **apply_floor_snap** **(** **)** 如果该物体发生了碰撞,则返回 ``true``\ ,否则返回 ``false``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_characterbody3d.rst b/classes/zh_CN/class_characterbody3d.rst index 992fcad470..bd7f43b88d 100644 --- a/classes/zh_CN/class_characterbody3d.rst +++ b/classes/zh_CN/class_characterbody3d.rst @@ -10,14 +10,14 @@ CharacterBody3D =============== -**Inherits:** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 专门用于通过脚本移动的角色的 3D 物理物体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **CharacterBody3D** 是针对用户控制的物理体的特化类。它们不会受到物理的影响,但会影响路径上的其他物理体。除了由 :ref:`PhysicsBody3D.move_and_collide` 提供的常见的碰撞检测之外,它们主要用于提供移动对象的高阶 API,能够检测墙壁和斜坡(\ :ref:`move_and_slide` 方法)。因此适用于需要高度可配置的物理体,因为通常是用户控制的角色,所以必须按照特定的方式移动、与世界发生碰撞。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`运动学角色(2D) <../tutorials/physics/kinematic_character_2d>` @@ -40,8 +40,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -80,8 +80,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -132,8 +132,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_CharacterBody3D_MotionMode: @@ -197,8 +197,8 @@ enum **PlatformOnLeave**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CharacterBody3D_property_floor_block_on_wall: @@ -427,7 +427,7 @@ Property Descriptions - void **set_up_direction** **(** :ref:`Vector3` value **)** - :ref:`Vector3` **get_up_direction** **(** **)** -指向上方的向量,用于在调用 :ref:`move_and_slide` 时决定什么是墙壁、什么是地板(或者天花板)。默认为 ``Vector3.UP``\ 。因为会对该向量进行归一化,所以不能等于 :ref:`Vector3.ZERO`\ ,如果你想要让所有碰撞都被报告为墙壁,请考虑使用 :ref:`MOTION_MODE_FLOATING` 作为 :ref:`motion_mode`\ 。 +指向上方的向量,用于在调用 :ref:`move_and_slide` 时决定什么是墙壁、什么是地板(或者天花板)。默认为 :ref:`Vector3.UP`\ 。因为会对该向量进行归一化,所以不能等于 :ref:`Vector3.ZERO`\ ,如果你想要让所有碰撞都被报告为墙壁,请考虑使用 :ref:`MOTION_MODE_FLOATING` 作为 :ref:`motion_mode`\ 。 .. rst-class:: classref-item-separator @@ -461,7 +461,7 @@ Property Descriptions - void **set_wall_min_slide_angle** **(** :ref:`float` value **)** - :ref:`float` **get_wall_min_slide_angle** **(** **)** -该物体遇到斜坡时,允许滑动的最小角度(单位为弧度)。默认值等于 15 度。当 :ref:`motion_mode` 为 :ref:`MOTION_MODE_GROUNDED` 时,只有 :ref:`floor_block_on_wall` 为 ``true`` 才会影响运动。 +该物体遇到斜面时,允许滑动的最小角度(单位为弧度)。默认值等于 15 度。当 :ref:`motion_mode` 为 :ref:`MOTION_MODE_GROUNDED` 时,只有 :ref:`floor_block_on_wall` 为 ``true`` 才会影响运动。 .. rst-class:: classref-section-separator @@ -469,8 +469,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CharacterBody3D_method_apply_floor_snap: @@ -490,7 +490,7 @@ void **apply_floor_snap** **(** **)** :ref:`float` **get_floor_angle** **(** :ref:`Vector3` up_direction=Vector3(0, 1, 0) **)** |const| -返回地板在最近一次碰撞点的碰撞角度,依据为 ``up_direction``\ ,默认为 ``Vector3.UP``\ 。该值始终为正数,只有在调用了 :ref:`move_and_slide` 并且 :ref:`is_on_floor` 返回值为 ``true`` 时才有效。 +返回地板在最近一次碰撞点的碰撞角度,依据为 ``up_direction``\ ,默认为 :ref:`Vector3.UP`\ 。该值始终为正数,只有在调用了 :ref:`move_and_slide` 并且 :ref:`is_on_floor` 返回值为 ``true`` 时才有效。 .. rst-class:: classref-item-separator @@ -702,10 +702,10 @@ void **apply_floor_snap** **(** **)** 如果该物体发生了碰撞,则返回 ``true``\ ,否则返回 ``false``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_charfxtransform.rst b/classes/zh_CN/class_charfxtransform.rst index f91b7fe433..87bad6c9bf 100644 --- a/classes/zh_CN/class_charfxtransform.rst +++ b/classes/zh_CN/class_charfxtransform.rst @@ -10,21 +10,21 @@ CharFXTransform =============== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 控制单个字符在 :ref:`RichTextEffect` 中的显示方式。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 通过在此对象上设置各种属性,可以控制单个字符在 :ref:`RichTextEffect` 中的显示方式。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`RichTextLabel 中的 BBCode <../tutorials/ui/bbcode_in_richtextlabel>` @@ -32,37 +32,39 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`Color` | :ref:`color` | ``Color(0, 0, 0, 1)`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`elapsed_time` | ``0.0`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`Dictionary` | :ref:`env` | ``{}`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`RID` | :ref:`font` | ``RID()`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`glyph_count` | ``0`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`glyph_flags` | ``0`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`glyph_index` | ``0`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`outline` | ``false`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`Vector2i` | :ref:`range` | ``Vector2i(0, 0)`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`relative_index` | ``0`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`visible` | ``true`` | - +-------------------------------------+----------------------------------------------------------------------+-----------------------+ + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`color` | ``Color(0, 0, 0, 1)`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`elapsed_time` | ``0.0`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Dictionary` | :ref:`env` | ``{}`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`RID` | :ref:`font` | ``RID()`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`glyph_count` | ``0`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`glyph_flags` | ``0`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`glyph_index` | ``0`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Vector2` | :ref:`offset` | ``Vector2(0, 0)`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`outline` | ``false`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Vector2i` | :ref:`range` | ``Vector2i(0, 0)`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`relative_index` | ``0`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`Transform2D` | :ref:`transform` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ + | :ref:`bool` | :ref:`visible` | ``true`` | + +---------------------------------------+----------------------------------------------------------------------+-----------------------------------+ .. rst-class:: classref-section-separator @@ -70,8 +72,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CharFXTransform_property_color: @@ -228,7 +230,7 @@ Property Descriptions - void **set_outline** **(** :ref:`bool` value **)** - :ref:`bool` **is_outline** **(** **)** -如果为 ``为true``\ ,则调用 FX 变换进行轮廓绘制。设置该属性不会影响绘制。 +如果为 ``true``\ ,则调用 FX 变换进行轮廓绘制。设置该属性不会影响绘制。 .. rst-class:: classref-item-separator @@ -268,6 +270,23 @@ Property Descriptions ---- +.. _class_CharFXTransform_property_transform: + +.. rst-class:: classref-property + +:ref:`Transform2D` **transform** = ``Transform2D(1, 0, 0, 1, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_transform** **(** :ref:`Transform2D` value **)** +- :ref:`Transform2D` **get_transform** **(** **)** + +当前字形的当前变换。可以被覆盖(例如根据曲线来确定位置和旋转)。你还可以修改现有值,在其他效果的基础上应用变换。 + +.. rst-class:: classref-item-separator + +---- + .. _class_CharFXTransform_property_visible: .. rst-class:: classref-property @@ -281,10 +300,10 @@ Property Descriptions 如果为 ``true``\ ,将绘制字符。如果为 ``false``\ ,则隐藏字符。隐藏字符周围的字符将回流以占用隐藏字符的空间。如果不希望这样做,可以将它们的 :ref:`color` 设置为\ ``Color(1, 1, 1, 0)``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_checkbox.rst b/classes/zh_CN/class_checkbox.rst index f9ca056afa..8d23da0270 100644 --- a/classes/zh_CN/class_checkbox.rst +++ b/classes/zh_CN/class_checkbox.rst @@ -10,14 +10,14 @@ CheckBox ======== -**Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 代表二元选项的按钮。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **CheckBox** 允许用户在仅有的两个可能的选项中选择一个。它在功能上类似于 :ref:`CheckButton`\ ,但外观不同。为了遵循既定的 UX 模式,建议在切换而\ **不会**\ 立即对某些内容产生影响时使用 **CheckBox**\ 。例如,切换后只会在按下确认按钮后才执行某些操作时,就可以使用它。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,65 +41,31 @@ Properties .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_focus_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_hover_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`check_v_offset` | ``0`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`h_separation` | ``4`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`outline_size` | ``0`` | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Font` | :ref:`font` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`font_size` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`checked` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`checked_disabled` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`radio_checked` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`radio_checked_disabled` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`radio_unchecked` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`radio_unchecked_disabled` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`unchecked` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`unchecked_disabled` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`disabled` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`focus` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`hover` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`hover_pressed` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`normal` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`pressed` | | - +-----------------------------------+--------------------------------------------------------------------------------------+-------------------------------------+ + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`check_v_offset` | ``0`` | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`checked` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`checked_disabled` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`radio_checked` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`radio_checked_disabled` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`radio_unchecked` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`radio_unchecked_disabled` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`unchecked` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`unchecked_disabled` | | + +-----------------------------------+-------------------------------------------------------------------------------------+-------+ .. rst-class:: classref-section-separator @@ -107,92 +73,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- - -.. _class_CheckBox_theme_color_font_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` - -该 **CheckBox** 文本的字体颜色。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_color_font_disabled_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` - -该 **CheckBox** 被禁用时的文本字体颜色。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_color_font_focus_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` - -该 **CheckBox** 被聚焦时的文本字体颜色。只替代该勾选框的正常文本颜色。禁用、悬停和按下状态优先于这个颜色。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_color_font_hover_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` - -该 **CheckBox** 被悬停时的文本字体颜色。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_color_font_hover_pressed_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` - -该 **CheckBox** 被悬停且被按下时的文本字体颜色。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_color_font_outline_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` - -该 **CheckBox** 文本轮廓的色调。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_color_font_pressed_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_pressed_color** = ``Color(1, 1, 1, 1)`` - -该 **CheckBox** 被按下时的文本字体颜色。 - -.. rst-class:: classref-item-separator - ----- +主题属性说明 +------------ .. _class_CheckBox_theme_constant_check_v_offset: @@ -206,56 +88,6 @@ Theme Property Descriptions ---- -.. _class_CheckBox_theme_constant_h_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **h_separation** = ``4`` - -勾选图标与文本之间的间隔(单位:像素)。使用时负值会被视为 ``0``\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_constant_outline_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **outline_size** = ``0`` - -文字轮廓的大小。 - -\ **注意:**\ 如果使用启用了 :ref:`FontFile.multichannel_signed_distance_field` 的字体,其 :ref:`FontFile.msdf_pixel_range` 必须至少设置为 :ref:`outline_size` 的\ *两倍*\ ,轮廓渲染才能看起来正确。否则,轮廓可能会比预期的更早被切断。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_font_font: - -.. rst-class:: classref-themeproperty - -:ref:`Font` **font** - -该 **CheckBox** 文本所使用的 :ref:`Font`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_font_size_font_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **font_size** - -该 **CheckBox** 文本的字体大小。 - -.. rst-class:: classref-item-separator - ----- - .. _class_CheckBox_theme_icon_checked: .. rst-class:: classref-themeproperty @@ -348,82 +180,10 @@ Theme Property Descriptions 勾选图标,该 **CheckBox** 未勾选且被禁用时显示。 -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_style_disabled: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **disabled** - -作为背景显示的 :ref:`StyleBox`\ ,该 **CheckBox** 被禁用时使用。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_style_focus: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **focus** - -作为背景显示的 :ref:`StyleBox`\ ,该 **CheckBox** 被聚焦时使用。\ ``focus`` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,所以应该使用部分透明的 :ref:`StyleBox`\ ,确保基础 :ref:`StyleBox` 仍然可见。代表轮廓或下划线的 :ref:`StyleBox` 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 :ref:`StyleBoxEmpty` 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的可用性,所以出于可访问性的原因,不建议这样做。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_style_hover: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **hover** - -作为背景显示的 :ref:`StyleBox`\ ,该 **CheckBox** 被悬停时使用。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_style_hover_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **hover_pressed** - -作为背景显示的 :ref:`StyleBox`\ ,该 **CheckBox** 被悬停且被按下时使用。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_style_normal: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **normal** - -作为背景显示的 :ref:`StyleBox`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckBox_theme_style_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **pressed** - -作为背景显示的 :ref:`StyleBox`\ ,该 **CheckBox** 被按下时使用。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_checkbutton.rst b/classes/zh_CN/class_checkbutton.rst index c87c20cd49..bce4802026 100644 --- a/classes/zh_CN/class_checkbutton.rst +++ b/classes/zh_CN/class_checkbutton.rst @@ -10,14 +10,14 @@ CheckButton =========== -**Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 代表二元选项的按钮。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **CheckButton** 是一种显示为勾选字段的切换按钮。它在功能上类似于 :ref:`CheckBox`\ ,但外观不同。为了遵循既定的 UX 模式,建议在切换后会\ **立即**\ 生效时使用 **CheckButton**\ 。例如,如果切换后立即启用/禁用设置而无需用户按下确认按钮时,就可以使用它。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,65 +39,31 @@ Properties .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_focus_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_hover_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`check_v_offset` | ``0`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`h_separation` | ``4`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`outline_size` | ``0`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Font` | :ref:`font` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`font_size` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`checked` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`checked_disabled` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`checked_disabled_mirrored` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`checked_mirrored` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`unchecked` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`unchecked_disabled` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`unchecked_disabled_mirrored` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`unchecked_mirrored` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`disabled` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`focus` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`hover` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`hover_pressed` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`normal` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`pressed` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------+ + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`check_v_offset` | ``0`` | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`checked` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`checked_disabled` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`checked_disabled_mirrored` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`checked_mirrored` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`unchecked` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`unchecked_disabled` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`unchecked_disabled_mirrored` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`unchecked_mirrored` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ .. rst-class:: classref-section-separator @@ -105,92 +71,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- - -.. _class_CheckButton_theme_color_font_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` - -该 **CheckButton** 的文本字体颜色。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_color_font_disabled_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` - -该 **CheckButton** 被禁用时的文本字体颜色。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_color_font_focus_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` - -该 **CheckButton** 被聚焦时的文本字体颜色。只替代该按钮的正常文本颜色。禁用、悬停和按下状态优先于此颜色。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_color_font_hover_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` - -该 **CheckButton** 被悬停时的文本字体颜色。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_color_font_hover_pressed_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` - -该 **CheckButton** 被悬停且被按下时的文本字体颜色。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_color_font_outline_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` - -该 **CheckButton** 文本轮廓的色调。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_color_font_pressed_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_pressed_color** = ``Color(1, 1, 1, 1)`` - -该 **CheckButton** 被按下时的文本字体颜色。 - -.. rst-class:: classref-item-separator - ----- +主题属性说明 +------------ .. _class_CheckButton_theme_constant_check_v_offset: @@ -204,56 +86,6 @@ Theme Property Descriptions ---- -.. _class_CheckButton_theme_constant_h_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **h_separation** = ``4`` - -切换图标与文本之间的间隔(单位:像素)。使用时负值会被视为 ``0``\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_constant_outline_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **outline_size** = ``0`` - -文字轮廓的大小。 - -\ **注意:**\ 如果使用启用了 :ref:`FontFile.multichannel_signed_distance_field` 的字体,其 :ref:`FontFile.msdf_pixel_range` 必须至少设置为 :ref:`outline_size` 的\ *两倍*\ ,轮廓渲染才能看起来正确。否则,轮廓可能会比预期的更早被切断。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_font_font: - -.. rst-class:: classref-themeproperty - -:ref:`Font` **font** - -该 **CheckButton** 文本所使用的 :ref:`Font`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_font_size_font_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **font_size** - -该 **CheckButton** 文本的字体大小。 - -.. rst-class:: classref-item-separator - ----- - .. _class_CheckButton_theme_icon_checked: .. rst-class:: classref-themeproperty @@ -346,82 +178,10 @@ Theme Property Descriptions 切换图标,该 **CheckButton** 未勾选时显示(用于从右至左布局)。 -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_style_disabled: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **disabled** - -作为背景显示的 :ref:`StyleBox`\ ,该 **CheckButton** 被禁用时使用。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_style_focus: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **focus** - -作为背景显示的 :ref:`StyleBox`\ ,该 **CheckButton** 被聚焦时使用。\ ``focus`` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,所以应该使用部分透明的 :ref:`StyleBox`\ ,确保基础 :ref:`StyleBox` 仍然可见。代表轮廓或下划线的 :ref:`StyleBox` 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 :ref:`StyleBoxEmpty` 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的可用性,所以出于可访问性的原因,不建议这样做。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_style_hover: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **hover** - -作为背景显示的 :ref:`StyleBox`\ ,该 **CheckButton** 被悬停时使用。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_style_hover_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **hover_pressed** - -作为背景显示的 :ref:`StyleBox`\ ,该 **CheckButton** 被悬停且被按下时使用。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_style_normal: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **normal** - -作为背景显示的 :ref:`StyleBox`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CheckButton_theme_style_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **pressed** - -作为背景显示的 :ref:`StyleBox`\ ,该 **CheckButton** 被按下时使用。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_circleshape2d.rst b/classes/zh_CN/class_circleshape2d.rst index 21c66fe8de..a3bc75f069 100644 --- a/classes/zh_CN/class_circleshape2d.rst +++ b/classes/zh_CN/class_circleshape2d.rst @@ -10,14 +10,14 @@ CircleShape2D ============= -**Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 2D 圆形,旨在用于物理学。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 2D 圆形,旨在用于物理学。通常用于为 :ref:`CollisionShape2D` 提供形状。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CircleShape2D_property_radius: @@ -57,10 +57,10 @@ Property Descriptions 圆的半径。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_classdb.rst b/classes/zh_CN/class_classdb.rst index a323567472..212c7a4c46 100644 --- a/classes/zh_CN/class_classdb.rst +++ b/classes/zh_CN/class_classdb.rst @@ -10,21 +10,21 @@ ClassDB ======= -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 类信息的存储库。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 提供对为每个可用类存储的元数据的访问。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -83,8 +83,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ClassDB_method_can_instantiate: @@ -360,10 +360,10 @@ Method Descriptions 返回 ``inherits`` 是否为 ``class`` 的祖先。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_codeedit.rst b/classes/zh_CN/class_codeedit.rst index 0423d2aea3..6cf0262e80 100644 --- a/classes/zh_CN/class_codeedit.rst +++ b/classes/zh_CN/class_codeedit.rst @@ -10,14 +10,14 @@ CodeEdit ======== -**Inherits:** :ref:`TextEdit` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`TextEdit` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 多行文本编辑器,针对编辑代码而设计。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- CodeEdit 是一种专门用于编辑纯文本代码文件的 :ref:`TextEdit`\ 。它包含了许多代码编辑器中的常见功能,如行号、折行、代码补全、缩进管理以及字符串/注释管理。 @@ -25,8 +25,8 @@ CodeEdit 是一种专门用于编辑纯文本代码文件的 :ref:`TextEdit` **(** :ref:`bool` replace **)** |virtual| | + | void | :ref:`_confirm_code_completion` **(** :ref:`bool` replace **)** |virtual| | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_filter_code_completion_candidates` **(** :ref:`Dictionary[]` candidates **)** |virtual| |const| | + | :ref:`Dictionary[]` | :ref:`_filter_code_completion_candidates` **(** :ref:`Dictionary[]` candidates **)** |virtual| |const| | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_request_code_completion` **(** :ref:`bool` force **)** |virtual| | + | void | :ref:`_request_code_completion` **(** :ref:`bool` force **)** |virtual| | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_auto_brace_completion_pair` **(** :ref:`String` start_key, :ref:`String` end_key **)** | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -122,6 +122,8 @@ Methods +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`do_indent` **(** **)** | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`duplicate_lines` **(** **)** | + +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fold_all_lines` **(** **)** | +-------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fold_line` **(** :ref:`int` line **)** | @@ -221,109 +223,63 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`background_color` | ``Color(0, 0, 0, 0)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`bookmark_color` | ``Color(0.5, 0.64, 1, 0.8)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`brace_mismatch_color` | ``Color(1, 0.2, 0.2, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`breakpoint_color` | ``Color(0.9, 0.29, 0.3, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`caret_background_color` | ``Color(0, 0, 0, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`caret_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`code_folding_color` | ``Color(0.8, 0.8, 0.8, 0.8)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`completion_background_color` | ``Color(0.17, 0.16, 0.2, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`completion_existing_color` | ``Color(0.87, 0.87, 0.87, 0.13)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`completion_font_color` | ``Color(0.67, 0.67, 0.67, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`completion_scroll_color` | ``Color(1, 1, 1, 0.29)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`completion_scroll_hovered_color` | ``Color(1, 1, 1, 0.4)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`completion_selected_color` | ``Color(0.26, 0.26, 0.27, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`current_line_color` | ``Color(0.25, 0.25, 0.26, 0.8)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`executing_line_color` | ``Color(0.98, 0.89, 0.27, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`folded_code_region_color` | ``Color(0.68, 0.46, 0.77, 0.2)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_placeholder_color` | ``Color(0.875, 0.875, 0.875, 0.6)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_readonly_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_selected_color` | ``Color(0, 0, 0, 0)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`line_length_guideline_color` | ``Color(0.3, 0.5, 0.8, 0.1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`line_number_color` | ``Color(0.67, 0.67, 0.67, 0.4)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`search_result_border_color` | ``Color(0.3, 0.3, 0.3, 0.4)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`search_result_color` | ``Color(0.3, 0.3, 0.3, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`selection_color` | ``Color(0.5, 0.5, 0.5, 1)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`word_highlighted_color` | ``Color(0.8, 0.9, 0.9, 0.15)`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`completion_lines` | ``7`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`completion_max_width` | ``50`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`completion_scroll_width` | ``6`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`line_spacing` | ``4`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`outline_size` | ``0`` | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Font` | :ref:`font` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`font_size` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`bookmark` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`breakpoint` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`can_fold` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`can_fold_code_region` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`executing_line` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`folded` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`folded_code_region` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`folded_eol_icon` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`space` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`tab` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`completion` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`focus` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`normal` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`read_only` | | - +-----------------------------------+----------------------------------------------------------------------------------------------------+-------------------------------------+ + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`bookmark_color` | ``Color(0.5, 0.64, 1, 0.8)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`brace_mismatch_color` | ``Color(1, 0.2, 0.2, 1)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`breakpoint_color` | ``Color(0.9, 0.29, 0.3, 1)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`code_folding_color` | ``Color(0.8, 0.8, 0.8, 0.8)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`completion_background_color` | ``Color(0.17, 0.16, 0.2, 1)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`completion_existing_color` | ``Color(0.87, 0.87, 0.87, 0.13)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`completion_scroll_color` | ``Color(1, 1, 1, 0.29)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`completion_scroll_hovered_color` | ``Color(1, 1, 1, 0.4)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`completion_selected_color` | ``Color(0.26, 0.26, 0.27, 1)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`executing_line_color` | ``Color(0.98, 0.89, 0.27, 1)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`folded_code_region_color` | ``Color(0.68, 0.46, 0.77, 0.2)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`line_length_guideline_color` | ``Color(0.3, 0.5, 0.8, 0.1)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`line_number_color` | ``Color(0.67, 0.67, 0.67, 0.4)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`completion_lines` | ``7`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`completion_max_width` | ``50`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`completion_scroll_width` | ``6`` | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`bookmark` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`breakpoint` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`can_fold` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`can_fold_code_region` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`executing_line` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`folded` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`folded_code_region` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Texture2D` | :ref:`folded_eol_icon` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`completion` | | + +-----------------------------------+----------------------------------------------------------------------------------------------------+-----------------------------------+ .. rst-class:: classref-section-separator @@ -331,8 +287,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_CodeEdit_signal_breakpoint_toggled: @@ -384,8 +340,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_CodeEdit_CodeCompletionKind: @@ -521,8 +477,8 @@ enum **CodeCompletionLocation**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CodeEdit_property_auto_brace_completion_enabled: @@ -790,7 +746,7 @@ Property Descriptions - void **set_indent_size** **(** :ref:`int` value **)** - :ref:`int` **get_indent_size** **(** **)** -制表符的大小,如果启用 ``indent_use_spaces``\ ,则代表使用的空格数。 +制表缩进的大小(按一次 :kbd:`Tab`\ ),以字符为单位。如果启用 :ref:`indent_use_spaces`\ ,则代表使用的空格数。 .. rst-class:: classref-item-separator @@ -866,10 +822,10 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_CodeEdit_method__confirm_code_completion: +.. _class_CodeEdit_private_method__confirm_code_completion: .. rst-class:: classref-method @@ -881,7 +837,7 @@ void **_confirm_code_completion** **(** :ref:`bool` replace **)** |v ---- -.. _class_CodeEdit_method__filter_code_completion_candidates: +.. _class_CodeEdit_private_method__filter_code_completion_candidates: .. rst-class:: classref-method @@ -895,7 +851,7 @@ void **_confirm_code_completion** **(** :ref:`bool` replace **)** |v ---- -.. _class_CodeEdit_method__request_code_completion: +.. _class_CodeEdit_private_method__request_code_completion: .. rst-class:: classref-method @@ -1059,7 +1015,7 @@ void **clear_string_delimiters** **(** **)** void **confirm_code_completion** **(** :ref:`bool` replace=false **)** -将选定的条目插入文本中。如果 ``replace`` 为真,任何现有的文本都会被替换,而不是合并。 +将选定的条目插入到文本中。如果 ``replace`` 为真,任何现有的文本都会被替换,而不是被合并。 .. rst-class:: classref-item-separator @@ -1085,13 +1041,13 @@ void **convert_indent** **(** :ref:`int` from_line=-1, :ref:`int`). +使用选区创建一个新的代码区块。必须至少定义一个单行注释分隔符(见 :ref:`add_comment_delimiter`\ )。 -A code region is a part of code that is highlighted when folded and can help organize your script. +代码区块是代码的一部分,它在折叠时会高亮显示,且可以帮助组织脚本。 -Code region start and end tags can be customized (see :ref:`set_code_region_tags`). +代码区块的开始和结束标记可以被自定义(见 :ref:`set_code_region_tags`\ )。 -Code regions are delimited using start and end tags (respectively ``region`` and ``endregion`` by default) preceded by one line comment delimiter. (eg. ``#region`` and ``#endregion``) +代码区块使用开始和结束标记(默认情况下分别为 ``region`` 和 ``endregion``\ )进行分隔,前面有一个行注释分隔符。(例如 ``#region`` 和 ``#endregion``\ ) .. rst-class:: classref-item-separator @@ -1109,6 +1065,18 @@ void **do_indent** **(** **)** ---- +.. _class_CodeEdit_method_duplicate_lines: + +.. rst-class:: classref-method + +void **duplicate_lines** **(** **)** + +复制当前使用任何文本光标选择的所有行。无论文本光标位于行内的哪个位置,复制当前行所在的整行。 + +.. rst-class:: classref-item-separator + +---- + .. _class_CodeEdit_method_fold_all_lines: .. rst-class:: classref-method @@ -1223,7 +1191,7 @@ void **fold_line** **(** :ref:`int` line **)** :ref:`String` **get_code_region_end_tag** **(** **)** |const| -Returns the code region end tag (without comment delimiter). +返回代码区块结束标签(不带注释分隔符)。 .. rst-class:: classref-item-separator @@ -1235,7 +1203,7 @@ Returns the code region end tag (without comment delimiter). :ref:`String` **get_code_region_start_tag** **(** **)** |const| -Returns the code region start tag (without comment delimiter). +返回代码区块开始标签(不带注释分隔符)。 .. rst-class:: classref-item-separator @@ -1319,7 +1287,7 @@ Returns the code region start tag (without comment delimiter). :ref:`String` **get_text_for_code_completion** **(** **)** |const| -返回在插入符号位置带有 ``0xFFFF`` 字符的全文。 +返回在文本光标位置带有 ``0xFFFF`` 字符的全文。 .. rst-class:: classref-item-separator @@ -1331,7 +1299,7 @@ Returns the code region start tag (without comment delimiter). :ref:`String` **get_text_for_symbol_lookup** **(** **)** |const| -返回在光标位置处带有 ``0xFFFF`` 字符的全文。 +返回在鼠标光标处带有 ``0xFFFF`` 字符的全文。 .. rst-class:: classref-item-separator @@ -1343,7 +1311,7 @@ Returns the code region start tag (without comment delimiter). :ref:`String` **get_text_with_cursor_char** **(** :ref:`int` line, :ref:`int` column **)** |const| -Returns the full text with char ``0xFFFF`` at the specified location. +返回在指定位置带有 ``0xFFFF`` 字符的全文。 .. rst-class:: classref-item-separator @@ -1463,7 +1431,7 @@ void **indent_lines** **(** **)** :ref:`bool` **is_line_code_region_end** **(** :ref:`int` line **)** |const| -Returns whether the line at the specified index is a code region end. +返回指定索引处的行是否是代码区块末尾。 .. rst-class:: classref-item-separator @@ -1475,7 +1443,7 @@ Returns whether the line at the specified index is a code region end. :ref:`bool` **is_line_code_region_start** **(** :ref:`int` line **)** |const| -Returns whether the line at the specified index is a code region start. +返回指定索引处的行是否是代码区块开始。 .. rst-class:: classref-item-separator @@ -1583,7 +1551,7 @@ void **set_code_hint_draw_below** **(** :ref:`bool` draw_below **)** void **set_code_region_tags** **(** :ref:`String` start="region", :ref:`String` end="endregion" **)** -Sets the code region start and end tags (without comment delimiter). +设置代码区块的开始和结束标签(不含注释分隔符)。 .. rst-class:: classref-item-separator @@ -1691,9 +1659,9 @@ void **unindent_lines** **(** **)** void **update_code_completion_options** **(** :ref:`bool` force **)** -Submits all completion options added with :ref:`add_code_completion_option`. Will try to force the autocomplete menu to popup, if ``force`` is ``true``. +提交所有用 :ref:`add_code_completion_option` 添加的补全选项。如果 ``force`` 是 ``true``\ ,将尝试强制弹出自动补全菜单 。 -\ **Note:** This will replace all current candidates. +\ **注意:**\ 这将取代所有当前的候补选项。 .. rst-class:: classref-section-separator @@ -1701,20 +1669,8 @@ Submits all completion options added with :ref:`add_code_completion_option` **background_color** = ``Color(0, 0, 0, 0)`` - -设置背景的 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- +主题属性说明 +------------ .. _class_CodeEdit_theme_color_bookmark_color: @@ -1752,30 +1708,6 @@ Theme Property Descriptions ---- -.. _class_CodeEdit_theme_color_caret_background_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **caret_background_color** = ``Color(0, 0, 0, 1)`` - -启用块光标时在光标后面的文本的 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_caret_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **caret_color** = ``Color(0.875, 0.875, 0.875, 1)`` - -光标的 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - .. _class_CodeEdit_theme_color_code_folding_color: .. rst-class:: classref-themeproperty @@ -1812,18 +1744,6 @@ Theme Property Descriptions ---- -.. _class_CodeEdit_theme_color_completion_font_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **completion_font_color** = ``Color(0.67, 0.67, 0.67, 1)`` - -代码补全弹出窗口字体的 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - .. _class_CodeEdit_theme_color_completion_scroll_color: .. rst-class:: classref-themeproperty @@ -1860,18 +1780,6 @@ Theme Property Descriptions ---- -.. _class_CodeEdit_theme_color_current_line_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **current_line_color** = ``Color(0.25, 0.25, 0.26, 0.8)`` - -光标所在行的背景 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - .. _class_CodeEdit_theme_color_executing_line_color: .. rst-class:: classref-themeproperty @@ -1890,67 +1798,7 @@ Theme Property Descriptions :ref:`Color` **folded_code_region_color** = ``Color(0.68, 0.46, 0.77, 0.2)`` -:ref:`Color` of background line highlight for folded code region. - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_font_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` - -设置字体颜色 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_font_outline_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` - -该 **CodeEdit** 文本轮廓的色调。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_font_placeholder_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_placeholder_color** = ``Color(0.875, 0.875, 0.875, 0.6)`` - -:ref:`TextEdit.placeholder_text` 的字体颜色。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_font_readonly_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_readonly_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` - -设置禁用 :ref:`TextEdit.editable` 时的字体 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_font_selected_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_selected_color** = ``Color(0, 0, 0, 0)`` - -设置所选文本的 :ref:`Color`\ 。如果等于 ``Color(0, 0, 0, 0)``\ ,则该属性将被忽略。 +折叠代码区块的背景行高亮 :ref:`Color`\ 。 .. rst-class:: classref-item-separator @@ -1980,54 +1828,6 @@ Theme Property Descriptions ---- -.. _class_CodeEdit_theme_color_search_result_border_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **search_result_border_color** = ``Color(0.3, 0.3, 0.3, 0.4)`` - -与搜索查询匹配的文本周围的边框的 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_search_result_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **search_result_color** = ``Color(0.3, 0.3, 0.3, 1)`` - -与搜索查询匹配的文本背景的 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_selection_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **selection_color** = ``Color(0.5, 0.5, 0.5, 1)`` - -设置文本选择的高亮 :ref:`Color` 颜色。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_color_word_highlighted_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **word_highlighted_color** = ``Color(0.8, 0.9, 0.9, 0.15)`` - -设置多次出现的高亮的 :ref:`Color`\ 。\ :ref:`TextEdit.highlight_all_occurrences` 必须已被启用。 - -.. rst-class:: classref-item-separator - ----- - .. _class_CodeEdit_theme_constant_completion_lines: .. rst-class:: classref-themeproperty @@ -2046,7 +1846,7 @@ Theme Property Descriptions :ref:`int` **completion_max_width** = ``50`` -代码补全弹出窗口中选项的最大宽度。更长的选项将被切断。 +代码补全弹出窗口中选项的最大宽度。超过此长度的选项将被截断。 .. rst-class:: classref-item-separator @@ -2064,56 +1864,6 @@ Theme Property Descriptions ---- -.. _class_CodeEdit_theme_constant_line_spacing: - -.. rst-class:: classref-themeproperty - -:ref:`int` **line_spacing** = ``4`` - -设置行间距。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_constant_outline_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **outline_size** = ``0`` - -文字轮廓的大小。 - -\ **注意:**\ 如果使用启用了 :ref:`FontFile.multichannel_signed_distance_field` 的字体,其 :ref:`FontFile.msdf_pixel_range` 必须至少设置为 :ref:`outline_size` 的\ *两倍*\ ,轮廓渲染才能看起来正确。否则,轮廓可能会比预期的更早被切断。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_font_font: - -.. rst-class:: classref-themeproperty - -:ref:`Font` **font** - -设置默认的字体 :ref:`Font`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_font_size_font_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **font_size** - -设置默认的字体大小。 - -.. rst-class:: classref-item-separator - ----- - .. _class_CodeEdit_theme_icon_bookmark: .. rst-class:: classref-themeproperty @@ -2156,7 +1906,7 @@ Theme Property Descriptions :ref:`Texture2D` **can_fold_code_region** -Sets a custom :ref:`Texture2D` to draw in the line folding gutter when a code region can be folded. +设置一个自定义 :ref:`Texture2D`\ ,以在代码区块可以折叠时在行折叠栏中绘制。 .. rst-class:: classref-item-separator @@ -2180,7 +1930,7 @@ Sets a custom :ref:`Texture2D` to draw in the line folding gutt :ref:`Texture2D` **folded** -当行被折叠且可以展开时,设置要在行折叠装订线中绘制的一个自定义 :ref:`Texture2D`\ 。 +设置一个自定义 :ref:`Texture2D`\ ,以在行被折叠且可以展开时,在行折叠边栏中绘制。 .. rst-class:: classref-item-separator @@ -2192,7 +1942,7 @@ Sets a custom :ref:`Texture2D` to draw in the line folding gutt :ref:`Texture2D` **folded_code_region** -Sets a custom :ref:`Texture2D` to draw in the line folding gutter when a code region is folded and can be unfolded. +设置一个自定义 :ref:`Texture2D`\ ,以在代码区块被折叠且可以展开时,在行折叠边栏中绘制。 .. rst-class:: classref-item-separator @@ -2210,30 +1960,6 @@ Sets a custom :ref:`Texture2D` to draw in the line folding gutt ---- -.. _class_CodeEdit_theme_icon_space: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **space** - -为空格文本字符,设置一个自定义 :ref:`Texture2D`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_icon_tab: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **tab** - -为制表符文本字符,设置一个自定义 :ref:`Texture2D`\ 。 - -.. rst-class:: classref-item-separator - ----- - .. _class_CodeEdit_theme_style_completion: .. rst-class:: classref-themeproperty @@ -2242,46 +1968,10 @@ Sets a custom :ref:`Texture2D` to draw in the line folding gutt 用于代码补全弹窗的 :ref:`StyleBox`\ 。 -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_style_focus: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **focus** - -设置当获得焦点时的 :ref:`StyleBox`\ 。该 ``focus`` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,因此应使用部分透明的 :ref:`StyleBox` 以确保基础 :ref:`StyleBox` 保持可见。表示轮廓或下划线的 :ref:`StyleBox` 非常适合此目的。要禁用焦点视觉效果,请指定一个 :ref:`StyleBoxEmpty` 资源。请注意,禁用焦点视觉效果会破坏键盘 / 控制器导航的可用性,出于可访问性原因,不建议这样做。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_style_normal: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **normal** - -设置该 :ref:`StyleBox`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_CodeEdit_theme_style_read_only: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **read_only** - -设置 :ref:`TextEdit.editable` 处于禁用状态时的 :ref:`StyleBox`\ 。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_codehighlighter.rst b/classes/zh_CN/class_codehighlighter.rst index 343e4a6c36..a2ef2fdb91 100644 --- a/classes/zh_CN/class_codehighlighter.rst +++ b/classes/zh_CN/class_codehighlighter.rst @@ -10,21 +10,21 @@ CodeHighlighter =============== -**Inherits:** :ref:`SyntaxHighlighter` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`SyntaxHighlighter` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于代码的语法高亮器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 通过调整该资源的各种属性,可以更改 :ref:`TextEdit` 控件内的字符串、注释、数字、和其他文本图案的颜色。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -89,8 +89,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CodeHighlighter_property_color_regions: @@ -213,8 +213,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CodeHighlighter_method_add_color_region: @@ -390,10 +390,10 @@ void **remove_member_keyword_color** **(** :ref:`String` member_ke 移除成员关键字。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_collisionobject2d.rst b/classes/zh_CN/class_collisionobject2d.rst index 9ab609ac4b..eeb27cdbd9 100644 --- a/classes/zh_CN/class_collisionobject2d.rst +++ b/classes/zh_CN/class_collisionobject2d.rst @@ -10,16 +10,16 @@ CollisionObject2D ================= -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`Area2D`, :ref:`PhysicsBody2D` +**派生:** :ref:`Area2D`, :ref:`PhysicsBody2D` 2D 物理对象的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 2D 物理对象的抽象基类。\ **CollisionObject2D** 能够容纳任意数量的 :ref:`Shape2D` 用作碰撞形状。每个形状必须分配给一个\ *形状所有者*\ 。形状所有者不是节点,也不会出现在编辑器中,但可以通过代码使用 ``shape_owner_*`` 方法访问。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,71 +47,71 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_input_event` **(** :ref:`Viewport` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_mouse_enter` **(** **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_mouse_exit` **(** **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_mouse_shape_enter` **(** :ref:`int` shape_idx **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_mouse_shape_exit` **(** :ref:`int` shape_idx **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`create_shape_owner` **(** :ref:`Object` owner **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_shape_owner_one_way_collision_margin` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_shape_owners` **(** **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_shape_owner_disabled` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_shape_owner_one_way_collision_enabled` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_shape_owner` **(** :ref:`int` owner_id **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`shape_find_owner` **(** :ref:`int` shape_index **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_add_shape` **(** :ref:`int` owner_id, :ref:`Shape2D` shape **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_clear_shapes` **(** :ref:`int` owner_id **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`shape_owner_get_owner` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Shape2D` | :ref:`shape_owner_get_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`shape_owner_get_shape_count` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`shape_owner_get_shape_index` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`shape_owner_get_transform` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_remove_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_set_disabled` **(** :ref:`int` owner_id, :ref:`bool` disabled **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_set_one_way_collision` **(** :ref:`int` owner_id, :ref:`bool` enable **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_set_one_way_collision_margin` **(** :ref:`int` owner_id, :ref:`float` margin **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_set_transform` **(** :ref:`int` owner_id, :ref:`Transform2D` transform **)** | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_input_event` **(** :ref:`Viewport` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** |virtual| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_mouse_enter` **(** **)** |virtual| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_mouse_exit` **(** **)** |virtual| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_mouse_shape_enter` **(** :ref:`int` shape_idx **)** |virtual| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_mouse_shape_exit` **(** :ref:`int` shape_idx **)** |virtual| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`create_shape_owner` **(** :ref:`Object` owner **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_shape_owner_one_way_collision_margin` **(** :ref:`int` owner_id **)** |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_shape_owners` **(** **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_shape_owner_disabled` **(** :ref:`int` owner_id **)** |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_shape_owner_one_way_collision_enabled` **(** :ref:`int` owner_id **)** |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_shape_owner` **(** :ref:`int` owner_id **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shape_find_owner` **(** :ref:`int` shape_index **)** |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shape_owner_add_shape` **(** :ref:`int` owner_id, :ref:`Shape2D` shape **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shape_owner_clear_shapes` **(** :ref:`int` owner_id **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`shape_owner_get_owner` **(** :ref:`int` owner_id **)** |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Shape2D` | :ref:`shape_owner_get_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shape_owner_get_shape_count` **(** :ref:`int` owner_id **)** |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shape_owner_get_shape_index` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`shape_owner_get_transform` **(** :ref:`int` owner_id **)** |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shape_owner_remove_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shape_owner_set_disabled` **(** :ref:`int` owner_id, :ref:`bool` disabled **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shape_owner_set_one_way_collision` **(** :ref:`int` owner_id, :ref:`bool` enable **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shape_owner_set_one_way_collision_margin` **(** :ref:`int` owner_id, :ref:`float` margin **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shape_owner_set_transform` **(** :ref:`int` owner_id, :ref:`Transform2D` transform **)** | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -119,8 +119,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_CollisionObject2D_signal_input_event: @@ -128,7 +128,7 @@ Signals **input_event** **(** :ref:`Node` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** -当输入事件发生时发出。要求 :ref:`input_pickable` 为 ``true`` 并且至少设置了一个 :ref:`collision_layer` 位。有关详细信息,请参见 :ref:`_input_event`\ 。 +当输入事件发生时发出。要求 :ref:`input_pickable` 为 ``true`` 并且至少设置了一个 :ref:`collision_layer` 位。详见 :ref:`_input_event`\ 。 .. rst-class:: classref-item-separator @@ -188,8 +188,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_CollisionObject2D_DisableMode: @@ -231,8 +231,8 @@ enum **DisableMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CollisionObject2D_property_collision_layer: @@ -325,24 +325,24 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_CollisionObject2D_method__input_event: +.. _class_CollisionObject2D_private_method__input_event: .. rst-class:: classref-method void **_input_event** **(** :ref:`Viewport` viewport, :ref:`InputEvent` event, :ref:`int` shape_idx **)** |virtual| -接收未处理的 :ref:`InputEvent`\ 。\ ``shape_idx`` 是被点击的 :ref:`Shape2D` 的子索引。连接到 ``input_event`` 信号即可轻松获取这些事件。 +接收未处理的 :ref:`InputEvent`\ 。\ ``shape_idx`` 是被点击的 :ref:`Shape2D` 的子索引。连接到 :ref:`input_event` 即可轻松获取这些事件。 -\ **注意:**\ :ref:`_input_event` 要求 :ref:`input_pickable` 为 ``true``\ ,并且至少要设置一个 :ref:`collision_layer` 位。 +\ **注意:**\ :ref:`_input_event` 要求 :ref:`input_pickable` 为 ``true``\ ,并且至少要设置一个 :ref:`collision_layer` 位。 .. rst-class:: classref-item-separator ---- -.. _class_CollisionObject2D_method__mouse_enter: +.. _class_CollisionObject2D_private_method__mouse_enter: .. rst-class:: classref-method @@ -354,7 +354,7 @@ void **_mouse_enter** **(** **)** |virtual| ---- -.. _class_CollisionObject2D_method__mouse_exit: +.. _class_CollisionObject2D_private_method__mouse_exit: .. rst-class:: classref-method @@ -366,7 +366,7 @@ void **_mouse_exit** **(** **)** |virtual| ---- -.. _class_CollisionObject2D_method__mouse_shape_enter: +.. _class_CollisionObject2D_private_method__mouse_shape_enter: .. rst-class:: classref-method @@ -378,7 +378,7 @@ void **_mouse_shape_enter** **(** :ref:`int` shape_idx **)** |virtual ---- -.. _class_CollisionObject2D_method__mouse_shape_exit: +.. _class_CollisionObject2D_private_method__mouse_shape_exit: .. rst-class:: classref-method @@ -674,10 +674,10 @@ void **shape_owner_set_transform** **(** :ref:`int` owner_id, :ref:`T 设置给定形状所有者的 :ref:`Transform2D`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_collisionobject3d.rst b/classes/zh_CN/class_collisionobject3d.rst index 5857598588..9b6fb54371 100644 --- a/classes/zh_CN/class_collisionobject3d.rst +++ b/classes/zh_CN/class_collisionobject3d.rst @@ -10,16 +10,16 @@ CollisionObject3D ================= -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`Area3D`, :ref:`PhysicsBody3D` +**派生:** :ref:`Area3D`, :ref:`PhysicsBody3D` 3D 物理对象的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 3D 物理对象的抽象基类。\ **CollisionObject3D** 能够容纳任意数量的 :ref:`Shape3D` 用作碰撞形状。每个形状必须分配给一个\ *形状所有者*\ 。形状所有者不是节点,也不会出现在编辑器中,但可以通过代码使用 ``shape_owner_*`` 方法访问。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,59 +49,59 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_input_event` **(** :ref:`Camera3D` camera, :ref:`InputEvent` event, :ref:`Vector3` position, :ref:`Vector3` normal, :ref:`int` shape_idx **)** |virtual| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_mouse_enter` **(** **)** |virtual| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_mouse_exit` **(** **)** |virtual| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`create_shape_owner` **(** :ref:`Object` owner **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_shape_owners` **(** **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_shape_owner_disabled` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_shape_owner` **(** :ref:`int` owner_id **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`shape_find_owner` **(** :ref:`int` shape_index **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_add_shape` **(** :ref:`int` owner_id, :ref:`Shape3D` shape **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_clear_shapes` **(** :ref:`int` owner_id **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`shape_owner_get_owner` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Shape3D` | :ref:`shape_owner_get_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`shape_owner_get_shape_count` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`shape_owner_get_shape_index` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`shape_owner_get_transform` **(** :ref:`int` owner_id **)** |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_remove_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_set_disabled` **(** :ref:`int` owner_id, :ref:`bool` disabled **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`shape_owner_set_transform` **(** :ref:`int` owner_id, :ref:`Transform3D` transform **)** | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_input_event` **(** :ref:`Camera3D` camera, :ref:`InputEvent` event, :ref:`Vector3` position, :ref:`Vector3` normal, :ref:`int` shape_idx **)** |virtual| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_mouse_enter` **(** **)** |virtual| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_mouse_exit` **(** **)** |virtual| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`create_shape_owner` **(** :ref:`Object` owner **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_layer_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_rid` **(** **)** |const| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_shape_owners` **(** **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_shape_owner_disabled` **(** :ref:`int` owner_id **)** |const| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_shape_owner` **(** :ref:`int` owner_id **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_layer_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shape_find_owner` **(** :ref:`int` shape_index **)** |const| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shape_owner_add_shape` **(** :ref:`int` owner_id, :ref:`Shape3D` shape **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shape_owner_clear_shapes` **(** :ref:`int` owner_id **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`shape_owner_get_owner` **(** :ref:`int` owner_id **)** |const| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Shape3D` | :ref:`shape_owner_get_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shape_owner_get_shape_count` **(** :ref:`int` owner_id **)** |const| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`shape_owner_get_shape_index` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** |const| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`shape_owner_get_transform` **(** :ref:`int` owner_id **)** |const| | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shape_owner_remove_shape` **(** :ref:`int` owner_id, :ref:`int` shape_id **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shape_owner_set_disabled` **(** :ref:`int` owner_id, :ref:`bool` disabled **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`shape_owner_set_transform` **(** :ref:`int` owner_id, :ref:`Transform3D` transform **)** | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -109,8 +109,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_CollisionObject3D_signal_input_event: @@ -154,8 +154,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_CollisionObject3D_DisableMode: @@ -197,8 +197,8 @@ enum **DisableMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CollisionObject3D_property_collision_layer: @@ -308,10 +308,10 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_CollisionObject3D_method__input_event: +.. _class_CollisionObject3D_private_method__input_event: .. rst-class:: classref-method @@ -319,13 +319,13 @@ void **_input_event** **(** :ref:`Camera3D` camera, :ref:`InputE 接收未处理的 :ref:`InputEvent`\ 。\ ``position`` 是鼠标指针在索引为 ``shape_idx`` 的形状表面上的世界空间位置,\ ``normal`` 是该点表面的法向量。连接到 :ref:`input_event` 信号即可轻松获取这些事件。 -\ **注意:**\ :ref:`_input_event` 要求 :ref:`input_ray_pickable` 为 ``true``\ ,并且至少要设置一个 :ref:`collision_layer` 位。 +\ **注意:**\ :ref:`_input_event` 要求 :ref:`input_ray_pickable` 为 ``true``\ ,并且至少要设置一个 :ref:`collision_layer` 位。 .. rst-class:: classref-item-separator ---- -.. _class_CollisionObject3D_method__mouse_enter: +.. _class_CollisionObject3D_private_method__mouse_enter: .. rst-class:: classref-method @@ -337,7 +337,7 @@ void **_mouse_enter** **(** **)** |virtual| ---- -.. _class_CollisionObject3D_method__mouse_exit: +.. _class_CollisionObject3D_private_method__mouse_exit: .. rst-class:: classref-method @@ -585,10 +585,10 @@ void **shape_owner_set_transform** **(** :ref:`int` owner_id, :ref:`T 设置给定形状所有者的 :ref:`Transform3D`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_collisionpolygon2d.rst b/classes/zh_CN/class_collisionpolygon2d.rst index 0a69b9f813..58499b18b2 100644 --- a/classes/zh_CN/class_collisionpolygon2d.rst +++ b/classes/zh_CN/class_collisionpolygon2d.rst @@ -10,23 +10,23 @@ CollisionPolygon2D ================== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 向 :ref:`CollisionObject2D` 父级提供多边形形状的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A node that provides a thickened polygon shape (a prism) to a :ref:`CollisionObject2D` parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an :ref:`Area2D` or turn :ref:`PhysicsBody2D` into a solid object. +一个节点,为 :ref:`CollisionObject2D` 父级提供加厚多边形形状(角柱体)并允许对其进行编辑。该多边形可以是凹的或凸的。这可以为 :ref:`Area2D` 提供检测形状,也能够将 :ref:`PhysicsBody2D` 转变为实体对象。 -\ **Warning:** A non-uniformly scaled :ref:`CollisionShape2D` will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead. +\ **警告:**\ 非均匀缩放的 :ref:`CollisionShape2D` 可能不会按预期运行。可改为确保在所有轴上保持其缩放相同,并调整其形状资源。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_CollisionPolygon2D_BuildMode: @@ -80,8 +80,8 @@ enum **BuildMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CollisionPolygon2D_property_build_mode: @@ -168,10 +168,10 @@ Property Descriptions \ **警告:**\ 返回值是 :ref:`PackedVector2Array` 的副本,不是引用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_collisionpolygon3d.rst b/classes/zh_CN/class_collisionpolygon3d.rst index e35f800bfc..94850dfe9c 100644 --- a/classes/zh_CN/class_collisionpolygon3d.rst +++ b/classes/zh_CN/class_collisionpolygon3d.rst @@ -10,14 +10,14 @@ CollisionPolygon3D ================== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 向 :ref:`CollisionObject3D` 父级提供加厚多边形形状(角柱体)的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 向 :ref:`CollisionObject3D` 父级提供加厚多边形形状(角柱体)的节点,能够为这个形状提供编辑的方法。该多边形可以是凹多边形,也可以是凸多边形。能够为 :ref:`Area3D` 提供检测形状,也能够将 :ref:`PhysicsBody3D` 变为实体。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CollisionPolygon3D_property_depth: @@ -114,12 +114,12 @@ Property Descriptions 顶点数组,定义局部 XY 平面上的 2D 多边形。 -\ **注意:**\ 返回值为原始值的副本。修改返回值大小或属性的方法不会影响原始的多边形。要修改该多边形的属性,请先将其赋值给临时变量,修改完成后再重新赋值给 ``polygon`` 成员。 +\ **注意:**\ 返回值为原始值的副本。修改返回值大小或属性的方法不会影响原始的多边形。要修改该多边形的属性,请先将其赋值给临时变量,修改完成后再重新赋值给该类属性。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_collisionshape2d.rst b/classes/zh_CN/class_collisionshape2d.rst index 2f4ae511d2..f98ee18f2f 100644 --- a/classes/zh_CN/class_collisionshape2d.rst +++ b/classes/zh_CN/class_collisionshape2d.rst @@ -10,21 +10,21 @@ CollisionShape2D ================ -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 向 :ref:`CollisionObject2D` 父级提供 :ref:`Shape2D` 的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 向 :ref:`CollisionObject2D` 父级提供 :ref:`Shape2D` 并允许对其进行编辑的节点。这可以为 :ref:`Area2D` 提供检测形状或将 :ref:`PhysicsBody2D` 转变为实体对象。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`物理介绍 <../tutorials/physics/physics_introduction>` @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -60,8 +60,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CollisionShape2D_property_debug_color: @@ -148,10 +148,10 @@ Property Descriptions 该碰撞形状拥有的实际形状。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_collisionshape3d.rst b/classes/zh_CN/class_collisionshape3d.rst index a3fb5e76d7..030c75b286 100644 --- a/classes/zh_CN/class_collisionshape3d.rst +++ b/classes/zh_CN/class_collisionshape3d.rst @@ -10,14 +10,14 @@ CollisionShape3D ================ -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 向 :ref:`CollisionObject3D` 父级提供 :ref:`Shape3D` 的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 向 :ref:`CollisionObject3D` 父级提供 :ref:`Shape3D` 并能够对其进行编辑的节点。可以为 :ref:`Area3D` 提供检测形状,也可以将 :ref:`PhysicsBody3D` 变为实体对象。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`物理介绍 <../tutorials/physics/physics_introduction>` @@ -38,8 +38,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -70,8 +70,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CollisionShape3D_property_disabled: @@ -109,8 +109,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CollisionShape3D_method_make_convex_from_siblings: @@ -130,12 +130,12 @@ void **make_convex_from_siblings** **(** **)** void **resource_changed** **(** :ref:`Resource` resource **)** -*Obsoleted.* Use :ref:`Resource.changed` instead. +*已废弃 * 请改用 :ref:`Resource.changed` 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_color.rst b/classes/zh_CN/class_color.rst index b237587491..de637e33a1 100644 --- a/classes/zh_CN/class_color.rst +++ b/classes/zh_CN/class_color.rst @@ -14,25 +14,25 @@ Color .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A color represented in RGBA format by a red (:ref:`r`), green (:ref:`g`), blue (:ref:`b`), and alpha (:ref:`a`) component. Each component is a 16-bit floating-point value, usually ranging from ``0.0`` to ``1.0``. Some properties (such as :ref:`CanvasItem.modulate`) may support values greater than ``1.0``, for overbright or HDR (High Dynamic Range) colors. +由红(\ :ref:`r`\ )、绿(\ :ref:`g`\ )、蓝(\ :ref:`b`\ )和 alpha(\ :ref:`a`\ )分量表示的 RGBA 格式的颜色。每个分量都是一个 16 位浮点值,通常介于 ``0.0`` 到 ``1.0`` 之间。某些属性(例如 :ref:`CanvasItem.modulate`\ )可能支持大于 ``1.0`` 的值,用于表示过亮或 HDR(High Dynamic Range,高动态范围)颜色。 -Colors can be created in various ways: By the various **Color** constructors, by static methods such as :ref:`from_hsv`, and by using a name from the set of standardized colors based on `X11 color names `__ with the addition of :ref:`TRANSPARENT`. GDScript also provides :ref:`@GDScript.Color8`, which uses integers from ``0`` to ``255`` and doesn't support overbright colors. +创建颜色的方法有很多:可以使用 **Color** 的各种构造函数,\ :ref:`from_hsv` 等静态方法,以及使用基于 `X11 颜色名称 `__\ 的标准化颜色集外加 :ref:`TRANSPARENT`\ 。GDScript 还提供了 :ref:`@GDScript.Color8`\ ,使用的是 ``0`` 到 ``255`` 之间的整数,且不支持过亮的颜色。 -\ **Note:** In a boolean context, a Color will evaluate to ``false`` if it is equal to ``Color(0, 0, 0, 1)`` (opaque black). Otherwise, a Color will always evaluate to ``true``. +\ **注意:**\ 在布尔上下文中,等于 ``Color(0, 0, 0, 1)``\ (不透明的黑色)的 Color 将被评估为 ``false``\ 。否则,Color 将始终被评估为 ``true``\ 。 -\ `Color constants cheatsheet `__ +\ `Color 常量速查表 `__ .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `2D GD 画图演示 `__ @@ -42,8 +42,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -74,8 +74,8 @@ Properties .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -98,8 +98,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -158,8 +158,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -198,8 +198,8 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Color_constant_ALICE_BLUE: @@ -1375,8 +1375,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Color_property_a: @@ -1512,8 +1512,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_Color_constructor_Color: @@ -1630,8 +1630,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Color_method_blend: @@ -1871,30 +1871,30 @@ Method Descriptions :ref:`bool` **html_is_valid** **(** :ref:`String` color **)** |static| -Returns ``true`` if ``color`` is a valid HTML hexadecimal color string. The string must be a hexadecimal value (case-insensitive) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign (``#``). This method is identical to :ref:`String.is_valid_html_color`. +如果 ``color`` 是一个有效的 HTML 十六进制颜色字符串,则返回 ``true``\ 。该字符串必须是一个由 3、4、6 或 8 位数字组成的十六进制值(不区分大小写),并且可以以井号 (``#``) 作为前缀。该方法与 :ref:`String.is_valid_html_color` 相同。 .. tabs:: .. code-tab:: gdscript - Color.html_is_valid("#55aaFF") # Returns true - Color.html_is_valid("#55AAFF20") # Returns true - Color.html_is_valid("55AAFF") # Returns true - Color.html_is_valid("#F2C") # Returns true + Color.html_is_valid("#55aaFF") # 返回 true + Color.html_is_valid("#55AAFF20") # 返回 true + Color.html_is_valid("55AAFF") # 返回 true + Color.html_is_valid("#F2C") # 返回 true - Color.html_is_valid("#AABBC") # Returns false - Color.html_is_valid("#55aaFF5") # Returns false + Color.html_is_valid("#AABBC") # 返回 false + Color.html_is_valid("#55aaFF5") # 返回 false .. code-tab:: csharp - Color.HtmlIsValid("#55AAFF"); // Returns true - Color.HtmlIsValid("#55AAFF20"); // Returns true - Color.HtmlIsValid("55AAFF"); // Returns true - Color.HtmlIsValid("#F2C"); // Returns true + Color.HtmlIsValid("#55AAFF"); // 返回 true + Color.HtmlIsValid("#55AAFF20"); // 返回 true + Color.HtmlIsValid("55AAFF"); // 返回 true + Color.HtmlIsValid("#F2C"); // 返回 true - Color.HtmlIsValid("#AABBC"); // Returns false - Color.HtmlIsValid("#55aaFF5"); // Returns false + Color.HtmlIsValid("#AABBC"); // 返回 false + Color.HtmlIsValid("#55aaFF5"); // 返回 false @@ -2224,8 +2224,8 @@ Returns ``true`` if ``color`` is a valid HTML hexadecimal color string. The stri .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Color_operator_neq_Color: @@ -2383,10 +2383,10 @@ Operator Descriptions 反转给定的颜色。这相当于 ``Color.WHITE - c`` 或 ``Color(1 - c.r, 1 - c.g, 1 - c.b, 1 - c.a)``\ 。与 :ref:`inverted` 不同,\ :ref:`a` 分量也将被反转。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_colorpicker.rst b/classes/zh_CN/class_colorpicker.rst index 9583dfa03b..59d34f3818 100644 --- a/classes/zh_CN/class_colorpicker.rst +++ b/classes/zh_CN/class_colorpicker.rst @@ -10,14 +10,14 @@ ColorPicker =========== -**Inherits:** :ref:`VBoxContainer` **<** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`VBoxContainer` **<** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 提供用于选择或修改颜色的界面的小工具。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 提供用于选择或修改颜色的界面的小工具。还可以提供取色器(吸管)、颜色模式、预设等功能。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `Tween 演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -86,8 +86,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -138,8 +138,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_ColorPicker_signal_color_changed: @@ -179,8 +179,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_ColorPicker_ColorModeType: @@ -280,8 +280,8 @@ HSL OK 颜色模型圆形色彩空间。 .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ColorPicker_property_can_add_swatches: @@ -472,8 +472,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ColorPicker_method_add_preset: @@ -553,8 +553,8 @@ void **erase_recent_preset** **(** :ref:`Color` color **)** .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_ColorPicker_theme_constant_center_slider_grabbers: @@ -562,7 +562,7 @@ Theme Property Descriptions :ref:`int` **center_slider_grabbers** = ``1`` -覆盖滑块的 :ref:`HSlider.center_grabber` 主题属性。 +覆盖滑块的 :ref:`Slider.center_grabber` 主题属性。 .. rst-class:: classref-item-separator @@ -780,10 +780,10 @@ OKHSL 颜色模式的 H 滑块的自定义纹理。 矩形轮拾取器形状的图标。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_colorpickerbutton.rst b/classes/zh_CN/class_colorpickerbutton.rst index 7ca4bd33e6..87f06d2041 100644 --- a/classes/zh_CN/class_colorpickerbutton.rst +++ b/classes/zh_CN/class_colorpickerbutton.rst @@ -10,14 +10,14 @@ ColorPickerButton ================= -**Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 点击后会显示 :ref:`ColorPicker` 的按钮。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 封装一个 :ref:`ColorPicker`\ ,按下按钮即可访问该控件。按下按钮会切换 :ref:`ColorPicker` 的可见性。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `GUI 拖放演示 `__ @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -66,45 +66,15 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`Color` | :ref:`font_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.9, 0.9, 0.9, 0.3)`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`Color` | :ref:`font_focus_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`Color` | :ref:`font_hover_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`Color` | :ref:`font_pressed_color` | ``Color(0.8, 0.8, 0.8, 1)`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`int` | :ref:`h_separation` | ``4`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`int` | :ref:`outline_size` | ``0`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`Font` | :ref:`font` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`int` | :ref:`font_size` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`Texture2D` | :ref:`bg` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`StyleBox` | :ref:`disabled` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`StyleBox` | :ref:`focus` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`StyleBox` | :ref:`hover` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`StyleBox` | :ref:`normal` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ - | :ref:`StyleBox` | :ref:`pressed` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------------------------------+ + +-----------------------------------+--------------------------------------------------+ + | :ref:`Texture2D` | :ref:`bg` | + +-----------------------------------+--------------------------------------------------+ .. rst-class:: classref-section-separator @@ -112,8 +82,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_ColorPickerButton_signal_color_changed: @@ -153,8 +123,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ColorPickerButton_property_color: @@ -192,8 +162,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ColorPickerButton_method_get_picker: @@ -225,130 +195,8 @@ Method Descriptions .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- - -.. _class_ColorPickerButton_theme_color_font_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_color** = ``Color(1, 1, 1, 1)`` - -**ColorPickerButton** 的默认文本颜色 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_color_font_disabled_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_disabled_color** = ``Color(0.9, 0.9, 0.9, 0.3)`` - -禁用 **ColorPickerButton** 时使用的文本颜色 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_color_font_focus_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_focus_color** = ``Color(1, 1, 1, 1)`` - -当 **ColorPickerButton** 获得焦点时使用的文本颜色 :ref:`Color`\ 。只替换按钮的正常文本颜色。禁用、悬停和按下状态优先于这个颜色。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_color_font_hover_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_hover_color** = ``Color(1, 1, 1, 1)`` - -悬停 **ColorPickerButton** 时使用的文本 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_color_font_outline_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` - -**ColorPickerButton** 文本轮廓的色调。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_color_font_pressed_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_pressed_color** = ``Color(0.8, 0.8, 0.8, 1)`` - -按下 **ColorPickerButton** 时使用的文本颜色 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_constant_h_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **h_separation** = ``4`` - -**ColorPickerButton** 的图标和文本之间的水平间距。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_constant_outline_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **outline_size** = ``0`` - -文字轮廓的大小。 - -\ **注意:**\ 如果使用启用了 :ref:`FontFile.multichannel_signed_distance_field` 的字体,其 :ref:`FontFile.msdf_pixel_range` 必须至少设置为 :ref:`outline_size` 的\ *两倍*\ ,轮廓渲染才能看起来正确。否则,轮廓可能会比预期的更早被切断。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_font_font: - -.. rst-class:: classref-themeproperty - -:ref:`Font` **font** - -**ColorPickerButton** 文本的 :ref:`Font`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_font_size_font_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **font_size** - -**ColorPickerButton** 文本的字体大小。 - -.. rst-class:: classref-item-separator - ----- +主题属性说明 +------------ .. _class_ColorPickerButton_theme_icon_bg: @@ -358,70 +206,10 @@ Theme Property Descriptions 颜色预览的背景将在按钮上显示。 -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_style_disabled: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **disabled** - -该 **ColorPickerButton** 处于禁用状态时使用的 :ref:`StyleBox`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_style_focus: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **focus** - -该 **ColorPickerButton** 处于聚焦状态时使用的 :ref:`StyleBox`\ 。\ ``focus`` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,所以应该使用部分透明的 :ref:`StyleBox`\ ,确保基础 :ref:`StyleBox` 仍然可见。代表轮廓或下划线的 :ref:`StyleBox` 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 :ref:`StyleBoxEmpty` 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的可用性,所以出于可访问性的原因,不建议这样做。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_style_hover: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **hover** - -该 **ColorPickerButton** 处于悬停状态时使用的 :ref:`StyleBox`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_style_normal: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **normal** - -该 **ColorPickerButton** 的默认 :ref:`StyleBox`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_ColorPickerButton_theme_style_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **pressed** - -该 **ColorPickerButton** 处于按下状态时使用的 :ref:`StyleBox`\ 。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_colorrect.rst b/classes/zh_CN/class_colorrect.rst index d78c5d52b8..ec67506af1 100644 --- a/classes/zh_CN/class_colorrect.rst +++ b/classes/zh_CN/class_colorrect.rst @@ -10,28 +10,28 @@ ColorRect ========= -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 显示单色矩形的控件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 显示一个用纯色 :ref:`color` 填充的矩形。如果你需要单独显示边框,请考虑改用 :ref:`Panel`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `2D Dodge The Creeps 演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +46,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ColorRect_property_color: @@ -62,10 +62,10 @@ Property Descriptions 该矩形的填充颜色。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_compressedcubemap.rst b/classes/zh_CN/class_compressedcubemap.rst index 2dece95e4b..5088b6d980 100644 --- a/classes/zh_CN/class_compressedcubemap.rst +++ b/classes/zh_CN/class_compressedcubemap.rst @@ -10,14 +10,14 @@ CompressedCubemap ================= -**Inherits:** :ref:`CompressedTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`CompressedTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -An optionally compressed :ref:`Cubemap`. +可选压缩的 :ref:`Cubemap` 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 一种从 ``.ccube`` 文件加载的立方体贴图。这种文件格式是 Godot 内部使用的;它是通过导入系统导入其他图像格式创建的。\ **CompressedCubemap** 可以使用 4 种压缩方法中的一种: @@ -37,10 +37,10 @@ Description 有关立方体贴图的一般描述,请参阅 :ref:`Cubemap`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_compressedcubemaparray.rst b/classes/zh_CN/class_compressedcubemaparray.rst index 9c734a194b..05fa42eb02 100644 --- a/classes/zh_CN/class_compressedcubemaparray.rst +++ b/classes/zh_CN/class_compressedcubemaparray.rst @@ -10,14 +10,14 @@ CompressedCubemapArray ====================== -**Inherits:** :ref:`CompressedTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`CompressedTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -An optionally compressed :ref:`CubemapArray`. +一个可选压缩的 :ref:`CubemapArray` 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 一种从 ``.ccubearray`` 文件加载的立方体贴图数组。这种文件格式是 Godot 内部使用的;它是通过导入系统导入其他图像格式创建的。\ **CompressedCubemapArray** 可以使用 4 种压缩方法中的一种: @@ -37,10 +37,10 @@ Description 有关立方体贴图数组的一般说明,请参阅 :ref:`CubemapArray`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_compressedtexture2d.rst b/classes/zh_CN/class_compressedtexture2d.rst index e25e6e6183..697a6debf5 100644 --- a/classes/zh_CN/class_compressedtexture2d.rst +++ b/classes/zh_CN/class_compressedtexture2d.rst @@ -10,14 +10,14 @@ CompressedTexture2D =================== -**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 二维纹理,可选择压缩。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 一种从 ``.ctex`` 文件加载的纹理。这种文件格式是 Godot 内部使用的;它是通过导入系统导入其他图像格式创建的。\ **CompressedTexture2D** 可以使用 4 种压缩方法中的一种(包括没有任何压缩): @@ -37,8 +37,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -51,8 +51,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -67,8 +67,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CompressedTexture2D_property_load_path: @@ -89,8 +89,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CompressedTexture2D_method_load: @@ -100,10 +100,10 @@ Method Descriptions 从指定的路径 ``path`` 加载纹理。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_compressedtexture2darray.rst b/classes/zh_CN/class_compressedtexture2darray.rst index d4541ef678..ef30f6a7f6 100644 --- a/classes/zh_CN/class_compressedtexture2darray.rst +++ b/classes/zh_CN/class_compressedtexture2darray.rst @@ -10,14 +10,14 @@ CompressedTexture2DArray ======================== -**Inherits:** :ref:`CompressedTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`CompressedTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 二维纹理的数组,可选择压缩。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 一种从 ``.ctexarray`` 文件加载的纹理数组。这种文件格式是 Godot 内部使用的;它是通过导入系统导入其他图像格式创建的。\ **CompressedTexture2DArray** 可以使用 4 种压缩方法中的一种: @@ -37,10 +37,10 @@ Description 有关纹理数组的一般描述,请参阅 :ref:`Texture2DArray`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_compressedtexture3d.rst b/classes/zh_CN/class_compressedtexture3d.rst index 2d709b6527..4a6e04a9c3 100644 --- a/classes/zh_CN/class_compressedtexture3d.rst +++ b/classes/zh_CN/class_compressedtexture3d.rst @@ -10,14 +10,14 @@ CompressedTexture3D =================== -**Inherits:** :ref:`Texture3D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture3D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 三维纹理,可选择压缩。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **CompressedTexture3D** 是 :ref:`ImageTexture3D` 的 VRAM 压缩对应物。\ **CompressedTexture3D** 文件的文件扩展名为 ``.ctex3d``\ 。这种文件格式是 Godot 内部使用的;它是通过导入系统导入其他图像格式创建的。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CompressedTexture3D_property_load_path: @@ -77,8 +77,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CompressedTexture3D_method_load: @@ -88,10 +88,10 @@ Method Descriptions 从指定的路径 ``path`` 加载纹理。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_compressedtexturelayered.rst b/classes/zh_CN/class_compressedtexturelayered.rst index 4c91ebd7c6..0ffdf4e9da 100644 --- a/classes/zh_CN/class_compressedtexturelayered.rst +++ b/classes/zh_CN/class_compressedtexturelayered.rst @@ -10,23 +10,23 @@ CompressedTextureLayered ======================== -**Inherits:** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`CompressedCubemap`, :ref:`CompressedCubemapArray`, :ref:`CompressedTexture2DArray` +**派生:** :ref:`CompressedCubemap`, :ref:`CompressedCubemapArray`, :ref:`CompressedTexture2DArray` 可压缩纹理数组的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`CompressedTexture2DArray` 和 :ref:`CompressedTexture3D` 的基类。不能直接使用,但包含了访问派生资源类型所需的所有函数。另见 :ref:`TextureLayered`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -37,8 +37,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -53,8 +53,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CompressedTextureLayered_property_load_path: @@ -75,8 +75,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CompressedTextureLayered_method_load: @@ -86,10 +86,10 @@ Method Descriptions 加载位于 ``path`` 的纹理。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_concavepolygonshape2d.rst b/classes/zh_CN/class_concavepolygonshape2d.rst index ef2fc8c449..faccc6fbfd 100644 --- a/classes/zh_CN/class_concavepolygonshape2d.rst +++ b/classes/zh_CN/class_concavepolygonshape2d.rst @@ -10,29 +10,29 @@ ConcavePolygonShape2D ===================== -**Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于物理碰撞的 2D 多线段形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A 2D polyline shape, intended for use in physics. Used internally in :ref:`CollisionPolygon2D` when it's in :ref:`CollisionPolygon2D.BUILD_SEGMENTS` mode. +一种 2D 折线形状,用于物理运算。当 :ref:`CollisionPolygon2D` 处于 :ref:`CollisionPolygon2D.BUILD_SEGMENTS` 模式时,会在其内部使用。 -Being just a collection of interconnected line segments, **ConcavePolygonShape2D** is the most freely configurable single 2D shape. It can be used to form polygons of any nature, or even shapes that don't enclose an area. However, :ref:`ConvexPolygonShape2D` is *hollow* even if the interconnected line segments do enclose an area, which often makes it unsuitable for physics or detection. +作为一组相互连接线段,\ **ConcavePolygonShape2D** 是最自由的可配置的单一 2D 形状。它可以用于形成任何性质的多边形,甚至是不封闭区域的形状。然而,即使相互连接的线段确实封闭了一个区域,\ **ConcavePolygonShape2D** 仍然是\ *中空的*\ ,这常常使其不适用于物理模拟或碰撞检测。 -\ **Note:** When used for collision, **ConcavePolygonShape2D** is intended to work with static :ref:`CollisionShape2D` nodes like :ref:`StaticBody2D` and will likely not behave well for :ref:`CharacterBody2D`\ s or :ref:`RigidBody2D`\ s in a mode other than Static. +\ **注意:**\ 当用于碰撞计算时,\ **ConcavePolygonShape2D** 旨在与 :ref:`StaticBody2D` 等静态 :ref:`CollisionShape2D` 节点一起使用,并且对于 :ref:`CharacterBody2D` 或 :ref:`RigidBody2D`\ ,在除静态模式之外的其他模式下可能表现不佳。 -\ **Warning:** Physics bodies that are small have a chance to clip through this shape when moving fast. This happens because on one frame, the physics body may be on the "outside" of the shape, and on the next frame it may be "inside" it. **ConcavePolygonShape2D** is hollow, so it won't detect a collision. +\ **警告:**\ 较小的物理物体在快速移动时有机会穿过该形状。发生这种情况是因为在一帧上,物理物体可能位于形状的“外部”,而在下一帧上,它可能位于形状的“内部”。由于\ **ConcavePolygonShape2D** 是中空的,因此它不会检测到碰撞。 -\ **Performance:** Due to its complexity, **ConcavePolygonShape2D** is the slowest 2D collision shape to check collisions against. Its use should generally be limited to level geometry. If the polyline is closed, :ref:`CollisionPolygon2D`'s :ref:`CollisionPolygon2D.BUILD_SOLIDS` mode can be used, which decomposes the polygon into convex ones; see :ref:`ConvexPolygonShape2D`'s documentation for instructions. +\ **性能:**\ 由于其复杂性, **ConcavePolygonShape2D** 是检测碰撞最慢的 2D 碰撞形状。它的使用一般仅限于关卡几何体。如果折线是闭合的,可以使用 :ref:`CollisionPolygon2D` 的 :ref:`CollisionPolygon2D.BUILD_SOLIDS` 模式,它会将多边形分解成凸多边形;相关说明请参阅 :ref:`ConvexPolygonShape2D` 文档。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ConcavePolygonShape2D_property_segments: @@ -63,10 +63,10 @@ Property Descriptions 顶点数组,构成 **ConcavePolygonShape2D** 的线段。该(长度能被二整除的)数组自然两两分组(每组代表一条线段);每组都由一条线段的起点和终点构成。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_concavepolygonshape3d.rst b/classes/zh_CN/class_concavepolygonshape3d.rst index 26cafe23b6..861a8ada2a 100644 --- a/classes/zh_CN/class_concavepolygonshape3d.rst +++ b/classes/zh_CN/class_concavepolygonshape3d.rst @@ -10,36 +10,36 @@ ConcavePolygonShape3D ===================== -**Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于物理碰撞的 3D 三角网格形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -一种用于物理模拟的三维三角网格形状。通常用于为 :ref:`CollisionShape3D` 提供形状。 +一种用于物理模拟的 3D 三角网格形状。通常用于为 :ref:`CollisionShape3D` 提供形状。 -作为一组相互连接的三角形, **ConcavePolygonShape3D** 是最自由配置的单一三维形状之一。它可以用于形成任何性质的多面体,甚至是不封闭体积的形状。然而,即使相互连接的三角形封闭了一个体积, :ref:`ConvexPolygonShape3D` 仍然是\ *中空*\ 的,这常常使其不适用于物理模拟或碰撞检测。 +作为一组相互连接的三角形, **ConcavePolygonShape3D** 是最自由的可配置的单一 3D 形状。它可以用于形成任何性质的多面体,甚至是不封闭体积的形状。然而,即使相互连接的三角形封闭了一个体积, :ref:`ConvexPolygonShape3D` 仍然是\ *中空*\ 的,这常常使其不适用于物理模拟或碰撞检测。 -\ **注意:**\ 当用于碰撞计算时, **ConcavePolygonShape3D** 旨在与静态的 :ref:`CollisionShape3D` 节点一起使用,如 :ref:`StaticBody3D` 。并且可能不适用于处于除静态外的其他模式下的 :ref:`CharacterBody3D` 或 :ref:`RigidBody3D` 。 +\ **注意:**\ 当用于碰撞计算时, **ConcavePolygonShape3D** 旨在与 :ref:`StaticBody3D` 等静态 :ref:`CollisionShape3D` 节点一起使用 。并且对于 :ref:`CharacterBody3D` 或 :ref:`RigidBody3D`\ ,在除静态模式之外的其他模式下可能表现不佳。 -\ **警告:**\ 当移动速度较快时,较小的物体有可能穿过该形状。这是因为在一帧中,物理体可能在形状的“外部”,而在下一帧中可能在其“内部”。 **ConcavePolygonShape3D** 是中空的,因此不会检测到碰撞。 +\ **警告:**\ 较小的物理物体在快速移动时有机会穿过该形状。发生这种情况是因为在一帧上,物理物体可能位于形状的“外部”,而在下一帧上,它可能位于形状的“内部”。由于\ **ConcavePolygonShape3D** 是中空的,因此它不会检测到碰撞。 -\ **性能:**\ 由于其复杂性, **ConcavePolygonShape3D** 是用于检测三维碰撞的形状中最慢的。它的使用通常应限制在关卡几何体上。对于凸几何体,应使用 :ref:`ConvexPolygonShape3D` 。对于需要凹碰撞的动态物体,可以使用多个 :ref:`ConvexPolygonShape3D` 通过凸分解来表示其碰撞;请参阅 :ref:`ConvexPolygonShape3D` 的文档以获取指示。 +\ **性能:**\ 由于其复杂性, **ConcavePolygonShape3D** 是检测碰撞最慢的 3D 碰撞形状。它的使用一般仅限于关卡几何体。对于凸几何体,应使用 :ref:`ConvexPolygonShape3D` 。对于需要凹碰撞的动态物体,可以使用多个 :ref:`ConvexPolygonShape3D` 通过凸分解来表示其碰撞;相关说明请参阅 :ref:`ConvexPolygonShape3D` 文档。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 物理测试演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -68,8 +68,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ConcavePolygonShape3D_property_backface_collision: @@ -90,8 +90,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ConcavePolygonShape3D_method_get_faces: @@ -113,10 +113,10 @@ void **set_faces** **(** :ref:`PackedVector3Array` fac 根据顶点数组设置三角网格形状的面。\ ``faces`` 数组应更多由若干三元组构成,每三个顶点定义一个三角形。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_conetwistjoint3d.rst b/classes/zh_CN/class_conetwistjoint3d.rst index 36004b4e73..ccf0cbc2a7 100644 --- a/classes/zh_CN/class_conetwistjoint3d.rst +++ b/classes/zh_CN/class_conetwistjoint3d.rst @@ -10,21 +10,21 @@ ConeTwistJoint3D ================ -**Inherits:** :ref:`Joint3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Joint3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 以模拟球窝关节的方式连接两个 3D 物理物体的物理关节。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 以模拟球窝关节的方式连接两个 3D 物理物体的物理关节。扭转轴被初始化为 **ConeTwistJoint3D** 的 X 轴。一旦物理体摆动,扭转轴将被计算为两个物理体局部空间中关节的 X 轴的中间值。可用作肩膀、臀部等肢体,也可以用作从天花板荡下的灯之类的对象。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -61,8 +61,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_ConeTwistJoint3D_Param: @@ -134,8 +134,8 @@ enum **Param**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ConeTwistJoint3D_property_bias: @@ -234,8 +234,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ConeTwistJoint3D_method_get_param: @@ -257,10 +257,10 @@ void **set_param** **(** :ref:`Param` param, :ref:` 设置指定参数的值。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_configfile.rst b/classes/zh_CN/class_configfile.rst index e10b214a3a..29fc77873c 100644 --- a/classes/zh_CN/class_configfile.rst +++ b/classes/zh_CN/class_configfile.rst @@ -10,14 +10,14 @@ ConfigFile ========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 用于处理 INI 样式文件的辅助类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该辅助类可用于使用 INI 样式格式在文件系统上存储 :ref:`Variant` 值。存储的值由一个小节和一个键标识: @@ -124,8 +124,8 @@ ConfigFiles 还可以包含以分号(\ ``;``\ )开头的手动编写的注 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -172,8 +172,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ConfigFile_method_clear: @@ -291,7 +291,7 @@ void **erase_section_key** **(** :ref:`String` section, :ref:`Stri 加载指定为参数的配置文件。解析文件的内容并将其加载到调用该方法的 **ConfigFile** 对象中。 -返回 :ref:`Error` 错误码常量(成功时为 :ref:`@GlobalScope.OK`\ )。 +成功时返回 :ref:`@GlobalScope.OK`\ ;如果操作失败,则返回其他 :ref:`Error` 值。 .. rst-class:: classref-item-separator @@ -305,7 +305,7 @@ void **erase_section_key** **(** :ref:`String` section, :ref:`Stri 加载指定为参数的加密配置文件,使用提供的 ``key`` 对其解密。解析文件的内容并将其加载到调用该方法的 **ConfigFile** 对象中。 -返回 :ref:`Error` 错误码常量(成功时为 :ref:`@GlobalScope.OK`\ )。 +成功时返回 :ref:`@GlobalScope.OK`\ ;如果操作失败,则返回其他 :ref:`Error` 值。 .. rst-class:: classref-item-separator @@ -319,7 +319,7 @@ void **erase_section_key** **(** :ref:`String` section, :ref:`Stri 加载作为参数的加密配置文件,使用提供的 ``password`` 解密。该文件的内容被解析并加载到调用该方法的 **ConfigFile** 对象中。 -返回 :ref:`Error` 错误码常量(成功时为 :ref:`@GlobalScope.OK`\ )。 +成功时返回 :ref:`@GlobalScope.OK`\ ;如果操作失败,则返回其他 :ref:`Error` 值。 .. rst-class:: classref-item-separator @@ -333,7 +333,7 @@ void **erase_section_key** **(** :ref:`String` section, :ref:`Stri 将传递的字符串解析为配置文件的内容。该字符串被解析并加载到调用该方法的 ConfigFile 对象中。 -返回 :ref:`Error` 错误码常量(成功时为 :ref:`@GlobalScope.OK`\ )。 +成功时返回 :ref:`@GlobalScope.OK`\ ;如果操作失败,则返回其他 :ref:`Error` 值。 .. rst-class:: classref-item-separator @@ -347,7 +347,7 @@ void **erase_section_key** **(** :ref:`String` section, :ref:`Stri 将 **ConfigFile** 对象的内容保存到指定为参数的文件中。输出文件使用 INI 样式的结构。 -返回 :ref:`Error` 错误码常量(成功时为 :ref:`@GlobalScope.OK`\ )。 +成功时返回 :ref:`@GlobalScope.OK`\ ;如果操作失败,则返回其他 :ref:`Error` 值。 .. rst-class:: classref-item-separator @@ -361,7 +361,7 @@ void **erase_section_key** **(** :ref:`String` section, :ref:`Stri 使用提供的 ``key`` 将 **ConfigFile** 对象的内容保存到作为参数指定的 AES-256 加密文件中。输出文件使用 INI 样式的结构。 -返回 :ref:`Error` 错误码常量(成功时为 :ref:`@GlobalScope.OK`\ )。 +成功时返回 :ref:`@GlobalScope.OK`\ ;如果操作失败,则返回其他 :ref:`Error` 值。 .. rst-class:: classref-item-separator @@ -375,7 +375,7 @@ void **erase_section_key** **(** :ref:`String` section, :ref:`Stri 将 **ConfigFile** 对象的内容保存到作为参数指定的 AES-256 加密文件中,使用提供的 ``password`` 进行加密。输出文件使用 INI 风格的结构。 -返回 :ref:`Error` 错误码常量(成功时为 :ref:`@GlobalScope.OK`\ )。 +成功时返回 :ref:`@GlobalScope.OK`\ ;如果操作失败,则返回其他 :ref:`Error` 值。 .. rst-class:: classref-item-separator @@ -389,10 +389,10 @@ void **set_value** **(** :ref:`String` section, :ref:`String` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`AcceptDialog` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`EditorCommandPalette`, :ref:`EditorFileDialog`, :ref:`FileDialog`, :ref:`ScriptCreateDialog` +**派生:** :ref:`EditorCommandPalette`, :ref:`EditorFileDialog`, :ref:`FileDialog`, :ref:`ScriptCreateDialog` 用于确认动作的对话框。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于确认动作的对话框。这个窗口类似于 :ref:`AcceptDialog`\ ,但按下“取消”按钮和按下“确定”按钮的效果是不同的。这两个按钮的顺序取决于主机操作系统。 @@ -40,8 +40,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -74,8 +74,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ConfirmationDialog_property_cancel_button_text: @@ -96,8 +96,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ConfirmationDialog_method_get_cancel_button: @@ -109,10 +109,10 @@ Method Descriptions \ **警告:**\ 这是一个必需的内部节点,移除并释放它可能会导致崩溃。如果你希望隐藏它或其任何子项,请使用其 :ref:`CanvasItem.visible` 属性。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_container.rst b/classes/zh_CN/class_container.rst index 907bd22f39..f67f10f942 100644 --- a/classes/zh_CN/class_container.rst +++ b/classes/zh_CN/class_container.rst @@ -10,30 +10,30 @@ Container ========= -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AspectRatioContainer`, :ref:`BoxContainer`, :ref:`CenterContainer`, :ref:`EditorProperty`, :ref:`FlowContainer`, :ref:`GraphElement`, :ref:`GridContainer`, :ref:`MarginContainer`, :ref:`PanelContainer`, :ref:`ScrollContainer`, :ref:`SplitContainer`, :ref:`SubViewportContainer`, :ref:`TabContainer` +**派生:** :ref:`AspectRatioContainer`, :ref:`BoxContainer`, :ref:`CenterContainer`, :ref:`EditorProperty`, :ref:`FlowContainer`, :ref:`GraphElement`, :ref:`GridContainer`, :ref:`MarginContainer`, :ref:`PanelContainer`, :ref:`ScrollContainer`, :ref:`SplitContainer`, :ref:`SubViewportContainer`, :ref:`TabContainer` 所有 GUI 容器的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 所有 GUI 容器的基础节点。\ **Container** 包含其他控件,并自动以某种方式排列它们。可以继承此类来生成自定义的容器类。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -44,16 +44,16 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`_get_allowed_size_flags_horizontal` **(** **)** |virtual| |const| | + | :ref:`PackedInt32Array` | :ref:`_get_allowed_size_flags_horizontal` **(** **)** |virtual| |const| | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`_get_allowed_size_flags_vertical` **(** **)** |virtual| |const| | + | :ref:`PackedInt32Array` | :ref:`_get_allowed_size_flags_vertical` **(** **)** |virtual| |const| | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`fit_child_in_rect` **(** :ref:`Control` child, :ref:`Rect2` rect **)** | +-------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -66,8 +66,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Container_signal_pre_sort_children: @@ -95,8 +95,8 @@ Signals .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Container_constant_NOTIFICATION_PRE_SORT_CHILDREN: @@ -120,10 +120,10 @@ Constants .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_Container_method__get_allowed_size_flags_horizontal: +.. _class_Container_private_method__get_allowed_size_flags_horizontal: .. rst-class:: classref-method @@ -137,7 +137,7 @@ Method Descriptions ---- -.. _class_Container_method__get_allowed_size_flags_vertical: +.. _class_Container_private_method__get_allowed_size_flags_vertical: .. rst-class:: classref-method @@ -171,10 +171,10 @@ void **queue_sort** **(** **)** 将子节点的重排加入队列。虽然会被自动调用,但也可以在需要时手动调用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_control.rst b/classes/zh_CN/class_control.rst index df73d62d50..dc0be25813 100644 --- a/classes/zh_CN/class_control.rst +++ b/classes/zh_CN/class_control.rst @@ -10,16 +10,16 @@ Control ======= -**Inherits:** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`BaseButton`, :ref:`ColorRect`, :ref:`Container`, :ref:`GraphEdit`, :ref:`ItemList`, :ref:`Label`, :ref:`LineEdit`, :ref:`MenuBar`, :ref:`NinePatchRect`, :ref:`Panel`, :ref:`Range`, :ref:`ReferenceRect`, :ref:`RichTextLabel`, :ref:`Separator`, :ref:`TabBar`, :ref:`TextEdit`, :ref:`TextureRect`, :ref:`Tree`, :ref:`VideoStreamPlayer` +**派生:** :ref:`BaseButton`, :ref:`ColorRect`, :ref:`Container`, :ref:`GraphEdit`, :ref:`ItemList`, :ref:`Label`, :ref:`LineEdit`, :ref:`MenuBar`, :ref:`NinePatchRect`, :ref:`Panel`, :ref:`Range`, :ref:`ReferenceRect`, :ref:`RichTextLabel`, :ref:`Separator`, :ref:`TabBar`, :ref:`TextEdit`, :ref:`TextureRect`, :ref:`Tree`, :ref:`VideoStreamPlayer` 所有 GUI 控件的基类。根据其父控件调整其位置和大小。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 所有 UI 相关节点的基类。\ **Control** 具有定义其范围的边界矩形,相对于父控件或当前视口的锚点位置,以及相对于锚点的偏移。当节点、任何父节点或屏幕尺寸发生变化时,偏移就会自动更新。 @@ -29,9 +29,9 @@ Description Godot 使用视口来传播输入事件。视口负责将 :ref:`InputEvent` 传播给它的子节点。因为 :ref:`SceneTree.root` 是 :ref:`Window`\ ,所以游戏中的所有 UI 元素都会自动进行传播。 -输入事件通过调用 :ref:`Node._input` 在 :ref:`SceneTree` 中传播,从根节点传播到所有子节点。对 UI 元素而言,覆盖的最好是 :ref:`_gui_input`\ ,可以过滤掉无关的输入事件,例如它会对 Z 顺序、\ :ref:`mouse_filter`\ 、焦点、事件是否在该控件的边界框内等条件进行检查。 +输入事件通过调用 :ref:`Node._input` 在 :ref:`SceneTree` 中传播,从根节点传播到所有子节点。对 UI 元素而言,覆盖的最好是 :ref:`_gui_input`\ ,可以过滤掉无关的输入事件,例如它会对 Z 顺序、\ :ref:`mouse_filter`\ 、焦点、事件是否在该控件的边界框内等条件进行检查。 -请调用 :ref:`accept_event`\ ,这样其他节点就不会收到该事件。输入被接受后,就会被标记为已处理,\ :ref:`Node._unhandled_input` 不会对它进行处理。 +请调用 :ref:`accept_event`\ ,这样其他节点就不会收到该事件。输入被接受后,就会被标记为已处理,\ :ref:`Node._unhandled_input` 不会对它进行处理。 只能有一个 **Control** 节点处于焦点。只有处于焦点的节点才会接收到事件。要获得焦点,请调用 :ref:`grab_focus`\ 。导致 **Control** 节点失去焦点的情况有:其他节点获得了焦点、隐藏了聚焦节点。 @@ -43,8 +43,8 @@ Godot 使用视口来传播输入事件。视口负责将 :ref:`InputEvent` @@ -58,8 +58,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -146,30 +146,30 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_can_drop_data` **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| |const| | + | :ref:`bool` | :ref:`_can_drop_data` **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| |const| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_drop_data` **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| | + | void | :ref:`_drop_data` **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_drag_data` **(** :ref:`Vector2` at_position **)** |virtual| | + | :ref:`Variant` | :ref:`_get_drag_data` **(** :ref:`Vector2` at_position **)** |virtual| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_minimum_size` **(** **)** |virtual| |const| | + | :ref:`Vector2` | :ref:`_get_minimum_size` **(** **)** |virtual| |const| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_tooltip` **(** :ref:`Vector2` at_position **)** |virtual| |const| | + | :ref:`String` | :ref:`_get_tooltip` **(** :ref:`Vector2` at_position **)** |virtual| |const| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_gui_input` **(** :ref:`InputEvent` event **)** |virtual| | + | void | :ref:`_gui_input` **(** :ref:`InputEvent` event **)** |virtual| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_point` **(** :ref:`Vector2` point **)** |virtual| |const| | + | :ref:`bool` | :ref:`_has_point` **(** :ref:`Vector2` point **)** |virtual| |const| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`_make_custom_tooltip` **(** :ref:`String` for_text **)** |virtual| |const| | + | :ref:`Object` | :ref:`_make_custom_tooltip` **(** :ref:`String` for_text **)** |virtual| |const| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i[]` | :ref:`_structured_text_parser` **(** :ref:`Array` args, :ref:`String` text **)** |virtual| |const| | + | :ref:`Vector3i[]` | :ref:`_structured_text_parser` **(** :ref:`Array` args, :ref:`String` text **)** |virtual| |const| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`accept_event` **(** **)** | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -193,6 +193,8 @@ Methods +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Control` | :ref:`find_prev_valid_focus` **(** **)** |const| | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`find_valid_focus_neighbor` **(** :ref:`Side` side **)** |const| | + +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`force_drag` **(** :ref:`Variant` data, :ref:`Control` preview **)** | +----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_anchor` **(** :ref:`Side` side **)** |const| | @@ -330,8 +332,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Control_signal_focus_entered: @@ -387,9 +389,9 @@ Signals **mouse_entered** **(** **)** -Emitted when the mouse cursor enters the control's visible area, that is not occluded behind other Controls or Windows, provided its :ref:`mouse_filter` lets the event reach it and regardless if it's currently focused or not. +当鼠标光标进入控件(或任何子控件)的可见区域时发出,可见区域即未被其他 Control 和 Window 遮挡的区域,需要 :ref:`mouse_filter` 允许事件达到,与控件是否持有焦点无关。 -\ **Note:** :ref:`CanvasItem.z_index` doesn't affect, which Control receives the signal. +\ **注意:**\ :ref:`CanvasItem.z_index` 不影响哪个 Control 会收到信号。 .. rst-class:: classref-item-separator @@ -401,17 +403,17 @@ Emitted when the mouse cursor enters the control's visible area, that is not occ **mouse_exited** **(** **)** -Emitted when the mouse cursor leaves the control's visible area, that is not occluded behind other Controls or Windows, provided its :ref:`mouse_filter` lets the event reach it and regardless if it's currently focused or not. +当鼠标光标离开控件(或任何子控件)的可见区域时发出,可见区域即未被其他 Control 和 Window 遮挡的区域,需要 :ref:`mouse_filter` 允许事件达到,与控件是否持有焦点无关。 -\ **Note:** :ref:`CanvasItem.z_index` doesn't affect, which Control receives the signal. +\ **注意:**\ :ref:`CanvasItem.z_index` 不影响哪个 Control 会收到信号。 -\ **Note:** If you want to check whether the mouse truly left the area, ignoring any top nodes, you can use code like this: +\ **注意:**\ 如果要忽略任何顶部节点,检查鼠标是否真的离开了该区域,可以使用如下代码: :: func _on_mouse_exited(): if not Rect2(Vector2(), size).has_point(get_local_mouse_position()): - # Not hovering over area. + # 未悬停在区域上。 .. rst-class:: classref-item-separator @@ -455,8 +457,8 @@ Emitted when the mouse cursor leaves the control's visible area, that is not occ .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Control_FocusMode: @@ -890,7 +892,7 @@ enum **MouseFilter**: :ref:`MouseFilter` **MOUSE_FILTER_STOP** = ``0`` -The control will receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input`. And the control will receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. +在控件上点击时,将通过 :ref:`_gui_input` 收到鼠标移动输入事件和鼠标按钮输入事件。控件能够接收到 :ref:`mouse_entered` 和 :ref:`mouse_exited` 信号。这些事件将自动被标记为已处理,不会进一步传播到其他控件。这也会导致其他控件中的信号被阻止。 .. _class_Control_constant_MOUSE_FILTER_PASS: @@ -898,7 +900,7 @@ The control will receive mouse movement input events and mouse button input even :ref:`MouseFilter` **MOUSE_FILTER_PASS** = ``1`` -The control will receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input`. And the control will receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. If no control handled it, the event will be passed to :ref:`Node._shortcut_input` for further processing. +在控件上点击时,将通过 :ref:`_gui_input` 收到鼠标移动输入事件和鼠标按钮输入事件。并且控件能够接收到 :ref:`mouse_entered` 和 :ref:`mouse_exited` 信号。如果此控件不处理事件,则将考虑其父控件(如果有的话),依此类推,直到没有更多的父控件可以处理该事件。这也允许信号在其他控件中触发。如果没有控件处理它,该事件将被传递到 :ref:`Node._shortcut_input` 进行进一步处理。 .. _class_Control_constant_MOUSE_FILTER_IGNORE: @@ -906,7 +908,9 @@ The control will receive mouse movement input events and mouse button input even :ref:`MouseFilter` **MOUSE_FILTER_IGNORE** = ``2`` -The control will not receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input`. The control will also not receive the :ref:`mouse_entered` nor :ref:`mouse_exited` signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. +在控件上点击时,不会通过 :ref:`_gui_input` 收到鼠标移动输入事件和鼠标按钮输入事件,也不会接收到 :ref:`mouse_entered` 和 :ref:`mouse_exited` 信号。这不会阻止其他控件接收这些事件或触发信号。被忽略的事件将不会被自动处理。 + +\ **注意:**\ 如果控件已收到 :ref:`mouse_entered` 但未收到 :ref:`mouse_exited`\ ,则将 :ref:`mouse_filter` 更改为 :ref:`MOUSE_FILTER_IGNORE` 将导致发出 :ref:`mouse_exited`\ 。 .. rst-class:: classref-item-separator @@ -1058,8 +1062,8 @@ enum **TextDirection**: .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Control_constant_NOTIFICATION_RESIZED: @@ -1075,9 +1079,11 @@ Constants **NOTIFICATION_MOUSE_ENTER** = ``41`` -Sent when the mouse cursor enters the control's visible area, that is not occluded behind other Controls or Windows, provided its :ref:`mouse_filter` lets the event reach it and regardless if it's currently focused or not. +当鼠标光标进入控件(或任何子控件)的可见区域时发送,可见区域即未被其他 Control 和 Window 遮挡的区域,需要 :ref:`mouse_filter` 允许事件达到,与控件是否持有焦点无关。 -\ **Note:** :ref:`CanvasItem.z_index` doesn't affect, which Control receives the notification. +\ **注意:**\ :ref:`CanvasItem.z_index` 不影响哪个 Control 会收到该通知。 + +另见 :ref:`NOTIFICATION_MOUSE_ENTER_SELF`\ 。 .. _class_Control_constant_NOTIFICATION_MOUSE_EXIT: @@ -1085,9 +1091,35 @@ Sent when the mouse cursor enters the control's visible area, that is not occlud **NOTIFICATION_MOUSE_EXIT** = ``42`` -Sent when the mouse cursor leaves the control's visible area, that is not occluded behind other Controls or Windows, provided its :ref:`mouse_filter` lets the event reach it and regardless if it's currently focused or not. +当鼠标光标离开控件(以及所有子控件)的可见区域时发送,可见区域即未被其他 Control 和 Window 遮挡的区域,需要 :ref:`mouse_filter` 允许事件达到,与控件是否持有焦点无关。 -\ **Note:** :ref:`CanvasItem.z_index` doesn't affect, which Control receives the notification. +\ **注意:**\ :ref:`CanvasItem.z_index` 不影响哪个 Control 会收到该通知。 + +另见 :ref:`NOTIFICATION_MOUSE_EXIT_SELF`\ 。 + +.. _class_Control_constant_NOTIFICATION_MOUSE_ENTER_SELF: + +.. rst-class:: classref-constant + +**NOTIFICATION_MOUSE_ENTER_SELF** = ``60`` + +当鼠标光标进入控件的可见区域时发送,可见区域即未被其他 Control 和 Window 遮挡的区域,需要 :ref:`mouse_filter` 允许事件达到,与控件是否持有焦点无关。 + +\ **注意:**\ :ref:`CanvasItem.z_index` 不影响哪个 Control 会收到该通知。 + +另见 :ref:`NOTIFICATION_MOUSE_ENTER`\ 。 + +.. _class_Control_constant_NOTIFICATION_MOUSE_EXIT_SELF: + +.. rst-class:: classref-constant + +**NOTIFICATION_MOUSE_EXIT_SELF** = ``61`` + +当鼠标光标离开控件的可见区域时发送,可见区域即未被其他 Control 和 Window 遮挡的区域,需要 :ref:`mouse_filter` 允许事件达到,与控件是否持有焦点无关。 + +\ **注意:**\ :ref:`CanvasItem.z_index` 不影响哪个 Control 会收到该通知。 + +另见 :ref:`NOTIFICATION_MOUSE_EXIT`\ 。 .. _class_Control_constant_NOTIFICATION_FOCUS_ENTER: @@ -1129,7 +1161,9 @@ Sent when the mouse cursor leaves the control's visible area, that is not occlud **NOTIFICATION_SCROLL_BEGIN** = ``47`` -当此节点在已开始滚动的 :ref:`ScrollContainer` 内部时发送。 +当该节点位于 :ref:`ScrollContainer` 内部时发送,该容器在通过\ *触摸事件*\ 拖动该可滚动区域时已开始滚动。通过拖动滚动条滚动、使用鼠标滚轮滚动、或使用键盘/游戏手柄事件滚动时,\ *不*\ 会发送该通知。 + +\ **注意:**\ 该信号仅在在 Android 或 iOS 上、或当启用 :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse` 时的桌面/Web 平台上发出。 .. _class_Control_constant_NOTIFICATION_SCROLL_END: @@ -1137,7 +1171,9 @@ Sent when the mouse cursor leaves the control's visible area, that is not occlud **NOTIFICATION_SCROLL_END** = ``48`` -当此节点在已停止滚动的 :ref:`ScrollContainer` 内部时发送。 +当该节点位于 :ref:`ScrollContainer` 内部时发送,该容器在通过\ *触摸事件*\ 拖动该可滚动区域时已停止滚动。通过拖动滚动条滚动、使用鼠标滚轮滚动、或使用键盘/游戏手柄事件滚动时,\ *不*\ 会发送该通知。 + +\ **注意:**\ 该信号仅在在 Android 或 iOS 上、或当启用 :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse` 时的桌面/Web 平台上发出。 .. _class_Control_constant_NOTIFICATION_LAYOUT_DIRECTION_CHANGED: @@ -1153,8 +1189,8 @@ Sent when the mouse cursor leaves the control's visible area, that is not occlud .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Control_property_anchor_bottom: @@ -1512,7 +1548,7 @@ Property Descriptions - void **set_mouse_filter** **(** :ref:`MouseFilter` value **)** - :ref:`MouseFilter` **get_mouse_filter** **(** **)** -控制控件是否能够通过 :ref:`_gui_input` 接收鼠标按钮输入事件,以及如何处理这些事件。还控制控件是否能接收 :ref:`mouse_entered` 和 :ref:`mouse_exited` 信号。参阅常量来了解每个常量的作用。 +控制控件是否能够通过 :ref:`_gui_input` 接收鼠标按钮输入事件,以及如何处理这些事件。还控制控件是否能接收 :ref:`mouse_entered` 和 :ref:`mouse_exited` 信号。参阅常量来了解每个常量的作用。 .. rst-class:: classref-item-separator @@ -1529,9 +1565,9 @@ Property Descriptions - void **set_force_pass_scroll_events** **(** :ref:`bool` value **)** - :ref:`bool` **is_force_pass_scroll_events** **(** **)** -启用后,即使 :ref:`mouse_filter` 被设置为 :ref:`MOUSE_FILTER_STOP`\ ,由 :ref:`_gui_input` 处理的滚轮事件也会被传递给父控件。由于它默认为“真”,这允许嵌套的可滚动容器可以开箱即用。 +启用后,即使 :ref:`mouse_filter` 被设置为 :ref:`MOUSE_FILTER_STOP`\ ,由 :ref:`_gui_input` 处理的滚轮事件也会被传递给父控件。由于它默认为“真”,这允许嵌套的可滚动容器可以开箱即用。 -如果不希望滚动事件进入 :ref:`Node._unhandled_input` 处理,则应该在用户界面的根部禁用它。 +如果不希望滚动事件进入 :ref:`Node._unhandled_input` 处理,则应该在用户界面的根部禁用它。 .. rst-class:: classref-item-separator @@ -1844,7 +1880,7 @@ Property Descriptions 默认工具提示文本。如果 :ref:`mouse_filter` 属性不是 :ref:`MOUSE_FILTER_IGNORE`\ ,则当用户的鼠标光标在此控件上停留片刻时,将出现工具提示。可以使用 :ref:`ProjectSettings.gui/timers/tooltip_delay_sec` 选项更改工具提示出现所需的时间。另见 :ref:`get_tooltip`\ 。 -工具提示弹出窗口将使用默认实现,或者使用通过覆盖 :ref:`_make_custom_tooltip` 提供的自定义实现。默认工具提示包括一个 :ref:`PopupPanel` 和 :ref:`Label`\ ,其主题属性可以使用 :ref:`Theme` 方法分别对 ``"TooltipPanel"`` 和 ``"TooltipLabel"`` 进行自定义。例如: +工具提示弹出窗口将使用默认实现,或者使用通过覆盖 :ref:`_make_custom_tooltip` 提供的自定义实现。默认工具提示包括一个 :ref:`PopupPanel` 和 :ref:`Label`\ ,其主题属性可以使用 :ref:`Theme` 方法分别对 ``"TooltipPanel"`` 和 ``"TooltipLabel"`` 进行自定义。例如: .. tabs:: @@ -1875,18 +1911,18 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_Control_method__can_drop_data: +.. _class_Control_private_method__can_drop_data: .. rst-class:: classref-method :ref:`bool` **_can_drop_data** **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| |const| -Godot 调用这个方法来检查是否能够将来自某个控件 :ref:`_get_drag_data` 方法的 ``data`` 拖放到 ``at_position``\ 。\ ``at_position`` 使用的是这个控件的局部坐标系。 +Godot 调用这个方法来检查是否能够将来自某个控件 :ref:`_get_drag_data` 方法的 ``data`` 拖放到 ``at_position``\ 。\ ``at_position`` 使用的是这个控件的局部坐标系。 -这个方法应该只用于检查数据。请在 :ref:`_drop_data` 中处理数据。 +这个方法应该只用于检查数据。请在 :ref:`_drop_data` 中处理数据。 .. tabs:: @@ -1913,13 +1949,13 @@ Godot 调用这个方法来检查是否能够将来自某个控件 :ref:`_get_dr ---- -.. _class_Control_method__drop_data: +.. _class_Control_private_method__drop_data: .. rst-class:: classref-method void **_drop_data** **(** :ref:`Vector2` at_position, :ref:`Variant` data **)** |virtual| -Godot 调用这个方法把 ``data`` 传给你,这是从某个控件的 :ref:`_get_drag_data` 获得的结果。Godot 首先会调用 :ref:`_can_drop_data` 来检查是否允许把 ``data`` 拖放到 ``at_position``\ ,这里的 ``at_position`` 使用的是这个控件的局部坐标系。 +Godot 调用这个方法把 ``data`` 传给你,这是从某个控件的 :ref:`_get_drag_data` 获得的结果。Godot 首先会调用 :ref:`_can_drop_data` 来检查是否允许把 ``data`` 拖放到 ``at_position``\ ,这里的 ``at_position`` 使用的是这个控件的局部坐标系。 .. tabs:: @@ -1950,13 +1986,13 @@ Godot 调用这个方法把 ``data`` 传给你,这是从某个控件的 :ref:` ---- -.. _class_Control_method__get_drag_data: +.. _class_Control_private_method__get_drag_data: .. rst-class:: classref-method :ref:`Variant` **_get_drag_data** **(** :ref:`Vector2` at_position **)** |virtual| -Godot 调用该方法来获取可以拖放到期望放置数据的控件上的数据。如果没有要拖动的数据,则返回 ``null``\ 。想要接收拖放数据的控件应该实现 :ref:`_can_drop_data` 和 :ref:`_drop_data`\ 。\ ``at_position`` 是该控件的局部位置。可以使用 :ref:`force_drag` 强制拖动。 +Godot 调用该方法来获取可以拖放到期望放置数据的控件上的数据。如果没有要拖动的数据,则返回 ``null``\ 。想要接收拖放数据的控件应该实现 :ref:`_can_drop_data` 和 :ref:`_drop_data`\ 。\ ``at_position`` 是该控件的局部位置。可以使用 :ref:`force_drag` 强制拖动。 可以使用 :ref:`set_drag_preview` 设置跟随鼠标显示数据的预览。设置预览的好时机就是在这个方法中。 @@ -1985,7 +2021,7 @@ Godot 调用该方法来获取可以拖放到期望放置数据的控件上的 ---- -.. _class_Control_method__get_minimum_size: +.. _class_Control_private_method__get_minimum_size: .. rst-class:: classref-method @@ -2001,7 +2037,7 @@ Godot 调用该方法来获取可以拖放到期望放置数据的控件上的 ---- -.. _class_Control_method__get_tooltip: +.. _class_Control_private_method__get_tooltip: .. rst-class:: classref-method @@ -2015,7 +2051,7 @@ Godot 调用该方法来获取可以拖放到期望放置数据的控件上的 ---- -.. _class_Control_method__gui_input: +.. _class_Control_private_method__gui_input: .. rst-class:: classref-method @@ -2052,7 +2088,7 @@ void **_gui_input** **(** :ref:`InputEvent` event **)** |virtu 如果出现以下情况,则不会触发该事件: -\* 在控件外点击(参阅\ :ref:`_has_point`\ ); +\* 在控件外点击(参阅\ :ref:`_has_point`\ ); \* 控件将 :ref:`mouse_filter` 设置为 :ref:`MOUSE_FILTER_IGNORE`\ ; @@ -2068,7 +2104,7 @@ void **_gui_input** **(** :ref:`InputEvent` event **)** |virtu ---- -.. _class_Control_method__has_point: +.. _class_Control_private_method__has_point: .. rst-class:: classref-method @@ -2084,7 +2120,7 @@ void **_gui_input** **(** :ref:`InputEvent` event **)** |virtu ---- -.. _class_Control_method__make_custom_tooltip: +.. _class_Control_private_method__make_custom_tooltip: .. rst-class:: classref-method @@ -2150,7 +2186,7 @@ void **_gui_input** **(** :ref:`InputEvent` event **)** |virtu ---- -.. _class_Control_method__structured_text_parser: +.. _class_Control_private_method__structured_text_parser: .. rst-class:: classref-method @@ -2170,7 +2206,7 @@ void **_gui_input** **(** :ref:`InputEvent` event **)** |virtu void **accept_event** **(** **)** -将输入事件标记为已处理。一旦接受输入事件,传播就会停止,不会再传播到正在侦听 :ref:`Node._unhandled_input` 和 :ref:`Node._unhandled_key_input` 的节点。 +将输入事件标记为已处理。一旦接受输入事件,传播就会停止,不会再传播到正在侦听 :ref:`Node._unhandled_input` 和 :ref:`Node._unhandled_key_input` 的节点。 \ **注意:**\ 不会影响 :ref:`Input` 中的方法,只会影响事件的传播。 @@ -2366,15 +2402,29 @@ void **end_bulk_theme_override** **(** **)** ---- +.. _class_Control_method_find_valid_focus_neighbor: + +.. rst-class:: classref-method + +:ref:`Control` **find_valid_focus_neighbor** **(** :ref:`Side` side **)** |const| + +查找指定 :ref:`Side` 上可以接收焦点的下一个 **Control**\ 。 + +\ **注意:**\ 这与 :ref:`get_focus_neighbor` 不同,后者返回指定焦点邻居的路径。 + +.. rst-class:: classref-item-separator + +---- + .. _class_Control_method_force_drag: .. rst-class:: classref-method void **force_drag** **(** :ref:`Variant` data, :ref:`Control` preview **)** -通过传递 ``data`` 和 ``preview`` 强制拖动并绕过 :ref:`_get_drag_data` 和 :ref:`set_drag_preview`\ 。即使鼠标既没有在该控件悬停也没有在该控件上按下,拖动都将开始。 +通过传递 ``data`` 和 ``preview`` 强制拖动并绕过 :ref:`_get_drag_data` 和 :ref:`set_drag_preview`\ 。即使鼠标既没有在该控件悬停也没有在该控件上按下,拖动都将开始。 -方法 :ref:`_can_drop_data` 和 :ref:`_drop_data` 必须在想要接收拖放数据的控件上实现。 +方法 :ref:`_can_drop_data` 和 :ref:`_drop_data` 必须在想要接收拖放数据的控件上实现。 .. rst-class:: classref-item-separator @@ -2448,6 +2498,8 @@ void **force_drag** **(** :ref:`Variant` data, :ref:`Control` 的焦点邻居。用于 :ref:`focus_neighbor_bottom`\ 、\ :ref:`focus_neighbor_left`\ 、\ :ref:`focus_neighbor_right`\ 、和 :ref:`focus_neighbor_top` 的取值方法。 +\ **注意:**\ 要查找特定 :ref:`Side` 上的下一个 **Control**\ ,即使未指定邻居,也请使用 :ref:`find_valid_focus_neighbor`\ 。 + .. rst-class:: classref-item-separator ---- @@ -2711,7 +2763,7 @@ void **force_drag** **(** :ref:`Variant` data, :ref:`Control`\ 。 -覆盖这个方法可以自定义行为。见 :ref:`_get_tooltip`\ 。 +覆盖这个方法可以自定义行为。见 :ref:`_get_tooltip`\ 。 \ **注意:**\ 如果返回的是空 :ref:`String`\ ,则不会显示工具提示。 @@ -2756,7 +2808,7 @@ void **grab_focus** **(** **)** 从别的控件上窃取焦点,从而成为聚焦的控件(见 :ref:`focus_mode`\ )。 -\ **注意:**\ 这个方法与 :ref:`Object.call_deferred` 配合使用会更加可靠,尤其是在 :ref:`Node._ready` 中调用时。 +\ **注意:**\ 这个方法与 :ref:`Object.call_deferred` 配合使用会更加可靠,尤其是在 :ref:`Node._ready` 中调用时。 .. rst-class:: classref-item-separator @@ -3136,7 +3188,7 @@ void **set_begin** **(** :ref:`Vector2` position **)** void **set_drag_forwarding** **(** :ref:`Callable` drag_func, :ref:`Callable` can_drop_func, :ref:`Callable` drop_func **)** -转发该控件的 :ref:`_get_drag_data`\ 、\ :ref:`_can_drop_data` 和 :ref:`_drop_data` 虚函数的处理,以委托给可调用体。 +转发该控件的 :ref:`_get_drag_data`\ 、\ :ref:`_can_drop_data` 和 :ref:`_drop_data` 虚函数的处理,以委托给可调用体。 对于每个参数,如果不为空,则使用委托的可调用体,否则使用本地(虚)函数。 @@ -3152,7 +3204,7 @@ void **set_drag_forwarding** **(** :ref:`Callable` drag_func, :r void **set_drag_preview** **(** :ref:`Control` control **)** -在鼠标指针处显示给定的控件。调用此方法的好时机是在 :ref:`_get_drag_data` 中。控件不得位于场景树中。你不应释放控件,也不应在拖动持续时间之外保留对控件的引用。拖拽结束后它会自动删除。 +在鼠标指针处显示给定的控件。调用此方法的好时机是在 :ref:`_get_drag_data` 中。控件不得位于场景树中。你不应释放控件,也不应在拖动持续时间之外保留对控件的引用。拖拽结束后它会自动删除。 .. tabs:: @@ -3306,10 +3358,10 @@ void **warp_mouse** **(** :ref:`Vector2` position **)** \ **注意:**\ :ref:`warp_mouse` 仅在 Windows、macOS 和 Linux 上受支持。它在 Android、iOS 和 Web 上没有效果。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_convexpolygonshape2d.rst b/classes/zh_CN/class_convexpolygonshape2d.rst index 2ac046411a..947791b37c 100644 --- a/classes/zh_CN/class_convexpolygonshape2d.rst +++ b/classes/zh_CN/class_convexpolygonshape2d.rst @@ -10,27 +10,27 @@ ConvexPolygonShape2D ==================== -**Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于物理碰撞的 2D 凸多边形形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A 2D convex polygon shape, intended for use in physics. Used internally in :ref:`CollisionPolygon2D` when it's in :ref:`CollisionPolygon2D.BUILD_SOLIDS` mode. +2D 凸多边形形状,旨在用于物理。\ :ref:`CollisionPolygon2D` 为 :ref:`CollisionPolygon2D.BUILD_SOLIDS` 模式时内部会使用这个类。 -\ **ConvexPolygonShape2D** is *solid*, which means it detects collisions from objects that are fully inside it, unlike :ref:`ConcavePolygonShape2D` which is hollow. This makes it more suitable for both detection and physics. +\ **ConvexPolygonShape2D** 是\ *实心*\ 的,与空心的 :ref:`ConcavePolygonShape2D` 不同,如果对象完全位于其内部,也能够检测到碰撞。因此更适于检测和物理。 -\ **Convex decomposition:** A concave polygon can be split up into several convex polygons. This allows dynamic physics bodies to have complex concave collisions (at a performance cost) and can be achieved by using several **ConvexPolygonShape2D** nodes or by using the :ref:`CollisionPolygon2D` node in :ref:`CollisionPolygon2D.BUILD_SOLIDS` mode. To generate a collision polygon from a sprite, select the :ref:`Sprite2D` node, go to the **Sprite2D** menu that appears above the viewport, and choose **Create Polygon2D Sibling**. +\ **凸分解:**\ 凹多边形可以拆分为多个凸多边形。这样就能够让动态物理体拥有复杂的凹碰撞(以消耗性能为代价),做法是使用多个 :ref:`ConvexPolygonShape3D` 节点,或者使用 :ref:`CollisionPolygon2D.BUILD_SOLIDS` 模式的 :ref:`CollisionPolygon2D` 节点。要根据精灵生成碰撞多边形,请选中 :ref:`Sprite2D` 节点,前往出现在视口上方的 **Sprite2D** 菜单,然后选择\ **创建 Polygon2D 同级**\ 。 -\ **Performance:** **ConvexPolygonShape2D** is faster to check collisions against compared to :ref:`ConcavePolygonShape2D`, but it is slower than primitive collision shapes such as :ref:`CircleShape2D` and :ref:`RectangleShape2D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by primitive shapes. +\ **性能:**\ **ConvexPolygonShape2D** 检查碰撞的速度比 :ref:`ConcavePolygonShape2D` 要快,但比 :ref:`CircleShape2D`\ 、\ :ref:`RectangleShape2D` 等基本碰撞形状要慢。通常应该仅限于中等大小的对象,在无法使用基本形状精确表示碰撞时使用。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -57,8 +57,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ConvexPolygonShape2D_property_points: @@ -81,8 +81,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ConvexPolygonShape2D_method_set_point_cloud: @@ -92,10 +92,10 @@ void **set_point_cloud** **(** :ref:`PackedVector2Array` 属性,移除所有不必要的点。详见 :ref:`Geometry2D.convex_hull`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_convexpolygonshape3d.rst b/classes/zh_CN/class_convexpolygonshape3d.rst index de8049efa0..fb0d7e73ea 100644 --- a/classes/zh_CN/class_convexpolygonshape3d.rst +++ b/classes/zh_CN/class_convexpolygonshape3d.rst @@ -10,14 +10,14 @@ ConvexPolygonShape3D ==================== -**Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于物理碰撞的 3D 凸多面体形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 3D 凸多面体形状,旨在用于物理。常用来为 :ref:`CollisionShape3D` 提供形状。 @@ -29,15 +29,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 物理测试演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ConvexPolygonShape3D_property_points: @@ -68,10 +68,10 @@ Property Descriptions 形成凸多边形的 3D 点列表。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_cpuparticles2d.rst b/classes/zh_CN/class_cpuparticles2d.rst index 5e2ef87870..129e811df1 100644 --- a/classes/zh_CN/class_cpuparticles2d.rst +++ b/classes/zh_CN/class_cpuparticles2d.rst @@ -10,14 +10,14 @@ CPUParticles2D ============== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -A CPU-based 2D particle emitter. +基于 CPU 的 2D 粒子发射器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 基于 CPU 的 2D 粒子节点,可用于创建各种粒子系统、粒子效果。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`粒子系统(2D) <../tutorials/2d/particle_systems_2d>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -172,8 +172,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -206,8 +206,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_CPUParticles2D_signal_finished: @@ -215,7 +215,7 @@ Signals **finished** **(** **)** -Emitted when all active particles have finished processing. When :ref:`one_shot` is disabled, particles will process continuously, so this is never emitted. +当所有活动粒子完成处理时发出。当 :ref:`one_shot` 被禁用时,粒子将连续处理,因此它永远不会触发。 .. rst-class:: classref-section-separator @@ -223,8 +223,8 @@ Emitted when all active particles have finished processing. When :ref:`one_shot< .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_CPUParticles2D_DrawOrder: @@ -246,7 +246,7 @@ enum **DrawOrder**: :ref:`DrawOrder` **DRAW_ORDER_LIFETIME** = ``1`` -粒子按剩余寿命的顺序绘制。 +粒子按照剩余寿命的顺序绘制。换句话说,寿命最长的粒子被绘制在前面。 .. rst-class:: classref-item-separator @@ -476,8 +476,8 @@ enum **EmissionShape**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CPUParticles2D_property_amount: @@ -951,7 +951,7 @@ Property Descriptions - void **set_emitting** **(** :ref:`bool` value **)** - :ref:`bool` **is_emitting** **(** **)** -If ``true``, particles are being emitted. :ref:`emitting` can be used to start and stop particles from emitting. However, if :ref:`one_shot` is ``true`` setting :ref:`emitting` to ``true`` will not restart the emission cycle until after all active particles finish processing. You can use the :ref:`finished` signal to be notified once all active particles finish processing. +如果为 ``true``\ ,则正在发射粒子。\ :ref:`emitting` 可用于启动和停止粒子发射。但是,如果 :ref:`one_shot` 为 ``true``\ ,则将 :ref:`emitting` 设置为 ``true`` 将不会重新启动该发射循环,直到所有活动粒子完成处理为止。一旦所有活动粒子完成处理,你可以使用 :ref:`finished` 信号来收取通知。 .. rst-class:: classref-item-separator @@ -1592,8 +1592,8 @@ If ``true``, particles are being emitted. :ref:`emitting`\ )。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_cpuparticles3d.rst b/classes/zh_CN/class_cpuparticles3d.rst index 1875202a08..d88e596fc3 100644 --- a/classes/zh_CN/class_cpuparticles3d.rst +++ b/classes/zh_CN/class_cpuparticles3d.rst @@ -10,14 +10,14 @@ CPUParticles3D ============== -**Inherits:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A CPU-based 3D particle emitter. +基于 CPU 的 3D 粒子发射器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 基于 CPU 的 3D 粒子节点,可用于创建各种粒子系统、粒子效果。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`粒子系统(3D) <../tutorials/3d/particles/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -188,8 +188,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -222,8 +222,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_CPUParticles3D_signal_finished: @@ -231,7 +231,7 @@ Signals **finished** **(** **)** -Emitted when all active particles have finished processing. When :ref:`one_shot` is disabled, particles will process continuously, so this is never emitted. +当所有活动粒子完成处理时发出。当 :ref:`one_shot` 被禁用时,粒子将连续处理,因此它永远不会触发。 .. rst-class:: classref-section-separator @@ -239,8 +239,8 @@ Emitted when all active particles have finished processing. When :ref:`one_shot< .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_CPUParticles3D_DrawOrder: @@ -262,7 +262,7 @@ enum **DrawOrder**: :ref:`DrawOrder` **DRAW_ORDER_LIFETIME** = ``1`` -粒子按剩余寿命的顺序绘制。 +粒子按照剩余寿命的顺序绘制。换句话说,寿命最长的粒子被绘制在前面。 .. _class_CPUParticles3D_constant_DRAW_ORDER_VIEW_DEPTH: @@ -508,8 +508,8 @@ enum **EmissionShape**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CPUParticles3D_property_amount: @@ -1057,7 +1057,7 @@ Property Descriptions - void **set_emitting** **(** :ref:`bool` value **)** - :ref:`bool` **is_emitting** **(** **)** -If ``true``, particles are being emitted. :ref:`emitting` can be used to start and stop particles from emitting. However, if :ref:`one_shot` is ``true`` setting :ref:`emitting` to ``true`` will not restart the emission cycle until after all active particles finish processing. You can use the :ref:`finished` signal to be notified once all active particles finish processing. +如果为 ``true``\ ,则正在发射粒子。\ :ref:`emitting` 可用于启动和停止粒子发射。但是,如果 :ref:`one_shot` 为 ``true``\ ,则将 :ref:`emitting` 设置为 ``true`` 将不会重新启动该发射循环,直到所有活动粒子完成处理为止。一旦所有活动粒子完成处理,你可以使用 :ref:`finished` 信号来收取通知。 .. rst-class:: classref-item-separator @@ -1762,8 +1762,8 @@ Y/Z 平面中的 :ref:`spread` 数量。 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CPUParticles3D_method_convert_from_particles: @@ -1881,10 +1881,10 @@ void **set_particle_flag** **(** :ref:`ParticleFlags`\ )。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_crypto.rst b/classes/zh_CN/class_crypto.rst index a7d46bf356..83023fcd37 100644 --- a/classes/zh_CN/class_crypto.rst +++ b/classes/zh_CN/class_crypto.rst @@ -10,14 +10,14 @@ Crypto ====== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 提供对高阶加密功能的访问。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- Crypto 类提供对高阶加密功能的访问。 @@ -94,8 +94,8 @@ Crypto 类提供对高阶加密功能的访问。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -126,8 +126,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Crypto_method_constant_time_compare: @@ -264,10 +264,10 @@ Method Descriptions 使用提供的公钥 ``key`` 验证类型为 ``hash_type`` 的给定签名 ``signature``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_cryptokey.rst b/classes/zh_CN/class_cryptokey.rst index 1e3f5ebf52..03e9239bad 100644 --- a/classes/zh_CN/class_cryptokey.rst +++ b/classes/zh_CN/class_cryptokey.rst @@ -10,14 +10,14 @@ CryptoKey ========= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 加密密钥(RSA)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- CryptoKey 类表示加密密钥。密钥可以像其他任何 :ref:`Resource` 一样进行加载和保存。 @@ -25,15 +25,15 @@ CryptoKey 类表示加密密钥。密钥可以像其他任何 :ref:`Resource` +- :doc:`SSL 证书 <../tutorials/networking/ssl_certificates>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CryptoKey_method_is_public_only: @@ -119,10 +119,10 @@ Method Descriptions 返回包含 PEM 格式的密钥的字符串。如果 ``public_only`` 为 ``true``\ ,则仅包含公钥。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_csgbox3d.rst b/classes/zh_CN/class_csgbox3d.rst index bfc9cf47d6..80369b5159 100644 --- a/classes/zh_CN/class_csgbox3d.rst +++ b/classes/zh_CN/class_csgbox3d.rst @@ -10,14 +10,14 @@ CSGBox3D ======== -**Inherits:** :ref:`CSGPrimitive3D` **<** :ref:`CSGShape3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`CSGPrimitive3D` **<** :ref:`CSGShape3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` CSG 盒子形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 此节点允许你创建与 CSG 系统一起使用的盒子。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 CSG 设计关卡原型 <../tutorials/3d/csg_tools>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CSGBox3D_property_material: @@ -83,10 +83,10 @@ Property Descriptions 该盒子的宽度、高度和深度。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_csgcombiner3d.rst b/classes/zh_CN/class_csgcombiner3d.rst index 2506a62947..dbd2886f52 100644 --- a/classes/zh_CN/class_csgcombiner3d.rst +++ b/classes/zh_CN/class_csgcombiner3d.rst @@ -10,14 +10,14 @@ CSGCombiner3D ============= -**Inherits:** :ref:`CSGShape3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`CSGShape3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 允许你组合其他 CSG 修改器的 CSG 节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 对于形状的复杂排列,有时需要向 CSG 节点添加结构。CSGCombiner3D 节点允许创建该结构。节点封装了其子节点的 CSG 操作的结果。通过这种方式,可以对作为一个 CSGCombiner3D 节点的子节点的一组形状进行操作,并对作为第二个 CSGCombiner3D 节点的子节点的第二组形状进行一组单独的操作,然后执行以下操作: 将两个最终结果作为输入来创建最终形状。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 CSG 设计关卡原型 <../tutorials/3d/csg_tools>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_csgcylinder3d.rst b/classes/zh_CN/class_csgcylinder3d.rst index da15851f41..811de47a40 100644 --- a/classes/zh_CN/class_csgcylinder3d.rst +++ b/classes/zh_CN/class_csgcylinder3d.rst @@ -10,14 +10,14 @@ CSGCylinder3D ============= -**Inherits:** :ref:`CSGPrimitive3D` **<** :ref:`CSGShape3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`CSGPrimitive3D` **<** :ref:`CSGShape3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` CSG 圆柱形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 此节点允许你创建与 CSG 系统一起使用的圆柱体(或圆锥体)。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 CSG 设计关卡原型 <../tutorials/3d/csg_tools>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CSGCylinder3D_property_cone: @@ -159,10 +159,10 @@ Property Descriptions 如果为 ``true``\ ,则将圆柱体的法线设置为具有平滑效果,使圆柱体看起来是圆形的。如果为 ``false``\ ,则圆柱体将具有平坦的阴影表现。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_csgmesh3d.rst b/classes/zh_CN/class_csgmesh3d.rst index e794a7f447..ed09f01c03 100644 --- a/classes/zh_CN/class_csgmesh3d.rst +++ b/classes/zh_CN/class_csgmesh3d.rst @@ -10,14 +10,14 @@ CSGMesh3D ========= -**Inherits:** :ref:`CSGPrimitive3D` **<** :ref:`CSGShape3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`CSGPrimitive3D` **<** :ref:`CSGShape3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 使用网格资源的 CSG 网格形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 此 CSG 节点允许你将任何网格资源用作 CSG 形状,前提是它是闭合的、不自相交、不包含内部面并且没有连接到两个面以上的边。 另请参阅 :ref:`CSGPolygon3D`\ ,以绘制 2D 挤出多边形以用作 CSG 节点。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 CSG 设计关卡原型 <../tutorials/3d/csg_tools>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CSGMesh3D_property_material: @@ -81,16 +81,16 @@ Property Descriptions - void **set_mesh** **(** :ref:`Mesh` value **)** - :ref:`Mesh` **get_mesh** **(** **)** -The :ref:`Mesh` resource to use as a CSG shape. +用作 CSG 形状的 :ref:`Mesh` 资源。 -\ **Note:** When using an :ref:`ArrayMesh`, all vertex attributes except :ref:`Mesh.ARRAY_VERTEX`, :ref:`Mesh.ARRAY_NORMAL` and :ref:`Mesh.ARRAY_TEX_UV` are left unused. Only :ref:`Mesh.ARRAY_VERTEX` and :ref:`Mesh.ARRAY_TEX_UV` will be passed to the GPU. +\ **注意:**\ 使用 :ref:`ArrayMesh` 时,除 :ref:`Mesh.ARRAY_VERTEX`\ 、\ :ref:`Mesh.ARRAY_NORMAL` 和 :ref:`Mesh.ARRAY_TEX_UV` 之外的所有顶点属性均保持未被使用的状态。只有 :ref:`Mesh.ARRAY_VERTEX` 和 :ref:`Mesh.ARRAY_TEX_UV` 会被传递到 GPU。 -\ :ref:`Mesh.ARRAY_NORMAL` is only used to determine which faces require the use of flat shading. By default, CSGMesh will ignore the mesh's vertex normals, recalculate them for each vertex and use a smooth shader. If a flat shader is required for a face, ensure that all vertex normals of the face are approximately equal. +\ :ref:`Mesh.ARRAY_NORMAL` 仅被用于确定哪些面需要使用平直着色。默认情况下,CSGMesh 将忽略该网格的顶点法线,为每个顶点重新计算它们并使用一个平滑着色器。如果面需要平直着色器,请确保面的所有顶点法线大致相等。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_csgpolygon3d.rst b/classes/zh_CN/class_csgpolygon3d.rst index 302bd55171..404cd351c0 100644 --- a/classes/zh_CN/class_csgpolygon3d.rst +++ b/classes/zh_CN/class_csgpolygon3d.rst @@ -10,14 +10,14 @@ CSGPolygon3D ============ -**Inherits:** :ref:`CSGPrimitive3D` **<** :ref:`CSGShape3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`CSGPrimitive3D` **<** :ref:`CSGShape3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 拉伸 2D 多边形形状以创建 3D 网格。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 挤出一组 2D 点,以快速轻松地创建各种 3D 网格。另请参阅 :ref:`CSGMesh3D`\ ,以了解将 3D 网格用作 CSG 节点。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 CSG 设计关卡原型 <../tutorials/3d/csg_tools>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -78,8 +78,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_CSGPolygon3D_Mode: @@ -181,8 +181,8 @@ enum **PathIntervalType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CSGPolygon3D_property_depth: @@ -454,10 +454,10 @@ Property Descriptions :ref:`mode` 为 :ref:`MODE_SPIN` 时,挤出的次数。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_csgprimitive3d.rst b/classes/zh_CN/class_csgprimitive3d.rst index 096f1b9709..1f6cad513a 100644 --- a/classes/zh_CN/class_csgprimitive3d.rst +++ b/classes/zh_CN/class_csgprimitive3d.rst @@ -10,16 +10,16 @@ CSGPrimitive3D ============== -**Inherits:** :ref:`CSGShape3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`CSGShape3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`CSGBox3D`, :ref:`CSGCylinder3D`, :ref:`CSGMesh3D`, :ref:`CSGPolygon3D`, :ref:`CSGSphere3D`, :ref:`CSGTorus3D` +**派生:** :ref:`CSGBox3D`, :ref:`CSGCylinder3D`, :ref:`CSGMesh3D`, :ref:`CSGPolygon3D`, :ref:`CSGSphere3D`, :ref:`CSGTorus3D` CSG 图元的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 各种 CSG 图元的父类,包含了它们所需的公共代码和功能。无法直接使用这个类,请使用继承它的各种类。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 CSG 设计关卡原型 <../tutorials/3d/csg_tools>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CSGPrimitive3D_property_flip_faces: @@ -66,10 +66,10 @@ Property Descriptions 如果设置,则每个三角形中顶点的顺序会颠倒,从而导致绘制网格的背面。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_csgshape3d.rst b/classes/zh_CN/class_csgshape3d.rst index fc35430ae4..6d237da066 100644 --- a/classes/zh_CN/class_csgshape3d.rst +++ b/classes/zh_CN/class_csgshape3d.rst @@ -10,16 +10,16 @@ CSGShape3D ========== -**Inherits:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`CSGCombiner3D`, :ref:`CSGPrimitive3D` +**派生:** :ref:`CSGCombiner3D`, :ref:`CSGPrimitive3D` CSG 基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这是为 Godot 中的各种 CSG 节点提供 CSG 操作支持的 CSG 基类。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 CSG 设计关卡原型 <../tutorials/3d/csg_tools>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -84,8 +84,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_CSGShape3D_Operation: @@ -123,8 +123,8 @@ enum **Operation**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CSGShape3D_property_calculate_tangents: @@ -251,8 +251,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CSGShape3D_method_get_collision_layer_value: @@ -322,10 +322,10 @@ void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref 根据 ``value``\ ,启用或禁用 :ref:`collision_mask` 中指定的层,给定的 ``layer_number`` 应在 1 和 32 之间。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_csgsphere3d.rst b/classes/zh_CN/class_csgsphere3d.rst index a59bff8e0c..c5cd883a74 100644 --- a/classes/zh_CN/class_csgsphere3d.rst +++ b/classes/zh_CN/class_csgsphere3d.rst @@ -10,14 +10,14 @@ CSGSphere3D =========== -**Inherits:** :ref:`CSGPrimitive3D` **<** :ref:`CSGShape3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`CSGPrimitive3D` **<** :ref:`CSGShape3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` CSG 球形形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该节点允许创建与 CSG 系统一起使用的球体。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 CSG 设计关卡原型 <../tutorials/3d/csg_tools>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CSGSphere3D_property_material: @@ -140,10 +140,10 @@ Property Descriptions 如果为 ``true``\ ,则将球体的法线设置为具有平滑效果,使球体看起来是圆形的。如果为 ``false``\ ,则球体将具有平坦的阴影表现。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_csgtorus3d.rst b/classes/zh_CN/class_csgtorus3d.rst index 97a174f75a..c8ad7c53f4 100644 --- a/classes/zh_CN/class_csgtorus3d.rst +++ b/classes/zh_CN/class_csgtorus3d.rst @@ -10,14 +10,14 @@ CSGTorus3D ========== -**Inherits:** :ref:`CSGPrimitive3D` **<** :ref:`CSGShape3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`CSGPrimitive3D` **<** :ref:`CSGShape3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` CSG 圆环形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该节点允许创建与 CSG 系统一起使用的环面。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 CSG 设计关卡原型 <../tutorials/3d/csg_tools>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CSGTorus3D_property_inner_radius: @@ -159,10 +159,10 @@ Property Descriptions 如果 ``true`` 设置圆环的法线以提供平滑效果,则使圆环看起来是圆形的。如果为 ``false``\ ,则圆环将具有平坦的阴影表现。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_csharpscript.rst b/classes/zh_CN/class_csharpscript.rst index 154e7807e6..fd9382f72c 100644 --- a/classes/zh_CN/class_csharpscript.rst +++ b/classes/zh_CN/class_csharpscript.rst @@ -10,14 +10,14 @@ CSharpScript ============ -**Inherits:** :ref:`Script` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Script` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` A script implemented in the C# programming language, saved with the ``.cs`` extension (Mono-enabled builds only). .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- This class represents a C# script. It is the C# equivalent of the :ref:`GDScript` class and is only available in Mono-enabled Godot builds. @@ -25,15 +25,15 @@ See also :ref:`GodotSharp`. .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`C# documentation index <../tutorials/scripting/c_sharp/index>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CSharpScript_method_new: @@ -59,10 +59,10 @@ Method Descriptions Returns a new instance of the script. -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_cubemap.rst b/classes/zh_CN/class_cubemap.rst index 4647a70dc9..342431596c 100644 --- a/classes/zh_CN/class_cubemap.rst +++ b/classes/zh_CN/class_cubemap.rst @@ -10,14 +10,14 @@ Cubemap ======= -**Inherits:** :ref:`ImageTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ImageTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Six square textures representing the faces of a cube. Commonly used as a skybox. +代表立方体面的六个正方形纹理。通常用作天空盒。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 单个立方体贴图是由 6 个纹理分层组织的纹理组成的。它们通常用于在 3D 渲染中伪造反射(参见 :ref:`ReflectionProbe`\ )。可以用来让对象看起来像是在反射它的周围环境。与其他反射方法相比,这通常能提供更好的性能。 @@ -29,8 +29,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Cubemap_method_create_placeholder: @@ -56,10 +56,10 @@ Method Descriptions 创建该资源的占位符版本(\ :ref:`PlaceholderCubemap`\ )。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_cubemaparray.rst b/classes/zh_CN/class_cubemaparray.rst index 36f3523044..4e39d68570 100644 --- a/classes/zh_CN/class_cubemaparray.rst +++ b/classes/zh_CN/class_cubemaparray.rst @@ -10,29 +10,29 @@ CubemapArray ============ -**Inherits:** :ref:`ImageTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ImageTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -An array of :ref:`Cubemap`\ s, stored together and with a single reference. +:ref:`Cubemap` 数组,存储在一起并使用单个引用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**CubemapArray**\ s are made of an array of :ref:`Cubemap`\ s. Like :ref:`Cubemap`\ s, they are made of multiple textures, the amount of which must be divisible by 6 (one for each face of the cube). The primary benefit of **CubemapArray**\ s is that they can be accessed in shader code using a single texture reference. In other words, you can pass multiple :ref:`Cubemap`\ s into a shader using a single **CubemapArray**. +**CubemapArray** 由一组 :ref:`Cubemap` 组成。它们像 :ref:`Cubemap` 一样是由多个纹理组成的,其纹理的数量必须能被 6 整除(立方体的每个面都有一个)。\ **CubemapArray** 的主要好处是可以使用单个纹理引用在着色器代码中访问它们。换句话说,可以使用单个 **CubemapArray** 将多个 :ref:`Cubemap` 传入着色器。 -Moreover, :ref:`Cubemap`\ s are allocated in adjacent cache regions on the GPU. This makes **CubemapArray**\ s the most efficient way to store multiple :ref:`Cubemap`\ s. +此外,\ :ref:`Cubemap` 被分配在 GPU 上相邻的缓存区块中。这使得 **CubemapArray** 成为存储多个 :ref:`Cubemap` 的最有效方式。 -Internally, Godot uses **CubemapArray**\ s for many effects, including the :ref:`Sky` if you set :ref:`ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections` to ``true``. +如果将 :ref:`ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections` 设置为 ``true``\ ,Godot 在内部会将 **CubemapArray** 用于多种效果,包括 :ref:`Sky`\ 。 -To create such a texture file yourself, reimport your image files using the import presets of the File System dock. +要想自己创建这样的纹理文件,请使用文件系统停靠面板的导入预设重新导入你的图像文件。 -\ **Note:** **CubemapArray** is not supported in the OpenGL 3 rendering backend. +\ **注意:**\ **CubemapArray** 在 OpenGL 3 渲染后端中不受支持。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_CubemapArray_method_create_placeholder: @@ -58,10 +58,10 @@ Method Descriptions 创建该资源的占位符版本(\ :ref:`PlaceholderCubemapArray`\ )。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_curve.rst b/classes/zh_CN/class_curve.rst index ac4cf9db51..93aed3e149 100644 --- a/classes/zh_CN/class_curve.rst +++ b/classes/zh_CN/class_curve.rst @@ -10,23 +10,23 @@ Curve ===== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A mathematical curve. +数学曲线。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This resource describes a mathematical curve by defining a set of points and tangents at each point. By default, it ranges between ``0`` and ``1`` on the Y axis and positions points relative to the ``0.5`` Y position. +该资源通过定义一组点和每个点的切线来描述数学曲线。默认情况下,它在 Y 轴上的范围在 ``0`` 到 ``1`` 之间,并且位置点相对于 ``0.5`` Y 位置。 -See also :ref:`Gradient` which is designed for color interpolation. See also :ref:`Curve2D` and :ref:`Curve3D`. +另请参阅为颜色插值设计的 :ref:`Gradient`\ 。另请参阅 :ref:`Curve2D` 和 :ref:`Curve3D`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -93,8 +93,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Curve_signal_range_changed: @@ -110,8 +110,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Curve_TangentMode: @@ -149,8 +149,8 @@ enum **TangentMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Curve_property_bake_resolution: @@ -222,8 +222,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Curve_method_add_point: @@ -437,10 +437,10 @@ void **set_point_value** **(** :ref:`int` index, :ref:`float` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 描述 2D 空间的贝塞尔曲线。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该类描述了 2D 空间中的贝塞尔曲线。它主要用于给 :ref:`Path2D` 一个形状,但也可以手动采样用于其他目的。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -91,8 +91,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Curve2D_property_bake_interval: @@ -130,8 +130,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Curve2D_method_add_point: @@ -388,10 +388,10 @@ void **set_point_position** **(** :ref:`int` idx, :ref:`Vector2` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 描述 3D 空间的贝兹尔曲线。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该类描述了 3D 空间中的贝塞尔曲线。它主要用于给 :ref:`Path3D` 提供一个形状,但也可以手动采样以用于其他目的。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -103,8 +103,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Curve3D_property_bake_interval: @@ -159,8 +159,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Curve3D_method_add_point: @@ -346,9 +346,7 @@ void **remove_point** **(** :ref:`int` idx **)** :ref:`Vector3` **sample_baked** **(** :ref:`float` offset=0.0, :ref:`bool` cubic=false **)** |const| -返回曲线内位于 ``offset`` 位置的一个点,其中 ``offset`` 为沿曲线的 3D 单位测量距离。 - -为此,它会找到 ``offset`` 位于其间的两个缓存点,然后对值进行插值。如果 ``cubic`` 被设置为 ``true``\ ,则该插值是立方插值;如果被设置为 ``false``\ ,则该插值是线性插值。 +返回曲线内位于 ``offset`` 位置的一个点,其中 ``offset`` 为沿曲线的 3D 单位测量距离。为此,它会找到 ``offset`` 位于其间的两个缓存点,然后对值进行插值。如果 ``cubic`` 被设置为 ``true``\ ,则该插值是立方插值;如果被设置为 ``false``\ ,则该插值是线性插值。 立方插值往往能更好地跟随曲线,但线性插值速度更快(而且通常足够精确)。 @@ -362,9 +360,7 @@ void **remove_point** **(** :ref:`int` idx **)** :ref:`Vector3` **sample_baked_up_vector** **(** :ref:`float` offset, :ref:`bool` apply_tilt=false **)** |const| -返回曲线内位于 ``offset`` 位置的向上向量,其中 ``offset`` 为沿曲线的 3D 单位测量距离。 - -为此,它会找到 ``offset`` 位于其间的两个缓存向上向量,然后对值进行插值。如果 ``apply_tilt`` 为 ``true``\ ,则对插值后的向上向量应用插值后的倾斜。 +返回曲线内位于 ``offset`` 位置的向上向量,其中 ``offset`` 为沿曲线的 3D 单位测量距离。为此,它会找到 ``offset`` 位于其间的两个缓存向上向量,然后对值进行插值。如果 ``apply_tilt`` 为 ``true``\ ,则对插值后的向上向量应用插值后的倾斜。 如果曲线没有向上向量,则该函数将向控制台发送一个错误,并返回 ``(0, 1, 0)``\ 。 @@ -378,7 +374,7 @@ void **remove_point** **(** :ref:`int` idx **)** :ref:`Transform3D` **sample_baked_with_rotation** **(** :ref:`float` offset=0.0, :ref:`bool` cubic=false, :ref:`bool` apply_tilt=false **)** |const| -与 ``interpolate_baked()`` 类似。返回值为 ``Transform3D``\ ,其中 ``origin`` 作为点位置,\ ``basis.x`` 作为横向向量,\ ``basis.y`` 作为向上向量,\ ``basis.z`` 作为前向向量。当曲线长度为 0 时,将没有合理的方法来计算旋转,所有向量都会与全局空间轴对齐。 +返回一个 :ref:`Transform3D`\ ,其中 ``origin`` 作为点位置,\ ``basis.x`` 作为横向向量,\ ``basis.y`` 作为向上向量,\ ``basis.z`` 作为前向向量。当曲线长度为 0 时,将没有合理的方法来计算旋转,所有向量都会与全局空间轴对齐。另请参见 :ref:`sample_baked`\ 。 .. rst-class:: classref-item-separator @@ -474,10 +470,10 @@ void **set_point_tilt** **(** :ref:`int` idx, :ref:`float` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A 1D texture where pixel brightness corresponds to points on a curve. +一维纹理,其中像素亮度对应于曲线上的点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A 1D texture where pixel brightness corresponds to points on a :ref:`Curve` resource, either in grayscale or in red. This visual representation simplifies the task of saving curves as image files. +1D 纹理,其中像素亮度对应于 :ref:`Curve` 资源上的点(以灰度或红色来表示)。这种视觉表示简化了将曲线保存为图像文件的任务。 -If you need to store up to 3 curves within a single texture, use :ref:`CurveXYZTexture` instead. See also :ref:`GradientTexture1D` and :ref:`GradientTexture2D`. +如果需要在单个纹理中,存储最多 3 条曲线,请改用 :ref:`CurveXYZTexture`\ 。另见 :ref:`GradientTexture1D` 和 :ref:`GradientTexture2D`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_CurveTexture_TextureMode: @@ -78,8 +78,8 @@ enum **TextureMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CurveTexture_property_curve: @@ -128,10 +128,10 @@ Property Descriptions 纹理宽度(单位为像素)。较大的值能够更好地表示高频数据(例如方向的突变),但会增加生成时间和内存占用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_curvexyztexture.rst b/classes/zh_CN/class_curvexyztexture.rst index 56f701a6d8..5bf2b11015 100644 --- a/classes/zh_CN/class_curvexyztexture.rst +++ b/classes/zh_CN/class_curvexyztexture.rst @@ -10,23 +10,23 @@ CurveXYZTexture =============== -**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A 1D texture where the red, green, and blue color channels correspond to points on 3 curves. +一维纹理,其中红色、绿色和蓝色通道分别对应 3 条曲线上的点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A 1D texture where the red, green, and blue color channels correspond to points on 3 :ref:`Curve` resources. Compared to using separate :ref:`CurveTexture`\ s, this further simplifies the task of saving curves as image files. +1D 纹理,其中红色、绿色和蓝色通道对应于 3 条 :ref:`Curve` 资源上的点。与使用单独的 :ref:`CurveTexture` 相比,这进一步简化了将曲线保存为图像文件的任务。 -If you only need to store one curve within a single texture, use :ref:`CurveTexture` instead. See also :ref:`GradientTexture1D` and :ref:`GradientTexture2D`. +如果只需要在单个纹理中存储一条曲线,请改用 :ref:`CurveTexture`\ 。另见 :ref:`GradientTexture1D` 和 :ref:`GradientTexture2D`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CurveXYZTexture_property_curve_x: @@ -116,10 +116,10 @@ Property Descriptions 纹理宽度(单位为像素)。较大的值能够更好地表示高频数据(例如方向的突变),但会增加生成时间和内存占用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_cylindermesh.rst b/classes/zh_CN/class_cylindermesh.rst index c0d4b4250d..ec11a81134 100644 --- a/classes/zh_CN/class_cylindermesh.rst +++ b/classes/zh_CN/class_cylindermesh.rst @@ -10,21 +10,21 @@ CylinderMesh ============ -**Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 表示圆柱形 :ref:`PrimitiveMesh` 的类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 表示圆柱形 :ref:`PrimitiveMesh` 的类。通过将 :ref:`top_radius` 或 :ref:`bottom_radius` 属性设置为 ``0.0``\ ,这个类可以用来创建圆锥体。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -51,8 +51,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CylinderMesh_property_bottom_radius: @@ -173,10 +173,10 @@ Property Descriptions 圆柱体的顶部半径。如果设置为 ``0.0``\ ,则不会生成顶面,呈圆锥状。另见 :ref:`cap_top`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_cylindershape3d.rst b/classes/zh_CN/class_cylindershape3d.rst index 1ca86a13b0..16b69292ee 100644 --- a/classes/zh_CN/class_cylindershape3d.rst +++ b/classes/zh_CN/class_cylindershape3d.rst @@ -10,25 +10,25 @@ CylinderShape3D =============== -**Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于物理碰撞的 3D 圆柱体形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A 3D cylinder shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape3D`. +3D 圆柱体形状,旨在用于物理学。通常用于为 :ref:`CollisionShape3D` 提供形状。 -\ **Note:** There are several known bugs with cylinder collision shapes. Using :ref:`CapsuleShape3D` or :ref:`BoxShape3D` instead is recommended. +\ **注意:**\ 圆柱体碰撞形状有若干已知的问题。建议改用 :ref:`CapsuleShape3D` 或 :ref:`BoxShape3D`\ 。 -\ **Performance:** **CylinderShape3D** is fast to check collisions against, but it is slower than :ref:`CapsuleShape3D`, :ref:`BoxShape3D`, and :ref:`SphereShape3D`. +\ **性能:**\ **CylinderShape3D** 可以快速检查碰撞,但比 :ref:`CapsuleShape3D`\ 、\ :ref:`BoxShape3D` 和 :ref:`SphereShape3D` 慢。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `第三人称射击演示 `__ @@ -38,8 +38,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_CylinderShape3D_property_height: @@ -89,10 +89,10 @@ Property Descriptions 圆柱体的半径。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_dampedspringjoint2d.rst b/classes/zh_CN/class_dampedspringjoint2d.rst index 31368498e4..83cbe716ba 100644 --- a/classes/zh_CN/class_dampedspringjoint2d.rst +++ b/classes/zh_CN/class_dampedspringjoint2d.rst @@ -10,21 +10,21 @@ DampedSpringJoint2D =================== -**Inherits:** :ref:`Joint2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Joint2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 通过类似弹簧的力连接两个 2D 物理物体的物理关节。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 通过类似弹簧的力连接两个 2D 物理物体的物理关节。这就像一个总是想拉伸到给定长度的弹簧。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_DampedSpringJoint2D_property_damping: @@ -59,7 +59,7 @@ Property Descriptions - void **set_damping** **(** :ref:`float` value **)** - :ref:`float` **get_damping** **(** **)** -弹簧关节的阻尼比。值在 ``0`` 和 ``1`` 之间。当两个机构移动到不同的方向时,系统会尝试将它们再次对准弹簧轴。高的 ``damping`` 值迫使连接的机构更快地对齐。 +弹簧关节的阻尼比。值在 ``0`` 和 ``1`` 之间。当两个实体移动到不同的方向时,系统会尝试将它们再次对准弹簧轴。高的 :ref:`damping` 值迫使连接的实体更快地对齐。 .. rst-class:: classref-item-separator @@ -112,10 +112,10 @@ Property Descriptions 该值越大,连接在关节上的机构变形越小。关节对各机构施加一个相反的力,即刚度乘以与其静止长度的大小差的乘积。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_decal.rst b/classes/zh_CN/class_decal.rst index 2f3d2f8ada..d940dc6653 100644 --- a/classes/zh_CN/class_decal.rst +++ b/classes/zh_CN/class_decal.rst @@ -10,14 +10,14 @@ Decal ===== -**Inherits:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 将纹理投影到 :ref:`MeshInstance3D` 上的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **Decal** 用于将纹理投射到场景中的 :ref:`Mesh` 上。使用贴花可在不影响底层 :ref:`Mesh` 的情况下向场景中添加细节。它们通常用于为建筑物添加风化效果,为地面添加污垢或泥土,或为道具添加多样性。贴花可以随时移动,使其适用于斑点阴影或激光瞄准点之类的东西。 @@ -33,8 +33,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -73,8 +73,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -91,8 +91,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Decal_DecalTexture: @@ -146,8 +146,8 @@ enum **DecalTexture**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Decal_property_albedo_mix: @@ -422,8 +422,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Decal_method_get_texture: @@ -487,10 +487,10 @@ void **set_texture** **(** :ref:`DecalTexture` type, :r -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_dictionary.rst b/classes/zh_CN/class_dictionary.rst index ac950da2c5..289c036088 100644 --- a/classes/zh_CN/class_dictionary.rst +++ b/classes/zh_CN/class_dictionary.rst @@ -14,8 +14,8 @@ Dictionary .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 字典是关系容器,包含的值(Value)由唯一的键(Key)引用。添加新条目时,字典会保持插入顺序。在其他编程语言中,这种数据结构有时也称为哈希表或关联数组。 @@ -191,12 +191,12 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `GDScript 基础:字典 <../tutorials/scripting/gdscript/gdscript_basics.html#dictionary>`__ @@ -206,8 +206,8 @@ Tutorials .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -220,8 +220,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -260,8 +260,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -280,8 +280,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_Dictionary_constructor_Dictionary: @@ -307,8 +307,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Dictionary_method_clear: @@ -446,7 +446,7 @@ void **clear** **(** **)** :ref:`int` **hash** **(** **)** |const| -Returns a hashed 32-bit integer value representing the dictionary contents. +返回代表该字典内容的 32 位整数哈希值。 .. tabs:: @@ -456,21 +456,21 @@ Returns a hashed 32-bit integer value representing the dictionary contents. var dict1 = {"A": 10, "B": 2} var dict2 = {"A": 10, "B": 2} - print(dict1.hash() == dict2.hash()) # Prints true + print(dict1.hash() == dict2.hash()) # 输出 true .. code-tab:: csharp var dict1 = new Godot.Collections.Dictionary{{"A", 10}, {"B", 2}}; var dict2 = new Godot.Collections.Dictionary{{"A", 10}, {"B", 2}}; - // Godot.Collections.Dictionary has no Hash() method. Use GD.Hash() instead. - GD.Print(GD.Hash(dict1) == GD.Hash(dict2)); // Prints true + // Godot.Collections.Dictionary 没有 Hash() 方法。请改用 GD.Hash()。 + GD.Print(GD.Hash(dict1) == GD.Hash(dict2)); // 输出 true -\ **Note:** Dictionaries with the same entries but in a different order will not have the same hash. +\ **注意:**\ 如果两个字典条目相同,但顺序不同,则哈希值也不同。 -\ **Note:** Dictionaries with equal hash values are *not* guaranteed to be the same, because of hash collisions. On the contrary, dictionaries with different hash values are guaranteed to be different. +\ **注意:**\ 哈希值相同的字典\ *不保证*\ 相同,因为可能存在哈希碰撞。相对地,哈希值不同的字典保证不同。 .. rst-class:: classref-item-separator @@ -530,7 +530,49 @@ void **make_read_only** **(** **)** void **merge** **(** :ref:`Dictionary` dictionary, :ref:`bool` overwrite=false **)** -将 ``dictionary`` 中的条目添加到该字典中。默认不复制重复的键,除非 ``overwrite`` 为 ``true``\ 。 +将 ``dictionary`` 中的条目添加到该字典中。默认情况下,不会复制重复的键,除非 ``overwrite`` 为 ``true``\ 。 + + +.. tabs:: + + .. code-tab:: gdscript + + var dict = { "item": "sword", "quantity": 2 } + var other_dict = { "quantity": 15, "color": "silver" } + + # 默认情况下禁用覆盖已有键。 + dict.merge(other_dict) + print(dict) # { "item": "sword", "quantity": 2, "color": "silver" } + + # 启用覆盖已有键。 + dict.merge(other_dict, true) + print(dict) # { "item": "sword", "quantity": 15, "color": "silver" } + + .. code-tab:: csharp + + var dict = new Godot.Collections.Dictionary + { + ["item"] = "sword", + ["quantity"] = 2, + }; + + var otherDict = new Godot.Collections.Dictionary + { + ["quantity"] = 15, + ["color"] = "silver", + }; + + // 默认情况下禁用覆盖已有键。 + dict.Merge(otherDict); + GD.Print(dict); // { "item": "sword", "quantity": 2, "color": "silver" } + + // 启用覆盖已有键。 + dict.Merge(otherDict, true); + GD.Print(dict); // { "item": "sword", "quantity": 15, "color": "silver" } + + + +\ **注意:**\ :ref:`merge` *不*\ 是递归的。嵌套的字典是否可被视为键可以被覆盖,具体取决于 ``overwrite`` 的值,但它们永远不会被合并在一起。 .. rst-class:: classref-item-separator @@ -562,8 +604,8 @@ void **merge** **(** :ref:`Dictionary` dictionary, :ref:`bool< .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Dictionary_operator_neq_Dictionary: @@ -599,10 +641,10 @@ Operator Descriptions 返回该字典中与给定的键 ``key`` 对应的值。如果条目不存在或者失败,则返回 ``null``\ 。为了更安全的访问,请使用 :ref:`get` 或 :ref:`has`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_diraccess.rst b/classes/zh_CN/class_diraccess.rst index 7f96691a3e..34c2f78f78 100644 --- a/classes/zh_CN/class_diraccess.rst +++ b/classes/zh_CN/class_diraccess.rst @@ -10,14 +10,14 @@ DirAccess ========= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 提供管理目录及其内容的方法。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类可以用来管理目录及其内容,不限于项目文件夹。 @@ -88,15 +88,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`文件系统 <../tutorials/scripting/filesystem>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -109,8 +109,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -152,6 +152,8 @@ Methods +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_space_left` **(** **)** | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_case_sensitive` **(** :ref:`String` path **)** |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`list_dir_begin` **(** **)** | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`list_dir_end` **(** **)** | @@ -181,8 +183,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_DirAccess_property_include_hidden: @@ -224,8 +226,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_DirAccess_method_change_dir: @@ -237,6 +239,8 @@ Method Descriptions 返回 :ref:`Error` 错误码常量之一(成功时为 :ref:`@GlobalScope.OK`\ )。 +\ **注意:**\ 新目录必须在相同范围内,例如当在 ``res://`` 中打开目录时,无法将其更改为 ``user://`` 目录。如果需要在另一个访问范围中打开目录,请使用 :ref:`open` 创建一个新实例。 + .. rst-class:: classref-item-separator ---- @@ -475,6 +479,20 @@ Method Descriptions ---- +.. _class_DirAccess_method_is_case_sensitive: + +.. rst-class:: classref-method + +:ref:`bool` **is_case_sensitive** **(** :ref:`String` path **)** |const| + +如果文件系统或目录使用区分大小写的文件名,则返回 ``true``\ 。 + +\ **注意:**\ 该方法在 macOS、Linux(仅对于 EXT4 和 F2FS 文件系统)和 Windows 上实现。在其他平台上,它始终返回 ``true``\ 。 + +.. rst-class:: classref-item-separator + +---- + .. _class_DirAccess_method_list_dir_begin: .. rst-class:: classref-method @@ -619,10 +637,10 @@ void **list_dir_end** **(** **)** 静态版本的 :ref:`rename`\ 。仅支持绝对路径。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_directionallight2d.rst b/classes/zh_CN/class_directionallight2d.rst index 78882a0814..93715f6b18 100644 --- a/classes/zh_CN/class_directionallight2d.rst +++ b/classes/zh_CN/class_directionallight2d.rst @@ -10,14 +10,14 @@ DirectionalLight2D ================== -**Inherits:** :ref:`Light2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Light2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 来自远处的 2D 平行光。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 平行光是一种 :ref:`Light2D` 节点,模拟覆盖整个场景的无数平行光线。可用于远离场景的强光(例如:模拟日光或月光)。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`2D 灯光和阴影 <../tutorials/2d/2d_lights_and_shadows>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_DirectionalLight2D_property_height: @@ -83,10 +83,10 @@ Property Descriptions 对象在其阴影被剔除前与相机中心的最大距离(单位:像素)。降低这个值可以防止位于相机外部的对象投射阴影(同时还可以提高性能)。\ :ref:`Camera2D.zoom` 不被 :ref:`max_distance` 考虑在内,这意味着在较高的缩放值下,当缩放到一个给定的点时,阴影会更快地淡出。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_directionallight3d.rst b/classes/zh_CN/class_directionallight3d.rst index d90f3db85d..0865e36f5b 100644 --- a/classes/zh_CN/class_directionallight3d.rst +++ b/classes/zh_CN/class_directionallight3d.rst @@ -10,30 +10,30 @@ DirectionalLight3D ================== -**Inherits:** :ref:`Light3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Light3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 来自远处的平行光,如太阳光。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 平行光是一种 :ref:`Light3D` 节点,它可以模拟覆盖整个场景的无限数量的平行光线。它用于距离场景较远的强光,以模拟日光或月光。 DirectionalLight3D 变换的世界空间位置(原点)将被忽略。只有基被用于确定光线方向。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`3D 灯光与阴影 <../tutorials/3d/lights_and_shadows>` -- :doc:`Faking global illumination <../tutorials/3d/global_illumination/faking_global_illumination>` +- :doc:`伪造全局光照 <../tutorials/3d/global_illumination/faking_global_illumination>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_DirectionalLight3D_ShadowMode: @@ -137,8 +137,8 @@ enum **SkyMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_DirectionalLight3D_property_directional_shadow_blend_splits: @@ -289,10 +289,10 @@ Property Descriptions 设置该 **DirectionalLight3D** 是否在天空、场景、或天空和场景中可见。有关选项,请参阅 :ref:`SkyMode`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_displayserver.rst b/classes/zh_CN/class_displayserver.rst index 64f9a3e7c5..ebc2afc022 100644 --- a/classes/zh_CN/class_displayserver.rst +++ b/classes/zh_CN/class_displayserver.rst @@ -10,14 +10,14 @@ DisplayServer ============= -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 用于低阶窗口管理的服务器接口。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 所有与窗口管理相关的内容都由 **DisplayServer**\ (显示服务器)处理。因为一个操作系统可能支持多个显示服务器,所以与 :ref:`OS` 是分开的。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -138,6 +138,8 @@ Methods +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`global_menu_is_item_disabled` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`global_menu_is_item_hidden` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`global_menu_is_item_radio_checkable` **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| | +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`global_menu_remove_item` **(** :ref:`String` menu_root, :ref:`int` idx **)** | @@ -152,6 +154,10 @@ Methods +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`global_menu_set_item_disabled` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` disabled **)** | +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`global_menu_set_item_hidden` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` hidden **)** | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`global_menu_set_item_hover_callbacks` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Callable` callback **)** | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`global_menu_set_item_icon` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Texture2D` icon **)** | +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`global_menu_set_item_indentation_level` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`int` level **)** | @@ -172,6 +178,8 @@ Methods +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`global_menu_set_item_tooltip` **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`String` tooltip **)** | +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`global_menu_set_popup_callbacks` **(** :ref:`String` menu_root, :ref:`Callable` open_callback, :ref:`Callable` close_callback **)** | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_feature` **(** :ref:`Feature` feature **)** |const| | +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`ime_get_selection` **(** **)** |const| | @@ -302,6 +310,8 @@ Methods +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`window_get_size_with_decorations` **(** :ref:`int` window_id=0 **)** |const| | +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`window_get_title_size` **(** :ref:`String` title, :ref:`int` window_id=0 **)** |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`VSyncMode` | :ref:`window_get_vsync_mode` **(** :ref:`int` window_id=0 **)** |const| | +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`window_is_focused` **(** :ref:`int` window_id=0 **)** |const| | @@ -365,8 +375,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_DisplayServer_Feature: @@ -906,7 +916,7 @@ enum **FileDialogMode**: :ref:`FileDialogMode` **FILE_DIALOG_MODE_OPEN_FILE** = ``0`` -The native file dialog allows selecting one, and only one file. +该原生对话框只允许选择一个文件。 .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_FILES: @@ -914,7 +924,7 @@ The native file dialog allows selecting one, and only one file. :ref:`FileDialogMode` **FILE_DIALOG_MODE_OPEN_FILES** = ``1`` -The native file dialog allows selecting multiple files. +该原生对话框允许选择多个文件。 .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_DIR: @@ -922,7 +932,7 @@ The native file dialog allows selecting multiple files. :ref:`FileDialogMode` **FILE_DIALOG_MODE_OPEN_DIR** = ``2`` -The native file dialog only allows selecting a directory, disallowing the selection of any file. +该原生对话框只允许选择一个目录,不允许选择任何文件。 .. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_ANY: @@ -930,7 +940,7 @@ The native file dialog only allows selecting a directory, disallowing the select :ref:`FileDialogMode` **FILE_DIALOG_MODE_OPEN_ANY** = ``3`` -The native file dialog allows selecting one file or directory. +该原生对话框允许选择一个文件或目录。 .. _class_DisplayServer_constant_FILE_DIALOG_MODE_SAVE_FILE: @@ -938,7 +948,7 @@ The native file dialog allows selecting one file or directory. :ref:`FileDialogMode` **FILE_DIALOG_MODE_SAVE_FILE** = ``4`` -The native file dialog will warn when a file exists. +当文件存在时,原生对话框会发出警告。 .. rst-class:: classref-item-separator @@ -982,7 +992,11 @@ enum **WindowMode**: 具有完整多窗口支持的全屏模式。 -全屏窗口覆盖屏幕的整个显示区域,没有边框或装饰。显示视频模式没有更改。 +全屏窗口覆盖屏幕的整个显示区域,且没有任何装饰。显示的视频模式没有更改。 + +\ **在 Windows 上:**\ 多窗口全屏模式具有 1px 宽的颜色为 :ref:`ProjectSettings.rendering/environment/defaults/default_clear_color` 的边框。 + +\ **在 macOS 上:**\ 使用新桌面来显示正在运行的项目。 \ **注意:**\ 无论平台如何,启用全屏都会更改窗口大小以匹配显示器的大小。因此,请确保你的项目在启用全屏模式时支持\ :doc:`多种分辨率 <../tutorials/rendering/multiple_resolutions>`\ 。 @@ -998,7 +1012,7 @@ enum **WindowMode**: \ **在 Windows 上:**\ 取决于视频驱动程序,全屏过渡可能会导致屏幕暂时变黑。 -\ **在 macOS 上:**\ 当鼠标指针悬停在屏幕边缘时,独占全屏模式会阻止 Dock 和 Menu 出现。 +\ **在 macOS 上:**\ 一个新的桌面用于显示正在运行的项目。当鼠标指针悬停在屏幕边缘时,独占全屏模式会阻止 Dock 和 Menu 出现。 \ **在 Linux(X11)上:**\ 独占全屏模式会绕过合成器。 @@ -1112,7 +1126,7 @@ enum **WindowEvent**: :ref:`WindowEvent` **WINDOW_EVENT_MOUSE_ENTER** = ``0`` -当鼠标指针进入该窗口时发送,见 :ref:`window_set_window_event_callback`\ 。 +当鼠标指针进入该窗口时发送。 .. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_EXIT: @@ -1120,7 +1134,7 @@ enum **WindowEvent**: :ref:`WindowEvent` **WINDOW_EVENT_MOUSE_EXIT** = ``1`` -当鼠标指针退出该窗口时发送,见 :ref:`window_set_window_event_callback`\ 。 +当鼠标指针退出该窗口时发送。 .. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_IN: @@ -1128,7 +1142,7 @@ enum **WindowEvent**: :ref:`WindowEvent` **WINDOW_EVENT_FOCUS_IN** = ``2`` -当该窗口获得焦点时发送,见 :ref:`window_set_window_event_callback`\ 。 +当窗口获得焦点时发送。 .. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_OUT: @@ -1136,7 +1150,7 @@ enum **WindowEvent**: :ref:`WindowEvent` **WINDOW_EVENT_FOCUS_OUT** = ``3`` -当该窗口失去焦点时发送,见 :ref:`window_set_window_event_callback`\ 。 +当窗口失去焦点时发送。 .. _class_DisplayServer_constant_WINDOW_EVENT_CLOSE_REQUEST: @@ -1144,7 +1158,7 @@ enum **WindowEvent**: :ref:`WindowEvent` **WINDOW_EVENT_CLOSE_REQUEST** = ``4`` -当用户试图关闭该窗口时发送(例如按下关闭按钮),见 :ref:`window_set_window_event_callback`\ 。 +当用户试图关闭该窗口时发送(例如按下关闭按钮)。 .. _class_DisplayServer_constant_WINDOW_EVENT_GO_BACK_REQUEST: @@ -1152,7 +1166,7 @@ enum **WindowEvent**: :ref:`WindowEvent` **WINDOW_EVENT_GO_BACK_REQUEST** = ``5`` -当按下设备的“后退”按钮时发送,见 :ref:`window_set_window_event_callback`\ 。 +当按下设备的“后退”按钮时发送。 \ **注意:**\ 该事件仅在 Android 上实现。 @@ -1162,7 +1176,7 @@ enum **WindowEvent**: :ref:`WindowEvent` **WINDOW_EVENT_DPI_CHANGE** = ``6`` -当窗口被移动到具有不同 DPI 的显示器上,或者显示器的 DPI 更改时发送,见 :ref:`window_set_window_event_callback`\ 。 +当窗口被移动到具有不同 DPI 的显示器上,或者显示器的 DPI 更改时发送。 \ **注意:**\ 该标志仅在 macOS 上实现。 @@ -1172,7 +1186,7 @@ enum **WindowEvent**: :ref:`WindowEvent` **WINDOW_EVENT_TITLEBAR_CHANGE** = ``7`` -当窗口标题栏的装饰改变时发送(例如 :ref:`WINDOW_FLAG_EXTEND_TO_TITLE` 被设置或窗口进入/退出全屏模式),见 :ref:`window_set_window_event_callback`\ 。 +当窗口标题栏的装饰改变时发送(例如 :ref:`WINDOW_FLAG_EXTEND_TO_TITLE` 被设置或窗口进入/退出全屏模式)。 \ **注意:**\ 该标志仅在 macOS 上实现。 @@ -1192,7 +1206,7 @@ enum **VSyncMode**: :ref:`VSyncMode` **VSYNC_DISABLED** = ``0`` -No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). Framerate is unlimited (notwithstanding :ref:`Engine.max_fps`). +没有垂直同步,这意味着引擎将尽可能快地显示帧(可能会有可见的撕裂)。帧速率是未限制的(不考虑 :ref:`Engine.max_fps`\ )。 .. _class_DisplayServer_constant_VSYNC_ENABLED: @@ -1200,7 +1214,7 @@ No vertical synchronization, which means the engine will display frames as fast :ref:`VSyncMode` **VSYNC_ENABLED** = ``1`` -Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). Framerate is limited by the monitor refresh rate (notwithstanding :ref:`Engine.max_fps`). +默认的垂直同步模式,图像只在垂直消隐间隔显示(没有可见的撕裂)。帧速率受显示器刷新率的限制(不考虑 :ref:`Engine.max_fps`\ )。 .. _class_DisplayServer_constant_VSYNC_ADAPTIVE: @@ -1208,7 +1222,7 @@ Default vertical synchronization mode, the image is displayed only on vertical b :ref:`VSyncMode` **VSYNC_ADAPTIVE** = ``2`` -Behaves like :ref:`VSYNC_DISABLED` when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible). Otherwise, vertical synchronization is enabled to avoid tearing. Framerate is limited by the monitor refresh rate (notwithstanding :ref:`Engine.max_fps`). Behaves like :ref:`VSYNC_ENABLED` when using the Compatibility rendering method. +当帧速率降至屏幕刷新率以下以减少卡顿(可能有可见的撕裂)时,行为类似于 :ref:`VSYNC_DISABLED`\ 。否则,启用垂直同步以避免撕裂。帧速率受显示器刷新率的限制(不考虑 :ref:`Engine.max_fps`\ )。使用兼容渲染方法时表现得像 :ref:`VSYNC_ENABLED`\ 。 .. _class_DisplayServer_constant_VSYNC_MAILBOX: @@ -1216,9 +1230,9 @@ Behaves like :ref:`VSYNC_DISABLED` :ref:`VSyncMode` **VSYNC_MAILBOX** = ``3`` -Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). Framerate is unlimited (notwithstanding :ref:`Engine.max_fps`). +在垂直消隐间隔显示队列中的最新图像,同时对其他图像渲染(没有可见的撕裂)。帧速率是未限制的(不考虑 :ref:`Engine.max_fps`\ )。 -Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag (also called "Fast" V-Sync mode). :ref:`VSYNC_MAILBOX` works best when at least twice as many frames as the display refresh rate are rendered. Behaves like :ref:`VSYNC_ENABLED` when using the Compatibility rendering method. +虽然不能保证,但可以尽可能快地渲染图像,这可能会减少输入滞后(也称为“快速”V-Sync 模式)。\ :ref:`VSYNC_MAILBOX` 在渲染的帧数至少是显示器刷新率的两倍时效果最佳。使用兼容渲染方法时表现得像 :ref:`VSYNC_ENABLED`\ 。 .. rst-class:: classref-item-separator @@ -1280,15 +1294,15 @@ enum **HandleType**: :ref:`HandleType` **OPENGL_CONTEXT** = ``3`` -OpenGL context (only with the GL Compatibility renderer): +OpenGL 上下文(仅适用于 GL 兼容性渲染器): -- Windows: ``HGLRC`` for the window (native GL), or ``EGLContext`` for the window (ANGLE). +- Windows:窗口的 ``HGLRC``\ (原生 GL)或窗口的 ``EGLContext``\ (ANGLE)。 -- Linux: ``GLXContext*`` for the window. +- Linux:窗口的 ``GLXContext*``\ 。 -- macOS: ``NSOpenGLContext*`` for the window (native GL), or ``EGLContext`` for the window (ANGLE). +- macOS:窗口的 ``NSOpenGLContext*``\ (原生 GL)或窗口的 ``EGLContext``\ (ANGLE)。 -- Android: ``EGLContext`` for the window. +- Android:窗口的 ``EGLContext``\ 。 .. rst-class:: classref-item-separator @@ -1338,8 +1352,8 @@ enum **TTSUtteranceEvent**: .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_DisplayServer_constant_SCREEN_WITH_MOUSE_FOCUS: @@ -1395,8 +1409,8 @@ Constants .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_DisplayServer_method_clipboard_get: @@ -1416,7 +1430,7 @@ Method Descriptions :ref:`Image` **clipboard_get_image** **(** **)** |const| -Returns the user's clipboard as an image if possible. +如果可能,将用户的剪贴板作为图像返回。 .. rst-class:: classref-item-separator @@ -1442,7 +1456,7 @@ Returns the user's clipboard as an image if possible. :ref:`bool` **clipboard_has** **(** **)** |const| -Returns ``true`` if there is a text content on the user's clipboard. +如果用户的剪贴板中有文本内容,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -1454,7 +1468,7 @@ Returns ``true`` if there is a text content on the user's clipboard. :ref:`bool` **clipboard_has_image** **(** **)** |const| -Returns ``true`` if there is an image content on the user's clipboard. +如果用户的剪贴板中有图像内容,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -1570,21 +1584,21 @@ void **enable_for_stealing_focus** **(** :ref:`int` process_id **)** :ref:`Error` **file_dialog_show** **(** :ref:`String` title, :ref:`String` current_directory, :ref:`String` filename, :ref:`bool` show_hidden, :ref:`FileDialogMode` mode, :ref:`PackedStringArray` filters, :ref:`Callable` callback **)** -Displays OS native dialog for selecting files or directories in the file system. +显示操作系统原生对话框,用于选择文件系统中的文件或目录。 -Callbacks have the following arguments: ``bool status, PackedStringArray selected_paths``. +回调具有以下参数:\ ``bool status, PackedStringArray selected_paths, int selected_filter_index``\ 。 -\ **Note:** This method is implemented if the display server has the ``FEATURE_NATIVE_DIALOG`` feature. +\ **注意:**\ 如果显示服务器具有 :ref:`FEATURE_NATIVE_DIALOG` 功能,则该方法已被实现。 -\ **Note:** This method is implemented on Linux, Windows and macOS. +\ **注意:**\ 该方法在 Linux、Windows 和 macOS 上实现。 -\ **Note:** ``current_directory`` might be ignored. +\ **注意:**\ ``current_directory`` 可能会被忽略。 -\ **Note:** On Linux, ``show_hidden`` is ignored. +\ **注意:**\ 在 Linux 上,\ ``show_hidden`` 被忽略。 -\ **Note:** On macOS, native file dialogs have no title. +\ **注意:**\ 在 macOS 上,原生文件对话框没有标题。 -\ **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use :ref:`OS.get_granted_permissions` to get a list of saved bookmarks. +\ **注意:**\ 在 macOS 上,沙盒应用程序将保存安全范围的书签,以保留对多个会话中打开的文件夹的访问权限。使用 :ref:`OS.get_granted_permissions` 获取已保存书签的列表。 .. rst-class:: classref-item-separator @@ -1624,7 +1638,7 @@ void **force_process_and_drop_events** **(** **)** :ref:`Rect2[]` **get_display_cutouts** **(** **)** |const| -返回 :ref:`Rect2` 的 :ref:`Array`\ ,其中每个都是显示切口或凹口的边界矩形。这些是相机和传感器使用的无边框屏幕上的非功能区域。如果设备没有切口,则返回一个空数组。另请参见 :ref:`get_display_safe_area`\ 。 +返回 :ref:`Rect2` 的 :ref:`Array`\ ,其中每个都是显示切口或凹口的边界矩形。这些是相机和传感器使用的无边框屏幕上的非功能区域。如果设备没有切口,则返回一个空数组。另见 :ref:`get_display_safe_area`\ 。 \ **注意:**\ 目前仅在 Android 上实现。其他平台将返回一个空数组,即使它们确实有显示切口或凹口。 @@ -1638,7 +1652,7 @@ void **force_process_and_drop_events** **(** **)** :ref:`Rect2i` **get_display_safe_area** **(** **)** |const| -返回应渲染交互式控件的显示器的未遮挡区域。另请参见 :ref:`get_display_cutouts`\ 。 +返回应渲染交互式控件的显示器的未遮挡区域。另见 :ref:`get_display_cutouts`\ 。 .. rst-class:: classref-item-separator @@ -1712,9 +1726,9 @@ void **force_process_and_drop_events** **(** **)** :ref:`bool` **get_swap_cancel_ok** **(** **)** -Returns ``true`` if positions of **OK** and **Cancel** buttons are swapped in dialogs. This is enabled by default on Windows to follow interface conventions, and be toggled by changing :ref:`ProjectSettings.gui/common/swap_cancel_ok`. +如果对话框中的\ **确定**\ 和\ **取消**\ 按钮进行了交换,则返回 ``true``\ 。在 Windows 上默认启用,从而遵循界面规范,可以使用 :ref:`ProjectSettings.gui/common/swap_cancel_ok` 开关。 -\ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`dialog_show`. +\ **注意:**\ 由 :ref:`dialog_show` 等生成的原生对话框不受影响。 .. rst-class:: classref-item-separator @@ -2259,6 +2273,22 @@ void **global_menu_clear** **(** :ref:`String` menu_root **)** ---- +.. _class_DisplayServer_method_global_menu_is_item_hidden: + +.. rst-class:: classref-method + +:ref:`bool` **global_menu_is_item_hidden** **(** :ref:`String` menu_root, :ref:`int` idx **)** |const| + +如果索引为 ``idx`` 的菜单项被隐藏,则返回 ``true``\ 。 + +关于如何隐藏菜单项的更多信息见 :ref:`global_menu_set_item_hidden`\ 。 + +\ **注意:**\ 该方法仅在 macOS 上实现。 + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_global_menu_is_item_radio_checkable: .. rst-class:: classref-method @@ -2363,6 +2393,36 @@ void **global_menu_set_item_disabled** **(** :ref:`String` menu_ro ---- +.. _class_DisplayServer_method_global_menu_set_item_hidden: + +.. rst-class:: classref-method + +void **global_menu_set_item_hidden** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`bool` hidden **)** + +隐藏/显示索引为 ``idx`` 的菜单项。当它被隐藏时,项目不会出现在菜单中,并且无法调用其操作。 + +\ **注意:**\ 该方法仅在 macOS 上实现。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_global_menu_set_item_hover_callbacks: + +.. rst-class:: classref-method + +void **global_menu_set_item_hover_callbacks** **(** :ref:`String` menu_root, :ref:`int` idx, :ref:`Callable` callback **)** + +设置索引为 ``idx`` 的菜单项的回调。回调会在菜单项被悬停时发出。 + +\ **注意:**\ ``callback`` Callable 需要接受一个 Variant 参数,传入 Callable 的参数是创建菜单项时传给 ``tag`` 参数的值。 + +\ **注意:**\ 该方法仅在 macOS 上实现。 + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_global_menu_set_item_icon: .. rst-class:: classref-method @@ -2509,6 +2569,18 @@ void **global_menu_set_item_tooltip** **(** :ref:`String` menu_roo ---- +.. _class_DisplayServer_method_global_menu_set_popup_callbacks: + +.. rst-class:: classref-method + +void **global_menu_set_popup_callbacks** **(** :ref:`String` menu_root, :ref:`Callable` open_callback, :ref:`Callable` close_callback **)** + +注册当菜单分别即将显示或关闭时发出的可调用对象。 + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_has_feature: .. rst-class:: classref-method @@ -2557,7 +2629,7 @@ void **global_menu_set_item_tooltip** **(** :ref:`String` menu_roo 如果操作系统正在使用暗黑模式,则返回 ``true``\ 。 -\ **注意:**\ 这个方法在 macOS、Windows 和 Linux(X11)上实现。 +\ **注意:**\ 该方法在 Android、iOS、macOS、Windows 和 Linux(X11)上实现。 .. rst-class:: classref-item-separator @@ -2571,7 +2643,7 @@ void **global_menu_set_item_tooltip** **(** :ref:`String` menu_roo 如果操作系统支持暗黑模式,则返回 ``true``\ 。 -\ **注意:**\ 这个方法在 macOS、Windows 和 Linux(X11)上实现。 +\ **注意:**\ 该方法在 Android、iOS、macOS、Windows 和 Linux(X11)上实现。 .. rst-class:: classref-item-separator @@ -2583,7 +2655,7 @@ void **global_menu_set_item_tooltip** **(** :ref:`String` menu_roo :ref:`bool` **is_touchscreen_available** **(** **)** |const| -Returns ``true`` if touch events are available (Android or iOS), the capability is detected on the Web platform or if :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse` is ``true``. +如果触摸事件可用(Android 或 iOS)、在 Web 平台上检测到该功能或如果 :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse` 为 ``true`` 时,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -2623,9 +2695,9 @@ Returns ``true`` if touch events are available (Android or iOS), the capability :ref:`Key` **keyboard_get_label_from_physical** **(** :ref:`Key` keycode **)** |const| -Converts a physical (US QWERTY) ``keycode`` to localized label printed on the key in the active keyboard layout. +将物理(美式 QWERTY)键码 ``keycode`` 转换为活动键盘布局中的按键上印刷的本地化标签。 -\ **Note:** This method is implemented on Linux (X11), macOS and Windows. +\ **注意:**\ 该方法在 Linux(X11)、macOS 和 Windows 上实现。 .. rst-class:: classref-item-separator @@ -3319,7 +3391,7 @@ void **warp_mouse** **(** :ref:`Vector2i` position **)** :ref:`int` **window_get_current_screen** **(** :ref:`int` window_id=0 **)** |const| -该函数返回窗口 ``window_id`` 所在的屏幕。如果屏幕跨越多个显示器,则返回窗口中心所在的屏幕。另请参见 :ref:`window_set_current_screen` 。 +该函数返回窗口 ``window_id`` 所在的屏幕。如果屏幕跨越多个显示器,则返回窗口中心所在的屏幕。另见 :ref:`window_set_current_screen` 。 .. rst-class:: classref-item-separator @@ -3417,7 +3489,7 @@ void **warp_mouse** **(** :ref:`Vector2i` position **)** :ref:`Vector2i` **window_get_position_with_decorations** **(** :ref:`int` window_id=0 **)** |const| -该函数返回给定窗口在屏幕上的位置,包括操作系统绘制的边框。另请参见 :ref:`window_get_position`\ 。 +该函数返回给定窗口在屏幕上的位置,包括操作系统绘制的边框。另见 :ref:`window_get_position`\ 。 .. rst-class:: classref-item-separator @@ -3459,6 +3531,20 @@ void **warp_mouse** **(** :ref:`Vector2i` position **)** ---- +.. _class_DisplayServer_method_window_get_title_size: + +.. rst-class:: classref-method + +:ref:`Vector2i` **window_get_title_size** **(** :ref:`String` title, :ref:`int` window_id=0 **)** |const| + +返回由 ``window_id`` 指定的窗口的估计窗口标题栏大小(包括文本和窗口按钮)(单位:像素)。该方法不会更改窗口标题。 + +\ **注意:**\ 该方法在 macOS 和 Windows 上实现。 + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_window_get_vsync_mode: .. rst-class:: classref-method @@ -3567,6 +3653,8 @@ void **window_set_drop_files_callback** **(** :ref:`Callable` ca 设置回调 ``callback``\ ,将文件从操作系统的文件管理器拖放到由 ``window_id`` 指定的窗口中时会进行调用。 +\ **警告:**\ 仅限高级用户!将这样的回调添加到 :ref:`Window` 节点将覆盖其默认实现,这可能会引入错误。 + \ **注意:**\ 这个方法在 Windows、macOS、Linux(X11)、Web 上实现。 .. rst-class:: classref-item-separator @@ -3633,6 +3721,8 @@ void **window_set_input_event_callback** **(** :ref:`Callable` c 设置回调 ``callback``\ ,向由 ``window_id`` 指定的窗口发送任何 :ref:`InputEvent` 时会进行回调。 +\ **警告:**\ 仅限高级用户!将这样的回调添加到 :ref:`Window` 节点将覆盖其默认实现,这可能会引入错误。 + .. rst-class:: classref-item-separator ---- @@ -3645,6 +3735,8 @@ void **window_set_input_text_callback** **(** :ref:`Callable` ca 设置回调 ``callback``\ ,使用虚拟键盘向由 ``window_id`` 指定的窗口输入文本时会进行回调。 +\ **警告:**\ 仅限高级用户!将这样的回调添加到 :ref:`Window` 节点将覆盖其默认实现,这可能会引入错误。 + .. rst-class:: classref-item-separator ---- @@ -3787,6 +3879,8 @@ void **window_set_rect_changed_callback** **(** :ref:`Callable` 设置回调 ``callback``\ ,由 ``window_id`` 指定的窗口发生移动或调整大小时会进行回调。 +\ **警告:**\ 仅限高级用户!将这样的回调添加到 :ref:`Window` 节点将覆盖其默认实现,这可能会引入错误。 + .. rst-class:: classref-item-separator ---- @@ -3877,10 +3971,12 @@ void **window_set_window_event_callback** **(** :ref:`Callable` 设置回调 ``callback``\ ,由 ``window_id`` 指定的窗口发生事件时会进行回调。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +\ **警告:**\ 仅限高级用户!将这样的回调添加到 :ref:`Window` 节点将覆盖其默认实现,这可能会引入错误。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_dtlsserver.rst b/classes/zh_CN/class_dtlsserver.rst index 8a2c927fe3..c3df6fd526 100644 --- a/classes/zh_CN/class_dtlsserver.rst +++ b/classes/zh_CN/class_dtlsserver.rst @@ -10,14 +10,14 @@ DTLSServer ========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 实现 DTLS 服务器的辅助类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该类用于存储 DTLS 服务器的状态。在 :ref:`setup` 之后,它将连接的 :ref:`PacketPeerUDP` 转换为 :ref:`PacketPeerDTLS`\ ,通过 :ref:`take_connection` 接受它们作为 DTLS 客户端。在底层,这个类用于存储服务器的 DTLS 状态和 cookie。为什么需要状态和 cookie 的原因不在本文档的范围内。 @@ -174,8 +174,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -192,8 +192,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_DTLSServer_method_setup: @@ -217,10 +217,10 @@ Method Descriptions \ **注意:**\ 必须检查返回的 PacketPeerUDP 的状态是否为 :ref:`PacketPeerDTLS.STATUS_HANDSHAKING`\ ,因为正常情况下,50% 的新连接会因为 cookie 交换而无效。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorcommandpalette.rst b/classes/zh_CN/class_editorcommandpalette.rst index 23c8540ff1..fbd827463b 100644 --- a/classes/zh_CN/class_editorcommandpalette.rst +++ b/classes/zh_CN/class_editorcommandpalette.rst @@ -10,18 +10,18 @@ EditorCommandPalette ==================== -**Inherits:** :ref:`ConfirmationDialog` **<** :ref:`AcceptDialog` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`ConfirmationDialog` **<** :ref:`AcceptDialog` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` Godot 编辑器的命令面板。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Object that holds all the available Commands and their shortcuts text. These Commands can be accessed through **Editor > Command Palette** menu. +该对象包含所有可用命令及其快捷方式文本。这些命令可以通过 **Editor > 命令面板** 菜单访问。 -Command key names use slash delimiters to distinguish sections, for example: ``"example/command1"`` then ``example`` will be the section name. +命令键名使用斜杠分隔符来区分部分,例如:\ ``"example/command1"``\ ,那么 ``example`` 将是部分名称。 .. tabs:: @@ -29,25 +29,25 @@ Command key names use slash delimiters to distinguish sections, for example: ``" .. code-tab:: gdscript var command_palette = EditorInterface.get_command_palette() - # external_command is a function that will be called with the command is executed. + # external_command 是将在命令执行时调用的函数。 var command_callable = Callable(self, "external_command").bind(arguments) command_palette.add_command("command", "test/command",command_callable) .. code-tab:: csharp EditorCommandPalette commandPalette = EditorInterface.Singleton.GetCommandPalette(); - // ExternalCommand is a function that will be called with the command is executed. + // ExternalCommand 是将在命令执行时调用的函数。 Callable commandCallable = new Callable(this, MethodName.ExternalCommand); commandPalette.AddCommand("command", "test/command", commandCallable) -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_command_palette`. +\ **注意:**\ 不应直接实例化此类。相反,使用 :ref:`EditorInterface.get_command_palette` 访问单例。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -76,8 +76,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_EditorCommandPalette_method_add_command: @@ -109,10 +109,10 @@ void **remove_command** **(** :ref:`String` key_name **)** - ``key_name``: :ref:`String` (特定 **Command** 的键名) -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editordebuggerplugin.rst b/classes/zh_CN/class_editordebuggerplugin.rst index 5e88231658..da3de4fdcd 100644 --- a/classes/zh_CN/class_editordebuggerplugin.rst +++ b/classes/zh_CN/class_editordebuggerplugin.rst @@ -10,20 +10,20 @@ EditorDebuggerPlugin ==================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 实现调试器插件的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 编辑器调试器插件 **EditorDebuggerPlugin** 提供了与调试器的编辑器端相关的函数。 要与调试器交互,必须将这个类的实例通过 :ref:`EditorPlugin.add_debugger_plugin` 添加至编辑器。 -添加完成后,会针对该插件可用的每一个编辑器调试器会话 :ref:`EditorDebuggerSession` 回调一次 :ref:`_setup_session`\ ,后续有新的会话也会进行回调(这些会话在此阶段可能尚未激活)。 +添加完成后,会针对该插件可用的每一个编辑器调试器会话 :ref:`EditorDebuggerSession` 回调一次 :ref:`_setup_session`\ ,后续有新的会话也会进行回调(这些会话在此阶段可能尚未激活)。 你可以通过 :ref:`get_sessions` 获取所有可用的 :ref:`EditorDebuggerSession`\ ,也可以通过 :ref:`get_session` 获取特定的会话。 @@ -68,23 +68,23 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_capture` **(** :ref:`String` message, :ref:`Array` data, :ref:`int` session_id **)** |virtual| | - +-----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_capture` **(** :ref:`String` capture **)** |virtual| |const| | - +-----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_setup_session` **(** :ref:`int` session_id **)** |virtual| | - +-----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorDebuggerSession` | :ref:`get_session` **(** :ref:`int` id **)** | - +-----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`get_sessions` **(** **)** | - +-----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_capture` **(** :ref:`String` message, :ref:`Array` data, :ref:`int` session_id **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_capture` **(** :ref:`String` capture **)** |virtual| |const| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_setup_session` **(** :ref:`int` session_id **)** |virtual| | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorDebuggerSession` | :ref:`get_session` **(** :ref:`int` id **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_sessions` **(** **)** | + +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -92,10 +92,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorDebuggerPlugin_method__capture: +.. _class_EditorDebuggerPlugin_private_method__capture: .. rst-class:: classref-method @@ -107,19 +107,19 @@ Method Descriptions ---- -.. _class_EditorDebuggerPlugin_method__has_capture: +.. _class_EditorDebuggerPlugin_private_method__has_capture: .. rst-class:: classref-method :ref:`bool` **_has_capture** **(** :ref:`String` capture **)** |virtual| |const| -覆盖此方法以启用从调试器接收消息。如果\ ``capture``\ 是"my_message",那么以"my_message:"开头的消息将会传递到\ :ref:`_capture`\ 方法。 +覆盖此方法以启用从调试器接收消息。如果\ ``capture``\ 是"my_message",那么以"my_message:"开头的消息将会传递到\ :ref:`_capture`\ 方法。 .. rst-class:: classref-item-separator ---- -.. _class_EditorDebuggerPlugin_method__setup_session: +.. _class_EditorDebuggerPlugin_private_method__setup_session: .. rst-class:: classref-method @@ -149,14 +149,14 @@ void **_setup_session** **(** :ref:`int` session_id **)** |virtual| :ref:`Array` **get_sessions** **(** **)** -Returns an array of :ref:`EditorDebuggerSession` currently available to this debugger plugin. +返回该调试器插件当前可用的 :ref:`EditorDebuggerSession` 数组。 -\ **Note:** Sessions in the array may be inactive, check their state via :ref:`EditorDebuggerSession.is_active`. +\ **注意:**\ 数组中的会话可能处于非活动状态,请通过 :ref:`EditorDebuggerSession.is_active` 检查它们的状态。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editordebuggersession.rst b/classes/zh_CN/class_editordebuggersession.rst index 2b50a4a6f0..1cd0d57597 100644 --- a/classes/zh_CN/class_editordebuggersession.rst +++ b/classes/zh_CN/class_editordebuggersession.rst @@ -10,14 +10,14 @@ EditorDebuggerSession ===================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 与编辑器调试器交互的类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类不能直接实例化,必须通过 :ref:`EditorDebuggerPlugin` 来获取。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -53,8 +53,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_EditorDebuggerSession_signal_breaked: @@ -106,8 +106,8 @@ Signals .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_EditorDebuggerSession_method_add_session_tab: @@ -189,10 +189,10 @@ void **toggle_profiler** **(** :ref:`String` profiler, :ref:`bool< 在所附加的远程实例上开关给定的 ``profiler``\ ,还可以传入额外的数据 ``data``\ 。详见 :ref:`EngineProfiler`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorexportplatform.rst b/classes/zh_CN/class_editorexportplatform.rst index 7155be6820..9d47739a24 100644 --- a/classes/zh_CN/class_editorexportplatform.rst +++ b/classes/zh_CN/class_editorexportplatform.rst @@ -10,32 +10,32 @@ EditorExportPlatform ==================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`EditorExportPlatformAndroid`, :ref:`EditorExportPlatformIOS`, :ref:`EditorExportPlatformMacOS`, :ref:`EditorExportPlatformPC`, :ref:`EditorExportPlatformWeb` +**派生:** :ref:`EditorExportPlatformAndroid`, :ref:`EditorExportPlatformIOS`, :ref:`EditorExportPlatformMacOS`, :ref:`EditorExportPlatformPC`, :ref:`EditorExportPlatformWeb` 标识一个支持的导出平台,并在内部提供导出到该平台的功能。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 基础资源,提供从编辑器将项目的发布构建导出到平台的功能。存储特定于平台的元数据,例如平台的名称和支持的功能,并执行项目、PCK 文件和 ZIP 文件的导出。使用在项目导出时提供的平台导出模板。 -在 :ref:`EditorExportPlugin` 的脚本中用于配置特定于平台的场景和资源的定制。有关详细信息,请参阅 :ref:`EditorExportPlugin._begin_customize_scenes` 和 :ref:`EditorExportPlugin._begin_customize_resources`\ 。 +在 :ref:`EditorExportPlugin` 的脚本中用于配置特定于平台的场景和资源的定制。有关详细信息,请参阅 :ref:`EditorExportPlugin._begin_customize_scenes` 和 :ref:`EditorExportPlugin._begin_customize_resources`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `$DOCS_URL/tutorials/platform/consoles.html `__ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_EditorExportPlatform_method_get_os_name: @@ -59,12 +59,12 @@ Method Descriptions :ref:`String` **get_os_name** **(** **)** |const| -Returns the name of the export operating system handled by this **EditorExportPlatform** class, as a friendly string. Possible return values are ``Windows``, ``Linux``, ``macOS``, ``Android``, ``iOS``, and ``Web``. +以友好字符串的形式,返回由该 **EditorExportPlatform** 类处理的导出操作系统的名称。可能的返回值为 ``Windows``\ 、\ ``Linux``\ 、\ ``macOS``\ 、\ ``Android``\ 、\ ``iOS``\ 、和 ``Web``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorexportplatformandroid.rst b/classes/zh_CN/class_editorexportplatformandroid.rst index f95106429e..77ae3a4508 100644 --- a/classes/zh_CN/class_editorexportplatformandroid.rst +++ b/classes/zh_CN/class_editorexportplatformandroid.rst @@ -10,25 +10,25 @@ EditorExportPlatformAndroid =========================== -**Inherits:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` 适用于 Android 的导出器。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`为 Android 导出 <../tutorials/export/exporting_for_android>` -- :doc:`适用于 Android 的自定义构建 <../tutorials/export/android_custom_build>` +- :doc:`适用于 Android 的 Gradle 构建 <../tutorials/export/android_gradle_build>` -- :doc:`Android plugins documentation index <../tutorials/platform/index>` +- :doc:`Android 插件文档索引 <../tutorials/platform/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -419,8 +419,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_EditorExportPlatformAndroid_property_apk_expansion/SALT: @@ -784,7 +784,7 @@ Play 商店的应用程序类别。 :ref:`bool` **package/show_as_launcher_app** -If ``true``, the user will be able to set this app as the system launcher in Android preferences. +如果为 ``true``\ ,用户将能够在 Android 首选项中将该应用程序设置为系统启动器。 .. rst-class:: classref-item-separator @@ -796,7 +796,7 @@ If ``true``, the user will be able to set this app as the system launcher in And :ref:`bool` **package/show_in_android_tv** -If ``true``, this app will show in Android TV launcher UI. +如果为 ``true``\ ,该应用将显示在 Android TV 启动器 UI 中。 .. rst-class:: classref-item-separator @@ -808,9 +808,9 @@ If ``true``, this app will show in Android TV launcher UI. :ref:`bool` **package/show_in_app_library** -If ``true``, this app will show in the device's app library. +如果为 ``true``\ ,则该应用程序将显示在设备的应用程序库中。 -\ **Note:** This is ``true`` by default. +\ **注意:**\ 默认情况下为 ``true``\ 。 .. rst-class:: classref-item-separator @@ -978,7 +978,7 @@ If ``true``, this app will show in the device's app library. :ref:`bool` **permissions/battery_stats** -Allows an application to collect battery statistics. See `BATTERY_STATS `__. +允许应用程序收集电池统计信息。见 `BATTERY_STATS `__\ 。 .. rst-class:: classref-item-separator @@ -2688,7 +2688,7 @@ API 级别 15 中废弃。 :ref:`int` **version/code** -Machine-readable application version. This must be incremented for every new release pushed to the Play Store. +机器可读的应用程序版本。每向 Play Store 推送一个新版本,该版本都必须递增。 .. rst-class:: classref-item-separator @@ -2700,7 +2700,7 @@ Machine-readable application version. This must be incremented for every new rel :ref:`String` **version/name** -Application version visible to the user. Falls back to :ref:`ProjectSettings.application/config/version` if left empty. +用户可见的应用程序版本。如果留空,则将回退到 :ref:`ProjectSettings.application/config/version`\ 。 .. rst-class:: classref-item-separator @@ -2714,12 +2714,12 @@ Application version visible to the user. Falls back to :ref:`ProjectSettings.app .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorexportplatformios.rst b/classes/zh_CN/class_editorexportplatformios.rst index 090107d69c..868df93d50 100644 --- a/classes/zh_CN/class_editorexportplatformios.rst +++ b/classes/zh_CN/class_editorexportplatformios.rst @@ -10,23 +10,23 @@ EditorExportPlatformIOS ======================= -**Inherits:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` iOS 导出器。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`为 iOS 导出 <../tutorials/export/exporting_for_ios>` -- :doc:`iOS plugins documentation index <../tutorials/platform/ios/index>` +- :doc:`iOS 插件文档索引 <../tutorials/platform/ios/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -153,8 +153,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_EditorExportPlatformIOS_property_application/app_store_team_id: @@ -234,7 +234,7 @@ Apple 团队 ID,唯一的 10 字符的字符串。要找到你的团队 ID, :ref:`bool` **application/export_project_only** -If ``true``, exports iOS project files without building an XCArchive or ``.ipa`` file. If ``false``, exports iOS project files and builds an XCArchive and ``.ipa`` file at the same time. When combining Godot with Fastlane or other build pipelines, you may want to set this to ``true``. +如果为 ``true``\ ,则导出 iOS 项目文件而不构建一份 XCArchive 或 ``.ipa`` 文件。如果为 ``false``\ ,则导出 iOS 项目文件并同时构建一份 XCArchive 和 ``.ipa`` 文件。将 Godot 与 Fastlane 或其他构建管道结合使用时,你可能需要将其设置为 ``true``\ 。 .. rst-class:: classref-item-separator @@ -298,7 +298,7 @@ If ``true``, exports iOS project files without building an XCArchive or ``.ipa`` :ref:`String` **application/short_version** -Application version visible to the user, can only contain numeric characters (``0-9``) and periods (``.``). Falls back to :ref:`ProjectSettings.application/config/version` if left empty. +用户可见的应用程序版本,只能包含数字字符(\ ``0-9``\ )和句点(\ ``.``\ )。如果留空,则回退到 :ref:`ProjectSettings.application/config/version`\ 。 .. rst-class:: classref-item-separator @@ -334,7 +334,7 @@ Application version visible to the user, can only contain numeric characters (`` :ref:`String` **application/version** -Machine-readable application version, in the ``major.minor.patch`` format, can only contain numeric characters (``0-9``) and periods (``.``). This must be incremented on every new release pushed to the App Store. +机器可读的应用程序版本,采用 ``major.minor.patch`` 格式,只能包含数字字符(\ ``0-9``\ )和句点(\ ``.``\ )。该值必须在被推送到 App Store 的每个新版本中递增。 .. rst-class:: classref-item-separator @@ -840,10 +840,10 @@ Storyboard 启动屏幕的自定义背景色。 如果为 ``true``\ ,应用的“Documents”文件夹可以在 iTunes 文件共享中访问。见 `UIFileSharingEnabled `__\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorexportplatformlinuxbsd.rst b/classes/zh_CN/class_editorexportplatformlinuxbsd.rst index 4db5ec7e44..6052ef0a27 100644 --- a/classes/zh_CN/class_editorexportplatformlinuxbsd.rst +++ b/classes/zh_CN/class_editorexportplatformlinuxbsd.rst @@ -10,21 +10,21 @@ EditorExportPlatformLinuxBSD ============================ -**Inherits:** :ref:`EditorExportPlatformPC` **<** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`EditorExportPlatformPC` **<** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` Linux/BSD 导出器。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`为 Linux 导出 <../tutorials/export/exporting_for_linux>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -69,8 +69,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_EditorExportPlatformLinuxBSD_property_binary_format/architecture: @@ -284,10 +284,10 @@ Property Descriptions 如果为 ``true``\ ,则项目中的纹理在导出时使用 S3TC 格式。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorexportplatformmacos.rst b/classes/zh_CN/class_editorexportplatformmacos.rst index 0860203545..4f351d2257 100644 --- a/classes/zh_CN/class_editorexportplatformmacos.rst +++ b/classes/zh_CN/class_editorexportplatformmacos.rst @@ -10,14 +10,14 @@ EditorExportPlatformMacOS ========================= -**Inherits:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` macOS 导出器。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`为 macOS 导出 <../tutorials/export/exporting_for_macos>` @@ -25,8 +25,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -219,8 +219,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_EditorExportPlatformMacOS_property_application/app_category: @@ -276,7 +276,7 @@ App Store 的应用程序分类。 :ref:`int` **application/export_angle** -If set to ``1``, ANGLE libraries are exported with the exported application. If set to ``0``, ANGLE libraries are exported only if :ref:`ProjectSettings.rendering/gl_compatibility/driver` is set to ``"opengl3_angle"``. +如果设置为 ``1``\ ,ANGLE 库将随导出的应用程序一起导出。如果设置为 ``0``\ ,则仅当 :ref:`ProjectSettings.rendering/gl_compatibility/driver` 被设置为 ``"opengl3_angle"`` 时才会导出 ANGLE 库。 .. rst-class:: classref-item-separator @@ -288,7 +288,7 @@ If set to ``1``, ANGLE libraries are exported with the exported application. If :ref:`String` **application/icon** -Application icon file. If left empty, it will fallback to :ref:`ProjectSettings.application/config/macos_native_icon`, and then to :ref:`ProjectSettings.application/config/icon`. +应用程序图标文件。如果留空,则会回退至 :ref:`ProjectSettings.application/config/macos_native_icon`\ ,继而回退至 :ref:`ProjectSettings.application/config/icon`\ 。 .. rst-class:: classref-item-separator @@ -324,7 +324,7 @@ Application icon file. If left empty, it will fallback to :ref:`ProjectSettings. :ref:`String` **application/short_version** -Application version visible to the user, can only contain numeric characters (``0-9``) and periods (``.``). Falls back to :ref:`ProjectSettings.application/config/version` if left empty. +用户可见的应用程序版本,只能包含数字字符(\ ``0-9``\ )和句点(\ ``.``\ )。如果留空,则回退到 :ref:`ProjectSettings.application/config/version`\ 。 .. rst-class:: classref-item-separator @@ -348,7 +348,7 @@ Application version visible to the user, can only contain numeric characters (`` :ref:`String` **application/version** -Machine-readable application version, in the ``major.minor.patch`` format, can only contain numeric characters (``0-9``) and periods (``.``). This must be incremented on every new release pushed to the App Store. +机器可读的应用程序版本,采用 ``major.minor.patch`` 格式,只能包含数字字符(\ ``0-9``\ )和句点(\ ``.``\ )。该值必须在被推送到 App Store 的每个新版本中递增。 .. rst-class:: classref-item-separator @@ -440,7 +440,7 @@ Apple 团队 ID,唯一的 10 字符的字符串。要找到你的团队 ID, :ref:`bool` **codesign/entitlements/address_book** -Enable to allow access to contacts in the user's address book, if it's enabled you should also provide usage message in the ``privacy/address_book_usage_description`` option. See `com.apple.security.personal-information.addressbook `__. +启用后允许访问用户地址簿中的联系人,如果启用,还应该在 :ref:`privacy/address_book_usage_description` 选项中提供用途信息。请参阅 `com.apple.security.personal-information.addressbook `__\ 。 .. rst-class:: classref-item-separator @@ -574,7 +574,7 @@ Enable to allow access to contacts in the user's address book, if it's enabled y :ref:`int` **codesign/entitlements/app_sandbox/files_user_selected** -Allows read or write access to the locations the user has selected using a native file dialog. See `com.apple.security.files.user-selected.read-write `__. +允许对用户使用原生文件对话框选择的位置进行读或写访问。请参阅 `com.apple.security.files.user-selected.read-write `__\ 。 .. rst-class:: classref-item-separator @@ -634,7 +634,7 @@ Allows read or write access to the locations the user has selected using a nativ :ref:`bool` **codesign/entitlements/audio_input** -请在需要使用麦克风或其他音频输入源时启用,启用时还应在 ``privacy/microphone_usage_description`` 选项中提供用途信息。见 `com.apple.security.device.audio-input `__\ 。 +需要使用麦克风或其他音频输入源时启用,启用时还应在 :ref:`privacy/microphone_usage_description` 选项中提供用途信息。请参阅 `com.apple.security.device.audio-input `__\ 。 .. rst-class:: classref-item-separator @@ -646,7 +646,7 @@ Allows read or write access to the locations the user has selected using a nativ :ref:`bool` **codesign/entitlements/calendars** -启用后允许访问用户的日历,启用时还应在 ``privacy/calendar_usage_description`` 选项中提供用途信息。见 `com.apple.security.personal-information.calendars `__\ 。 +启用后允许访问用户的日历,启用时还应在 :ref:`privacy/calendar_usage_description` 选项中提供用途信息。请参阅 `com.apple.security.personal-information.calendars `__\ 。 .. rst-class:: classref-item-separator @@ -658,7 +658,7 @@ Allows read or write access to the locations the user has selected using a nativ :ref:`bool` **codesign/entitlements/camera** -请在需要访问相机时启用,启用时还应在 ``privacy/camera_usage_description`` 选项中提供用途信息。见 `com.apple.security.device.camera `__\ 。 +需要使用相机时启用,启用时还应在 :ref:`privacy/camera_usage_description` 选项中提供用途信息。请参阅 `com.apple.security.device.camera `__\ 。 .. rst-class:: classref-item-separator @@ -706,7 +706,7 @@ Allows read or write access to the locations the user has selected using a nativ :ref:`bool` **codesign/entitlements/location** -如果你需要使用位置服务的位置信息,请启用此选项。如果已启用,则还应在\ ``privacy/location_usage_description``\ 选项中提供使用说明。请参阅\ `com.apple.security.personal-information.location `__\ 。 +需要使用位置服务中的位置信息时启用,启用时还应在 :ref:`privacy/location_usage_description` 选项中提供用途信息。请参阅 `com.apple.security.personal-information.location `__\ 。 .. rst-class:: classref-item-separator @@ -718,7 +718,7 @@ Allows read or write access to the locations the user has selected using a nativ :ref:`bool` **codesign/entitlements/photos_library** -启用后允许对用户的照片库进行访问,启用时还应在 ``privacy/photos_library_usage_description`` 选项中提供用途信息。见 `com.apple.security.personal-information.photos-library `__\ 。 +启用后允许访问用户的照片库,启用时还应在 :ref:`privacy/photos_library_usage_description` 选项中提供用途消息。请参阅 `com.apple.security.personal-information.photos-library `__\ 。 .. rst-class:: classref-item-separator @@ -804,7 +804,7 @@ Allows read or write access to the locations the user has selected using a nativ :ref:`bool` **display/high_res** -If ``true``, the application is rendered at native display resolution, otherwise it is always rendered at loDPI resolution and upscaled by OS when required. +如果为 ``true``\ ,则应用程序使用原生显示器分辨率渲染,否则始终使用 loDPI 分辨率渲染,必要时由操作系统放大。 .. rst-class:: classref-item-separator @@ -1340,10 +1340,10 @@ Apple ID 针对应用的密码。 构建应用程序可执行文件所使用的 Xcode 版本。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorexportplatformpc.rst b/classes/zh_CN/class_editorexportplatformpc.rst index 1acd0e04fd..344e1aee90 100644 --- a/classes/zh_CN/class_editorexportplatformpc.rst +++ b/classes/zh_CN/class_editorexportplatformpc.rst @@ -10,16 +10,16 @@ EditorExportPlatformPC ====================== -**Inherits:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`EditorExportPlatformLinuxBSD`, :ref:`EditorExportPlatformWindows` +**派生:** :ref:`EditorExportPlatformLinuxBSD`, :ref:`EditorExportPlatformWindows` 桌面平台导出器的基类(Windows 与 Linux/BSD)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorexportplatformweb.rst b/classes/zh_CN/class_editorexportplatformweb.rst index f64210f529..5e201b8f5f 100644 --- a/classes/zh_CN/class_editorexportplatformweb.rst +++ b/classes/zh_CN/class_editorexportplatformweb.rst @@ -10,23 +10,23 @@ EditorExportPlatformWeb ======================= -**Inherits:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` Web 导出器。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`为 Web 导出 <../tutorials/export/exporting_for_web>` -- :doc:`Web documentation index <../tutorials/platform/web/index>` +- :doc:`网页文档索引 <../tutorials/platform/web/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -77,8 +77,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_EditorExportPlatformWeb_property_custom_template/debug: @@ -124,7 +124,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -138,7 +138,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -152,7 +152,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -166,7 +166,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -180,7 +180,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -194,7 +194,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -208,7 +208,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -222,7 +222,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -236,7 +236,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -250,7 +250,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -264,7 +264,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -278,7 +278,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -292,7 +292,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -306,7 +306,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -320,7 +320,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -334,12 +334,12 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorexportplatformwindows.rst b/classes/zh_CN/class_editorexportplatformwindows.rst index a8c606a119..e6b49a9fbd 100644 --- a/classes/zh_CN/class_editorexportplatformwindows.rst +++ b/classes/zh_CN/class_editorexportplatformwindows.rst @@ -10,21 +10,21 @@ EditorExportPlatformWindows =========================== -**Inherits:** :ref:`EditorExportPlatformPC` **<** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`EditorExportPlatformPC` **<** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` Windows 导出器。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`为 Windows 导出 <../tutorials/export/exporting_for_windows>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -111,8 +111,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_EditorExportPlatformWindows_property_application/company_name: @@ -156,7 +156,7 @@ Property Descriptions :ref:`int` **application/export_angle** -If set to ``1``, ANGLE libraries are exported with the exported application. If set to ``0``, ANGLE libraries are exported only if :ref:`ProjectSettings.rendering/gl_compatibility/driver` is set to ``"opengl3_angle"``. +如果设置为 ``1``\ ,ANGLE 库将随导出的应用程序一起导出。如果设置为 ``0``\ ,则仅当 :ref:`ProjectSettings.rendering/gl_compatibility/driver` 被设置为 ``"opengl3_angle"`` 时才会导出 ANGLE 库。 .. rst-class:: classref-item-separator @@ -180,7 +180,7 @@ If set to ``1``, ANGLE libraries are exported with the exported application. If :ref:`String` **application/file_version** -Version number of the file. Falls back to :ref:`ProjectSettings.application/config/version` if left empty. See `StringFileInfo `__. +文件的版本号。如果留空,则回退到 :ref:`ProjectSettings.application/config/version`\ 。请参阅 `StringFileInfo `__\ 。 .. rst-class:: classref-item-separator @@ -192,7 +192,7 @@ Version number of the file. Falls back to :ref:`ProjectSettings.application/conf :ref:`String` **application/icon** -Application icon file. If left empty, it will fallback to :ref:`ProjectSettings.application/config/windows_native_icon`, and then to :ref:`ProjectSettings.application/config/icon`. +应用程序图标文件。如果留空,则会回退至 :ref:`ProjectSettings.application/config/windows_native_icon`\ ,继而回退至 :ref:`ProjectSettings.application/config/icon`\ 。 .. rst-class:: classref-item-separator @@ -240,7 +240,7 @@ Application icon file. If left empty, it will fallback to :ref:`ProjectSettings. :ref:`String` **application/product_version** -Application version visible to the user. Falls back to :ref:`ProjectSettings.application/config/version` if left empty. See `StringFileInfo `__. +用户可见的应用程序版本。如果留空,则回退到 :ref:`ProjectSettings.application/config/version`\ 。请参阅 `StringFileInfo `__\ 。 .. rst-class:: classref-item-separator @@ -584,10 +584,10 @@ Application version visible to the user. Falls back to :ref:`ProjectSettings.app 如果为 ``true``\ ,则项目中的纹理在导出时使用 S3TC 格式。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorexportplugin.rst b/classes/zh_CN/class_editorexportplugin.rst index 8f379c3f91..ef34c1bf9f 100644 --- a/classes/zh_CN/class_editorexportplugin.rst +++ b/classes/zh_CN/class_editorexportplugin.rst @@ -10,103 +10,103 @@ EditorExportPlugin ================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 在导出项目时执行的脚本。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**EditorExportPlugin** 会在用户导出项目时自动调用。它们最常见的用途是确定哪些文件应该包含在导出的项目中。对于每个插件,导出过程开始时都会调用 :ref:`_export_begin`\ ,然后会为每一个导出的文件调用 :ref:`_export_file`\ 。 +**EditorExportPlugin** 会在用户导出项目时自动调用。它们最常见的用途是确定哪些文件应该包含在导出的项目中。对于每个插件,导出过程开始时都会调用 :ref:`_export_begin`\ ,然后会为每一个导出的文件调用 :ref:`_export_file`\ 。 要使用 **EditorExportPlugin**\ ,请先用 :ref:`EditorPlugin.add_export_plugin` 注册。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Export Android plugins <../tutorials/platform/android/android_plugin>` +- :doc:`导出 Android 插件 <../tutorials/platform/android/android_plugin>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_begin_customize_resources` **(** :ref:`EditorExportPlatform` platform, :ref:`PackedStringArray` features **)** |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_begin_customize_scenes` **(** :ref:`EditorExportPlatform` platform, :ref:`PackedStringArray` features **)** |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource` | :ref:`_customize_resource` **(** :ref:`Resource` resource, :ref:`String` path **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node` | :ref:`_customize_scene` **(** :ref:`Node` scene, :ref:`String` path **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_end_customize_resources` **(** **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_end_customize_scenes` **(** **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_export_begin` **(** :ref:`PackedStringArray` features, :ref:`bool` is_debug, :ref:`String` path, :ref:`int` flags **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_export_end` **(** **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_export_file` **(** :ref:`String` path, :ref:`String` type, :ref:`PackedStringArray` features **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_android_dependencies` **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_android_dependencies_maven_repos` **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_android_libraries` **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_android_manifest_activity_element_contents` **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_android_manifest_application_element_contents` **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_android_manifest_element_contents` **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_customization_configuration_hash` **(** **)** |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_export_features` **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_export_option_warning` **(** :ref:`EditorExportPlatform` platform, :ref:`String` option **)** |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_export_options` **(** :ref:`EditorExportPlatform` platform **)** |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_should_update_export_options` **(** :ref:`EditorExportPlatform` platform **)** |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_supports_platform` **(** :ref:`EditorExportPlatform` platform **)** |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_file` **(** :ref:`String` path, :ref:`PackedByteArray` file, :ref:`bool` remap **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_ios_bundle_file` **(** :ref:`String` path **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_ios_cpp_code` **(** :ref:`String` code **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_ios_embedded_framework` **(** :ref:`String` path **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_ios_framework` **(** :ref:`String` path **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_ios_linker_flags` **(** :ref:`String` flags **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_ios_plist_content` **(** :ref:`String` plist_content **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_ios_project_static_lib` **(** :ref:`String` path **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_macos_plugin_file` **(** :ref:`String` path **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_shared_object` **(** :ref:`String` path, :ref:`PackedStringArray` tags, :ref:`String` target **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_option` **(** :ref:`StringName` name **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`skip` **(** **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_begin_customize_resources` **(** :ref:`EditorExportPlatform` platform, :ref:`PackedStringArray` features **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_begin_customize_scenes` **(** :ref:`EditorExportPlatform` platform, :ref:`PackedStringArray` features **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`_customize_resource` **(** :ref:`Resource` resource, :ref:`String` path **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`_customize_scene` **(** :ref:`Node` scene, :ref:`String` path **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_end_customize_resources` **(** **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_end_customize_scenes` **(** **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_export_begin` **(** :ref:`PackedStringArray` features, :ref:`bool` is_debug, :ref:`String` path, :ref:`int` flags **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_export_end` **(** **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_export_file` **(** :ref:`String` path, :ref:`String` type, :ref:`PackedStringArray` features **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_android_dependencies` **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_android_dependencies_maven_repos` **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_android_libraries` **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_android_manifest_activity_element_contents` **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_android_manifest_application_element_contents` **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_android_manifest_element_contents` **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_customization_configuration_hash` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_export_features` **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_export_option_warning` **(** :ref:`EditorExportPlatform` platform, :ref:`String` option **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_export_options` **(** :ref:`EditorExportPlatform` platform **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_should_update_export_options` **(** :ref:`EditorExportPlatform` platform **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_supports_platform` **(** :ref:`EditorExportPlatform` platform **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_file` **(** :ref:`String` path, :ref:`PackedByteArray` file, :ref:`bool` remap **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_ios_bundle_file` **(** :ref:`String` path **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_ios_cpp_code` **(** :ref:`String` code **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_ios_embedded_framework` **(** :ref:`String` path **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_ios_framework` **(** :ref:`String` path **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_ios_linker_flags` **(** :ref:`String` flags **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_ios_plist_content` **(** :ref:`String` plist_content **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_ios_project_static_lib` **(** :ref:`String` path **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_macos_plugin_file` **(** :ref:`String` path **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_shared_object` **(** :ref:`String` path, :ref:`PackedStringArray` tags, :ref:`String` target **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_option` **(** :ref:`StringName` name **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`skip` **(** **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -114,10 +114,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorExportPlugin_method__begin_customize_resources: +.. _class_EditorExportPlugin_private_method__begin_customize_resources: .. rst-class:: classref-method @@ -125,13 +125,13 @@ Method Descriptions 如果该插件将根据所使用的平台和功能自定义资源,则返回 ``true``\ 。 -启用后,\ :ref:`_get_customization_configuration_hash`\ 、\ :ref:`_customize_resource` 和 :ref:`_customize_scene` 将被调用并且必须被实现。 +启用后,\ :ref:`_get_customization_configuration_hash`\ 、\ :ref:`_customize_resource` 和 :ref:`_customize_scene` 将被调用并且必须被实现。 .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlugin_method__begin_customize_scenes: +.. _class_EditorExportPlugin_private_method__begin_customize_scenes: .. rst-class:: classref-method @@ -143,7 +143,7 @@ Method Descriptions ---- -.. _class_EditorExportPlugin_method__customize_resource: +.. _class_EditorExportPlugin_private_method__customize_resource: .. rst-class:: classref-method @@ -153,27 +153,27 @@ Method Descriptions \ *path* 参数只在定制一个实际文件时使用,否则这意味着这个资源是另一个资源的一部分,并且它将是空的。 -如果 :ref:`_begin_customize_resources` 返回 ``true``\ ,则需要实现该方法。 +如果 :ref:`_begin_customize_resources` 返回 ``true``\ ,则需要实现该方法。 .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlugin_method__customize_scene: +.. _class_EditorExportPlugin_private_method__customize_scene: .. rst-class:: classref-method :ref:`Node` **_customize_scene** **(** :ref:`Node` scene, :ref:`String` path **)** |virtual| -Customize a scene. If changes are made to it, return the same or a new scene. Otherwise, return ``null``. If a new scene is returned, it is up to you to dispose of the old one. +定制一个场景。如果对其进行了修改,则返回相同的或新的场景。否则,返回 ``null`` 。如果返回一个新的场景,则由你来处理旧的场景。 -Implementing this method is required if :ref:`_begin_customize_scenes` returns ``true``. +如果 :ref:`_begin_customize_scenes` 返回 ``true``\ ,则需要实现该方法。 .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlugin_method__end_customize_resources: +.. _class_EditorExportPlugin_private_method__end_customize_resources: .. rst-class:: classref-method @@ -185,7 +185,7 @@ void **_end_customize_resources** **(** **)** |virtual| ---- -.. _class_EditorExportPlugin_method__end_customize_scenes: +.. _class_EditorExportPlugin_private_method__end_customize_scenes: .. rst-class:: classref-method @@ -197,7 +197,7 @@ void **_end_customize_scenes** **(** **)** |virtual| ---- -.. _class_EditorExportPlugin_method__export_begin: +.. _class_EditorExportPlugin_private_method__export_begin: .. rst-class:: classref-method @@ -209,7 +209,7 @@ void **_export_begin** **(** :ref:`PackedStringArray` f ---- -.. _class_EditorExportPlugin_method__export_end: +.. _class_EditorExportPlugin_private_method__export_end: .. rst-class:: classref-method @@ -221,7 +221,7 @@ void **_export_end** **(** **)** |virtual| ---- -.. _class_EditorExportPlugin_method__export_file: +.. _class_EditorExportPlugin_private_method__export_file: .. rst-class:: classref-method @@ -235,99 +235,99 @@ void **_export_file** **(** :ref:`String` path, :ref:`String` **_get_android_dependencies** **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| -Virtual method to be overridden by the user. This is called to retrieve the set of Android dependencies provided by this plugin. Each returned Android dependency should have the format of an Android remote binary dependency: ``org.godot.example:my-plugin:0.0.0``\ +由用户覆盖的虚方法。调用该函数是为了检索该插件提供的 Android 依赖项集。每个返回的 Android 依赖项应具有 Android 远程二进制依赖项的格式:\ ``org.godot.example:my-plugin:0.0.0``\ -For more information see `Android documentation on dependencies `__. +有关详细信息,请参阅 `有关依赖项的 Android 文档 `__\ 。 -\ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build` to be enabled. +\ **注意:**\ 仅在 Android 上受支持,并且需要启用 :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build`\ 。 .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlugin_method__get_android_dependencies_maven_repos: +.. _class_EditorExportPlugin_private_method__get_android_dependencies_maven_repos: .. rst-class:: classref-method :ref:`PackedStringArray` **_get_android_dependencies_maven_repos** **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| -Virtual method to be overridden by the user. This is called to retrieve the URLs of Maven repositories for the set of Android dependencies provided by this plugin. +由用户覆盖的虚方法。调用该函数是为了检索该插件提供的 Android 依赖项集的 Maven 存储库的 URL。 -For more information see `Gradle documentation on dependency management `__. +有关更多信息,请参阅 `有关依赖管理的 Gradle 文档 `__\ 。 -\ **Note:** Google's Maven repo and the Maven Central repo are already included by default. +\ **注意:**\ Google 的 Maven 存储库和 Maven Central 存储库默认已包含在内。 -\ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build` to be enabled. +\ **注意:**\ 仅在 Android 上受支持,并且需要启用 :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build`\ 。 .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlugin_method__get_android_libraries: +.. _class_EditorExportPlugin_private_method__get_android_libraries: .. rst-class:: classref-method :ref:`PackedStringArray` **_get_android_libraries** **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| -Virtual method to be overridden by the user. This is called to retrieve the local paths of the Android libraries archive (AAR) files provided by this plugin. +由用户覆盖的虚方法。调用该函数是为了检索该插件提供的 Android 库存档(AAR)文件的本地路径。 -\ **Note:** Relative paths **must** be relative to Godot's ``res://addons/`` directory. For example, an AAR file located under ``res://addons/hello_world_plugin/HelloWorld.release.aar`` can be returned as an absolute path using ``res://addons/hello_world_plugin/HelloWorld.release.aar`` or a relative path using ``hello_world_plugin/HelloWorld.release.aar``. +\ **注意:**\ 相对路径\ **必须**\ 相对于 Godot 的 ``res://addons/`` 目录。例如,位于 ``res://addons/hello_world_plugin/HelloWorld.release.aar`` 下的 AAR 文件,可以使用 ``res://addons/hello_world_plugin/HelloWorld.release.aar`` 作为绝对路径,或使用 ``hello_world_plugin/HelloWorld.release.aar`` 作为相对路径返回。 -\ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build` to be enabled. +\ **注意:**\ 仅在 Android 上受支持,并且需要启用 :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build`\ 。 .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlugin_method__get_android_manifest_activity_element_contents: +.. _class_EditorExportPlugin_private_method__get_android_manifest_activity_element_contents: .. rst-class:: classref-method :ref:`String` **_get_android_manifest_activity_element_contents** **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| -Virtual method to be overridden by the user. This is used at export time to update the contents of the ``activity`` element in the generated Android manifest. +由用户覆盖的虚方法。这在导出时用于更新生成的 Android 清单中的 ``activity`` 元素的内容。 -\ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build` to be enabled. +\ **注意:**\ 仅在 Android 上受支持,并且需要启用 :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build`\ 。 .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlugin_method__get_android_manifest_application_element_contents: +.. _class_EditorExportPlugin_private_method__get_android_manifest_application_element_contents: .. rst-class:: classref-method :ref:`String` **_get_android_manifest_application_element_contents** **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| -Virtual method to be overridden by the user. This is used at export time to update the contents of the ``application`` element in the generated Android manifest. +由用户覆盖的虚方法。这在导出时用于更新生成的 Android 清单中的 ``application`` 元素的内容。 -\ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build` to be enabled. +\ **注意:**\ 仅在 Android 上受支持,并且需要启用 :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build`\ 。 .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlugin_method__get_android_manifest_element_contents: +.. _class_EditorExportPlugin_private_method__get_android_manifest_element_contents: .. rst-class:: classref-method :ref:`String` **_get_android_manifest_element_contents** **(** :ref:`EditorExportPlatform` platform, :ref:`bool` debug **)** |virtual| |const| -Virtual method to be overridden by the user. This is used at export time to update the contents of the ``manifest`` element in the generated Android manifest. +由用户覆盖的虚方法。这在导出时用于更新生成的 Android 清单中的 ``manifest`` 元素的内容。 -\ **Note:** Only supported on Android and requires :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build` to be enabled. +\ **注意:**\ 仅在 Android 上受支持,并且需要启用 :ref:`EditorExportPlatformAndroid.gradle_build/use_gradle_build`\ 。 .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlugin_method__get_customization_configuration_hash: +.. _class_EditorExportPlugin_private_method__get_customization_configuration_hash: .. rst-class:: classref-method @@ -335,13 +335,13 @@ Virtual method to be overridden by the user. This is used at export time to upda 根据传入的配置返回一个哈希值(对于场景和资源)。这有助于为单独的导出配置保留单独的缓存。 -如果 :ref:`_begin_customize_resources` 返回 ``true``\ ,则需要实现该方法。 +如果 :ref:`_begin_customize_resources` 返回 ``true``\ ,则需要实现该方法。 .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlugin_method__get_export_features: +.. _class_EditorExportPlugin_private_method__get_export_features: .. rst-class:: classref-method @@ -353,21 +353,21 @@ Virtual method to be overridden by the user. This is used at export time to upda ---- -.. _class_EditorExportPlugin_method__get_export_option_warning: +.. _class_EditorExportPlugin_private_method__get_export_option_warning: .. rst-class:: classref-method :ref:`String` **_get_export_option_warning** **(** :ref:`EditorExportPlatform` platform, :ref:`String` option **)** |virtual| |const| -Check the requirements for the given ``option`` and return a non-empty warning string if they are not met. +检查给定 ``option`` 的要求,如果不满足则返回非空警告字符串。 -\ **Note:** Use :ref:`get_option` to check the value of the export options. +\ **注意:**\ 使用 :ref:`get_option` 检查导出选项的值。 .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlugin_method__get_export_options: +.. _class_EditorExportPlugin_private_method__get_export_options: .. rst-class:: classref-method @@ -387,7 +387,7 @@ Check the requirements for the given ``option`` and return a non-empty warning s ---- -.. _class_EditorExportPlugin_method__get_name: +.. _class_EditorExportPlugin_private_method__get_name: .. rst-class:: classref-method @@ -401,25 +401,25 @@ Check the requirements for the given ``option`` and return a non-empty warning s ---- -.. _class_EditorExportPlugin_method__should_update_export_options: +.. _class_EditorExportPlugin_private_method__should_update_export_options: .. rst-class:: classref-method :ref:`bool` **_should_update_export_options** **(** :ref:`EditorExportPlatform` platform **)** |virtual| |const| -如果 :ref:`_get_export_options` 的结果发生了改变,与 ``platform`` 对应的导出预设的选项需要更新,则返回 ``true``\ 。 +如果 :ref:`_get_export_options` 的结果发生了改变,与 ``platform`` 对应的导出预设的选项需要更新,则返回 ``true``\ 。 .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlugin_method__supports_platform: +.. _class_EditorExportPlugin_private_method__supports_platform: .. rst-class:: classref-method :ref:`bool` **_supports_platform** **(** :ref:`EditorExportPlatform` platform **)** |virtual| |const| -Return ``true`` if the plugin supports the given ``platform``. +如果插件支持给定的 ``platform``\ ,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -433,7 +433,7 @@ void **add_file** **(** :ref:`String` path, :ref:`PackedByteArray< 添加一个要导出的自定义文件。\ ``path`` 是可以用来加载该文件的虚拟路径,\ ``file`` 是该文件的二进制数据。 -在 :ref:`_export_file` 中调用时,如果 ``remap`` 为 ``true``\ ,则当前文件将不会被导出,而是被重新映射到这个自定义文件。在其他地方调用时会忽略 ``remap``\ 。 +在 :ref:`_export_file` 中调用时,如果 ``remap`` 为 ``true``\ ,则当前文件将不会被导出,而是被重新映射到这个自定义文件。在其他地方调用时会忽略 ``remap``\ 。 .. rst-class:: classref-item-separator @@ -469,11 +469,11 @@ void **add_ios_cpp_code** **(** :ref:`String` code **)** void **add_ios_embedded_framework** **(** :ref:`String` path **)** -将动态库(\*.dylib、\*.framework)添加到iOS的Xcode项目的链接阶段,并将其嵌入到生成的二进制文件中。 +将动态库(\*.dylib、\*.framework)添加到 iOS 的 Xcode 项目的链接阶段,并将其嵌入到生成的二进制文件中。 -\ **注意:**\ 对于静态库(\*.a),该方法的工作方式与\ ``add_ios_framework``\ 相同。 +\ **注意:**\ 对于静态库(\*.a),该方法的工作方式与 :ref:`add_ios_framework` 相同。 -此方法不该用于系统库,因为它们已经存在于设备上。 +\ **注意:**\ 此方法不该用于系统库,因为它们已经存在于设备上。 .. rst-class:: classref-item-separator @@ -563,7 +563,7 @@ void **add_shared_object** **(** :ref:`String` path, :ref:`PackedS :ref:`Variant` **get_option** **(** :ref:`StringName` name **)** |const| -返回 :ref:`_get_export_options` 提供的导出选项的当前值。 +返回 :ref:`_get_export_options` 提供的导出选项的当前值。 .. rst-class:: classref-item-separator @@ -575,12 +575,12 @@ void **add_shared_object** **(** :ref:`String` path, :ref:`PackedS void **skip** **(** **)** -在 :ref:`_export_file` 中调用。跳过当前文件,因此它不包括在导出中。 +在 :ref:`_export_file` 中调用。跳过当前文件,因此它不包括在导出中。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorfeatureprofile.rst b/classes/zh_CN/class_editorfeatureprofile.rst index b7b3d7adf8..3c24806039 100644 --- a/classes/zh_CN/class_editorfeatureprofile.rst +++ b/classes/zh_CN/class_editorfeatureprofile.rst @@ -10,14 +10,14 @@ EditorFeatureProfile ==================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 编辑器功能配置,可用于禁用特定功能。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 编辑器功能配置可以用来禁用 Godot 编辑器的特定功能。当禁用时,这些功能将不会出现在编辑器中,从而使编辑器不那么混乱。这个设置使编辑器更简洁,在团队中工作时。例如,游戏美术和关卡设计师可以使用禁用脚本编辑器的功能配置,以避免意外地对他们不应该编辑的文件进行更改。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -61,8 +61,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_EditorFeatureProfile_Feature: @@ -148,8 +148,8 @@ AssetLib 选项卡。如果禁用此功能,则不会显示 AssetLib 选项卡 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_EditorFeatureProfile_method_get_feature_name: @@ -217,9 +217,9 @@ Method Descriptions :ref:`Error` **load_from_file** **(** :ref:`String` path **)** -Loads an editor feature profile from a file. The file must follow the JSON format obtained by using the feature profile manager's **Export** button or the :ref:`save_to_file` method. +从文件加载编辑器功能配置文件。该文件必须遵循使用功能配置文件管理器的\ **导出**\ 按钮或 :ref:`save_to_file` 方法获取的 JSON 格式。 -\ **Note:** Feature profiles created via the user interface are loaded from the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir`. +\ **注意:**\ 通过用户界面创建的功能配置文件将从 ``feature_profiles`` 目录中的扩展名为 ``.profile`` 的文件加载。可以使用 :ref:`EditorPaths.get_config_dir` 找到编辑器配置文件夹。 .. rst-class:: classref-item-separator @@ -231,9 +231,9 @@ Loads an editor feature profile from a file. The file must follow the JSON forma :ref:`Error` **save_to_file** **(** :ref:`String` path **)** -Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's **Import** button or the :ref:`load_from_file` method. +将编辑器功能配置文件保存到一个 JSON 格式的文件中。然后可以使用功能配置文件管理器的\ **导入**\ 按钮或 :ref:`load_from_file` 方法导入它。 -\ **Note:** Feature profiles created via the user interface are saved in the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir`. +\ **注意:**\ 通过用户界面创建的功能配置文件,将作为扩展名为 ``.profile`` 的文件,保存在 ``feature_profiles`` 目录中。可以使用 :ref:`EditorPaths.get_config_dir` 找到编辑器配置文件夹。 .. rst-class:: classref-item-separator @@ -283,10 +283,10 @@ void **set_disable_feature** **(** :ref:`Feature` **<** :ref:`AcceptDialog` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`ConfirmationDialog` **<** :ref:`AcceptDialog` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` 编辑器使用的 :ref:`FileDialog` 的修改版。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **EditorFileDialog** 是 :ref:`FileDialog` 的增强版,只对编辑器插件可用。额外的功能包括收藏列表、最近文件列表和以缩略图网格而不是列表的形式查看文件的能力。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -64,6 +64,8 @@ Methods +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_filter` **(** :ref:`String` filter, :ref:`String` description="" **)** | +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_side_menu` **(** :ref:`Control` menu, :ref:`String` title="" **)** | + +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear_filters` **(** **)** | +-------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`LineEdit` | :ref:`get_line_edit` **(** **)** | @@ -79,8 +81,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_EditorFileDialog_signal_dir_selected: @@ -120,8 +122,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_EditorFileDialog_FileMode: @@ -235,8 +237,8 @@ enum **DisplayMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_EditorFileDialog_property_access: @@ -393,8 +395,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_EditorFileDialog_method_add_filter: @@ -412,6 +414,18 @@ void **add_filter** **(** :ref:`String` filter, :ref:`String` menu, :ref:`String` title="" **)** + +将给定的 ``menu`` 添加到文件对话框的侧边,在顶部显示标题文本 ``title``\ 。仅支持一个侧边菜单。 + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorFileDialog_method_clear_filters: .. rst-class:: classref-method @@ -444,7 +458,7 @@ void **clear_filters** **(** **)** :ref:`VBoxContainer` **get_vbox** **(** **)** -返回用于显示文件系统的 ``VBoxContainer``\ 。 +返回用于显示文件系统的 :ref:`VBoxContainer`\ 。 \ **警告:**\ 这是一个必需的内部节点,移除和释放它可能会导致崩溃。如果你想隐藏它或它的任何子节点,请使用 :ref:`CanvasItem.visible` 属性。 @@ -460,10 +474,10 @@ void **invalidate** **(** **)** 通知 **EditorFileDialog** 它的数据视图不再准确。在下次视图更新时更新视图内容。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorfilesystem.rst b/classes/zh_CN/class_editorfilesystem.rst index 6d9c32a520..91e09fe041 100644 --- a/classes/zh_CN/class_editorfilesystem.rst +++ b/classes/zh_CN/class_editorfilesystem.rst @@ -10,14 +10,14 @@ EditorFileSystem ================ -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` 编辑器可以浏览的资源文件系统。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个对象储存着文件系统里所有的资源的信息,类型和其他。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -57,8 +57,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_EditorFileSystem_signal_filesystem_changed: @@ -122,8 +122,8 @@ Signals .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_EditorFileSystem_method_get_file_type: @@ -195,7 +195,7 @@ void **reimport_files** **(** :ref:`PackedStringArray` 如果文件类型已更改或文件是新创建的,请使用 :ref:`update_file` 或 :ref:`scan`\ 。 -\ **注意:**\ 此函数会阻塞,直到导入完成。但由于进度条更新,主循环迭代,包括计时器和 :ref:`Node._process`\ ,将在导入过程中发生。避免在导入正在进行时调用 :ref:`reimport_files` 或 :ref:`scan`\ 。 +\ **注意:**\ 此函数会阻塞,直到导入完成。但由于进度条更新,主循环迭代,包括计时器和 :ref:`Node._process`\ ,将在导入过程中发生。避免在导入正在进行时调用 :ref:`reimport_files` 或 :ref:`scan`\ 。 .. rst-class:: classref-item-separator @@ -235,10 +235,10 @@ void **update_file** **(** :ref:`String` path **)** 这不会导入文件。要重新导入,请调用 :ref:`reimport_files` 或 :ref:`scan` 方法。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorfilesystemdirectory.rst b/classes/zh_CN/class_editorfilesystemdirectory.rst index 3e352dc070..b924822a97 100644 --- a/classes/zh_CN/class_editorfilesystemdirectory.rst +++ b/classes/zh_CN/class_editorfilesystemdirectory.rst @@ -10,21 +10,21 @@ EditorFileSystemDirectory ========================= -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 资源文件系统的目录。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 目录概念的一个更概括的、低级的概念。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -65,8 +65,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_EditorFileSystemDirectory_method_find_dir_index: @@ -232,10 +232,10 @@ Method Descriptions 返回这个目录的子目录的数量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorfilesystemimportformatsupportquery.rst b/classes/zh_CN/class_editorfilesystemimportformatsupportquery.rst index 1c2563bf33..e293c9ce46 100644 --- a/classes/zh_CN/class_editorfilesystemimportformatsupportquery.rst +++ b/classes/zh_CN/class_editorfilesystemimportformatsupportquery.rst @@ -10,32 +10,32 @@ EditorFileSystemImportFormatSupportQuery ======================================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 用于查询和配置导入格式支持。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该类用于查询和配置某种导入格式。它与资产格式导入插件配合使用。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_file_extensions` **(** **)** |virtual| |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_active` **(** **)** |virtual| |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_query` **(** **)** |virtual| |const| | - +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_file_extensions` **(** **)** |virtual| |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_active` **(** **)** |virtual| |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_query` **(** **)** |virtual| |const| | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -43,10 +43,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorFileSystemImportFormatSupportQuery_method__get_file_extensions: +.. _class_EditorFileSystemImportFormatSupportQuery_private_method__get_file_extensions: .. rst-class:: classref-method @@ -58,7 +58,7 @@ Method Descriptions ---- -.. _class_EditorFileSystemImportFormatSupportQuery_method__is_active: +.. _class_EditorFileSystemImportFormatSupportQuery_private_method__is_active: .. rst-class:: classref-method @@ -70,7 +70,7 @@ Method Descriptions ---- -.. _class_EditorFileSystemImportFormatSupportQuery_method__query: +.. _class_EditorFileSystemImportFormatSupportQuery_private_method__query: .. rst-class:: classref-method @@ -78,10 +78,10 @@ Method Descriptions 查询支持。如果不能继续导入,则返回 false。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorimportplugin.rst b/classes/zh_CN/class_editorimportplugin.rst index a93c6a4d64..12687615db 100644 --- a/classes/zh_CN/class_editorimportplugin.rst +++ b/classes/zh_CN/class_editorimportplugin.rst @@ -10,18 +10,18 @@ EditorImportPlugin ================== -**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` 在编辑器中注册一个自定义资源导入器。使用该类来解析任何文件,并将其作为新的资源类型导入。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **EditorImportPlugin** 提供了一种方法来扩展编辑器的资源导入功能。使用它们从自定义文件中导入资源,或为编辑器的现有导入器提供替代方案。 -EditorImportPlugin 通过与特定的文件扩展名和资源类型相关联来工作。请参见 :ref:`_get_recognized_extensions` 和 :ref:`_get_resource_type`\ 。它们可以选择性地指定一些影响导入过程的导入预设。EditorImportPlugin 负责创建资源并将它们保存在 ``.godot/imported`` 目录中(参见 :ref:`ProjectSettings.application/config/use_hidden_project_data_directory`\ )。 +EditorImportPlugin 通过与特定的文件扩展名和资源类型相关联来工作。请参见 :ref:`_get_recognized_extensions` 和 :ref:`_get_resource_type`\ 。它们可以选择性地指定一些影响导入过程的导入预设。EditorImportPlugin 负责创建资源并将它们保存在 ``.godot/imported`` 目录中(见 :ref:`ProjectSettings.application/config/use_hidden_project_data_directory`\ )。 下面是一个 EditorImportPlugin 的示例,它从扩展名为“.special”或“.spec”的文件中导入 :ref:`Mesh`\ : @@ -141,43 +141,43 @@ EditorImportPlugin 通过与特定的文件扩展名和资源类型相关联来 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`导入插件 <../tutorials/plugins/editor/import_plugins>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_import_options` **(** :ref:`String` path, :ref:`int` preset_index **)** |virtual| |const| | + | :ref:`Dictionary[]` | :ref:`_get_import_options` **(** :ref:`String` path, :ref:`int` preset_index **)** |virtual| |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_import_order` **(** **)** |virtual| |const| | + | :ref:`int` | :ref:`_get_import_order` **(** **)** |virtual| |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_importer_name` **(** **)** |virtual| |const| | + | :ref:`String` | :ref:`_get_importer_name` **(** **)** |virtual| |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_get_option_visibility` **(** :ref:`String` path, :ref:`StringName` option_name, :ref:`Dictionary` options **)** |virtual| |const| | + | :ref:`bool` | :ref:`_get_option_visibility` **(** :ref:`String` path, :ref:`StringName` option_name, :ref:`Dictionary` options **)** |virtual| |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_preset_count` **(** **)** |virtual| |const| | + | :ref:`int` | :ref:`_get_preset_count` **(** **)** |virtual| |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_preset_name` **(** :ref:`int` preset_index **)** |virtual| |const| | + | :ref:`String` | :ref:`_get_preset_name` **(** :ref:`int` preset_index **)** |virtual| |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_priority` **(** **)** |virtual| |const| | + | :ref:`float` | :ref:`_get_priority` **(** **)** |virtual| |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | + | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_resource_type` **(** **)** |virtual| |const| | + | :ref:`String` | :ref:`_get_resource_type` **(** **)** |virtual| |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_save_extension` **(** **)** |virtual| |const| | + | :ref:`String` | :ref:`_get_save_extension` **(** **)** |virtual| |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_visible_name` **(** **)** |virtual| |const| | + | :ref:`String` | :ref:`_get_visible_name` **(** **)** |virtual| |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import` **(** :ref:`String` source_file, :ref:`String` save_path, :ref:`Dictionary` options, :ref:`String[]` platform_variants, :ref:`String[]` gen_files **)** |virtual| |const| | + | :ref:`Error` | :ref:`_import` **(** :ref:`String` source_file, :ref:`String` save_path, :ref:`Dictionary` options, :ref:`String[]` platform_variants, :ref:`String[]` gen_files **)** |virtual| |const| | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`append_import_external_resource` **(** :ref:`String` path, :ref:`Dictionary` custom_options={}, :ref:`String` custom_importer="", :ref:`Variant` generator_parameters=null **)** | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -188,10 +188,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorImportPlugin_method__get_import_options: +.. _class_EditorImportPlugin_private_method__get_import_options: .. rst-class:: classref-method @@ -203,7 +203,7 @@ Method Descriptions ---- -.. _class_EditorImportPlugin_method__get_import_order: +.. _class_EditorImportPlugin_private_method__get_import_order: .. rst-class:: classref-method @@ -215,7 +215,7 @@ Method Descriptions ---- -.. _class_EditorImportPlugin_method__get_importer_name: +.. _class_EditorImportPlugin_private_method__get_importer_name: .. rst-class:: classref-method @@ -227,7 +227,7 @@ Method Descriptions ---- -.. _class_EditorImportPlugin_method__get_option_visibility: +.. _class_EditorImportPlugin_private_method__get_option_visibility: .. rst-class:: classref-method @@ -268,19 +268,19 @@ Method Descriptions ---- -.. _class_EditorImportPlugin_method__get_preset_count: +.. _class_EditorImportPlugin_private_method__get_preset_count: .. rst-class:: classref-method :ref:`int` **_get_preset_count** **(** **)** |virtual| |const| -获取插件定义的初始预设的数量。使用 :ref:`_get_import_options` 获取预设的默认选项,使用 :ref:`_get_preset_name` 获取预设的名称。 +获取插件定义的初始预设的数量。使用 :ref:`_get_import_options` 获取预设的默认选项,使用 :ref:`_get_preset_name` 获取预设的名称。 .. rst-class:: classref-item-separator ---- -.. _class_EditorImportPlugin_method__get_preset_name: +.. _class_EditorImportPlugin_private_method__get_preset_name: .. rst-class:: classref-method @@ -292,7 +292,7 @@ Method Descriptions ---- -.. _class_EditorImportPlugin_method__get_priority: +.. _class_EditorImportPlugin_private_method__get_priority: .. rst-class:: classref-method @@ -304,7 +304,7 @@ Method Descriptions ---- -.. _class_EditorImportPlugin_method__get_recognized_extensions: +.. _class_EditorImportPlugin_private_method__get_recognized_extensions: .. rst-class:: classref-method @@ -316,7 +316,7 @@ Method Descriptions ---- -.. _class_EditorImportPlugin_method__get_resource_type: +.. _class_EditorImportPlugin_private_method__get_resource_type: .. rst-class:: classref-method @@ -328,7 +328,7 @@ Method Descriptions ---- -.. _class_EditorImportPlugin_method__get_save_extension: +.. _class_EditorImportPlugin_private_method__get_save_extension: .. rst-class:: classref-method @@ -340,7 +340,7 @@ Method Descriptions ---- -.. _class_EditorImportPlugin_method__get_visible_name: +.. _class_EditorImportPlugin_private_method__get_visible_name: .. rst-class:: classref-method @@ -352,7 +352,7 @@ Method Descriptions ---- -.. _class_EditorImportPlugin_method__import: +.. _class_EditorImportPlugin_private_method__import: .. rst-class:: classref-method @@ -372,12 +372,12 @@ Method Descriptions :ref:`Error` **append_import_external_resource** **(** :ref:`String` path, :ref:`Dictionary` custom_options={}, :ref:`String` custom_importer="", :ref:`Variant` generator_parameters=null **)** -该函数只能在 :ref:`_import` 回调期间调用,它允许从中手动导入资源。当导入的文件生成需要导入的外部资源(例如图像)时,这很有用。“.import”文件的自定义参数可以通过 ``custom_options`` 传递。此外,在多个导入器可以处理一个文件的情况下,可以指定 ``custom_importer`` 以强制使用某个特定的导入器。该函数会执行一次资源导入并立即返回成功或错误代码。\ ``generator_parameters`` 定义可选的额外元数据,这些元数据将作为 ``generator_parameters`` 存储在 ``.import`` 文件的 ``remap`` 小节中,例如存储源数据的一个 md5 散列值。 +该函数只能在 :ref:`_import` 回调期间调用,它允许从中手动导入资源。当导入的文件生成需要导入的外部资源(例如图像)时,这很有用。“.import”文件的自定义参数可以通过 ``custom_options`` 传递。此外,在多个导入器可以处理一个文件的情况下,可以指定 ``custom_importer`` 以强制使用某个特定的导入器。该函数会执行一次资源导入并立即返回成功或错误代码。\ ``generator_parameters`` 定义可选的额外元数据,这些元数据将作为 ``generator_parameters`` 存储在 ``.import`` 文件的 ``remap`` 小节中,例如存储源数据的一个 md5 散列值。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorinspector.rst b/classes/zh_CN/class_editorinspector.rst index a8d18d153e..ccaffb0639 100644 --- a/classes/zh_CN/class_editorinspector.rst +++ b/classes/zh_CN/class_editorinspector.rst @@ -10,14 +10,14 @@ EditorInspector =============== -**Inherits:** :ref:`ScrollContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`ScrollContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 用于编辑对象属性的控件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这是为编辑器的“设置”对话框、“检查器”面板等实现属性编辑的控件。要获取编辑器的“检查器”面板中所使用的 **EditorInspector**\ ,请使用 :ref:`EditorInterface.get_inspector`\ 。 @@ -33,8 +33,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,12 +45,14 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto + +-----------------------------+----------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`get_edited_object` **(** **)** | +-----------------------------+----------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_selected_path` **(** **)** |const| | +-----------------------------+----------------------------------------------------------------------------------------------+ @@ -61,8 +63,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_EditorInspector_signal_edited_object_changed: @@ -176,8 +178,20 @@ Signals .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- + +.. _class_EditorInspector_method_get_edited_object: + +.. rst-class:: classref-method + +:ref:`Object` **get_edited_object** **(** **)** + +返回当前在该检查器中选择的对象。 + +.. rst-class:: classref-item-separator + +---- .. _class_EditorInspector_method_get_selected_path: @@ -187,10 +201,10 @@ Method Descriptions 获取当前选定属性的路径。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorinspectorplugin.rst b/classes/zh_CN/class_editorinspectorplugin.rst index 784b972fab..328ff4c84c 100644 --- a/classes/zh_CN/class_editorinspectorplugin.rst +++ b/classes/zh_CN/class_editorinspectorplugin.rst @@ -10,24 +10,24 @@ EditorInspectorPlugin ===================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 插件,用于在检查器上添加自定义属性编辑器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **EditorInspectorPlugin** 允许将自定义属性编辑器添加到 :ref:`EditorInspector`\ 。 -当编辑对象时,会调用 :ref:`_can_handle` 函数,如果支持该对象类型,则必须返回 ``true``\ 。 +当编辑对象时,会调用 :ref:`_can_handle` 函数,如果支持该对象类型,则必须返回 ``true``\ 。 -如果支持,函数 :ref:`_parse_begin` 将被调用,允许在类的开头放置自定义控件。 +如果支持,函数 :ref:`_parse_begin` 将被调用,允许在类的开头放置自定义控件。 -随后,为每个类别和属性调用 :ref:`_parse_category` 和 :ref:`_parse_property`\ 。它们也提供了向检查器添加自定义控件的能力。 +随后,为每个类别和属性调用 :ref:`_parse_category` 和 :ref:`_parse_property`\ 。它们也提供了向检查器添加自定义控件的能力。 -最后,将调用 :ref:`_parse_end`\ 。 +最后,将调用 :ref:`_parse_end`\ 。 在这些调用中的每一个,都可以调用“add”函数。 @@ -35,38 +35,38 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`检查器插件 <../tutorials/plugins/editor/inspector_plugins>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_can_handle` **(** :ref:`Object` object **)** |virtual| |const| | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_parse_begin` **(** :ref:`Object` object **)** |virtual| | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_parse_category` **(** :ref:`Object` object, :ref:`String` category **)** |virtual| | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_parse_end` **(** :ref:`Object` object **)** |virtual| | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_parse_group` **(** :ref:`Object` object, :ref:`String` group **)** |virtual| | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_parse_property` **(** :ref:`Object` object, :ref:`Variant.Type` type, :ref:`String` name, :ref:`PropertyHint` hint_type, :ref:`String` hint_string, |bitfield|\<:ref:`PropertyUsageFlags`\> usage_flags, :ref:`bool` wide **)** |virtual| | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_custom_control` **(** :ref:`Control` control **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_property_editor` **(** :ref:`String` property, :ref:`Control` editor, :ref:`bool` add_to_end=false **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_property_editor_for_multiple_properties` **(** :ref:`String` label, :ref:`PackedStringArray` properties, :ref:`Control` editor **)** | - +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_handle` **(** :ref:`Object` object **)** |virtual| |const| | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_parse_begin` **(** :ref:`Object` object **)** |virtual| | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_parse_category` **(** :ref:`Object` object, :ref:`String` category **)** |virtual| | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_parse_end` **(** :ref:`Object` object **)** |virtual| | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_parse_group` **(** :ref:`Object` object, :ref:`String` group **)** |virtual| | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_parse_property` **(** :ref:`Object` object, :ref:`Variant.Type` type, :ref:`String` name, :ref:`PropertyHint` hint_type, :ref:`String` hint_string, |bitfield|\<:ref:`PropertyUsageFlags`\> usage_flags, :ref:`bool` wide **)** |virtual| | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_custom_control` **(** :ref:`Control` control **)** | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_property_editor` **(** :ref:`String` property, :ref:`Control` editor, :ref:`bool` add_to_end=false **)** | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_property_editor_for_multiple_properties` **(** :ref:`String` label, :ref:`PackedStringArray` properties, :ref:`Control` editor **)** | + +-------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -74,10 +74,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorInspectorPlugin_method__can_handle: +.. _class_EditorInspectorPlugin_private_method__can_handle: .. rst-class:: classref-method @@ -89,7 +89,7 @@ Method Descriptions ---- -.. _class_EditorInspectorPlugin_method__parse_begin: +.. _class_EditorInspectorPlugin_private_method__parse_begin: .. rst-class:: classref-method @@ -101,7 +101,7 @@ void **_parse_begin** **(** :ref:`Object` object **)** |virtual| ---- -.. _class_EditorInspectorPlugin_method__parse_category: +.. _class_EditorInspectorPlugin_private_method__parse_category: .. rst-class:: classref-method @@ -113,7 +113,7 @@ void **_parse_category** **(** :ref:`Object` object, :ref:`String< ---- -.. _class_EditorInspectorPlugin_method__parse_end: +.. _class_EditorInspectorPlugin_private_method__parse_end: .. rst-class:: classref-method @@ -125,7 +125,7 @@ void **_parse_end** **(** :ref:`Object` object **)** |virtual| ---- -.. _class_EditorInspectorPlugin_method__parse_group: +.. _class_EditorInspectorPlugin_private_method__parse_group: .. rst-class:: classref-method @@ -137,7 +137,7 @@ void **_parse_group** **(** :ref:`Object` object, :ref:`String`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorinterface.rst b/classes/zh_CN/class_editorinterface.rst index e844e0202e..948aecd0eb 100644 --- a/classes/zh_CN/class_editorinterface.rst +++ b/classes/zh_CN/class_editorinterface.rst @@ -10,18 +10,18 @@ EditorInterface =============== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` Godot 编辑器的界面。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**EditorInterface** gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to :ref:`EditorSettings`, :ref:`EditorFileSystem`, :ref:`EditorResourcePreview`, :ref:`ScriptEditor`, the editor viewport, and information about scenes. +**EditorInterface** 允许控制 Godot 编辑器的窗口,包括自定义窗口,保存和重新加载场景,渲染网格预览,检查和编辑资源和对象,并提供对 :ref:`EditorSettings` , :ref:`EditorFileSystem` , :ref:`EditorResourcePreview` , :ref:`ScriptEditor` ,编辑器视口以及场景信息的访问。 -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton directly by its name. +\ **注意:** 这个类不应该被直接实例化。而是,直接通过名称访问单例。 .. tabs:: @@ -32,15 +32,15 @@ Description .. code-tab:: csharp - // In C# you can access it via the static Singleton property. + // 在 C# 中,可以通过静态 Singleton 属性来访问。 EditorSettings settings = EditorInterface.Singleton.GetEditorSettings(); .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -53,8 +53,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -88,6 +88,10 @@ Methods +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Theme` | :ref:`get_editor_theme` **(** **)** |const| | +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SubViewport` | :ref:`get_editor_viewport_2d` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SubViewport` | :ref:`get_editor_viewport_3d` **(** :ref:`int` idx=0 **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`FileSystemDock` | :ref:`get_file_system_dock` **(** **)** |const| | +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorInspector` | :ref:`get_inspector` **(** **)** |const| | @@ -159,8 +163,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_EditorInterface_property_distraction_free_mode: @@ -198,8 +202,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_EditorInterface_method_edit_node: @@ -259,7 +263,7 @@ void **edit_script** **(** :ref:`Script` script, :ref:`int` 实例。 -\ **警告:** 删除和释放此节点,将使编辑器的一部分失去作用,并可能导致崩溃。 +\ **警告:**\ 删除和释放此节点,将使编辑器的一部分失去作用,并可能导致崩溃。 .. rst-class:: classref-item-separator @@ -283,11 +287,11 @@ void **edit_script** **(** :ref:`Script` script, :ref:`int` **get_current_feature_profile** **(** **)** |const| -Returns the name of the currently activated feature profile. If the default profile is currently active, an empty string is returned instead. +返回当前激活的功能配置文件的名称。如果默认配置文件当前处于活动状态,则返回空字符串。 -In order to get a reference to the :ref:`EditorFeatureProfile`, you must load the feature profile using :ref:`EditorFeatureProfile.load_from_file`. +为了获取对 :ref:`EditorFeatureProfile` 的引用,你必须使用 :ref:`EditorFeatureProfile.load_from_file` 加载该功能配置文件。 -\ **Note:** Feature profiles created via the user interface are loaded from the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir`. +\ **注意:**\ 通过用户界面创建的功能配置文件将从 ``feature_profiles`` 目录中的扩展名为 ``.profile`` 的文件加载。可以使用 :ref:`EditorPaths.get_config_dir` 找到编辑器配置文件夹。 .. rst-class:: classref-item-separator @@ -323,9 +327,9 @@ In order to get a reference to the :ref:`EditorFeatureProfile` **get_editor_main_screen** **(** **)** |const| -返回负责主屏幕插件和工具的编辑器控件。将其与实现了 :ref:`EditorPlugin._has_main_screen` 的插件一起使用。 +返回负责主屏幕插件和工具的编辑器控件。将其与实现了 :ref:`EditorPlugin._has_main_screen` 的插件一起使用。 -\ **警告:** 移除和释放这个节点将使编辑器的一部分失去作用,并可能导致崩溃。 +\ **警告:**\ 移除和释放这个节点将使编辑器的一部分失去作用,并可能导致崩溃。 .. rst-class:: classref-item-separator @@ -375,9 +379,33 @@ In order to get a reference to the :ref:`EditorFeatureProfile` **get_editor_theme** **(** **)** |const| -Returns the editor's :ref:`Theme`. +返回编辑器的 :ref:`Theme`\ 。 -\ **Note:** When creating custom editor UI, prefer accessing theme items directly from your GUI nodes using the ``get_theme_*`` methods. +\ **注意:**\ 创建自定义编辑器 UI 时,请优先直接通过 GUI 节点的 ``get_theme_*`` 方法来访问主题项目。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorInterface_method_get_editor_viewport_2d: + +.. rst-class:: classref-method + +:ref:`SubViewport` **get_editor_viewport_2d** **(** **)** |const| + +返回 2D 编辑器 :ref:`SubViewport`\ 。视口中没有相机。视图是直接进行变换的,可以使用 :ref:`Viewport.global_canvas_transform` 访问。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorInterface_method_get_editor_viewport_3d: + +.. rst-class:: classref-method + +:ref:`SubViewport` **get_editor_viewport_3d** **(** :ref:`int` idx=0 **)** |const| + +返回指定的 3D 编辑器 :ref:`SubViewport`\ ,编号从 ``0`` 到 ``3``\ 。可以通过 :ref:`Viewport.get_camera_3d` 访问视口中的活动编辑器相机。 .. rst-class:: classref-item-separator @@ -691,7 +719,7 @@ void **restart_editor** **(** :ref:`bool` save=true **)** void **save_all_scenes** **(** **)** -Saves all opened scenes in the editor. +保存编辑器中打开的所有场景。 .. rst-class:: classref-item-separator @@ -703,7 +731,7 @@ Saves all opened scenes in the editor. :ref:`Error` **save_scene** **(** **)** -Saves the currently active scene. Returns either :ref:`@GlobalScope.OK` or :ref:`@GlobalScope.ERR_CANT_CREATE`. +保存当前活动场景。返回 :ref:`@GlobalScope.OK` 或 :ref:`@GlobalScope.ERR_CANT_CREATE`\ 。 .. rst-class:: classref-item-separator @@ -715,7 +743,7 @@ Saves the currently active scene. Returns either :ref:`@GlobalScope.OK` path, :ref:`bool` with_preview=true **)** -Saves the currently active scene as a file at ``path``. +将当前活动场景保存为 ``path`` 处的文件。 .. rst-class:: classref-item-separator @@ -739,11 +767,11 @@ void **select_file** **(** :ref:`String` file **)** void **set_current_feature_profile** **(** :ref:`String` profile_name **)** -Selects and activates the specified feature profile with the given ``profile_name``. Set ``profile_name`` to an empty string to reset to the default feature profile. +使用给定的 ``profile_name`` 选择并激活指定的功能配置文件。将 ``profile_name`` 设置为空字符串以重置为默认功能配置文件。 -A feature profile can be created programmatically using the :ref:`EditorFeatureProfile` class. +可以使用 :ref:`EditorFeatureProfile` 类以编程方式创建功能配置文件。 -\ **Note:** The feature profile that gets activated must be located in the ``feature_profiles`` directory, as a file with the ``.profile`` extension. If a profile could not be found, an error occurs. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir`. +\ **注意:**\ 激活的功能配置文件必须位于 ``feature_profiles`` 目录中,且该文件的扩展名为 ``.profile``\ 。如果找不到配置文件,则会发生错误。可以使用 :ref:`EditorPaths.get_config_dir` 找到编辑器配置文件夹。 .. rst-class:: classref-item-separator @@ -781,10 +809,10 @@ void **stop_playing_scene** **(** **)** 停止当前正在播放的场景。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editornode3dgizmo.rst b/classes/zh_CN/class_editornode3dgizmo.rst index 780bf55a47..dee16644bb 100644 --- a/classes/zh_CN/class_editornode3dgizmo.rst +++ b/classes/zh_CN/class_editornode3dgizmo.rst @@ -10,47 +10,47 @@ EditorNode3DGizmo ================= -**Inherits:** :ref:`Node3DGizmo` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Node3DGizmo` **<** :ref:`RefCounted` **<** :ref:`Object` -用于编辑 Node3D 对象的小工具。 +用于编辑 :ref:`Node3D` 对象的小工具。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -小工具可用于为 Node3D 对象提供自定义可视化和编辑功能(控柄和子小工具)。可以被重写以创建自定义小工具,但对于简单的小工具而言,通常建议创建 :ref:`EditorNode3DGizmoPlugin`\ 。 +小工具可用于为 :ref:`Node3D` 对象提供自定义可视化和编辑功能(控柄和子小工具)。可以被重写以创建自定义小工具,但对于简单的小工具而言,通常建议创建 :ref:`EditorNode3DGizmoPlugin`\ 。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_commit_handle` **(** :ref:`int` id, :ref:`bool` secondary, :ref:`Variant` restore, :ref:`bool` cancel **)** |virtual| | + | void | :ref:`_commit_handle` **(** :ref:`int` id, :ref:`bool` secondary, :ref:`Variant` restore, :ref:`bool` cancel **)** |virtual| | +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_commit_subgizmos` **(** :ref:`PackedInt32Array` ids, :ref:`Transform3D[]` restores, :ref:`bool` cancel **)** |virtual| | + | void | :ref:`_commit_subgizmos` **(** :ref:`PackedInt32Array` ids, :ref:`Transform3D[]` restores, :ref:`bool` cancel **)** |virtual| | +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_handle_name` **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| | + | :ref:`String` | :ref:`_get_handle_name` **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| | +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_handle_value` **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| | + | :ref:`Variant` | :ref:`_get_handle_value` **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| | +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`_get_subgizmo_transform` **(** :ref:`int` id **)** |virtual| |const| | + | :ref:`Transform3D` | :ref:`_get_subgizmo_transform` **(** :ref:`int` id **)** |virtual| |const| | +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_handle_highlighted` **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| | + | :ref:`bool` | :ref:`_is_handle_highlighted` **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| | +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_redraw` **(** **)** |virtual| | + | void | :ref:`_redraw` **(** **)** |virtual| | +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_handle` **(** :ref:`int` id, :ref:`bool` secondary, :ref:`Camera3D` camera, :ref:`Vector2` point **)** |virtual| | + | void | :ref:`_set_handle` **(** :ref:`int` id, :ref:`bool` secondary, :ref:`Camera3D` camera, :ref:`Vector2` point **)** |virtual| | +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_subgizmo_transform` **(** :ref:`int` id, :ref:`Transform3D` transform **)** |virtual| | + | void | :ref:`_set_subgizmo_transform` **(** :ref:`int` id, :ref:`Transform3D` transform **)** |virtual| | +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`_subgizmos_intersect_frustum` **(** :ref:`Camera3D` camera, :ref:`Plane[]` frustum **)** |virtual| |const| | + | :ref:`PackedInt32Array` | :ref:`_subgizmos_intersect_frustum` **(** :ref:`Camera3D` camera, :ref:`Plane[]` frustum **)** |virtual| |const| | +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_subgizmos_intersect_ray` **(** :ref:`Camera3D` camera, :ref:`Vector2` point **)** |virtual| |const| | + | :ref:`int` | :ref:`_subgizmos_intersect_ray` **(** :ref:`Camera3D` camera, :ref:`Vector2` point **)** |virtual| |const| | +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_collision_segments` **(** :ref:`PackedVector3Array` segments **)** | +---------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -85,10 +85,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorNode3DGizmo_method__commit_handle: +.. _class_EditorNode3DGizmo_private_method__commit_handle: .. rst-class:: classref-method @@ -104,13 +104,13 @@ void **_commit_handle** **(** :ref:`int` id, :ref:`bool` ---- -.. _class_EditorNode3DGizmo_method__commit_subgizmos: +.. _class_EditorNode3DGizmo_private_method__commit_subgizmos: .. rst-class:: classref-method void **_commit_subgizmos** **(** :ref:`PackedInt32Array` ids, :ref:`Transform3D[]` restores, :ref:`bool` cancel **)** |virtual| -覆盖该方法,以提交一组正在编辑的子小工具(参见 :ref:`_subgizmos_intersect_ray` 和 :ref:`_subgizmos_intersect_frustum`\ )。这通常意味着为该更改创建一个 :ref:`UndoRedo` 动作,将当前变换用作“做”,并将 ``restores`` 变换用作“撤消”。 +覆盖该方法,以提交一组正在编辑的子小工具(参见 :ref:`_subgizmos_intersect_ray` 和 :ref:`_subgizmos_intersect_frustum`\ )。这通常意味着为该更改创建一个 :ref:`UndoRedo` 动作,将当前变换用作“做”,并将 ``restores`` 变换用作“撤消”。 如果 ``cancel`` 参数为 ``true``\ ,则\ ``restores`` 变换应被直接设置 ,而无需任何 :ref:`UndoRedo` 动作。 @@ -118,7 +118,7 @@ void **_commit_subgizmos** **(** :ref:`PackedInt32Array` ---- -.. _class_EditorNode3DGizmo_method__get_handle_name: +.. _class_EditorNode3DGizmo_private_method__get_handle_name: .. rst-class:: classref-method @@ -132,13 +132,13 @@ void **_commit_subgizmos** **(** :ref:`PackedInt32Array` ---- -.. _class_EditorNode3DGizmo_method__get_handle_value: +.. _class_EditorNode3DGizmo_private_method__get_handle_value: .. rst-class:: classref-method :ref:`Variant` **_get_handle_value** **(** :ref:`int` id, :ref:`bool` secondary **)** |virtual| |const| -覆盖该方法,以返回一个控柄的当前值。该值将在编辑开始时被请求,并用作 :ref:`_commit_handle` 中的 ``restore`` 参数。 +覆盖该方法,以返回一个控柄的当前值。该值将在编辑开始时被请求,并用作 :ref:`_commit_handle` 中的 ``restore`` 参数。 当请求的控柄是次要控柄时,\ ``secondary`` 参数为 ``true``\ (有关更多信息,请参阅 :ref:`add_handles`\ )。 @@ -146,19 +146,19 @@ void **_commit_subgizmos** **(** :ref:`PackedInt32Array` ---- -.. _class_EditorNode3DGizmo_method__get_subgizmo_transform: +.. _class_EditorNode3DGizmo_private_method__get_subgizmo_transform: .. rst-class:: classref-method :ref:`Transform3D` **_get_subgizmo_transform** **(** :ref:`int` id **)** |virtual| |const| -覆盖该方法,以返回子小工具的当前变换。该变换将在编辑开始时被请求,并用作 :ref:`_commit_subgizmos` 中的 ``restore`` 参数。 +覆盖该方法,以返回子小工具的当前变换。该变换将在编辑开始时被请求,并用作 :ref:`_commit_subgizmos` 中的 ``restore`` 参数。 .. rst-class:: classref-item-separator ---- -.. _class_EditorNode3DGizmo_method__is_handle_highlighted: +.. _class_EditorNode3DGizmo_private_method__is_handle_highlighted: .. rst-class:: classref-method @@ -172,7 +172,7 @@ void **_commit_subgizmos** **(** :ref:`PackedInt32Array` ---- -.. _class_EditorNode3DGizmo_method__redraw: +.. _class_EditorNode3DGizmo_private_method__redraw: .. rst-class:: classref-method @@ -184,7 +184,7 @@ void **_redraw** **(** **)** |virtual| ---- -.. _class_EditorNode3DGizmo_method__set_handle: +.. _class_EditorNode3DGizmo_private_method__set_handle: .. rst-class:: classref-method @@ -198,37 +198,37 @@ void **_set_handle** **(** :ref:`int` id, :ref:`bool` sec ---- -.. _class_EditorNode3DGizmo_method__set_subgizmo_transform: +.. _class_EditorNode3DGizmo_private_method__set_subgizmo_transform: .. rst-class:: classref-method void **_set_subgizmo_transform** **(** :ref:`int` id, :ref:`Transform3D` transform **)** |virtual| -覆盖该方法,以在子小工具编辑期间更新节点属性(参见 :ref:`_subgizmos_intersect_ray` 和 :ref:`_subgizmos_intersect_frustum`\ )。\ ``transform`` 是在 Node3D 的局部坐标系中给出的。 +覆盖该方法,以在子小工具编辑期间更新节点属性(参见 :ref:`_subgizmos_intersect_ray` 和 :ref:`_subgizmos_intersect_frustum`\ )。\ ``transform`` 是在 :ref:`Node3D` 的局部坐标系中给出的。 .. rst-class:: classref-item-separator ---- -.. _class_EditorNode3DGizmo_method__subgizmos_intersect_frustum: +.. _class_EditorNode3DGizmo_private_method__subgizmos_intersect_frustum: .. rst-class:: classref-method :ref:`PackedInt32Array` **_subgizmos_intersect_frustum** **(** :ref:`Camera3D` camera, :ref:`Plane[]` frustum **)** |virtual| |const| -覆盖该方法,以允许使用鼠标拖动框选来选择子小工具。给定一个 ``camera`` 和一个 ``frustum``\ ,这个方法应该返回哪些子小工具包含在锥体中。\ ``frustum`` 参数由一个构成选择锥体的所有 ``Plane`` 的 ``Array`` 组成。返回的值应该包含一个唯一的子小工具标识符列表,它可以有任何非负值,并将用于其他虚方法,如 :ref:`_get_subgizmo_transform` 或 :ref:`_commit_subgizmos`\ 。 +覆盖该方法,以允许使用鼠标拖动框选来选择子小工具。给定一个 ``camera`` 和一个 ``frustum``\ ,这个方法应该返回哪些子小工具包含在锥体中。\ ``frustum`` 参数由一个数组组成,其中包含构成选择锥体的所有 :ref:`Plane`\ 。返回的值应该包含一个唯一的子小工具标识符列表,它可以有任何非负值,并将用于其他虚方法,如 :ref:`_get_subgizmo_transform` 或 :ref:`_commit_subgizmos`\ 。 .. rst-class:: classref-item-separator ---- -.. _class_EditorNode3DGizmo_method__subgizmos_intersect_ray: +.. _class_EditorNode3DGizmo_private_method__subgizmos_intersect_ray: .. rst-class:: classref-method :ref:`int` **_subgizmos_intersect_ray** **(** :ref:`Camera3D` camera, :ref:`Vector2` point **)** |virtual| |const| -覆盖该方法,以允许使用鼠标点击选择子小工具。给定屏幕坐标中的 ``camera`` 和 ``point`` 时,该方法应返回应选择哪个子小工具。返回值应该是一个唯一的子小工具标识符,它可以有任何非负值,并将用于其他虚方法,如 :ref:`_get_subgizmo_transform` 或 :ref:`_commit_subgizmos`\ 。 +覆盖该方法,以允许使用鼠标点击选择子小工具。给定屏幕坐标中的 ``camera`` 和 ``point`` 时,该方法应返回应选择哪个子小工具。返回值应该是一个唯一的子小工具标识符,它可以有任何非负值,并将用于其他虚方法,如 :ref:`_get_subgizmo_transform` 或 :ref:`_commit_subgizmos`\ 。 .. rst-class:: classref-item-separator @@ -240,7 +240,7 @@ void **_set_subgizmo_transform** **(** :ref:`int` id, :ref:`Transform void **add_collision_segments** **(** :ref:`PackedVector3Array` segments **)** -将指定的 ``segments`` 添加到小工具的碰撞形状以进行拾取。在 :ref:`_redraw` 期间调用该方法。 +将指定的 ``segments`` 添加到小工具的碰撞形状以进行拾取。在 :ref:`_redraw` 期间调用该方法。 .. rst-class:: classref-item-separator @@ -252,7 +252,7 @@ void **add_collision_segments** **(** :ref:`PackedVector3Array` triangles **)** -将碰撞三角形添加到小工具以进行拾取。\ :ref:`TriangleMesh` 也可以从常规 :ref:`Mesh` 生成。在 :ref:`_redraw` 期间调用该方法。 +将碰撞三角形添加到小工具以进行拾取。\ :ref:`TriangleMesh` 也可以从常规 :ref:`Mesh` 生成。在 :ref:`_redraw` 期间调用该方法。 .. rst-class:: classref-item-separator @@ -264,11 +264,11 @@ void **add_collision_triangles** **(** :ref:`TriangleMesh` t void **add_handles** **(** :ref:`PackedVector3Array` handles, :ref:`Material` material, :ref:`PackedInt32Array` ids, :ref:`bool` billboard=false, :ref:`bool` secondary=false **)** -添加可用于编辑该小工具的 Node3D 属性的一组控柄(点)。\ ``ids`` 参数可用于为每个控柄指定一个自定义的标识符,如果传递了一个空的 ``Array``\ ,id 将按照 ``handles`` 参数顺序自动分配。 +添加可用于编辑该小工具的 :ref:`Node3D` 属性的一组控柄(点)。\ ``ids`` 参数可用于为每个控柄指定一个自定义的标识符,如果传递了一个空的数组,id 将按照 ``handles`` 参数顺序自动分配。 \ ``secondary`` 参数将添加的控柄标记为次要控柄,这意味着它们通常比普通控柄具有更低的选择优先级。当用户按住 Shift 键时,次要控柄将被切换为比普通控柄具有更高的优先级。这种优先级的变化可用于在同一点放置多个控柄,同时仍让用户控制他们的选择。 -这些虚方法将在编辑这些控柄时被调用。在 :ref:`_redraw` 期间将调用该方法。 +这些虚方法将在编辑这些控柄时被调用。在 :ref:`_redraw` 期间将调用该方法。 .. rst-class:: classref-item-separator @@ -280,7 +280,7 @@ void **add_handles** **(** :ref:`PackedVector3Array` h void **add_lines** **(** :ref:`PackedVector3Array` lines, :ref:`Material` material, :ref:`bool` billboard=false, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** -为小工具添加使用给定材质的线段(一对对点的集合)。线段将用于展示和选择。请在 :ref:`_redraw` 期间调用此方法。 +为小工具添加使用给定材质的线段(一对对点的集合)。线段将用于展示和选择。请在 :ref:`_redraw` 期间调用此方法。 .. rst-class:: classref-item-separator @@ -292,7 +292,7 @@ void **add_lines** **(** :ref:`PackedVector3Array` lin void **add_mesh** **(** :ref:`Mesh` mesh, :ref:`Material` material=null, :ref:`Transform3D` transform=Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), :ref:`SkinReference` skeleton=null **)** -为小工具添加网格,可以指定材质 ``material``\ 、本地变换 ``transform`` 和骨架 ``skeleton``\ 。请在 :ref:`_redraw` 期间调用此方法。 +为小工具添加网格,可以指定材质 ``material``\ 、本地变换 ``transform`` 和骨架 ``skeleton``\ 。请在 :ref:`_redraw` 期间调用此方法。 .. rst-class:: classref-item-separator @@ -304,7 +304,7 @@ void **add_mesh** **(** :ref:`Mesh` mesh, :ref:`Material` material, :ref:`float` default_scale=1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** -添加未缩放的公告板,将用于展示和选择。请在 :ref:`_redraw` 期间调用此方法。 +添加未缩放的公告板,将用于展示和选择。请在 :ref:`_redraw` 期间调用此方法。 .. rst-class:: classref-item-separator @@ -352,7 +352,7 @@ void **clear** **(** **)** :ref:`PackedInt32Array` **get_subgizmo_selection** **(** **)** |const| -返回当前选定的子小工具的列表。可用于在 :ref:`_redraw` 期间高亮显示所选元素。 +返回当前选定的子小工具的列表。可用于在 :ref:`_redraw` 期间高亮显示所选元素。 .. rst-class:: classref-item-separator @@ -364,7 +364,7 @@ void **clear** **(** **)** :ref:`bool` **is_subgizmo_selected** **(** :ref:`int` id **)** |const| -如果给定的子小工具是当前所选定的,则返回 ``true``\ 。可用于在 :ref:`_redraw` 期间高亮显示所选元素。 +如果给定的子小工具是当前所选定的,则返回 ``true``\ 。可用于在 :ref:`_redraw` 期间高亮显示所选元素。 .. rst-class:: classref-item-separator @@ -390,10 +390,10 @@ void **set_node_3d** **(** :ref:`Node` node **)** 设置该小工具参考的 :ref:`Node3D` 节点。\ ``node`` 必须继承自 :ref:`Node3D`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editornode3dgizmoplugin.rst b/classes/zh_CN/class_editornode3dgizmoplugin.rst index d872784b4f..8bd0d969fb 100644 --- a/classes/zh_CN/class_editornode3dgizmoplugin.rst +++ b/classes/zh_CN/class_editornode3dgizmoplugin.rst @@ -10,14 +10,14 @@ EditorNode3DGizmoPlugin ======================= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 编辑器用来定义 Node3D 小工具类型的类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **EditorNode3DGizmoPlugin** 允许定义一种新的小工具类型。定义主要有两种方法:比较简单的小工具可以扩展 **EditorNode3DGizmoPlugin**\ ,否则可以创建新的 :ref:`EditorNode3DGizmo` 类型。有关详细信息,请参阅文档中的教程。 @@ -25,64 +25,64 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`Node3D 小工具插件 <../tutorials/plugins/editor/3d_gizmos>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_can_be_hidden` **(** **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_commit_handle` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary, :ref:`Variant` restore, :ref:`bool` cancel **)** |virtual| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_commit_subgizmos` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`PackedInt32Array` ids, :ref:`Transform3D[]` restores, :ref:`bool` cancel **)** |virtual| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorNode3DGizmo` | :ref:`_create_gizmo` **(** :ref:`Node3D` for_node_3d **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_gizmo_name` **(** **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_handle_name` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_handle_value` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_priority` **(** **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`_get_subgizmo_transform` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` subgizmo_id **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_gizmo` **(** :ref:`Node3D` for_node_3d **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_handle_highlighted` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_selectable_when_hidden` **(** **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_redraw` **(** :ref:`EditorNode3DGizmo` gizmo **)** |virtual| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_handle` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary, :ref:`Camera3D` camera, :ref:`Vector2` screen_pos **)** |virtual| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_subgizmo_transform` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` subgizmo_id, :ref:`Transform3D` transform **)** |virtual| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`_subgizmos_intersect_frustum` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`Camera3D` camera, :ref:`Plane[]` frustum_planes **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_subgizmos_intersect_ray` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`Camera3D` camera, :ref:`Vector2` screen_pos **)** |virtual| |const| | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_material` **(** :ref:`String` name, :ref:`StandardMaterial3D` material **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_handle_material` **(** :ref:`String` name, :ref:`bool` billboard=false, :ref:`Texture2D` texture=null **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_icon_material` **(** :ref:`String` name, :ref:`Texture2D` texture, :ref:`bool` on_top=false, :ref:`Color` color=Color(1, 1, 1, 1) **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`create_material` **(** :ref:`String` name, :ref:`Color` color, :ref:`bool` billboard=false, :ref:`bool` on_top=false, :ref:`bool` use_vertex_color=false **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StandardMaterial3D` | :ref:`get_material` **(** :ref:`String` name, :ref:`EditorNode3DGizmo` gizmo=null **)** | - +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_be_hidden` **(** **)** |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_commit_handle` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary, :ref:`Variant` restore, :ref:`bool` cancel **)** |virtual| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_commit_subgizmos` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`PackedInt32Array` ids, :ref:`Transform3D[]` restores, :ref:`bool` cancel **)** |virtual| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorNode3DGizmo` | :ref:`_create_gizmo` **(** :ref:`Node3D` for_node_3d **)** |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_gizmo_name` **(** **)** |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_handle_name` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_handle_value` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_priority` **(** **)** |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_get_subgizmo_transform` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` subgizmo_id **)** |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_gizmo` **(** :ref:`Node3D` for_node_3d **)** |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_handle_highlighted` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_selectable_when_hidden` **(** **)** |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_redraw` **(** :ref:`EditorNode3DGizmo` gizmo **)** |virtual| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_handle` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary, :ref:`Camera3D` camera, :ref:`Vector2` screen_pos **)** |virtual| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_subgizmo_transform` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` subgizmo_id, :ref:`Transform3D` transform **)** |virtual| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_subgizmos_intersect_frustum` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`Camera3D` camera, :ref:`Plane[]` frustum_planes **)** |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_subgizmos_intersect_ray` **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`Camera3D` camera, :ref:`Vector2` screen_pos **)** |virtual| |const| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_material` **(** :ref:`String` name, :ref:`StandardMaterial3D` material **)** | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_handle_material` **(** :ref:`String` name, :ref:`bool` billboard=false, :ref:`Texture2D` texture=null **)** | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_icon_material` **(** :ref:`String` name, :ref:`Texture2D` texture, :ref:`bool` on_top=false, :ref:`Color` color=Color(1, 1, 1, 1) **)** | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`create_material` **(** :ref:`String` name, :ref:`Color` color, :ref:`bool` billboard=false, :ref:`bool` on_top=false, :ref:`bool` use_vertex_color=false **)** | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StandardMaterial3D` | :ref:`get_material` **(** :ref:`String` name, :ref:`EditorNode3DGizmo` gizmo=null **)** | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -90,10 +90,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorNode3DGizmoPlugin_method__can_be_hidden: +.. _class_EditorNode3DGizmoPlugin_private_method__can_be_hidden: .. rst-class:: classref-method @@ -105,13 +105,13 @@ Method Descriptions ---- -.. _class_EditorNode3DGizmoPlugin_method__commit_handle: +.. _class_EditorNode3DGizmoPlugin_private_method__commit_handle: .. rst-class:: classref-method void **_commit_handle** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary, :ref:`Variant` restore, :ref:`bool` cancel **)** |virtual| -覆盖该方法,以提交正在编辑的控柄(控柄必须是先前在 :ref:`_redraw` 期间通过 :ref:`EditorNode3DGizmo.add_handles` 添加的)。这通常意味着为该更改创建一个 :ref:`UndoRedo` 动作,将当前控柄值用作“做”,并将 ``restore`` 参数用作“撤销”。 +覆盖该方法,以提交正在编辑的控柄(控柄必须是先前在 :ref:`_redraw` 期间通过 :ref:`EditorNode3DGizmo.add_handles` 添加的)。这通常意味着为该更改创建一个 :ref:`UndoRedo` 动作,将当前控柄值用作“做”,并将 ``restore`` 参数用作“撤销”。 如果 ``cancel`` 参数为 ``true``\ ,则 ``restore`` 值应被直接设置,无需任何 :ref:`UndoRedo` 动作。 @@ -123,13 +123,13 @@ void **_commit_handle** **(** :ref:`EditorNode3DGizmo` ---- -.. _class_EditorNode3DGizmoPlugin_method__commit_subgizmos: +.. _class_EditorNode3DGizmoPlugin_private_method__commit_subgizmos: .. rst-class:: classref-method void **_commit_subgizmos** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`PackedInt32Array` ids, :ref:`Transform3D[]` restores, :ref:`bool` cancel **)** |virtual| -覆盖该方法,以提交一组正在编辑的子小工具(参见 :ref:`_subgizmos_intersect_ray` 和 :ref:`_subgizmos_intersect_frustum`\ )。这通常意味着为该更改创建一个 :ref:`UndoRedo` 动作,将当前变换用作“做”,并将 ``restores`` 变换用作“撤消”。 +覆盖该方法,以提交一组正在编辑的子小工具(参见 :ref:`_subgizmos_intersect_ray` 和 :ref:`_subgizmos_intersect_frustum`\ )。这通常意味着为该更改创建一个 :ref:`UndoRedo` 动作,将当前变换用作“做”,并将 ``restores`` 变换用作“撤消”。 如果 ``cancel`` 参数为 ``true``\ ,则 ``restores`` 变换应被直接设置,无需任何 :ref:`UndoRedo` 动作。对于所有子小工具方法,变换是在与小工具的 Node3D 相关的局部空间中给出的。为该插件的活动小工具而调用。 @@ -137,19 +137,19 @@ void **_commit_subgizmos** **(** :ref:`EditorNode3DGizmo` **_create_gizmo** **(** :ref:`Node3D` for_node_3d **)** |virtual| |const| -覆盖此方法,为选择的空间节点返回一个自定义的 :ref:`EditorNode3DGizmo`\ ,为其余节点返回 ``null``\ 。另见 :ref:`_has_gizmo`\ 。 +覆盖此方法,为选择的空间节点返回一个自定义的 :ref:`EditorNode3DGizmo`\ ,为其余节点返回 ``null``\ 。另见 :ref:`_has_gizmo`\ 。 .. rst-class:: classref-item-separator ---- -.. _class_EditorNode3DGizmoPlugin_method__get_gizmo_name: +.. _class_EditorNode3DGizmoPlugin_private_method__get_gizmo_name: .. rst-class:: classref-method @@ -161,7 +161,7 @@ void **_commit_subgizmos** **(** :ref:`EditorNode3DGizmo` **_get_handle_value** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` handle_id, :ref:`bool` secondary **)** |virtual| |const| -覆盖该方法,以返回一个控柄的当前值。该值将在编辑开始时被请求,并用作 :ref:`_commit_handle` 中的 ``restore`` 参数。 +覆盖该方法,以返回一个控柄的当前值。该值将在编辑开始时被请求,并用作 :ref:`_commit_handle` 中的 ``restore`` 参数。 当请求的控柄是次要控柄时,\ ``secondary`` 参数为 ``true``\ (有关更多信息,请参阅 :ref:`EditorNode3DGizmo.add_handles`\ )。 @@ -189,7 +189,7 @@ void **_commit_subgizmos** **(** :ref:`EditorNode3DGizmo` **_get_subgizmo_transform** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` subgizmo_id **)** |virtual| |const| -覆盖该方法,以返回子小工具的当前变换。对于所有子小工具方法,变换应该在相对于小工具的 Node3D 的局部空间中。此变换将在编辑开始时被请求,并在 :ref:`_commit_subgizmos` 中的 ``restore`` 参数中使用。为该插件的活动小工具而调用。 +覆盖该方法,以返回子小工具的当前变换。对于所有子小工具方法,变换应该在相对于小工具的 Node3D 的局部空间中。此变换将在编辑开始时被请求,并在 :ref:`_commit_subgizmos` 中的 ``restore`` 参数中使用。为该插件的活动小工具而调用。 .. rst-class:: classref-item-separator ---- -.. _class_EditorNode3DGizmoPlugin_method__has_gizmo: +.. _class_EditorNode3DGizmoPlugin_private_method__has_gizmo: .. rst-class:: classref-method @@ -227,7 +227,7 @@ void **_commit_subgizmos** **(** :ref:`EditorNode3DGizmo` gizmo * ---- -.. _class_EditorNode3DGizmoPlugin_method__set_handle: +.. _class_EditorNode3DGizmoPlugin_private_method__set_handle: .. rst-class:: classref-method @@ -279,37 +279,37 @@ void **_set_handle** **(** :ref:`EditorNode3DGizmo` giz ---- -.. _class_EditorNode3DGizmoPlugin_method__set_subgizmo_transform: +.. _class_EditorNode3DGizmoPlugin_private_method__set_subgizmo_transform: .. rst-class:: classref-method void **_set_subgizmo_transform** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`int` subgizmo_id, :ref:`Transform3D` transform **)** |virtual| -覆盖该方法,以在子小工具编辑期间更新节点属性(参见 :ref:`_subgizmos_intersect_ray` 和 :ref:`_subgizmos_intersect_frustum`\ )。\ ``transform`` 在 Node3D 的局部坐标系中给出。为该插件的活动小工具而调用。 +覆盖该方法,以在子小工具编辑期间更新节点属性(参见 :ref:`_subgizmos_intersect_ray` 和 :ref:`_subgizmos_intersect_frustum`\ )。\ ``transform`` 在 Node3D 的局部坐标系中给出。为该插件的活动小工具而调用。 .. rst-class:: classref-item-separator ---- -.. _class_EditorNode3DGizmoPlugin_method__subgizmos_intersect_frustum: +.. _class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_frustum: .. rst-class:: classref-method :ref:`PackedInt32Array` **_subgizmos_intersect_frustum** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`Camera3D` camera, :ref:`Plane[]` frustum_planes **)** |virtual| |const| -覆盖该方法,以允许使用鼠标拖动框选来选择子小工具。给定一个 ``camera`` 和 ``frustum_planes``\ ,该方法应返回哪些子小工具包含在视锥体中。\ ``frustum_planes`` 参数由一个构成选择视锥体的所有 ``Plane`` 的\ ``Array`` 组成。返回的值应该包含一个唯一的子小工具标识符列表,这些标识符可以有任何非负值,并将用于其他虚方法,如 :ref:`_get_subgizmo_transform` 或 :ref:`_commit_subgizmos`\ 。为该插件的活动小工具而调用。 +覆盖该方法,以允许使用鼠标拖动框选来选择子小工具。给定一个 ``camera`` 和 ``frustum_planes``\ ,该方法应返回哪些子小工具包含在视锥体中。\ ``frustum_planes`` 参数由一个构成选择视锥体的所有 :ref:`Plane` 的数组组成。返回的值应该包含一个唯一的子小工具标识符列表,这些标识符可以有任何非负值,并将用于其他虚方法,如 :ref:`_get_subgizmo_transform` 或 :ref:`_commit_subgizmos`\ 。为该插件的活动小工具而调用。 .. rst-class:: classref-item-separator ---- -.. _class_EditorNode3DGizmoPlugin_method__subgizmos_intersect_ray: +.. _class_EditorNode3DGizmoPlugin_private_method__subgizmos_intersect_ray: .. rst-class:: classref-method :ref:`int` **_subgizmos_intersect_ray** **(** :ref:`EditorNode3DGizmo` gizmo, :ref:`Camera3D` camera, :ref:`Vector2` screen_pos **)** |virtual| |const| -覆盖该方法,以允许使用鼠标点击选择子小工具。给定屏幕坐标中的 ``camera`` 和 ``screen_pos`` 时,该方法应返回应选择哪个子小工具。返回值应该是一个唯一的子小工具标识符,它可以有任何非负值,并将用于其他虚方法,如 :ref:`_get_subgizmo_transform` 或 :ref:`_commit_subgizmos`\ 。为该插件的活动小工具而调用。 +覆盖该方法,以允许使用鼠标点击选择子小工具。给定屏幕坐标中的 ``camera`` 和 ``screen_pos`` 时,该方法应返回应选择哪个子小工具。返回值应该是一个唯一的子小工具标识符,它可以有任何非负值,并将用于其他虚方法,如 :ref:`_get_subgizmo_transform` 或 :ref:`_commit_subgizmos`\ 。为该插件的活动小工具而调用。 .. rst-class:: classref-item-separator @@ -373,10 +373,10 @@ void **create_material** **(** :ref:`String` name, :ref:`Color`\ ,它将尝试获取相应的变体(选定的和/或可编辑的)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorpaths.rst b/classes/zh_CN/class_editorpaths.rst index faedbc3443..73df8253d9 100644 --- a/classes/zh_CN/class_editorpaths.rst +++ b/classes/zh_CN/class_editorpaths.rst @@ -10,14 +10,14 @@ EditorPaths =========== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 编辑器专用单例,返回特定于操作系统的各种数据文件夹和文件的路径。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个仅供编辑器使用的单例,可返回特定于操作系统的,到各种数据文件夹和文件的路径。它可以在编辑器插件中使用,以确保文件被保存在各个操作系统的正确位置。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`Godot 项目中的文件路径 <../tutorials/io/data_paths>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -60,8 +60,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_EditorPaths_method_get_cache_dir: @@ -163,10 +163,10 @@ Method Descriptions \ **注意:**\ Godot 的 Steam 版本默认使用自包含模式。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorplugin.rst b/classes/zh_CN/class_editorplugin.rst index 12f24018b7..ee7bcbd648 100644 --- a/classes/zh_CN/class_editorplugin.rst +++ b/classes/zh_CN/class_editorplugin.rst @@ -10,82 +10,82 @@ EditorPlugin ============ -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` 由编辑器使用,用于扩展其功能。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. See also :ref:`EditorScript` to add functions to the editor. +编辑器使用插件来扩展功能。最常见的插件类型是编辑给定的节点或资源类型的插件、导入插件和导出插件。另见 :ref:`EditorScript`\ ,能够向编辑器添加功能。 -\ **Note:** Some names in this class contain "left" or "right" (e.g. :ref:`DOCK_SLOT_LEFT_UL`). These APIs assume left-to-right layout, and would be backwards when using right-to-left layout. These names are kept for compatibility reasons. +\ **注意:**\ 这个类中的部分名称中包含“left”和“right”(例如 :ref:`DOCK_SLOT_LEFT_UL`\ )。这些 API 假设的是从左至右的布局,使用从右至左布局时是反的。保留这些名称是出于兼容的原因。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`编辑器插件文档索引 <../tutorials/plugins/editor/index>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_changes` **(** **)** |virtual| | + | void | :ref:`_apply_changes` **(** **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_build` **(** **)** |virtual| | + | :ref:`bool` | :ref:`_build` **(** **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_clear` **(** **)** |virtual| | + | void | :ref:`_clear` **(** **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_disable_plugin` **(** **)** |virtual| | + | void | :ref:`_disable_plugin` **(** **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_edit` **(** :ref:`Object` object **)** |virtual| | + | void | :ref:`_edit` **(** :ref:`Object` object **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_enable_plugin` **(** **)** |virtual| | + | void | :ref:`_enable_plugin` **(** **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_forward_3d_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | + | void | :ref:`_forward_3d_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_forward_3d_force_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | + | void | :ref:`_forward_3d_force_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_forward_3d_gui_input` **(** :ref:`Camera3D` viewport_camera, :ref:`InputEvent` event **)** |virtual| | + | :ref:`int` | :ref:`_forward_3d_gui_input` **(** :ref:`Camera3D` viewport_camera, :ref:`InputEvent` event **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_forward_canvas_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | + | void | :ref:`_forward_canvas_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_forward_canvas_force_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | + | void | :ref:`_forward_canvas_force_draw_over_viewport` **(** :ref:`Control` viewport_control **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_forward_canvas_gui_input` **(** :ref:`InputEvent` event **)** |virtual| | + | :ref:`bool` | :ref:`_forward_canvas_gui_input` **(** :ref:`InputEvent` event **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_breakpoints` **(** **)** |virtual| |const| | + | :ref:`PackedStringArray` | :ref:`_get_breakpoints` **(** **)** |virtual| |const| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`_get_plugin_icon` **(** **)** |virtual| |const| | + | :ref:`Texture2D` | :ref:`_get_plugin_icon` **(** **)** |virtual| |const| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_plugin_name` **(** **)** |virtual| |const| | + | :ref:`String` | :ref:`_get_plugin_name` **(** **)** |virtual| |const| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_state` **(** **)** |virtual| |const| | + | :ref:`Dictionary` | :ref:`_get_state` **(** **)** |virtual| |const| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_unsaved_status` **(** :ref:`String` for_scene **)** |virtual| |const| | + | :ref:`String` | :ref:`_get_unsaved_status` **(** :ref:`String` for_scene **)** |virtual| |const| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_get_window_layout` **(** :ref:`ConfigFile` configuration **)** |virtual| | + | void | :ref:`_get_window_layout` **(** :ref:`ConfigFile` configuration **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_handles` **(** :ref:`Object` object **)** |virtual| |const| | + | :ref:`bool` | :ref:`_handles` **(** :ref:`Object` object **)** |virtual| |const| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_main_screen` **(** **)** |virtual| |const| | + | :ref:`bool` | :ref:`_has_main_screen` **(** **)** |virtual| |const| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_make_visible` **(** :ref:`bool` visible **)** |virtual| | + | void | :ref:`_make_visible` **(** :ref:`bool` visible **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_save_external_data` **(** **)** |virtual| | + | void | :ref:`_save_external_data` **(** **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_state` **(** :ref:`Dictionary` state **)** |virtual| | + | void | :ref:`_set_state` **(** :ref:`Dictionary` state **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_window_layout` **(** :ref:`ConfigFile` configuration **)** |virtual| | + | void | :ref:`_set_window_layout` **(** :ref:`ConfigFile` configuration **)** |virtual| | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_autoload_singleton` **(** :ref:`String` name, :ref:`String` path **)** | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -182,8 +182,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_EditorPlugin_signal_main_screen_changed: @@ -203,9 +203,9 @@ Signals **project_settings_changed** **(** **)** -Emitted when any project setting has changed. +当任意项目设置发生改变时发出。 -\ *Deprecated.* Use :ref:`ProjectSettings.settings_changed` instead. +\ *已废弃。*\ 请改用 :ref:`ProjectSettings.settings_changed`\ 。 .. rst-class:: classref-item-separator @@ -249,8 +249,8 @@ Emitted when any project setting has changed. .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_EditorPlugin_CustomControlContainer: @@ -402,7 +402,7 @@ enum **DockSlot**: :ref:`DockSlot` **DOCK_SLOT_RIGHT_UL** = ``4`` -Dock slot, right side, upper-left (in default layout includes Inspector, Node, and History docks). +右侧停靠槽的左上(默认布局中为“检查器”“节点”以及“历史”面板)。 .. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_BL: @@ -418,7 +418,7 @@ Dock slot, right side, upper-left (in default layout includes Inspector, Node, a :ref:`DockSlot` **DOCK_SLOT_RIGHT_UR** = ``6`` -Dock slot, right side, upper-right (empty in default layout). +右侧停靠槽的右上(默认布局中为空)。 .. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_BR: @@ -476,10 +476,10 @@ enum **AfterGUIInput**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorPlugin_method__apply_changes: +.. _class_EditorPlugin_private_method__apply_changes: .. rst-class:: classref-method @@ -493,7 +493,7 @@ void **_apply_changes** **(** **)** |virtual| ---- -.. _class_EditorPlugin_method__build: +.. _class_EditorPlugin_private_method__build: .. rst-class:: classref-method @@ -501,13 +501,13 @@ void **_apply_changes** **(** **)** |virtual| 该方法在编辑器即将运行项目时被调用。这样,插件可以在项目运行之前,执行所需的操作。 -该方法必须返回一个布尔值。如果该方法返回 ``false``\ ,则项目将不会运行。运行会立即中止,因此这也会阻止运行所有其他插件的 :ref:`_build` 方法。 +该方法必须返回一个布尔值。如果该方法返回 ``false``\ ,则项目将不会运行。运行会立即中止,因此这也会阻止运行所有其他插件的 :ref:`_build` 方法。 .. rst-class:: classref-item-separator ---- -.. _class_EditorPlugin_method__clear: +.. _class_EditorPlugin_private_method__clear: .. rst-class:: classref-method @@ -519,7 +519,7 @@ void **_clear** **(** **)** |virtual| ---- -.. _class_EditorPlugin_method__disable_plugin: +.. _class_EditorPlugin_private_method__disable_plugin: .. rst-class:: classref-method @@ -531,7 +531,7 @@ void **_disable_plugin** **(** **)** |virtual| ---- -.. _class_EditorPlugin_method__edit: +.. _class_EditorPlugin_private_method__edit: .. rst-class:: classref-method @@ -545,7 +545,7 @@ void **_edit** **(** :ref:`Object` object **)** |virtual| ---- -.. _class_EditorPlugin_method__enable_plugin: +.. _class_EditorPlugin_private_method__enable_plugin: .. rst-class:: classref-method @@ -557,7 +557,7 @@ void **_enable_plugin** **(** **)** |virtual| ---- -.. _class_EditorPlugin_method__forward_3d_draw_over_viewport: +.. _class_EditorPlugin_private_method__forward_3d_draw_over_viewport: .. rst-class:: classref-method @@ -606,13 +606,13 @@ void **_forward_3d_draw_over_viewport** **(** :ref:`Control` view ---- -.. _class_EditorPlugin_method__forward_3d_force_draw_over_viewport: +.. _class_EditorPlugin_private_method__forward_3d_force_draw_over_viewport: .. rst-class:: classref-method void **_forward_3d_force_draw_over_viewport** **(** :ref:`Control` viewport_control **)** |virtual| -该方法与 :ref:`_forward_3d_draw_over_viewport` 相同,只是它绘制在所有内容之上。当需要一个显示在其他任何内容之上的额外图层时很有用。 +该方法与 :ref:`_forward_3d_draw_over_viewport` 相同,只是它绘制在所有内容之上。当需要一个显示在其他任何内容之上的额外图层时很有用。 需要使用 :ref:`set_force_draw_over_forwarding_enabled` 来启用该方法的调用。 @@ -620,13 +620,13 @@ void **_forward_3d_force_draw_over_viewport** **(** :ref:`Control ---- -.. _class_EditorPlugin_method__forward_3d_gui_input: +.. _class_EditorPlugin_private_method__forward_3d_gui_input: .. rst-class:: classref-method :ref:`int` **_forward_3d_gui_input** **(** :ref:`Camera3D` viewport_camera, :ref:`InputEvent` event **)** |virtual| -在当前编辑的场景中有根节点时调用,实现 :ref:`_handles` 并在 3D 视口中产生 :ref:`InputEvent`\ 。返回值决定 :ref:`InputEvent` 是被消费还是被转发给其他 **EditorPlugin**\ 。有关选项,请参阅 :ref:`AfterGUIInput`\ 。 +在当前编辑的场景中有根节点时调用,实现 :ref:`_handles` 并在 3D 视口中产生 :ref:`InputEvent`\ 。返回值决定 :ref:`InputEvent` 是被消费还是被转发给其他 **EditorPlugin**\ 。有关选项,请参阅 :ref:`AfterGUIInput`\ 。 \ **示例:**\ @@ -676,7 +676,7 @@ void **_forward_3d_force_draw_over_viewport** **(** :ref:`Control ---- -.. _class_EditorPlugin_method__forward_canvas_draw_over_viewport: +.. _class_EditorPlugin_private_method__forward_canvas_draw_over_viewport: .. rst-class:: classref-method @@ -725,13 +725,13 @@ void **_forward_canvas_draw_over_viewport** **(** :ref:`Control` ---- -.. _class_EditorPlugin_method__forward_canvas_force_draw_over_viewport: +.. _class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport: .. rst-class:: classref-method void **_forward_canvas_force_draw_over_viewport** **(** :ref:`Control` viewport_control **)** |virtual| -该方法与 :ref:`_forward_canvas_draw_over_viewport` 相同,只是它绘制在所有内容之上。当需要一个显示在其他任何内容之上的额外图层时很有用。 +该方法与 :ref:`_forward_canvas_draw_over_viewport` 相同,只是它绘制在所有内容之上。当需要一个显示在其他任何内容之上的额外图层时很有用。 需要使用 :ref:`set_force_draw_over_forwarding_enabled` 来启用该方法的调用。 @@ -739,13 +739,13 @@ void **_forward_canvas_force_draw_over_viewport** **(** :ref:`Control` **_forward_canvas_gui_input** **(** :ref:`InputEvent` event **)** |virtual| -在当前编辑的场景中有根节点时调用,实现 :ref:`_handles` 并在 2D 视口中产生 :ref:`InputEvent`\ 。如果 ``return true`` **EditorPlugin** 消耗 ``event``\ ,则拦截该 :ref:`InputEvent`\ ;否则将 ``event`` 转发给其他编辑器类。 +在当前编辑的场景中有根节点时调用,实现 :ref:`_handles` 并在 2D 视口中产生 :ref:`InputEvent`\ 。如果 ``return true`` **EditorPlugin** 消耗 ``event``\ ,则拦截该 :ref:`InputEvent`\ ;否则将 ``event`` 转发给其他编辑器类。 \ **示例:**\ @@ -801,7 +801,7 @@ void **_forward_canvas_force_draw_over_viewport** **(** :ref:`Control` **_get_plugin_icon** **(** **)** |virtual| |const| -Override this method in your plugin to return a :ref:`Texture2D` in order to give it an icon. +在插件中覆盖该方法,以返回一个 :ref:`Texture2D` 以便为插件提供一个图标。 -For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons. +对于主界面插件,它出现在屏幕顶部,“2D”、“3D”、“脚本”和 “AssetLib” 按钮的右侧。 -Ideally, the plugin icon should be white with a transparent background and 16x16 pixels in size. +理想情况下,插件图标应为透明背景的白色,大小为 16x16 像素。 .. tabs:: @@ -831,18 +831,18 @@ Ideally, the plugin icon should be white with a transparent background and 16x16 .. code-tab:: gdscript func _get_plugin_icon(): - # You can use a custom icon: + # 你可以使用一个自定义的图标: return preload("res://addons/my_plugin/my_plugin_icon.svg") - # Or use a built-in icon: + # 或者使用一个内置的图标: return EditorInterface.get_editor_theme().get_icon("Node", "EditorIcons") .. code-tab:: csharp public override Texture2D _GetPluginIcon() { - // You can use a custom icon: + // 你可以使用一个自定义的图标: return ResourceLoader.Load("res://addons/my_plugin/my_plugin_icon.svg"); - // Or use a built-in icon: + // 或者使用一个内置的图标: return EditorInterface.Singleton.GetEditorTheme().GetIcon("Node", "EditorIcons"); } @@ -852,7 +852,7 @@ Ideally, the plugin icon should be white with a transparent background and 16x16 ---- -.. _class_EditorPlugin_method__get_plugin_name: +.. _class_EditorPlugin_private_method__get_plugin_name: .. rst-class:: classref-method @@ -866,19 +866,19 @@ Ideally, the plugin icon should be white with a transparent background and 16x16 ---- -.. _class_EditorPlugin_method__get_state: +.. _class_EditorPlugin_private_method__get_state: .. rst-class:: classref-method :ref:`Dictionary` **_get_state** **(** **)** |virtual| |const| -覆盖该方法,以提供要保存的状态数据,如视图位置、网格设置、折叠等。这可用于保存场景(再次打开时,保持状态)和切换选项卡( 选项卡返回时,可以恢复状态)。每个场景的数据会自动被保存在编辑器元数据文件夹中的 ``editstate`` 文件中。如果想为插件存储全局的(独立于场景的)编辑器数据,可以改用 :ref:`_get_window_layout`\ 。 +覆盖该方法,以提供要保存的状态数据,如视图位置、网格设置、折叠等。这可用于保存场景(再次打开时,保持状态)和切换选项卡( 选项卡返回时,可以恢复状态)。每个场景的数据会自动被保存在编辑器元数据文件夹中的 ``editstate`` 文件中。如果想为插件存储全局的(独立于场景的)编辑器数据,可以改用 :ref:`_get_window_layout`\ 。 -使用 :ref:`_set_state` 恢复保存的状态。 +使用 :ref:`_set_state` 恢复保存的状态。 \ **注意:**\ 此方法不应该用于保存应随项目保留的重要设置。 -\ **注意:**\ 必须实现 :ref:`_get_plugin_name`\ ,才能正确存储和恢复状态。 +\ **注意:**\ 必须实现 :ref:`_get_plugin_name`\ ,才能正确存储和恢复状态。 :: @@ -890,17 +890,17 @@ Ideally, the plugin icon should be white with a transparent background and 16x16 ---- -.. _class_EditorPlugin_method__get_unsaved_status: +.. _class_EditorPlugin_private_method__get_unsaved_status: .. rst-class:: classref-method :ref:`String` **_get_unsaved_status** **(** :ref:`String` for_scene **)** |virtual| |const| -Override this method to provide a custom message that lists unsaved changes. The editor will call this method when exiting or when closing a scene, and display the returned string in a confirmation dialog. Return empty string if the plugin has no unsaved changes. +覆盖该方法以提供列出未保存更改的自定义消息。编辑器将在退出或关闭场景时调用该方法,并在确认对话框中显示返回的字符串。如果该插件没有未保存的更改,则返回空字符串。 -When closing a scene, ``for_scene`` is the path to the scene being closed. You can use it to handle built-in resources in that scene. +关闭场景时,\ ``for_scene`` 是正在关闭的场景的路径。你可以使用它来处理该场景中的内置资源。 -If the user confirms saving, :ref:`_save_external_data` will be called, before closing the editor. +如果用户确认保存,将在关闭编辑器之前将调用 :ref:`_save_external_data`\ 。 :: @@ -916,7 +916,7 @@ If the user confirms saving, :ref:`_save_external_data` configurat 覆盖该方法,以提供该插件的 GUI 布局、或想要存储的任何其他数据。这用于在调用 :ref:`queue_save_layout`\ 、或更改编辑器布局(例如更改停靠面板的位置)时,保存项目的编辑器布局。数据被存储在编辑器元数据目录中的 ``editor_layout.cfg`` 文件中。 -使用 :ref:`_set_window_layout` 恢复保存的布局。 +使用 :ref:`_set_window_layout` 恢复保存的布局。 :: @@ -948,31 +948,31 @@ void **_get_window_layout** **(** :ref:`ConfigFile` configurat ---- -.. _class_EditorPlugin_method__handles: +.. _class_EditorPlugin_private_method__handles: .. rst-class:: classref-method :ref:`bool` **_handles** **(** :ref:`Object` object **)** |virtual| |const| -Implement this function if your plugin edits a specific type of object (Resource or Node). If you return ``true``, then you will get the functions :ref:`_edit` and :ref:`_make_visible` called when the editor requests them. If you have declared the methods :ref:`_forward_canvas_gui_input` and :ref:`_forward_3d_gui_input` these will be called too. +如果插件会编辑特定类型的对象(资源或节点),则请实现该函数。如果返回 ``true``\ ,则将在编辑器请求时,调用函数 :ref:`_edit` 和 :ref:`_make_visible`\ 。如果已经声明了方法 :ref:`_forward_canvas_gui_input` 和 :ref:`_forward_3d_gui_input`\ ,则它们也会被调用。 -\ **Note:** Each plugin should handle only one type of objects at a time. If a plugin handes more types of objects and they are edited at the same time, it will result in errors. +\ **注意:**\ 每个插件一次只应处理一种类型的对象。如果一个插件处理多种类型的对象并且同时编辑这些对象,则会导致错误。 .. rst-class:: classref-item-separator ---- -.. _class_EditorPlugin_method__has_main_screen: +.. _class_EditorPlugin_private_method__has_main_screen: .. rst-class:: classref-method :ref:`bool` **_has_main_screen** **(** **)** |virtual| |const| -Returns ``true`` if this is a main screen editor plugin (it goes in the workspace selector together with **2D**, **3D**, **Script** and **AssetLib**). +如果这是一个主屏幕编辑器插件,则返回 ``true``\ (它与 **2D**\ 、\ **3D**\ 、\ **Script** 和 **AssetLib** 一起进入工作区选择器)。 -When the plugin's workspace is selected, other main screen plugins will be hidden, but your plugin will not appear automatically. It needs to be added as a child of :ref:`EditorInterface.get_base_control` and made visible inside :ref:`_make_visible`. +当该插件的工作区被选中时,其他主屏幕插件将被隐藏,但你的插件不会自动出现。它需要被添加为 :ref:`EditorInterface.get_base_control` 的子节点,并在 :ref:`_make_visible` 中使其可见。 -Use :ref:`_get_plugin_name` and :ref:`_get_plugin_icon` to customize the plugin button's appearance. +使用 :ref:`_get_plugin_name` 和 :ref:`_get_plugin_icon` 自定义插件按钮的外观。 :: @@ -999,7 +999,7 @@ Use :ref:`_get_plugin_name` and :ref ---- -.. _class_EditorPlugin_method__make_visible: +.. _class_EditorPlugin_private_method__make_visible: .. rst-class:: classref-method @@ -1013,7 +1013,7 @@ void **_make_visible** **(** :ref:`bool` visible **)** |virtual| ---- -.. _class_EditorPlugin_method__save_external_data: +.. _class_EditorPlugin_private_method__save_external_data: .. rst-class:: classref-method @@ -1025,15 +1025,15 @@ void **_save_external_data** **(** **)** |virtual| ---- -.. _class_EditorPlugin_method__set_state: +.. _class_EditorPlugin_private_method__set_state: .. rst-class:: classref-method void **_set_state** **(** :ref:`Dictionary` state **)** |virtual| -恢复用 :ref:`_get_state` 保存的状态。这个方法会在编辑器的当前场景选项卡发生改变时调用。 +恢复用 :ref:`_get_state` 保存的状态。这个方法会在编辑器的当前场景选项卡发生改变时调用。 -\ **注意:**\ 你的插件必须实现 :ref:`_get_plugin_name`\ ,否则无法被识别,这个方法也不会被调用。 +\ **注意:**\ 你的插件必须实现 :ref:`_get_plugin_name`\ ,否则无法被识别,这个方法也不会被调用。 :: @@ -1045,13 +1045,13 @@ void **_set_state** **(** :ref:`Dictionary` state **)** |virtu ---- -.. _class_EditorPlugin_method__set_window_layout: +.. _class_EditorPlugin_private_method__set_window_layout: .. rst-class:: classref-method void **_set_window_layout** **(** :ref:`ConfigFile` configuration **)** |virtual| -恢复用 :ref:`_get_window_layout` 保存的插件 GUI 布局和数据。编辑器启动时会调用每个插件的这个方法。请使用提供的 ``configuration`` 文件读取你保存的数据。 +恢复用 :ref:`_get_window_layout` 保存的插件 GUI 布局和数据。编辑器启动时会调用每个插件的这个方法。请使用提供的 ``configuration`` 文件读取你保存的数据。 :: @@ -1131,7 +1131,7 @@ void **add_custom_type** **(** :ref:`String` type, :ref:`String` 通过检查脚本或使用 ``is`` 关键字来检查你的自定义对象是否正在被编辑。 +可以使用虚方法 :ref:`_handles` 通过检查脚本或使用 ``is`` 关键字来检查你的自定义对象是否正在被编辑。 在运行时,这将是一个带有脚本的简单对象,因此不需要调用该函数。 @@ -1289,7 +1289,7 @@ void **add_tool_menu_item** **(** :ref:`String` name, :ref:`Callab void **add_tool_submenu_item** **(** :ref:`String` name, :ref:`PopupMenu` submenu **)** -在\ **项目 > 工具**\ 中添加名为 ``name`` 的自定义 :ref:`PopupMenu` 子菜单。请在清理插件时调用 ``remove_tool_menu_item(name)`` 移除该菜单。 +在\ **项目 > 工具**\ 中添加名为 ``name`` 的自定义 :ref:`PopupMenu` 子菜单。请在清理插件时调用 :ref:`remove_tool_menu_item` 移除该菜单。 .. rst-class:: classref-item-separator @@ -1327,9 +1327,9 @@ void **add_undo_redo_inspector_hook_callback** **(** :ref:`Callable` **get_editor_interface** **(** **)** -Returns the :ref:`EditorInterface` singleton instance. +返回 :ref:`EditorInterface` 单例实例。 -\ *Deprecated.* :ref:`EditorInterface` is a global singleton and can be accessed directly by its name. +\ *已废弃。*\ :ref:`EditorInterface` 是全局单例,可以使用其名称直接访问。 .. rst-class:: classref-item-separator @@ -1353,7 +1353,7 @@ Returns the :ref:`EditorInterface` singleton instance. :ref:`String` **get_plugin_version** **(** **)** |const| -Provide the version of the plugin declared in the ``plugin.cfg`` config file. +提供在 ``plugin.cfg`` 配置文件中声明的插件版本。 .. rst-class:: classref-item-separator @@ -1621,7 +1621,7 @@ void **remove_undo_redo_inspector_hook_callback** **(** :ref:`Callable` 的调用,为 3D 编辑器启用 :ref:`_forward_3d_force_draw_over_viewport` 的调用。只需调用该方法一次,它将永久适用于该插件。 +更新视口时,为 2D 编辑器启用 :ref:`_forward_canvas_force_draw_over_viewport` 的调用,为 3D 编辑器启用 :ref:`_forward_3d_force_draw_over_viewport` 的调用。只需调用该方法一次,它将永久适用于该插件。 .. rst-class:: classref-item-separator @@ -1633,7 +1633,7 @@ void **set_force_draw_over_forwarding_enabled** **(** **)** void **set_input_event_forwarding_always_enabled** **(** **)** -如果始终希望从 3D 视图屏幕在 :ref:`_forward_3d_gui_input` 中接收输入,请使用该方法。如果插件想要在场景中使用射线投射,它可能特别有用。 +如果始终希望从 3D 视图屏幕在 :ref:`_forward_3d_gui_input` 中接收输入,请使用该方法。如果插件想要在场景中使用射线投射,它可能特别有用。 .. rst-class:: classref-item-separator @@ -1645,12 +1645,12 @@ void **set_input_event_forwarding_always_enabled** **(** **)** :ref:`int` **update_overlays** **(** **)** |const| -更新 2D 和 3D 编辑器视口的叠加层。会导致方法 :ref:`_forward_canvas_draw_over_viewport`\ 、\ :ref:`_forward_canvas_force_draw_over_viewport`\ 、\ :ref:`_forward_3d_draw_over_viewport` 和 :ref:`_forward_3d_force_draw_over_viewport` 被调用。 +更新 2D 和 3D 编辑器视口的叠加层。会导致方法 :ref:`_forward_canvas_draw_over_viewport`\ 、\ :ref:`_forward_canvas_force_draw_over_viewport`\ 、\ :ref:`_forward_3d_draw_over_viewport` 和 :ref:`_forward_3d_force_draw_over_viewport` 被调用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorproperty.rst b/classes/zh_CN/class_editorproperty.rst index dad295717c..cbfa2f41fe 100644 --- a/classes/zh_CN/class_editorproperty.rst +++ b/classes/zh_CN/class_editorproperty.rst @@ -10,21 +10,21 @@ EditorProperty ============== -**Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 用于编辑属性的自定义控件,可以添加到 :ref:`EditorInspector` 中。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于编辑属性的自定义控件,可以添加到 :ref:`EditorInspector` 中。通过 :ref:`EditorInspectorPlugin` 添加。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,16 +47,16 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_read_only` **(** :ref:`bool` read_only **)** |virtual| | + | void | :ref:`_set_read_only` **(** :ref:`bool` read_only **)** |virtual| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_update_property` **(** **)** |virtual| | + | void | :ref:`_update_property` **(** **)** |virtual| | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_focusable` **(** :ref:`Control` control **)** | +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -77,8 +77,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_EditorProperty_signal_multiple_properties_changed: @@ -86,7 +86,7 @@ Signals **multiple_properties_changed** **(** :ref:`PackedStringArray` properties, :ref:`Array` value **)** -如果想要同时修改多个属性,请发出它。如果属性是通过 :ref:`EditorInspectorPlugin._parse_property` 添加的,请勿使用。 +如果想要同时修改多个属性,请发出它。如果属性是通过 :ref:`EditorInspectorPlugin._parse_property` 添加的,请勿使用。 .. rst-class:: classref-item-separator @@ -216,8 +216,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_EditorProperty_property_checkable: @@ -340,10 +340,10 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorProperty_method__set_read_only: +.. _class_EditorProperty_private_method__set_read_only: .. rst-class:: classref-method @@ -355,7 +355,7 @@ void **_set_read_only** **(** :ref:`bool` read_only **)** |virtual| ---- -.. _class_EditorProperty_method__update_property: +.. _class_EditorProperty_private_method__update_property: .. rst-class:: classref-method @@ -409,7 +409,7 @@ void **emit_changed** **(** :ref:`StringName` property, :ref:` :ref:`StringName` **get_edited_property** **(** **)** |const| -获取被编辑的属性。如果你的编辑器适用于单个属性(通过 :ref:`EditorInspectorPlugin._parse_property` 添加),则返回该属性。 +获取被编辑的属性。如果你的编辑器适用于单个属性(通过 :ref:`EditorInspectorPlugin._parse_property` 添加),则返回该属性。 .. rst-class:: classref-item-separator @@ -435,10 +435,10 @@ void **update_property** **(** **)** 强制刷新属性显示。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorresourceconversionplugin.rst b/classes/zh_CN/class_editorresourceconversionplugin.rst index 4df83d8413..dafc3cf369 100644 --- a/classes/zh_CN/class_editorresourceconversionplugin.rst +++ b/classes/zh_CN/class_editorresourceconversionplugin.rst @@ -10,14 +10,14 @@ EditorResourceConversionPlugin ============================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 用于在编辑器资源选择器的上下文菜单中添加从一种资源格式到另一种资源格式的自定义转换器的插件;例如,将 :ref:`StandardMaterial3D` 转换为 :ref:`ShaderMaterial`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 当编辑器检查器中的资源被调出上下文菜单时,\ **EditorResourceConversionPlugin** 被调用。相关的转换插件将作为菜单选项出现,以将给定的资源转换为目标类型。 @@ -47,19 +47,19 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource` | :ref:`_convert` **(** :ref:`Resource` resource **)** |virtual| |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_converts_to` **(** **)** |virtual| |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_handles` **(** :ref:`Resource` resource **)** |virtual| |const| | - +---------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`_convert` **(** :ref:`Resource` resource **)** |virtual| |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_converts_to` **(** **)** |virtual| |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handles` **(** :ref:`Resource` resource **)** |virtual| |const| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -67,22 +67,22 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorResourceConversionPlugin_method__convert: +.. _class_EditorResourceConversionPlugin_private_method__convert: .. rst-class:: classref-method :ref:`Resource` **_convert** **(** :ref:`Resource` resource **)** |virtual| |const| -获取输入 :ref:`Resource` 并将其转换为 :ref:`_converts_to` 中给定的类型。返回的 :ref:`Resource` 是转换后的结果,输入的 :ref:`Resource` 保持不变。 +获取输入 :ref:`Resource` 并将其转换为 :ref:`_converts_to` 中给定的类型。返回的 :ref:`Resource` 是转换后的结果,输入的 :ref:`Resource` 保持不变。 .. rst-class:: classref-item-separator ---- -.. _class_EditorResourceConversionPlugin_method__converts_to: +.. _class_EditorResourceConversionPlugin_private_method__converts_to: .. rst-class:: classref-method @@ -94,7 +94,7 @@ Method Descriptions ---- -.. _class_EditorResourceConversionPlugin_method__handles: +.. _class_EditorResourceConversionPlugin_private_method__handles: .. rst-class:: classref-method @@ -102,10 +102,10 @@ Method Descriptions 调用以确定特定 :ref:`Resource` 是否可以通过该插件转换为目标资源类型。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorresourcepicker.rst b/classes/zh_CN/class_editorresourcepicker.rst index 105c8509cc..c28ebff6e7 100644 --- a/classes/zh_CN/class_editorresourcepicker.rst +++ b/classes/zh_CN/class_editorresourcepicker.rst @@ -10,16 +10,16 @@ EditorResourcePicker ==================== -**Inherits:** :ref:`HBoxContainer` **<** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`HBoxContainer` **<** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`EditorScriptPicker` +**派生:** :ref:`EditorScriptPicker` Godot 编辑器用于选择 :ref:`Resource` 类型属性的控件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 此 :ref:`Control` 节点用于编辑器的属性检查器以允许编辑 :ref:`Resource` 类型属性。它提供了创建、加载、保存和转换资源的选项。可以与 :ref:`EditorInspectorPlugin` 检查器插件一起使用以重新创建相同的行为。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,21 +45,21 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_handle_menu_selected` **(** :ref:`int` id **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_create_options` **(** :ref:`Object` menu_node **)** |virtual| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_allowed_types` **(** **)** |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_toggle_pressed` **(** :ref:`bool` pressed **)** | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handle_menu_selected` **(** :ref:`int` id **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_create_options` **(** :ref:`Object` menu_node **)** |virtual| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_allowed_types` **(** **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_toggle_pressed` **(** :ref:`bool` pressed **)** | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -67,8 +67,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_EditorResourcePicker_signal_resource_changed: @@ -96,8 +96,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_EditorResourcePicker_property_base_type: @@ -169,22 +169,22 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorResourcePicker_method__handle_menu_selected: +.. _class_EditorResourcePicker_private_method__handle_menu_selected: .. rst-class:: classref-method :ref:`bool` **_handle_menu_selected** **(** :ref:`int` id **)** |virtual| -该虚方法可以被实现,以处理默认未处理的上下文菜单项目。请参阅 :ref:`_set_create_options`\ 。 +该虚方法可以被实现,以处理默认未处理的上下文菜单项目。请参阅 :ref:`_set_create_options`\ 。 .. rst-class:: classref-item-separator ---- -.. _class_EditorResourcePicker_method__set_create_options: +.. _class_EditorResourcePicker_private_method__set_create_options: .. rst-class:: classref-method @@ -192,7 +192,7 @@ void **_set_create_options** **(** :ref:`Object` menu_node **)** | 在更新 **EditorResourcePicker** 的上下文菜单时调用该虚方法。实现该方法以使用你自己的选项覆盖“新建 ...”项目。\ ``menu_node`` 是对 :ref:`PopupMenu` 节点的引用。 -\ **注意:**\ 实现 :ref:`_handle_menu_selected` 来处理这些自定义项。 +\ **注意:**\ 实现 :ref:`_handle_menu_selected` 来处理这些自定义项。 .. rst-class:: classref-item-separator @@ -218,10 +218,10 @@ void **set_toggle_pressed** **(** :ref:`bool` pressed **)** 设置主按钮的切换模式状态。只有当 :ref:`toggle_mode` 被设置为 ``true`` 时才起作用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorresourcepreview.rst b/classes/zh_CN/class_editorresourcepreview.rst index 198a6bcc64..e5014494ee 100644 --- a/classes/zh_CN/class_editorresourcepreview.rst +++ b/classes/zh_CN/class_editorresourcepreview.rst @@ -10,23 +10,23 @@ EditorResourcePreview ===================== -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` 用于生成资源或文件的预览的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This node is used to generate previews for resources or files. +该节点用于生成文件资源的预览。 -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_resource_previewer`. +\ **注意:**\ 不应该直接实例化这个类。请使用 :ref:`EditorInterface.get_resource_previewer` 访问单例。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_EditorResourcePreview_signal_preview_invalidated: @@ -66,8 +66,8 @@ Signals .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_EditorResourcePreview_method_add_preview_generator: @@ -129,10 +129,10 @@ void **remove_preview_generator** **(** :ref:`EditorResourcePreviewGenerator` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 自定义的预览生成器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 自定义代码来生成预览。请查看 :ref:`EditorSettings` 中的 ``file_dialog/thumbnail_size``\ ,找出适合做预览的尺寸。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_can_generate_small_preview` **(** **)** |virtual| |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`_generate` **(** :ref:`Resource` resource, :ref:`Vector2i` size, :ref:`Dictionary` metadata **)** |virtual| |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`_generate_from_path` **(** :ref:`String` path, :ref:`Vector2i` size, :ref:`Dictionary` metadata **)** |virtual| |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_generate_small_preview_automatically` **(** **)** |virtual| |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_handles` **(** :ref:`String` type **)** |virtual| |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_generate_small_preview` **(** **)** |virtual| |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`_generate` **(** :ref:`Resource` resource, :ref:`Vector2i` size, :ref:`Dictionary` metadata **)** |virtual| |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`_generate_from_path` **(** :ref:`String` path, :ref:`Vector2i` size, :ref:`Dictionary` metadata **)** |virtual| |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_generate_small_preview_automatically` **(** **)** |virtual| |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handles` **(** :ref:`String` type **)** |virtual| |const| | + +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -47,16 +47,16 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorResourcePreviewGenerator_method__can_generate_small_preview: +.. _class_EditorResourcePreviewGenerator_private_method__can_generate_small_preview: .. rst-class:: classref-method :ref:`bool` **_can_generate_small_preview** **(** **)** |virtual| |const| -如果该函数返回 ``true``\ ,则该生成器也会为小型预览调用 :ref:`_generate` 或 :ref:`_generate_from_path`\ 。 +如果该函数返回 ``true``\ ,则该生成器也会为小型预览调用 :ref:`_generate` 或 :ref:`_generate_from_path`\ 。 默认情况下,它返回 ``false``\ 。 @@ -64,49 +64,49 @@ Method Descriptions ---- -.. _class_EditorResourcePreviewGenerator_method__generate: +.. _class_EditorResourcePreviewGenerator_private_method__generate: .. rst-class:: classref-method :ref:`Texture2D` **_generate** **(** :ref:`Resource` resource, :ref:`Vector2i` size, :ref:`Dictionary` metadata **)** |virtual| |const| -Generate a preview from a given resource with the specified size. This must always be implemented. +根据给定的资源生成指定大小的预览。必须始终实现。 -Returning an empty texture is an OK way to fail and let another generator take care. +失败时允许返回空纹理,会由其他生成器接手。 -Care must be taken because this function is always called from a thread (not the main thread). +必须保持谨慎,因为这个函数始终是从(主线程以外的)线程中调用的。 -\ ``metadata`` dictionary can be modified to store file-specific metadata that can be used in :ref:`EditorResourceTooltipPlugin._make_tooltip_for_path` (like image size, sample length etc.). +可以修改 ``metadata`` 字典,从而保存能够在 :ref:`EditorResourceTooltipPlugin._make_tooltip_for_path` 中使用的文件相关的源数据(例如图片大小、采样长度等)。 .. rst-class:: classref-item-separator ---- -.. _class_EditorResourcePreviewGenerator_method__generate_from_path: +.. _class_EditorResourcePreviewGenerator_private_method__generate_from_path: .. rst-class:: classref-method :ref:`Texture2D` **_generate_from_path** **(** :ref:`String` path, :ref:`Vector2i` size, :ref:`Dictionary` metadata **)** |virtual| |const| -Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call :ref:`_generate`. +根据路径直接生成指定大小的预览。可选实现,默认代码会在加载后调用 :ref:`_generate`\ 。 -Returning an empty texture is an OK way to fail and let another generator take care. +失败时允许返回空纹理,会由其他生成器接手。 -Care must be taken because this function is always called from a thread (not the main thread). +必须保持谨慎,因为这个函数始终是从(主线程以外的)线程中调用的。 -\ ``metadata`` dictionary can be modified to store file-specific metadata that can be used in :ref:`EditorResourceTooltipPlugin._make_tooltip_for_path` (like image size, sample length etc.). +可以修改 ``metadata`` 字典,从而保存能够在 :ref:`EditorResourceTooltipPlugin._make_tooltip_for_path` 中使用的文件相关的源数据(例如图片大小、采样长度等)。 .. rst-class:: classref-item-separator ---- -.. _class_EditorResourcePreviewGenerator_method__generate_small_preview_automatically: +.. _class_EditorResourcePreviewGenerator_private_method__generate_small_preview_automatically: .. rst-class:: classref-method :ref:`bool` **_generate_small_preview_automatically** **(** **)** |virtual| |const| -如果该函数返回 ``true``\ ,则该生成器将自动从通过方法 :ref:`_generate` 或 :ref:`_generate_from_path` 生成的普通预览纹理生成小型预览。 +如果该函数返回 ``true``\ ,则该生成器将自动从通过方法 :ref:`_generate` 或 :ref:`_generate_from_path` 生成的普通预览纹理生成小型预览。 默认情况下,它返回 ``false``\ 。 @@ -114,7 +114,7 @@ Care must be taken because this function is always called from a thread (not the ---- -.. _class_EditorResourcePreviewGenerator_method__handles: +.. _class_EditorResourcePreviewGenerator_private_method__handles: .. rst-class:: classref-method @@ -122,10 +122,10 @@ Care must be taken because this function is always called from a thread (not the 如果你的生成器支持类型为 ``type`` 的资源,则返回 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorresourcetooltipplugin.rst b/classes/zh_CN/class_editorresourcetooltipplugin.rst index 30bc47f2c3..e1d86571f2 100644 --- a/classes/zh_CN/class_editorresourcetooltipplugin.rst +++ b/classes/zh_CN/class_editorresourcetooltipplugin.rst @@ -10,34 +10,34 @@ EditorResourceTooltipPlugin =========================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 为处理的资源类型制作高阶工具提示的插件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`FileSystemDock` 使用的资源工具提示插件,能够为指定资源生成自定义工具提示。例如,\ :ref:`Texture2D` 的工具提示会显示较大的预览和该纹理的尺寸。 -插件必须先使用 :ref:`FileSystemDock.add_resource_tooltip_plugin` 注册。用户悬停在文件系统面板中该插件能够处理的资源上时,就会调用 :ref:`_make_tooltip_for_path` 来创建工具提示。工作原理类似于 :ref:`Control._make_custom_tooltip`\ 。 +插件必须先使用 :ref:`FileSystemDock.add_resource_tooltip_plugin` 注册。用户悬停在文件系统面板中该插件能够处理的资源上时,就会调用 :ref:`_make_tooltip_for_path` 来创建工具提示。工作原理类似于 :ref:`Control._make_custom_tooltip`\ 。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_handles` **(** :ref:`String` type **)** |virtual| |const| | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Control` | :ref:`_make_tooltip_for_path` **(** :ref:`String` path, :ref:`Dictionary` metadata, :ref:`Control` base **)** |virtual| |const| | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`request_thumbnail` **(** :ref:`String` path, :ref:`TextureRect` control **)** |const| | - +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handles` **(** :ref:`String` type **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`_make_tooltip_for_path` **(** :ref:`String` path, :ref:`Dictionary` metadata, :ref:`Control` base **)** |virtual| |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`request_thumbnail` **(** :ref:`String` path, :ref:`TextureRect` control **)** |const| | + +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -45,10 +45,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorResourceTooltipPlugin_method__handles: +.. _class_EditorResourceTooltipPlugin_private_method__handles: .. rst-class:: classref-method @@ -60,28 +60,28 @@ Method Descriptions ---- -.. _class_EditorResourceTooltipPlugin_method__make_tooltip_for_path: +.. _class_EditorResourceTooltipPlugin_private_method__make_tooltip_for_path: .. rst-class:: classref-method :ref:`Control` **_make_tooltip_for_path** **(** :ref:`String` path, :ref:`Dictionary` metadata, :ref:`Control` base **)** |virtual| |const| -Create and return a tooltip that will be displayed when the user hovers a resource under the given ``path`` in filesystem dock. +创建并返回工具提示,会在用户悬停在文件系统面板上路径为 ``path`` 的资源上时显示。 -The ``metadata`` dictionary is provided by preview generator (see :ref:`EditorResourcePreviewGenerator._generate`). +元数据字典 ``metadata`` 由预览生成器提供(见 :ref:`EditorResourcePreviewGenerator._generate`\ )。 -\ ``base`` is the base default tooltip, which is a :ref:`VBoxContainer` with a file name, type and size labels. If another plugin handled the same file type, ``base`` will be output from the previous plugin. For best result, make sure the base tooltip is part of the returned :ref:`Control`. +\ ``base`` 是基础的默认工具提示,是一个包含文件名、类型、大小标签的 :ref:`VBoxContainer`\ 。如果其他插件也能够处理相同的文件类型,那么 ``base`` 就是上一个插件的输出。为了达到最佳效果,请确保基础工具提示是返回的 :ref:`Control` 的一部分。 -\ **Note:** It's unadvised to use :ref:`ResourceLoader.load`, especially with heavy resources like models or textures, because it will make the editor unresponsive when creating the tooltip. You can use :ref:`request_thumbnail` if you want to display a preview in your tooltip. +\ **注意:**\ 不建议使用 :ref:`ResourceLoader.load`\ ,尤其是模型、纹理等开销较大的资源,否则会在创建工具提示时让编辑器失去响应。如果想要在工具提示中显示预览,可以使用 :ref:`request_thumbnail`\ 。 -\ **Note:** If you decide to discard the ``base``, make sure to call :ref:`Node.queue_free`, because it's not freed automatically. +\ **注意:**\ 如果你决定要丢弃 ``base``\ ,请确保调用了 :ref:`Node.queue_free`\ ,否则不会自动释放。 :: func _make_tooltip_for_path(path, metadata, base): var t_rect = TextureRect.new() request_thumbnail(path, t_rect) - base.add_child(t_rect) # The TextureRect will appear at the bottom of the tooltip. + base.add_child(t_rect) # TextureRect 会出现在工具提示的底部。 return base .. rst-class:: classref-item-separator @@ -96,10 +96,10 @@ void **request_thumbnail** **(** :ref:`String` path, :ref:`Texture 为给定的 :ref:`TextureRect` 请求缩略图。缩略图使用 :ref:`EditorResourcePreview` 异步创建,会在可用时自动设置。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorsceneformatimporter.rst b/classes/zh_CN/class_editorsceneformatimporter.rst index 0efaeef68b..74e4800cb0 100644 --- a/classes/zh_CN/class_editorsceneformatimporter.rst +++ b/classes/zh_CN/class_editorsceneformatimporter.rst @@ -10,16 +10,16 @@ EditorSceneFormatImporter ========================= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`EditorSceneFormatImporterBlend`, :ref:`EditorSceneFormatImporterFBX`, :ref:`EditorSceneFormatImporterGLTF` +**派生:** :ref:`EditorSceneFormatImporterBlend`, :ref:`EditorSceneFormatImporterFBX`, :ref:`EditorSceneFormatImporterGLTF` 从第三方的 3D 文件中导入场景。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **EditorSceneFormatImporter** 允许为第三方 3D 格式定义导入器脚本。 @@ -27,23 +27,23 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_extensions` **(** **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_import_flags` **(** **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_get_import_options` **(** :ref:`String` path **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_option_visibility` **(** :ref:`String` path, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`_import_scene` **(** :ref:`String` path, :ref:`int` flags, :ref:`Dictionary` options **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_extensions` **(** **)** |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_import_flags` **(** **)** |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_get_import_options` **(** :ref:`String` path **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_option_visibility` **(** :ref:`String` path, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`_import_scene` **(** :ref:`String` path, :ref:`int` flags, :ref:`Dictionary` options **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -51,8 +51,8 @@ Methods .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_EditorSceneFormatImporter_constant_IMPORT_SCENE: @@ -102,16 +102,24 @@ Constants +.. _class_EditorSceneFormatImporter_constant_IMPORT_FORCE_DISABLE_MESH_COMPRESSION: + +.. rst-class:: classref-constant + +**IMPORT_FORCE_DISABLE_MESH_COMPRESSION** = ``64`` + + + .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorSceneFormatImporter_method__get_extensions: +.. _class_EditorSceneFormatImporter_private_method__get_extensions: .. rst-class:: classref-method @@ -119,13 +127,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_EditorSceneFormatImporter_method__get_import_flags: +.. _class_EditorSceneFormatImporter_private_method__get_import_flags: .. rst-class:: classref-method @@ -133,13 +141,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_EditorSceneFormatImporter_method__get_import_options: +.. _class_EditorSceneFormatImporter_private_method__get_import_options: .. rst-class:: classref-method @@ -147,13 +155,13 @@ void **_get_import_options** **(** :ref:`String` path **)** |virtu .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_EditorSceneFormatImporter_method__get_option_visibility: +.. _class_EditorSceneFormatImporter_private_method__get_option_visibility: .. rst-class:: classref-method @@ -161,13 +169,13 @@ void **_get_import_options** **(** :ref:`String` path **)** |virtu .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_EditorSceneFormatImporter_method__import_scene: +.. _class_EditorSceneFormatImporter_private_method__import_scene: .. rst-class:: classref-method @@ -175,12 +183,12 @@ void **_get_import_options** **(** :ref:`String` path **)** |virtu .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorsceneformatimporterblend.rst b/classes/zh_CN/class_editorsceneformatimporterblend.rst index 5e7158436f..9d83a2dfed 100644 --- a/classes/zh_CN/class_editorsceneformatimporterblend.rst +++ b/classes/zh_CN/class_editorsceneformatimporterblend.rst @@ -10,14 +10,14 @@ EditorSceneFormatImporterBlend ============================== -**Inherits:** :ref:`EditorSceneFormatImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`EditorSceneFormatImporter` **<** :ref:`RefCounted` **<** :ref:`Object` Blender 的 ``.blend`` 场景文件格式的导入器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 通过 glTF 2.0 3D 导入管道导入使用 ``.blend`` 文件格式的 Blender 场景。该导入器要求用户安装 Blender,以便将场景导出为 glTF 2.0。 @@ -29,10 +29,10 @@ Blend 导入需要 Blender 3.0。 在内部,EditorSceneFormatImporterBlend 使用 Blender glTF“使用原始”模式来引用外部纹理。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorsceneformatimporterfbx.rst b/classes/zh_CN/class_editorsceneformatimporterfbx.rst index 6608f37707..b6e51783a0 100644 --- a/classes/zh_CN/class_editorsceneformatimporterfbx.rst +++ b/classes/zh_CN/class_editorsceneformatimporterfbx.rst @@ -10,14 +10,14 @@ EditorSceneFormatImporterFBX ============================ -**Inherits:** :ref:`EditorSceneFormatImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`EditorSceneFormatImporter` **<** :ref:`RefCounted` **<** :ref:`Object` ``.fbx`` 场景文件格式的导入器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 通过使用 FBX2glTF 命令行工具将 Autodesk FBX 3D 场景转换为 glTF 2.0 来导入它们。 @@ -25,10 +25,10 @@ FBX2glTF 可执行文件的位置通过 ``filesystem/import/fbx/fbx2gltf_path`` 该导入器仅在启用 :ref:`ProjectSettings.filesystem/import/fbx/enabled` 时使用,否则不会导入项目文件夹中存在的 ``.fbx`` 文件。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorsceneformatimportergltf.rst b/classes/zh_CN/class_editorsceneformatimportergltf.rst index ff958808b8..e6068d6498 100644 --- a/classes/zh_CN/class_editorsceneformatimportergltf.rst +++ b/classes/zh_CN/class_editorsceneformatimportergltf.rst @@ -10,16 +10,16 @@ EditorSceneFormatImporterGLTF ============================= -**Inherits:** :ref:`EditorSceneFormatImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`EditorSceneFormatImporter` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorscenepostimport.rst b/classes/zh_CN/class_editorscenepostimport.rst index 750b9d33f3..6c17757c48 100644 --- a/classes/zh_CN/class_editorscenepostimport.rst +++ b/classes/zh_CN/class_editorscenepostimport.rst @@ -10,18 +10,18 @@ EditorScenePostImport ===================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 导入后对场景进行后处理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 通过将\ **自定义脚本**\ 导入属性设置为从此类继承的 ``tool`` 脚本,可以在导入后立即自动修改导入的场景。 -\ :ref:`_post_import` 回调接收导入场景的根节点,并返回场景的修改版本。使用示例: +\ :ref:`_post_import` 回调接收导入场景的根节点,并返回场景的修改版本。使用示例: .. tabs:: @@ -77,24 +77,24 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- `导入 3D 场景:自定义脚本 <../tutorials/assets_pipeline/importing_scenes.html#custom-script>`__ +- `导入 3D 场景:配置:使用导入脚本进行自动化 <../tutorials/assets_pipeline/importing_3d_scenes/import_configuration.html#using-import-scripts-for-automation>`__ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`_post_import` **(** :ref:`Node` scene **)** |virtual| | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_source_file` **(** **)** |const| | - +-----------------------------+--------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`_post_import` **(** :ref:`Node` scene **)** |virtual| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_source_file` **(** **)** |const| | + +-----------------------------+----------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -102,10 +102,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorScenePostImport_method__post_import: +.. _class_EditorScenePostImport_private_method__post_import: .. rst-class:: classref-method @@ -125,10 +125,10 @@ Method Descriptions 返回导入的源文件路径(如\ ``res://scene.dae``\ )。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorscenepostimportplugin.rst b/classes/zh_CN/class_editorscenepostimportplugin.rst index 139fc029d3..2ebc256df3 100644 --- a/classes/zh_CN/class_editorscenepostimportplugin.rst +++ b/classes/zh_CN/class_editorscenepostimportplugin.rst @@ -10,41 +10,41 @@ EditorScenePostImportPlugin =========================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 用于控制和修改导入场景的过程的插件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这种插件类型的存在是为了修改导入场景的处理,允许在处理的每个阶段更改内容以及添加导入器选项。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_get_import_options` **(** :ref:`String` path **)** |virtual| | + | void | :ref:`_get_import_options` **(** :ref:`String` path **)** |virtual| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_get_internal_import_options` **(** :ref:`int` category **)** |virtual| | + | void | :ref:`_get_internal_import_options` **(** :ref:`int` category **)** |virtual| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_internal_option_update_view_required` **(** :ref:`int` category, :ref:`String` option **)** |virtual| |const| | + | :ref:`Variant` | :ref:`_get_internal_option_update_view_required` **(** :ref:`int` category, :ref:`String` option **)** |virtual| |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_internal_option_visibility` **(** :ref:`int` category, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| | + | :ref:`Variant` | :ref:`_get_internal_option_visibility` **(** :ref:`int` category, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_option_visibility` **(** :ref:`String` path, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| | + | :ref:`Variant` | :ref:`_get_option_visibility` **(** :ref:`String` path, :ref:`bool` for_animation, :ref:`String` option **)** |virtual| |const| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_internal_process` **(** :ref:`int` category, :ref:`Node` base_node, :ref:`Node` node, :ref:`Resource` resource **)** |virtual| | + | void | :ref:`_internal_process` **(** :ref:`int` category, :ref:`Node` base_node, :ref:`Node` node, :ref:`Resource` resource **)** |virtual| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_post_process` **(** :ref:`Node` scene **)** |virtual| | + | void | :ref:`_post_process` **(** :ref:`Node` scene **)** |virtual| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pre_process` **(** :ref:`Node` scene **)** |virtual| | + | void | :ref:`_pre_process` **(** :ref:`Node` scene **)** |virtual| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_import_option` **(** :ref:`String` name, :ref:`Variant` value **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -59,8 +59,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_EditorScenePostImportPlugin_InternalImportCategory: @@ -138,10 +138,10 @@ enum **InternalImportCategory**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorScenePostImportPlugin_method__get_import_options: +.. _class_EditorScenePostImportPlugin_private_method__get_import_options: .. rst-class:: classref-method @@ -153,7 +153,7 @@ void **_get_import_options** **(** :ref:`String` path **)** |virtu ---- -.. _class_EditorScenePostImportPlugin_method__get_internal_import_options: +.. _class_EditorScenePostImportPlugin_private_method__get_internal_import_options: .. rst-class:: classref-method @@ -165,7 +165,7 @@ void **_get_internal_import_options** **(** :ref:`int` category **)** ---- -.. _class_EditorScenePostImportPlugin_method__get_internal_option_update_view_required: +.. _class_EditorScenePostImportPlugin_private_method__get_internal_option_update_view_required: .. rst-class:: classref-method @@ -177,7 +177,7 @@ void **_get_internal_import_options** **(** :ref:`int` category **)** ---- -.. _class_EditorScenePostImportPlugin_method__get_internal_option_visibility: +.. _class_EditorScenePostImportPlugin_private_method__get_internal_option_visibility: .. rst-class:: classref-method @@ -189,7 +189,7 @@ void **_get_internal_import_options** **(** :ref:`int` category **)** ---- -.. _class_EditorScenePostImportPlugin_method__get_option_visibility: +.. _class_EditorScenePostImportPlugin_private_method__get_option_visibility: .. rst-class:: classref-method @@ -201,7 +201,7 @@ void **_get_internal_import_options** **(** :ref:`int` category **)** ---- -.. _class_EditorScenePostImportPlugin_method__internal_process: +.. _class_EditorScenePostImportPlugin_private_method__internal_process: .. rst-class:: classref-method @@ -213,7 +213,7 @@ void **_internal_process** **(** :ref:`int` category, :ref:`Node` scene **)** |virtual| ---- -.. _class_EditorScenePostImportPlugin_method__pre_process: +.. _class_EditorScenePostImportPlugin_private_method__pre_process: .. rst-class:: classref-method @@ -243,7 +243,7 @@ void **_pre_process** **(** :ref:`Node` scene **)** |virtual| void **add_import_option** **(** :ref:`String` name, :ref:`Variant` value **)** -添加特定的导入选项(仅限名称和默认值)。该函数只能从 :ref:`_get_import_options` 和 :ref:`_get_internal_import_options` 被调用。 +添加特定的导入选项(仅限名称和默认值)。该函数只能从 :ref:`_get_import_options` 和 :ref:`_get_internal_import_options` 被调用。 .. rst-class:: classref-item-separator @@ -255,7 +255,7 @@ void **add_import_option** **(** :ref:`String` name, :ref:`Variant void **add_import_option_advanced** **(** :ref:`Variant.Type` type, :ref:`String` name, :ref:`Variant` default_value, :ref:`PropertyHint` hint=0, :ref:`String` hint_string="", :ref:`int` usage_flags=6 **)** -添加特定的导入选项。该函数只能从 :ref:`_get_import_options` 和 :ref:`_get_internal_import_options` 被调用。 +添加特定的导入选项。该函数只能从 :ref:`_get_import_options` 和 :ref:`_get_internal_import_options` 被调用。 .. rst-class:: classref-item-separator @@ -269,10 +269,10 @@ void **add_import_option_advanced** **(** :ref:`Variant.Type` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 可用于为编辑器添加扩展功能的基础脚本。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -扩展该类并实现其 :ref:`_run` 方法的脚本可以在编辑器运行时通过脚本编辑器的\ **文件 > 运行**\ 菜单选项(或按 :kbd:`Ctrl + Shift + X`\ )执行。这对于向 Godot 添加自定义的编辑内功能很有用。对于更复杂的添加,请考虑改用 :ref:`EditorPlugin`\ 。 +扩展该类并实现其 :ref:`_run` 方法的脚本可以在编辑器运行时通过脚本编辑器的\ **文件 > 运行**\ 菜单选项(或按 :kbd:`Ctrl + Shift + X`\ )执行。这对于向 Godot 添加自定义的编辑内功能很有用。对于更复杂的添加,请考虑改用 :ref:`EditorPlugin`\ 。 \ **注意:**\ 扩展脚本需要启用 ``tool`` 工具模式。 @@ -57,14 +57,14 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ - | void | :ref:`_run` **(** **)** |virtual| | + | void | :ref:`_run` **(** **)** |virtual| | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ | void | :ref:`add_root_node` **(** :ref:`Node` node **)** | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------+ @@ -79,10 +79,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorScript_method__run: +.. _class_EditorScript_private_method__run: .. rst-class:: classref-method @@ -114,9 +114,9 @@ void **add_root_node** **(** :ref:`Node` node **)** :ref:`EditorInterface` **get_editor_interface** **(** **)** |const| -Returns the :ref:`EditorInterface` singleton instance. +返回 :ref:`EditorInterface` 单例实例。 -\ *Deprecated.* :ref:`EditorInterface` is a global singleton and can be accessed directly by its name. +\ *已废弃。*\ :ref:`EditorInterface` 是全局单例,可以使用其名称直接访问。 .. rst-class:: classref-item-separator @@ -130,10 +130,10 @@ Returns the :ref:`EditorInterface` singleton instance. 返回编辑器的当前活动场景。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorscriptpicker.rst b/classes/zh_CN/class_editorscriptpicker.rst index e07ad82fe8..c8ac9f1b07 100644 --- a/classes/zh_CN/class_editorscriptpicker.rst +++ b/classes/zh_CN/class_editorscriptpicker.rst @@ -10,14 +10,14 @@ EditorScriptPicker ================== -**Inherits:** :ref:`EditorResourcePicker` **<** :ref:`HBoxContainer` **<** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`EditorResourcePicker` **<** :ref:`HBoxContainer` **<** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` Godot 编辑器的控件,用于选择节点 :ref:`Node` 的脚本 ``script`` 属性。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 与 :ref:`EditorResourcePicker` 类似,这个 :ref:`Control` 节点在编辑器的检查器面板中使用,但只用于编辑 :ref:`Node` 的 ``script`` 属性。创建包含所有可能子类型的新资源的默认选项 被替换为打开“附加节点脚本”对话框的专用按钮。可以与 :ref:`EditorInspectorPlugin` 一起使用以重新创建相同的行为。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_EditorScriptPicker_property_script_owner: @@ -57,10 +57,10 @@ Property Descriptions 持有被编辑资源的脚本属性的所有者 :ref:`Node`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorselection.rst b/classes/zh_CN/class_editorselection.rst index 624f19d405..6fbe991885 100644 --- a/classes/zh_CN/class_editorselection.rst +++ b/classes/zh_CN/class_editorselection.rst @@ -10,14 +10,14 @@ EditorSelection =============== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 管理编辑器中的 SceneTree 选择。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个对象管理编辑器中的 SceneTree 选择。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_EditorSelection_signal_selection_changed: @@ -66,8 +66,8 @@ Signals .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_EditorSelection_method_add_node: @@ -127,10 +127,10 @@ void **remove_node** **(** :ref:`Node` node **)** 从选择中删除一个节点。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorsettings.rst b/classes/zh_CN/class_editorsettings.rst index 586015e090..8f85096d3c 100644 --- a/classes/zh_CN/class_editorsettings.rst +++ b/classes/zh_CN/class_editorsettings.rst @@ -10,20 +10,20 @@ EditorSettings ============== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 保存编辑器设置的对象,这些设置与项目无关。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Object that holds the project-independent editor settings. These settings are generally visible in the **Editor > Editor Settings** menu. +保存编辑器设置的对象,这些设置与项目无关,通常在\ **编辑器 > 编辑器设置**\ 菜单中可见。 -Property names use slash delimiters to distinguish sections. Setting values can be of any :ref:`Variant` type. It's recommended to use ``snake_case`` for editor settings to be consistent with the Godot editor itself. +属性名称中使用斜线分隔符来区分不同的部分。设置的值可以是任何 :ref:`Variant` 类型。编辑器设置的名称建议使用 ``snake_case`` 形式,与 Godot 编辑器本身保持一致。 -Accessing the settings can be done using the following methods, such as: +可以使用以下方法访问设置,例如: .. tabs:: @@ -31,29 +31,29 @@ Accessing the settings can be done using the following methods, such as: .. code-tab:: gdscript var settings = EditorInterface.get_editor_settings() - # `settings.set("some/property", 10)` also works as this class overrides `_set()` internally. + # 也可以写 `settings.set("some/property", 10)`,因为这个类内部覆盖了 `_set()`。 settings.set_setting("some/property", 10) - # `settings.get("some/property")` also works as this class overrides `_get()` internally. + # 也可以写 `settings.get("some/property")` ,因为这个类内部覆盖了 `_get()`。 settings.get_setting("some/property") var list_of_settings = settings.get_property_list() .. code-tab:: csharp EditorSettings settings = EditorInterface.Singleton.GetEditorSettings(); - // `settings.set("some/property", value)` also works as this class overrides `_set()` internally. + // 也可以写 `settings.set("some/property", 10)`,因为这个类内部覆盖了 `_set()`。 settings.SetSetting("some/property", Value); - // `settings.get("some/property", value)` also works as this class overrides `_get()` internally. + // 也可以写 `settings.get("some/property")` ,因为这个类内部覆盖了 `_get()`。 settings.GetSetting("some/property"); Godot.Collections.Array listOfSettings = settings.GetPropertyList(); -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_editor_settings`. +\ **注意:**\ 不能直接实例化这个类。请改用 :ref:`EditorInterface.get_editor_settings` 访问单例。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -251,6 +251,8 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`filesystem/on_save/safe_save_on_backup_then_rename` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`filesystem/tools/oidn/oidn_denoise_path` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/editor/accept_dialog_cancel_ok_buttons` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/automatically_open_screenshots` | @@ -527,6 +529,8 @@ Properties +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`text_editor/theme/highlighting/current_line_color` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/doc_comment_color` | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`text_editor/theme/highlighting/engine_type_color` | +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`text_editor/theme/highlighting/executing_line_color` | @@ -570,8 +574,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -616,8 +620,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_EditorSettings_signal_settings_changed: @@ -633,8 +637,8 @@ Signals .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_EditorSettings_constant_NOTIFICATION_EDITOR_SETTINGS_CHANGED: @@ -650,8 +654,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_EditorSettings_property_debugger/auto_switch_to_remote_scene_tree: @@ -855,9 +859,9 @@ Property Descriptions :ref:`float` **editors/2d/bone_outline_size** -The outline size in the 2D skeleton editor (in pixels). See also :ref:`editors/2d/bone_width`. +2D 骨架编辑器中轮廓的大小(单位为像素)。另见 :ref:`editors/2d/bone_width`\ 。 -\ **Note:** Changes to this value only apply after modifying a :ref:`Bone2D` node in any way, or closing and reopening the scene. +\ **注意:**\ 对此值的更改只有在以任何方式修改 :ref:`Bone2D` 节点,或者关闭并重新打开场景后才会生效。 .. rst-class:: classref-item-separator @@ -881,9 +885,9 @@ The outline size in the 2D skeleton editor (in pixels). See also :ref:`editors/2 :ref:`float` **editors/2d/bone_width** -The bone width in the 2D skeleton editor (in pixels). See also :ref:`editors/2d/bone_outline_size`. +2D 骨架编辑器中的骨骼宽度(单位为像素)。另见 :ref:`editors/2d/bone_outline_size`\ 。 -\ **Note:** Changes to this value only apply after modifying a :ref:`Bone2D` node in any way, or closing and reopening the scene. +\ **注意:**\ 对此值的更改只有在以任何方式修改 :ref:`Bone2D` 节点,或者关闭并重新打开场景后才会生效。 .. rst-class:: classref-item-separator @@ -931,7 +935,7 @@ The bone width in the 2D skeleton editor (in pixels). See also :ref:`editors/2d/ :ref:`bool` **editors/2d/use_integer_zoom_by_default** -If ``true``, the 2D editor will snap to integer zoom values while not holding the :kbd:`Alt` key and powers of two while holding it. If ``false``, this behavior is swapped. +如果为 ``true``\ ,2D 编辑器将在不按住 :kbd:`Alt` 键的情况下吸附到整数缩放值,并在按住时吸附到 2 的幂。如果为 ``false``\ ,则交换这种行为。 .. rst-class:: classref-item-separator @@ -1087,7 +1091,7 @@ If ``true``, the 2D editor will snap to integer zoom values while not holding th :ref:`int` **editors/3d/grid_division_level_max** -The largest grid division to use in the 3D editor. Together with :ref:`editors/3d/primary_grid_steps`, this determines how large the grid divisions can be. The grid divisions will not be able to get larger than ``primary_grid_steps ^ grid_division_level_max`` units. By default, when :ref:`editors/3d/primary_grid_steps` is ``8``, this means grid divisions cannot get larger than ``64`` units each (so primary grid lines are ``512`` units apart), no matter how far away the camera is from the grid. +在 3D 编辑器中使用的最大栅格划分。这个属性与 :ref:`editors/3d/primary_grid_steps` 一同决定栅格划分的大小。栅格不能大于 ``primary_grid_steps ^ grid_division_level_max`` 个单位。默认情况下 :ref:`editors/3d/primary_grid_steps` 为 ``8``\ ,这意味着无论相机离栅格有多远,每个栅格划分都不能大于 ``64`` 个单位(因此主栅格线之间相距 ``512`` 个单位)。 .. rst-class:: classref-item-separator @@ -1789,9 +1793,9 @@ The largest grid division to use in the 3D editor. Together with :ref:`editors/3 :ref:`String` **filesystem/import/blender/blender3_path** -The path to the directory containing the Blender executable used for converting the Blender 3D scene files ``.blend`` to glTF 2.0 format during import. Blender 3.0 or later is required. +包含 Blender 可执行文件的目录,导入时会使用 Blender 将 Blender 3D 场景文件 ``.blend`` 转换为 glTF 2.0 格式。需要 Blender 3.0 及更高版本。 -To enable this feature for your specific project, use :ref:`ProjectSettings.filesystem/import/blender/enabled`. +要为指定项目启用这个功能,请使用 :ref:`ProjectSettings.filesystem/import/blender/enabled`\ 。 .. rst-class:: classref-item-separator @@ -1803,9 +1807,9 @@ To enable this feature for your specific project, use :ref:`ProjectSettings.file :ref:`int` **filesystem/import/blender/rpc_port** -The port number used for Remote Procedure Call (RPC) communication with Godot's created process of the blender executable. +用于与 Godot 创建的 Blender 可执行文件进程进行远程过程调用(RPC)通信的端口号。 -Setting this to 0 effectively disables communication with Godot and the blender process, making performance slower. +将其设置为 0 会有效禁用与 Godot 的通信和 Blender 进程,从而降低性能。 .. rst-class:: classref-item-separator @@ -1817,9 +1821,9 @@ Setting this to 0 effectively disables communication with Godot and the blender :ref:`float` **filesystem/import/blender/rpc_server_uptime** -The maximum idle uptime (in seconds) of the Blender process. +Blender 进程的最大空闲运行时间(单位为秒)。 -This prevents Godot from having to create a new process for each import within the given seconds. +能够在给定的秒数内,防止 Godot 每次导入都创建一个新的进程。 .. rst-class:: classref-item-separator @@ -1831,9 +1835,9 @@ This prevents Godot from having to create a new process for each import within t :ref:`String` **filesystem/import/fbx/fbx2gltf_path** -The path to the FBX2glTF executable used for converting Autodesk FBX 3D scene files ``.fbx`` to glTF 2.0 format during import. +包含 FBX2glTF 可执行文件的目录,导入时会使用 FBX2glTF 将 Autodesk FBX 3D 场景文件 ``.fbx`` 转换为 glTF 2.0 格式。 -To enable this feature for your specific project, use :ref:`ProjectSettings.filesystem/import/fbx/enabled`. +要为指定项目启用这个功能,请使用 :ref:`ProjectSettings.filesystem/import/fbx/enabled`\ 。 .. rst-class:: classref-item-separator @@ -1865,6 +1869,20 @@ To enable this feature for your specific project, use :ref:`ProjectSettings.file ---- +.. _class_EditorSettings_property_filesystem/tools/oidn/oidn_denoise_path: + +.. rst-class:: classref-property + +:ref:`String` **filesystem/tools/oidn/oidn_denoise_path** + +包含开放图像去噪(OIDN)可执行文件的目录路径,可选择用于去噪光照贴图。它可以从 `openimagedenoise.org `__ 下载。 + +要为特定项目启用该功能,请使用 :ref:`ProjectSettings.rendering/lightmapping/denoising/denoiser`\ 。 + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/editor/accept_dialog_cancel_ok_buttons: .. rst-class:: classref-property @@ -3223,7 +3241,7 @@ FreeType 的字体抗锯齿模式,用于渲染编辑器字体。大多数字 :ref:`bool` **text_editor/completion/code_complete_enabled** -If ``true``, code completion will be triggered automatically after :ref:`text_editor/completion/code_complete_delay`. If ``false``, you can still trigger completion manually by pressing :kbd:`Ctrl + Space` (:kbd:`Cmd + Space` on macOS). +如果为 ``true``\ ,代码补全将在 :ref:`text_editor/completion/code_complete_delay` 之后自动触发。如果为 ``false``\ ,你仍然可以通过按 :kbd:`Ctrl + Space`\ (在 macOS 上为 :kbd:`Cmd + Space`\ )手动触发补全。 .. rst-class:: classref-item-separator @@ -3235,7 +3253,7 @@ If ``true``, code completion will be triggered automatically after :ref:`text_ed :ref:`bool` **text_editor/completion/colorize_suggestions** -If ``true`` enables the coloring for some items in the autocompletion suggestions, like vector components. +如果为 ``true``\ ,则启用自动补全建议中某些项目的着色,例如向量分量。 .. rst-class:: classref-item-separator @@ -3599,6 +3617,18 @@ If ``true`` enables the coloring for some items in the autocompletion suggestion ---- +.. _class_EditorSettings_property_text_editor/theme/highlighting/doc_comment_color: + +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/doc_comment_color** + +脚本编辑器的文档注释颜色。在 GDScript 中,这被用于以 ``##`` 开头的注释。在 C# 中,这被用于以 ``///`` 或 ``/**`` 开头的注释。 + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/theme/highlighting/engine_type_color: .. rst-class:: classref-property @@ -3629,7 +3659,7 @@ If ``true`` enables the coloring for some items in the autocompletion suggestion :ref:`Color` **text_editor/theme/highlighting/folded_code_region_color** -The script editor's background line highlighting color for folded code region. +脚本编辑器的背景行高亮颜色,用于折叠代码区块。 .. rst-class:: classref-item-separator @@ -3847,8 +3877,8 @@ The script editor's background line highlighting color for folded code region. .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_EditorSettings_method_add_property_info: @@ -4080,10 +4110,10 @@ void **set_setting** **(** :ref:`String` name, :ref:`Variant`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorspinslider.rst b/classes/zh_CN/class_editorspinslider.rst index 98b05af4ec..b71684359f 100644 --- a/classes/zh_CN/class_editorspinslider.rst +++ b/classes/zh_CN/class_editorspinslider.rst @@ -10,21 +10,23 @@ EditorSpinSlider ================ -**Inherits:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` Godot 编辑器用于编辑数值的控件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个 :ref:`Control` 节点在编辑器的检查器面板中使用,允许编辑数值。可以与 :ref:`EditorInspectorPlugin` 一起使用,以重新创建相同的行为。 +如果 :ref:`Range.step` 值为 ``1``\ ,则 **EditorSpinSlider** 将显示向上/向下箭头,类似于 :ref:`SpinBox`\ 。如果 :ref:`Range.step` 值不是 ``1``\ ,则会显示一个滑块。 + .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -53,8 +55,8 @@ Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_EditorSpinSlider_signal_grabbed: @@ -106,8 +108,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_EditorSpinSlider_property_flat: @@ -137,7 +139,7 @@ Property Descriptions - void **set_hide_slider** **(** :ref:`bool` value **)** - :ref:`bool` **is_hiding_slider** **(** **)** -如果为 ``true``\ ,则隐藏滑块。 +如果为 ``true``\ ,则隐藏滑块和向上/向下箭头。 .. rst-class:: classref-item-separator @@ -190,10 +192,10 @@ Property Descriptions 在值之后显示的后缀(以一种淡化的颜色显示)。这通常应该是一个复数形式的词。如果后缀太长而无法显示,可能必须使用缩写。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorsyntaxhighlighter.rst b/classes/zh_CN/class_editorsyntaxhighlighter.rst index 51d61d8db8..b146c1a8da 100644 --- a/classes/zh_CN/class_editorsyntaxhighlighter.rst +++ b/classes/zh_CN/class_editorsyntaxhighlighter.rst @@ -10,32 +10,32 @@ EditorSyntaxHighlighter ======================= -**Inherits:** :ref:`SyntaxHighlighter` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`SyntaxHighlighter` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`ScriptEditor` 所使用的 :ref:`SyntaxHighlighter` 的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Base class that all :ref:`SyntaxHighlighter`\ s used by the :ref:`ScriptEditor` extend from. +扩展了 :ref:`ScriptEditor` 的编辑器所使用的所有 :ref:`SyntaxHighlighter` 的基类。 -Add a syntax highlighter to an individual script by calling :ref:`ScriptEditorBase.add_syntax_highlighter`. To apply to all scripts on open, call :ref:`ScriptEditor.register_syntax_highlighter`. +请通过调用 :ref:`ScriptEditorBase.add_syntax_highlighter` 为各个脚本添加语法高亮器。要在打开时应用于所有脚本,请调用 :ref:`ScriptEditor.register_syntax_highlighter`\ 。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_supported_languages` **(** **)** |virtual| |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_supported_languages` **(** **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -43,10 +43,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorSyntaxHighlighter_method__get_name: +.. _class_EditorSyntaxHighlighter_private_method__get_name: .. rst-class:: classref-method @@ -58,7 +58,7 @@ Method Descriptions ---- -.. _class_EditorSyntaxHighlighter_method__get_supported_languages: +.. _class_EditorSyntaxHighlighter_private_method__get_supported_languages: .. rst-class:: classref-method @@ -66,10 +66,10 @@ Method Descriptions 虚函数,可以在重写后返回所支持的语言名称。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editortranslationparserplugin.rst b/classes/zh_CN/class_editortranslationparserplugin.rst index 1b10a76ef9..bc6b532d88 100644 --- a/classes/zh_CN/class_editortranslationparserplugin.rst +++ b/classes/zh_CN/class_editortranslationparserplugin.rst @@ -10,16 +10,16 @@ EditorTranslationParserPlugin ============================= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 用于添加自定义解析器,以从自定义文件(.csv、.json等)提取已翻译的字符串的插件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**EditorTranslationParserPlugin**\ 在文件被解析以提取需要翻译的字符串时被调用。为了定义解析和提取字符串的逻辑,在脚本中覆盖 :ref:`_parse_file` 方法。 +**EditorTranslationParserPlugin**\ 在文件被解析以提取需要翻译的字符串时被调用。为了定义解析和提取字符串的逻辑,在脚本中覆盖 :ref:`_parse_file` 方法。 如果使用上下文或复数形式,则将提取的字符串添加到参数 ``msgids`` 或 ``msgids_context_plural``\ 。 @@ -137,17 +137,17 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_parse_file` **(** :ref:`String` path, :ref:`String[]` msgids, :ref:`Array[]` msgids_context_plural **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_parse_file` **(** :ref:`String` path, :ref:`String[]` msgids, :ref:`Array[]` msgids_context_plural **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -155,10 +155,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorTranslationParserPlugin_method__get_recognized_extensions: +.. _class_EditorTranslationParserPlugin_private_method__get_recognized_extensions: .. rst-class:: classref-method @@ -170,7 +170,7 @@ Method Descriptions ---- -.. _class_EditorTranslationParserPlugin_method__parse_file: +.. _class_EditorTranslationParserPlugin_private_method__parse_file: .. rst-class:: classref-method @@ -178,10 +178,10 @@ void **_parse_file** **(** :ref:`String` path, :ref:`String[]` +**继承:** :ref:`Object` 管理编辑器中打开场景的撤销历史。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **EditorUndoRedoManager** 是将 :ref:`UndoRedo` 对象与编辑场景相关联的管理器。每个场景都有自己的撤销历史,\ **EditorUndoRedoManager** 能够确保编辑器中执行的每个动作都与正确的场景相关联。与场景无关的动作(对 :ref:`ProjectSettings`\ 、外部资源等对象的编辑)使用单独的全局历史。 @@ -37,8 +37,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -73,8 +73,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_EditorUndoRedoManager_signal_history_changed: @@ -102,8 +102,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_EditorUndoRedoManager_SpecialHistory: @@ -141,8 +141,8 @@ enum **SpecialHistory**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_EditorUndoRedoManager_method_add_do_method: @@ -290,10 +290,10 @@ void **create_action** **(** :ref:`String` name, :ref:`MergeMode`\ )时,则返回 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_editorvcsinterface.rst b/classes/zh_CN/class_editorvcsinterface.rst index f056d73045..7a95366764 100644 --- a/classes/zh_CN/class_editorvcsinterface.rst +++ b/classes/zh_CN/class_editorvcsinterface.rst @@ -10,95 +10,95 @@ EditorVCSInterface ================== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 版本控制系统(VCS)接口,用于读取和写入正在使用的本地 VCS。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 定义编辑器使用的 API,负责从底层 VCS 提取信息。该 API 的实现包含在 VCS 插件中,这些插件是继承 **EditorVCSInterface** 并被附加(按需)到 **EditorVCSInterface** 的单例实例的 GDExtension 插件。以下列出的所有虚函数都不会亲自执行操作,而是会去调用 VCS 插件中内部覆盖的函数,以提供即插即用的体验。自定义 VCS 插件应当继承 **EditorVCSInterface** 并覆盖这些虚函数。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Version control systems <../tutorials/best_practices/version_control_systems>` +- :doc:`版本控制系统 <../tutorials/best_practices/version_control_systems>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_checkout_branch` **(** :ref:`String` branch_name **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_commit` **(** :ref:`String` msg **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_create_branch` **(** :ref:`String` branch_name **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_create_remote` **(** :ref:`String` remote_name, :ref:`String` remote_url **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_discard_file` **(** :ref:`String` file_path **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_fetch` **(** :ref:`String` remote **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String[]` | :ref:`_get_branch_list` **(** **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_current_branch_name` **(** **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_diff` **(** :ref:`String` identifier, :ref:`int` area **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_line_diff` **(** :ref:`String` file_path, :ref:`String` text **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_modified_files_data` **(** **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_previous_commits` **(** :ref:`int` max_commits **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String[]` | :ref:`_get_remotes` **(** **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_vcs_name` **(** **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_initialize` **(** :ref:`String` project_path **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pull` **(** :ref:`String` remote **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_push` **(** :ref:`String` remote, :ref:`bool` force **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_remove_branch` **(** :ref:`String` branch_name **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_remove_remote` **(** :ref:`String` remote_name **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_credentials` **(** :ref:`String` username, :ref:`String` password, :ref:`String` ssh_public_key_path, :ref:`String` ssh_private_key_path, :ref:`String` ssh_passphrase **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_shut_down` **(** **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_stage_file` **(** :ref:`String` file_path **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_unstage_file` **(** :ref:`String` file_path **)** |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`add_diff_hunks_into_diff_file` **(** :ref:`Dictionary` diff_file, :ref:`Dictionary[]` diff_hunks **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`add_line_diffs_into_diff_hunk` **(** :ref:`Dictionary` diff_hunk, :ref:`Dictionary[]` line_diffs **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`create_commit` **(** :ref:`String` msg, :ref:`String` author, :ref:`String` id, :ref:`int` unix_timestamp, :ref:`int` offset_minutes **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`create_diff_file` **(** :ref:`String` new_file, :ref:`String` old_file **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`create_diff_hunk` **(** :ref:`int` old_start, :ref:`int` new_start, :ref:`int` old_lines, :ref:`int` new_lines **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`create_diff_line` **(** :ref:`int` new_line_no, :ref:`int` old_line_no, :ref:`String` content, :ref:`String` status **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`create_status_file` **(** :ref:`String` file_path, :ref:`ChangeType` change_type, :ref:`TreeArea` area **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_error` **(** :ref:`String` msg **)** | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_checkout_branch` **(** :ref:`String` branch_name **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_commit` **(** :ref:`String` msg **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_create_branch` **(** :ref:`String` branch_name **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_create_remote` **(** :ref:`String` remote_name, :ref:`String` remote_url **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_discard_file` **(** :ref:`String` file_path **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_fetch` **(** :ref:`String` remote **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String[]` | :ref:`_get_branch_list` **(** **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_current_branch_name` **(** **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_diff` **(** :ref:`String` identifier, :ref:`int` area **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_line_diff` **(** :ref:`String` file_path, :ref:`String` text **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_modified_files_data` **(** **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_previous_commits` **(** :ref:`int` max_commits **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String[]` | :ref:`_get_remotes` **(** **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_vcs_name` **(** **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_initialize` **(** :ref:`String` project_path **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pull` **(** :ref:`String` remote **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_push` **(** :ref:`String` remote, :ref:`bool` force **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_remove_branch` **(** :ref:`String` branch_name **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_remove_remote` **(** :ref:`String` remote_name **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_credentials` **(** :ref:`String` username, :ref:`String` password, :ref:`String` ssh_public_key_path, :ref:`String` ssh_private_key_path, :ref:`String` ssh_passphrase **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shut_down` **(** **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_stage_file` **(** :ref:`String` file_path **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_unstage_file` **(** :ref:`String` file_path **)** |virtual| | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`add_diff_hunks_into_diff_file` **(** :ref:`Dictionary` diff_file, :ref:`Dictionary[]` diff_hunks **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`add_line_diffs_into_diff_hunk` **(** :ref:`Dictionary` diff_hunk, :ref:`Dictionary[]` line_diffs **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`create_commit` **(** :ref:`String` msg, :ref:`String` author, :ref:`String` id, :ref:`int` unix_timestamp, :ref:`int` offset_minutes **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`create_diff_file` **(** :ref:`String` new_file, :ref:`String` old_file **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`create_diff_hunk` **(** :ref:`int` old_start, :ref:`int` new_start, :ref:`int` old_lines, :ref:`int` new_lines **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`create_diff_line` **(** :ref:`int` new_line_no, :ref:`int` old_line_no, :ref:`String` content, :ref:`String` status **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`create_status_file` **(** :ref:`String` file_path, :ref:`ChangeType` change_type, :ref:`TreeArea` area **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_error` **(** :ref:`String` msg **)** | + +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -106,8 +106,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_EditorVCSInterface_ChangeType: @@ -203,10 +203,10 @@ enum **TreeArea**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EditorVCSInterface_method__checkout_branch: +.. _class_EditorVCSInterface_private_method__checkout_branch: .. rst-class:: classref-method @@ -218,7 +218,7 @@ Method Descriptions ---- -.. _class_EditorVCSInterface_method__commit: +.. _class_EditorVCSInterface_private_method__commit: .. rst-class:: classref-method @@ -230,7 +230,7 @@ void **_commit** **(** :ref:`String` msg **)** |virtual| ---- -.. _class_EditorVCSInterface_method__create_branch: +.. _class_EditorVCSInterface_private_method__create_branch: .. rst-class:: classref-method @@ -242,7 +242,7 @@ void **_create_branch** **(** :ref:`String` branch_name **)** |vir ---- -.. _class_EditorVCSInterface_method__create_remote: +.. _class_EditorVCSInterface_private_method__create_remote: .. rst-class:: classref-method @@ -254,7 +254,7 @@ void **_create_remote** **(** :ref:`String` remote_name, :ref:`Str ---- -.. _class_EditorVCSInterface_method__discard_file: +.. _class_EditorVCSInterface_private_method__discard_file: .. rst-class:: classref-method @@ -266,7 +266,7 @@ void **_discard_file** **(** :ref:`String` file_path **)** |virtua ---- -.. _class_EditorVCSInterface_method__fetch: +.. _class_EditorVCSInterface_private_method__fetch: .. rst-class:: classref-method @@ -278,7 +278,7 @@ void **_fetch** **(** :ref:`String` remote **)** |virtual| ---- -.. _class_EditorVCSInterface_method__get_branch_list: +.. _class_EditorVCSInterface_private_method__get_branch_list: .. rst-class:: classref-method @@ -290,7 +290,7 @@ void **_fetch** **(** :ref:`String` remote **)** |virtual| ---- -.. _class_EditorVCSInterface_method__get_current_branch_name: +.. _class_EditorVCSInterface_private_method__get_current_branch_name: .. rst-class:: classref-method @@ -302,7 +302,7 @@ void **_fetch** **(** :ref:`String` remote **)** |virtual| ---- -.. _class_EditorVCSInterface_method__get_diff: +.. _class_EditorVCSInterface_private_method__get_diff: .. rst-class:: classref-method @@ -314,7 +314,7 @@ void **_fetch** **(** :ref:`String` remote **)** |virtual| ---- -.. _class_EditorVCSInterface_method__get_line_diff: +.. _class_EditorVCSInterface_private_method__get_line_diff: .. rst-class:: classref-method @@ -326,7 +326,7 @@ void **_fetch** **(** :ref:`String` remote **)** |virtual| ---- -.. _class_EditorVCSInterface_method__get_modified_files_data: +.. _class_EditorVCSInterface_private_method__get_modified_files_data: .. rst-class:: classref-method @@ -338,7 +338,7 @@ void **_fetch** **(** :ref:`String` remote **)** |virtual| ---- -.. _class_EditorVCSInterface_method__get_previous_commits: +.. _class_EditorVCSInterface_private_method__get_previous_commits: .. rst-class:: classref-method @@ -350,7 +350,7 @@ void **_fetch** **(** :ref:`String` remote **)** |virtual| ---- -.. _class_EditorVCSInterface_method__get_remotes: +.. _class_EditorVCSInterface_private_method__get_remotes: .. rst-class:: classref-method @@ -362,7 +362,7 @@ void **_fetch** **(** :ref:`String` remote **)** |virtual| ---- -.. _class_EditorVCSInterface_method__get_vcs_name: +.. _class_EditorVCSInterface_private_method__get_vcs_name: .. rst-class:: classref-method @@ -374,7 +374,7 @@ void **_fetch** **(** :ref:`String` remote **)** |virtual| ---- -.. _class_EditorVCSInterface_method__initialize: +.. _class_EditorVCSInterface_private_method__initialize: .. rst-class:: classref-method @@ -386,7 +386,7 @@ void **_fetch** **(** :ref:`String` remote **)** |virtual| ---- -.. _class_EditorVCSInterface_method__pull: +.. _class_EditorVCSInterface_private_method__pull: .. rst-class:: classref-method @@ -398,7 +398,7 @@ void **_pull** **(** :ref:`String` remote **)** |virtual| ---- -.. _class_EditorVCSInterface_method__push: +.. _class_EditorVCSInterface_private_method__push: .. rst-class:: classref-method @@ -410,7 +410,7 @@ void **_push** **(** :ref:`String` remote, :ref:`bool` ---- -.. _class_EditorVCSInterface_method__remove_branch: +.. _class_EditorVCSInterface_private_method__remove_branch: .. rst-class:: classref-method @@ -422,7 +422,7 @@ void **_remove_branch** **(** :ref:`String` branch_name **)** |vir ---- -.. _class_EditorVCSInterface_method__remove_remote: +.. _class_EditorVCSInterface_private_method__remove_remote: .. rst-class:: classref-method @@ -434,7 +434,7 @@ void **_remove_remote** **(** :ref:`String` remote_name **)** |vir ---- -.. _class_EditorVCSInterface_method__set_credentials: +.. _class_EditorVCSInterface_private_method__set_credentials: .. rst-class:: classref-method @@ -446,7 +446,7 @@ void **_set_credentials** **(** :ref:`String` username, :ref:`Stri ---- -.. _class_EditorVCSInterface_method__shut_down: +.. _class_EditorVCSInterface_private_method__shut_down: .. rst-class:: classref-method @@ -458,7 +458,7 @@ void **_set_credentials** **(** :ref:`String` username, :ref:`Stri ---- -.. _class_EditorVCSInterface_method__stage_file: +.. _class_EditorVCSInterface_private_method__stage_file: .. rst-class:: classref-method @@ -470,7 +470,7 @@ void **_stage_file** **(** :ref:`String` file_path **)** |virtual| ---- -.. _class_EditorVCSInterface_method__unstage_file: +.. _class_EditorVCSInterface_private_method__unstage_file: .. rst-class:: classref-method @@ -572,12 +572,12 @@ void **_unstage_file** **(** :ref:`String` file_path **)** |virtua void **popup_error** **(** :ref:`String` msg **)** -Pops up an error message in the editor which is shown as coming from the underlying VCS. Use this to show VCS specific error messages. +在编辑器中弹出一条错误消息,显示为来自底层 VCS。使用它来显示 VCS 特定的错误消息。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_encodedobjectasid.rst b/classes/zh_CN/class_encodedobjectasid.rst index cff5e246e0..70cbe590ec 100644 --- a/classes/zh_CN/class_encodedobjectasid.rst +++ b/classes/zh_CN/class_encodedobjectasid.rst @@ -10,14 +10,14 @@ EncodedObjectAsID ================= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 保存对 :ref:`Object` 实例 ID 的引用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 实用程序类,其中包含对 :ref:`Object` 实例的内部标识符的引用,由 :ref:`Object.get_instance_id` 给出。然后可以使用该 ID 通过 :ref:`@GlobalScope.instance_from_id` 检索对象实例。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_EncodedObjectAsID_property_object_id: @@ -57,10 +57,10 @@ Property Descriptions 存储在该 **EncodedObjectAsID** 实例中的 :ref:`Object` 标识符。可以使用 :ref:`@GlobalScope.instance_from_id` 检索对象实例。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_enetconnection.rst b/classes/zh_CN/class_enetconnection.rst index d45060ace1..6790458564 100644 --- a/classes/zh_CN/class_enetconnection.rst +++ b/classes/zh_CN/class_enetconnection.rst @@ -10,28 +10,28 @@ ENetConnection ============== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` `ENetHost `__ 的包装类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- ENet 的目的是在 UDP(用户数据报协议)之上,提供一个相对轻便、简单和健壮的网络通信层。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `ENet 网站上的 API 文档 `__ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -80,8 +80,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_ENetConnection_CompressionMode: @@ -177,7 +177,7 @@ enum **EventType**: :ref:`EventType` **EVENT_RECEIVE** = ``3`` -已从对等体接收到一个数据包。该数组将包含发送数据包的对等体、接收数据包的通道号、以及接收到的数据包。 +已从对等体接收到一个数据包。该数组将包含发送数据包的对等体和接收数据包的通道号。接收到的数据包将被排队到关联的 :ref:`ENetPacketPeer`\ 。 .. rst-class:: classref-item-separator @@ -227,8 +227,8 @@ enum **HostStatistic**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ENetConnection_method_bandwidth_limit: @@ -458,10 +458,10 @@ void **socket_send** **(** :ref:`String` destination_address, :ref 要求在 NAT 设备处理连接请求后,预先了解公共互联网所看到的潜在客户端的地址和通信端口。这一信息可以通过 `STUN `__ 服务获取,必须由非潜在客户端的实体交给你的主机。由于对称 NAT 路由算法的性质,这种方法对于对称 NAT 之后的客户端无效,因为无法提前得知他们的 IP 和端口。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_enetmultiplayerpeer.rst b/classes/zh_CN/class_enetmultiplayerpeer.rst index 0a473a7bc9..ba204e5885 100644 --- a/classes/zh_CN/class_enetmultiplayerpeer.rst +++ b/classes/zh_CN/class_enetmultiplayerpeer.rst @@ -10,14 +10,14 @@ ENetMultiplayerPeer =================== -**Inherits:** :ref:`MultiplayerPeer` **<** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`MultiplayerPeer` **<** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` 使用 `ENet `__ 库实现的 MultiplayerPeer。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- MultiplayerPeer 的一种实现,应该在初始化为客户端、服务器或网格之后传递给 :ref:`MultiplayerAPI.multiplayer_peer`\ 。然后就可以通过连接到 :ref:`MultiplayerAPI` 的信号来处理事件。有关 ENet 库包装的更多信息,请参见 :ref:`ENetConnection`\ 。 @@ -25,8 +25,8 @@ MultiplayerPeer 的一种实现,应该在初始化为客户端、服务器或 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`高级多人游戏 <../tutorials/networking/high_level_multiplayer>` @@ -34,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +46,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -72,8 +72,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ENetMultiplayerPeer_property_host: @@ -93,8 +93,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ENetMultiplayerPeer_method_add_mesh_peer: @@ -166,10 +166,10 @@ void **set_bind_ip** **(** :ref:`String` ip **)** 创建服务器时使用的 IP。默认情况下,这被设置为通配符 ``"*"``\ ,它绑定到所有可用的接口。给定的 IP 地址格式需要是 IPv4 或 IPv6,例如:\ ``"192.168.1.1"``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_enetpacketpeer.rst b/classes/zh_CN/class_enetpacketpeer.rst index e9a827930e..9a0b913627 100644 --- a/classes/zh_CN/class_enetpacketpeer.rst +++ b/classes/zh_CN/class_enetpacketpeer.rst @@ -10,14 +10,14 @@ ENetPacketPeer ============== -**Inherits:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` `ENetPeer `__ 的包装类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 表示 :ref:`ENetConnection` 对等体的 PacketPeer 实现。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `ENet 网站上的 API 文档 `__ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -78,8 +78,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_ENetPacketPeer_PeerState: @@ -295,8 +295,8 @@ enum **PeerStatistic**: .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_ENetPacketPeer_constant_PACKET_LOSS_SCALE: @@ -344,8 +344,8 @@ Constants .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ENetPacketPeer_method_get_channels: @@ -533,10 +533,10 @@ void **throttle_configure** **(** :ref:`int` interval, :ref:`int` +**继承:** :ref:`Object` 提供对引擎属性的访问。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **Engine** 单例使你可以查询和修改项目的运行时参数,例如每秒帧数,时间范围等。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -109,8 +109,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Engine_property_max_fps: @@ -186,7 +186,7 @@ Property Descriptions - void **set_physics_ticks_per_second** **(** :ref:`int` value **)** - :ref:`int` **get_physics_ticks_per_second** **(** **)** -每秒执行的固定迭代次数。用于控制物理仿真和 :ref:`Node._physics_process` 的执行频率。因为 Godot 不会进行物理步骤的插值,所以通常应该总是将其设成大于等于 ``60`` 的值。因此,如果值小于 ``60`` 就会看起来卡顿。提高该值可以让输入变得更加灵敏、也可以绕过碰撞隧道问题,但请记得这么做也会提升 CPU 的占用率。另请参阅 :ref:`max_fps` 和 :ref:`ProjectSettings.physics/common/physics_ticks_per_second`\ 。 +每秒执行的固定迭代次数。用于控制物理仿真和 :ref:`Node._physics_process` 的执行频率。因为 Godot 不会进行物理步骤的插值,所以通常应该总是将其设成大于等于 ``60`` 的值。因此,如果值小于 ``60`` 就会看起来卡顿。提高该值可以让输入变得更加灵敏、也可以绕过碰撞隧道问题,但请记得这么做也会提升 CPU 的占用率。另请参阅 :ref:`max_fps` 和 :ref:`ProjectSettings.physics/common/physics_ticks_per_second`\ 。 \ **注意:**\ 每个渲染帧最多只能模拟 :ref:`max_physics_steps_per_frame` 个物理周期。如果为了追赶渲染,需要在每个渲染帧中模拟更多物理周期,游戏看上去会是降速的(即便在物理计算中始终使用 ``delta``\ )。因此,如果增大了 :ref:`physics_ticks_per_second`\ ,而且远大于默认值,那么建议将 :ref:`max_physics_steps_per_frame` 也调大。 @@ -234,8 +234,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Engine_method_get_architecture_name: @@ -700,10 +700,10 @@ void **unregister_singleton** **(** :ref:`StringName` name **) 将名称为 ``name`` 的单例解除注册。该单例对象不会被释放。仅能够对通过 :ref:`register_singleton` 创建的用户定义单例使用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_enginedebugger.rst b/classes/zh_CN/class_enginedebugger.rst index fdc10ea491..6b180dde4c 100644 --- a/classes/zh_CN/class_enginedebugger.rst +++ b/classes/zh_CN/class_enginedebugger.rst @@ -10,21 +10,21 @@ EngineDebugger ============== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 暴露内部调试器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **EngineDebugger** 处理编辑器与正在运行的游戏之间的通信。它会在运行游戏时激活,可以通过它收发消息,还负责管理性能分析器。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -59,8 +59,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_EngineDebugger_method_has_capture: @@ -192,10 +192,10 @@ void **unregister_profiler** **(** :ref:`StringName` name **)* 将具有给定名称 ``name`` 的分析器解除注册。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_engineprofiler.rst b/classes/zh_CN/class_engineprofiler.rst index 23eae373a1..db333f0516 100644 --- a/classes/zh_CN/class_engineprofiler.rst +++ b/classes/zh_CN/class_engineprofiler.rst @@ -10,14 +10,14 @@ EngineProfiler ============== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 用于创建自定义分析器的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类可用于实现自定义分析器,能够与引擎和编辑器调试器进行交互。 @@ -25,19 +25,19 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_frame` **(** :ref:`Array` data **)** |virtual| | - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_tick` **(** :ref:`float` frame_time, :ref:`float` process_time, :ref:`float` physics_time, :ref:`float` physics_frame_time **)** |virtual| | - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_toggle` **(** :ref:`bool` enable, :ref:`Array` options **)** |virtual| | - +------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_frame` **(** :ref:`Array` data **)** |virtual| | + +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_tick` **(** :ref:`float` frame_time, :ref:`float` process_time, :ref:`float` physics_time, :ref:`float` physics_frame_time **)** |virtual| | + +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_toggle` **(** :ref:`bool` enable, :ref:`Array` options **)** |virtual| | + +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -45,10 +45,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_EngineProfiler_method__add_frame: +.. _class_EngineProfiler_private_method__add_frame: .. rst-class:: classref-method @@ -60,7 +60,7 @@ void **_add_frame** **(** :ref:`Array` data **)** |virtual| ---- -.. _class_EngineProfiler_method__tick: +.. _class_EngineProfiler_private_method__tick: .. rst-class:: classref-method @@ -72,7 +72,7 @@ void **_tick** **(** :ref:`float` frame_time, :ref:`float` enable, :ref:`Array` 启用/禁用分析器时调用,提供了一组选项 ``options``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_environment.rst b/classes/zh_CN/class_environment.rst index c1522d621e..4d3583b49a 100644 --- a/classes/zh_CN/class_environment.rst +++ b/classes/zh_CN/class_environment.rst @@ -10,14 +10,14 @@ Environment =========== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 定义渲染选项的资源,用于环境节点(例如 :ref:`WorldEnvironment`\ )。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 定义环境操作(例如背景 :ref:`Sky` 或 :ref:`Color`\ 、环境光、雾、景深等)的资源,用于环境节点(例如 :ref:`WorldEnvironment`\ )。这些参数会对场景的最终渲染造成影响。操作的顺序为: @@ -31,12 +31,12 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`环境和后期处理 <../tutorials/3d/environment_and_post_processing>` -- :doc:`High dynamic range lighting <../tutorials/3d/high_dynamic_range>` +- :doc:`高动态范围照明 <../tutorials/3d/high_dynamic_range>` - `3D 材质测试演示 `__ @@ -46,8 +46,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -244,8 +244,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -262,8 +262,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Environment_BGMode: @@ -537,8 +537,8 @@ enum **SDFGIYScale**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Environment_property_adjustment_brightness: @@ -551,7 +551,7 @@ Property Descriptions - void **set_adjustment_brightness** **(** :ref:`float` value **)** - :ref:`float` **get_adjustment_brightness** **(** **)** -渲染场景的全局亮度值。只有当 ``adjust_enabled`` 为 ``true`` 时才有效。 +渲染场景的全局亮度值。只有当 :ref:`adjustment_enabled` 为 ``true`` 时才有效。 .. rst-class:: classref-item-separator @@ -568,7 +568,7 @@ Property Descriptions - void **set_adjustment_color_correction** **(** :ref:`Texture` value **)** - :ref:`Texture` **get_adjustment_color_correction** **(** **)** -用于内置后处理颜色分级的 :ref:`Texture2D` 或 :ref:`Texture3D` 查找表(LUT)。可以将 :ref:`GradientTexture1D` 用于一维 LUT,或将 :ref:`Texture3D` 用于更复杂的 LUT。仅当 ``adjustment_enabled`` 为 ``true`` 时有效。 +用于内置后处理颜色分级的 :ref:`Texture2D` 或 :ref:`Texture3D` 查找表(LUT)。可以将 :ref:`GradientTexture1D` 用于一维 LUT,或将 :ref:`Texture3D` 用于更复杂的 LUT。仅当 :ref:`adjustment_enabled` 为 ``true`` 时有效。 .. rst-class:: classref-item-separator @@ -585,7 +585,7 @@ Property Descriptions - void **set_adjustment_contrast** **(** :ref:`float` value **)** - :ref:`float` **get_adjustment_contrast** **(** **)** -渲染场景的全局对比度值(默认值为1)。只有当\ ``adjust_enabled``\ 为 ``true`` 时才有效。 +渲染场景的全局对比度值(默认值为 1)。只有当 :ref:`adjustment_enabled` 为 ``true`` 时才有效。 .. rst-class:: classref-item-separator @@ -621,7 +621,7 @@ Property Descriptions - void **set_adjustment_saturation** **(** :ref:`float` value **)** - :ref:`float` **get_adjustment_saturation** **(** **)** -渲染场景的全局色彩饱和度值(默认值为 1)。只有在 ``adjustment_enabled`` 为 ``true`` 时才有效。 +渲染场景的全局色彩饱和度值(默认值为 1)。只有在 :ref:`adjustment_enabled` 为 ``true`` 时才有效。 .. rst-class:: classref-item-separator @@ -2186,8 +2186,8 @@ SDFGI 可见的最大距离。超出该距离,环境照明或其他 GI 来源 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Environment_method_get_glow_level: @@ -2209,10 +2209,10 @@ void **set_glow_level** **(** :ref:`int` idx, :ref:`float` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 存储你可以执行的表达式的类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 表达式可以由任何算术运算、内置数学函数调用、传递实例的方法调用或内置类型构造调用组成。 @@ -72,15 +72,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`表达式求值 <../tutorials/scripting/evaluating_expressions>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -101,8 +101,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Expression_method_execute: @@ -152,10 +152,10 @@ Method Descriptions 你也可以选择用 ``input_names`` 来指定可能出现在表达式中的变量名称,这样就可以在执行表达式时进行绑定。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_fastnoiselite.rst b/classes/zh_CN/class_fastnoiselite.rst index 7814dc9870..447f6203a7 100644 --- a/classes/zh_CN/class_fastnoiselite.rst +++ b/classes/zh_CN/class_fastnoiselite.rst @@ -10,23 +10,23 @@ FastNoiseLite ============= -**Inherits:** :ref:`Noise` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Noise` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 使用 FastNoiseLite 库生成噪声。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This class generates noise using the FastNoiseLite library, which is a collection of several noise algorithms including Cellular, Perlin, Value, and more. +该类使用 FastNoiseLite 库生成噪声,该库是多种噪声算法的集合,包括 Cellular、Perlin、Value 等。 -Most generated noise values are in the range of ``[-1, 1]``, but not always. Some of the cellular noise algorithms return results above ``1``. +大多数生成的噪声值都在 ``[-1, 1]`` 范围内,但并非总是如此。一些蜂窝噪声算法返回高于 ``1`` 的结果。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -81,8 +81,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_FastNoiseLite_NoiseType: @@ -364,8 +364,8 @@ enum **DomainWarpFractalType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_FastNoiseLite_property_cellular_distance_function: @@ -724,10 +724,10 @@ Property Descriptions 所有噪声类型的随机数种子。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_fileaccess.rst b/classes/zh_CN/class_fileaccess.rst index 02c4c6f417..ba40ec4580 100644 --- a/classes/zh_CN/class_fileaccess.rst +++ b/classes/zh_CN/class_fileaccess.rst @@ -10,14 +10,14 @@ FileAccess ========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 提供用于文件读写操作的方法。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类可以用于在用户设备的文件系统中永久存储数据,也可以从中读取数据。适用于存储游戏存档数据或玩家配置文件。 @@ -64,17 +64,19 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`文件系统 <../tutorials/scripting/filesystem>` +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` + - `3D 体素演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -85,8 +87,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -207,8 +209,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_FileAccess_ModeFlags: @@ -314,7 +316,7 @@ flags **UnixPermissionFlags**: :ref:`UnixPermissionFlags` **UNIX_READ_OWNER** = ``256`` -Read for owner bit. +读取所有者比特位。 .. _class_FileAccess_constant_UNIX_WRITE_OWNER: @@ -322,7 +324,7 @@ Read for owner bit. :ref:`UnixPermissionFlags` **UNIX_WRITE_OWNER** = ``128`` -Write for owner bit. +写入所有者比特位。 .. _class_FileAccess_constant_UNIX_EXECUTE_OWNER: @@ -330,7 +332,7 @@ Write for owner bit. :ref:`UnixPermissionFlags` **UNIX_EXECUTE_OWNER** = ``64`` -Execute for owner bit. +执行所有者比特位。 .. _class_FileAccess_constant_UNIX_READ_GROUP: @@ -338,7 +340,7 @@ Execute for owner bit. :ref:`UnixPermissionFlags` **UNIX_READ_GROUP** = ``32`` -Read for group bit. +读取组比特位。 .. _class_FileAccess_constant_UNIX_WRITE_GROUP: @@ -346,7 +348,7 @@ Read for group bit. :ref:`UnixPermissionFlags` **UNIX_WRITE_GROUP** = ``16`` -Write for group bit. +写入组比特位。 .. _class_FileAccess_constant_UNIX_EXECUTE_GROUP: @@ -354,7 +356,7 @@ Write for group bit. :ref:`UnixPermissionFlags` **UNIX_EXECUTE_GROUP** = ``8`` -Execute for group bit. +执行组比特位。 .. _class_FileAccess_constant_UNIX_READ_OTHER: @@ -362,7 +364,7 @@ Execute for group bit. :ref:`UnixPermissionFlags` **UNIX_READ_OTHER** = ``4`` -Read for other bit. +读取其他比特位。 .. _class_FileAccess_constant_UNIX_WRITE_OTHER: @@ -370,7 +372,7 @@ Read for other bit. :ref:`UnixPermissionFlags` **UNIX_WRITE_OTHER** = ``2`` -Write for other bit. +写入其他比特位。 .. _class_FileAccess_constant_UNIX_EXECUTE_OTHER: @@ -378,7 +380,7 @@ Write for other bit. :ref:`UnixPermissionFlags` **UNIX_EXECUTE_OTHER** = ``1`` -Execute for other bit. +执行其他比特位。 .. _class_FileAccess_constant_UNIX_SET_USER_ID: @@ -386,7 +388,7 @@ Execute for other bit. :ref:`UnixPermissionFlags` **UNIX_SET_USER_ID** = ``2048`` -Set user id on execution bit. +在执行比特位上设置用户 ID 。 .. _class_FileAccess_constant_UNIX_SET_GROUP_ID: @@ -394,7 +396,7 @@ Set user id on execution bit. :ref:`UnixPermissionFlags` **UNIX_SET_GROUP_ID** = ``1024`` -Set group id on execution bit. +在执行位上设置组 ID。 .. _class_FileAccess_constant_UNIX_RESTRICTED_DELETE: @@ -402,7 +404,7 @@ Set group id on execution bit. :ref:`UnixPermissionFlags` **UNIX_RESTRICTED_DELETE** = ``512`` -Restricted deletion (sticky) bit. +限制删除(粘性)比特位。 .. rst-class:: classref-section-separator @@ -410,8 +412,8 @@ Restricted deletion (sticky) bit. .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_FileAccess_property_big_endian: @@ -436,8 +438,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_FileAccess_method_close: @@ -642,7 +644,9 @@ void **flush** **(** **)** :ref:`PackedByteArray` **get_file_as_bytes** **(** :ref:`String` path **)** |static| -将 ``path`` 文件中的所有内容作为 :ref:`PackedByteArray` 返回,不进行任何解码。 +将整个 ``path`` 文件内容作为 :ref:`PackedByteArray` 返回,无需任何解码。 + +如果打开文件时发生错误,则返回空的 :ref:`PackedByteArray`\ 。你可以使用 :ref:`get_open_error` 来检查发生的错误。 .. rst-class:: classref-item-separator @@ -654,7 +658,9 @@ void **flush** **(** **)** :ref:`String` **get_file_as_string** **(** :ref:`String` path **)** |static| -将 ``path`` 文件中的所有内容作为 :ref:`String` 返回。作为 UTF-8 编码的文本解析。 +将整个 ``path`` 文件内容以 :ref:`String` 形式返回。文本被解释为 UTF-8 编码。 + +如果打开文件时发生错误,则返回空 :ref:`String`\ 。可以使用 :ref:`get_open_error` 来检查发生的错误。 .. rst-class:: classref-item-separator @@ -678,9 +684,9 @@ void **flush** **(** **)** :ref:`bool` **get_hidden_attribute** **(** :ref:`String` file **)** |static| -Returns ``true``, if file ``hidden`` attribute is set. +如果文件 ``hidden`` 属性已设置,则返回 ``true``\ 。 -\ **Note:** This method is implemented on iOS, BSD, macOS, and Windows. +\ **注意:**\ 该方法在 iOS、BSD、macOS 和 Windows 上实现。 .. rst-class:: classref-item-separator @@ -730,7 +736,7 @@ Returns ``true``, if file ``hidden`` attribute is set. :ref:`int` **get_modified_time** **(** :ref:`String` file **)** |static| -Returns the last time the ``file`` was modified in Unix timestamp format, or ``0`` on error. This Unix timestamp can be converted to another format using the :ref:`Time` singleton. +返回 ``file`` 的最后修改时间,使用 Unix 时间戳格式,出错时返回 ``0``\ 。这个 Unix 时间戳可以用 :ref:`Time` 单例转换为其他格式。 .. rst-class:: classref-item-separator @@ -804,9 +810,9 @@ Returns the last time the ``file`` was modified in Unix timestamp format, or ``0 :ref:`bool` **get_read_only_attribute** **(** :ref:`String` file **)** |static| -Returns ``true``, if file ``read only`` attribute is set. +如果文件 ``read only`` 属性已设置,则返回 ``true``\ 。 -\ **Note:** This method is implemented on iOS, BSD, macOS, and Windows. +\ **注意:**\ 此方法在 iOS、BSD、macOS 和 Windows 上实现。 .. rst-class:: classref-item-separator @@ -842,9 +848,9 @@ Returns ``true``, if file ``read only`` attribute is set. |bitfield|\<:ref:`UnixPermissionFlags`\> **get_unix_permissions** **(** :ref:`String` file **)** |static| -Returns file UNIX permissions. +返回文件的 UNIX 权限。 -\ **Note:** This method is implemented on iOS, Linux/BSD, and macOS. +\ **注意:**\ 该方法在 iOS、Linux/BSD 和 macOS 上实现。 .. rst-class:: classref-item-separator @@ -970,9 +976,9 @@ void **seek_end** **(** :ref:`int` position=0 **)** :ref:`Error` **set_hidden_attribute** **(** :ref:`String` file, :ref:`bool` hidden **)** |static| -Sets file ``hidden`` attribute. +设置文件 **hidden** 属性。 -\ **Note:** This method is implemented on iOS, BSD, macOS, and Windows. +\ **注意:**\ 该方法在 iOS、BSD、macOS 和 Windows 上实现。 .. rst-class:: classref-item-separator @@ -984,9 +990,9 @@ Sets file ``hidden`` attribute. :ref:`Error` **set_read_only_attribute** **(** :ref:`String` file, :ref:`bool` ro **)** |static| -Sets file ``read only`` attribute. +设置文件 **read only** 属性。 -\ **Note:** This method is implemented on iOS, BSD, macOS, and Windows. +\ **注意:**\ 该方法在 iOS、BSD、macOS 和 Windows 上实现。 .. rst-class:: classref-item-separator @@ -998,9 +1004,9 @@ Sets file ``read only`` attribute. :ref:`Error` **set_unix_permissions** **(** :ref:`String` file, |bitfield|\<:ref:`UnixPermissionFlags`\> permissions **)** |static| -Sets file UNIX permissions. +设置文件的 UNIX 权限。 -\ **Note:** This method is implemented on iOS, Linux/BSD, and macOS. +\ **注意:**\ 该方法在 iOS、Linux/BSD 和 macOS 上实现。 .. rst-class:: classref-item-separator @@ -1217,12 +1223,12 @@ void **store_var** **(** :ref:`Variant` value, :ref:`bool` 方法相同的编码机制。 -\ **注意:**\ 并非所有属性都包括在内。只有配置了 :ref:`@GlobalScope.PROPERTY_USAGE_STORAGE` 标志集的属性才会被序列化。可以通过覆盖类中的 :ref:`Object._get_property_list` 方法来向属性添加新的使用标志。还可以通过调用 :ref:`Object._get_property_list` 来检查属性使用的配置方式。有关可能的使用标志,请参阅 :ref:`PropertyUsageFlags`\ 。 +\ **注意:**\ 并非所有属性都包括在内。只有配置了 :ref:`@GlobalScope.PROPERTY_USAGE_STORAGE` 标志集的属性才会被序列化。可以通过覆盖类中的 :ref:`Object._get_property_list` 方法来向属性添加新的使用标志。还可以通过调用 :ref:`Object._get_property_list` 来检查属性使用的配置方式。有关可能的使用标志,请参阅 :ref:`PropertyUsageFlags`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_filedialog.rst b/classes/zh_CN/class_filedialog.rst index aa8762f777..a16c5412eb 100644 --- a/classes/zh_CN/class_filedialog.rst +++ b/classes/zh_CN/class_filedialog.rst @@ -10,21 +10,21 @@ FileDialog ========== -**Inherits:** :ref:`ConfirmationDialog` **<** :ref:`AcceptDialog` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`ConfirmationDialog` **<** :ref:`AcceptDialog` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` 用于选择文件系统中的文件或目录的对话框。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **FileDialog** 是用来选择文件系统中文件和目录的预设对话框。支持过滤器掩码。\ **FileDialog** 会根据 :ref:`file_mode` 自动设置窗口的标题。如果你想使用自定义标题,请将 :ref:`mode_overrides_title` 设置为 ``false``\ ,禁用此功能。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -57,8 +57,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -79,8 +79,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -113,8 +113,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_FileDialog_signal_dir_selected: @@ -154,8 +154,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_FileDialog_FileMode: @@ -243,8 +243,8 @@ enum **Access**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_FileDialog_property_access: @@ -412,9 +412,9 @@ Property Descriptions - void **set_use_native_dialog** **(** :ref:`bool` value **)** - :ref:`bool` **get_use_native_dialog** **(** **)** -If ``true``, :ref:`access` is set to :ref:`ACCESS_FILESYSTEM`, and it is supported by the current :ref:`DisplayServer`, OS native dialog will be used instead of custom one. +如果为 ``true``\ ,\ :ref:`access` 被设置为\ :ref:`ACCESS_FILESYSTEM`\ ,并且它被当前的 :ref:`DisplayServer` 支持,则将使用操作系统原生对话框而不是自定义对话框。 -\ **Note:** On macOS, sandboxed apps always use native dialogs to access host filesystem. +\ **注意:**\ 在 macOS 上,沙盒应用程序始终使用原生对话框来访问主机文件系统。 .. rst-class:: classref-section-separator @@ -422,8 +422,8 @@ If ``true``, :ref:`access` is set to :ref:`ACC .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_FileDialog_method_add_filter: @@ -507,8 +507,8 @@ void **invalidate** **(** **)** .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_FileDialog_theme_color_file_disabled_color: @@ -626,10 +626,10 @@ Theme Property Descriptions 切换隐藏按钮的自定义图标。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_filesystemdock.rst b/classes/zh_CN/class_filesystemdock.rst index 8918c333d2..05a3cdb338 100644 --- a/classes/zh_CN/class_filesystemdock.rst +++ b/classes/zh_CN/class_filesystemdock.rst @@ -10,14 +10,14 @@ FileSystemDock ============== -**Inherits:** :ref:`VBoxContainer` **<** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`VBoxContainer` **<** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` Godot 编辑器中用于管理项目文件的停靠面板。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类仅在 :ref:`EditorPlugin` 中可用,无法实例化。可以使用 :ref:`EditorInterface.get_file_system_dock` 访问。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_FileSystemDock_signal_display_mode_changed: @@ -146,8 +146,8 @@ Signals .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_FileSystemDock_method_add_resource_tooltip_plugin: @@ -181,10 +181,10 @@ void **remove_resource_tooltip_plugin** **(** :ref:`EditorResourceTooltipPlugin< 移除一个 :ref:`EditorResourceTooltipPlugin`\ 。如果该插件尚未添加,则失败。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_float.rst b/classes/zh_CN/class_float.rst index 1290613efe..7e0454ac61 100644 --- a/classes/zh_CN/class_float.rst +++ b/classes/zh_CN/class_float.rst @@ -14,8 +14,8 @@ float .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **float** 内置类型是 64 位双精度浮点数,相当于 C++ 中的 ``double``\ 。这个类型有 14 个可靠的十进制小数位精度。\ **float** 的最大值约为 ``1.79769e308``\ ,最小值约为 ``-1.79769e308``\ 。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `维基百科:双精度浮点数格式 `__ @@ -34,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -54,8 +54,8 @@ Constructors .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -132,8 +132,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_float_constructor_float: @@ -189,8 +189,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_float_operator_neq_float: @@ -224,11 +224,11 @@ Operator Descriptions :ref:`Color` **operator *** **(** :ref:`Color` right **)** -Multiplies each component of the :ref:`Color`, including the alpha, by the given **float**. +将该 :ref:`Color` 的每个分量乘以给定的 **float**\ ,包括 Alpha。 :: - print(1.5 * Color(0.5, 0.5, 0.5)) # Prints "(0.75, 0.75, 0.75, 1.5)" + print(1.5 * Color(0.5, 0.5, 0.5)) # 输出“(0.75, 0.75, 0.75, 1.5)” .. rst-class:: classref-item-separator @@ -614,10 +614,10 @@ Multiplies each component of the :ref:`Color`, including the alpha, 返回该 **float** 的相反数。如果为正数,则将该数变为负数。如果为负数,则将该数变为正数。对于浮点数,数字零既可以是正数,也可以是负数。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_flowcontainer.rst b/classes/zh_CN/class_flowcontainer.rst index 164abd2713..44f1d2cd6c 100644 --- a/classes/zh_CN/class_flowcontainer.rst +++ b/classes/zh_CN/class_flowcontainer.rst @@ -10,30 +10,30 @@ FlowContainer ============= -**Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`HFlowContainer`, :ref:`VFlowContainer` +**派生:** :ref:`HFlowContainer`, :ref:`VFlowContainer` 将子控件横向或纵向排列并在边界处换行的容器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 将子控件横向或纵向排列并在边界处换行的容器。类似于书本中文字在一行中写不下以后的换行方式。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +46,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -76,8 +76,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_FlowContainer_AlignmentMode: @@ -115,8 +115,8 @@ enum **AlignmentMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_FlowContainer_property_alignment: @@ -156,8 +156,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_FlowContainer_method_get_line_count: @@ -173,8 +173,8 @@ Method Descriptions .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_FlowContainer_theme_constant_h_separation: @@ -196,10 +196,10 @@ Theme Property Descriptions 子节点的垂直分隔量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_fogmaterial.rst b/classes/zh_CN/class_fogmaterial.rst index db3663c49e..9ae80a44a0 100644 --- a/classes/zh_CN/class_fogmaterial.rst +++ b/classes/zh_CN/class_fogmaterial.rst @@ -10,14 +10,14 @@ FogMaterial =========== -**Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A material that controls how volumetric fog is rendered, to be assigned to a :ref:`FogVolume`. +控制体积雾渲染方式的材质,可被分配给 :ref:`FogVolume`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`FogVolume` 使用的 :ref:`Material` 资源,用于绘制体积效果。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -51,8 +51,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_FogMaterial_property_albedo: @@ -154,10 +154,10 @@ Property Descriptions 基于高度的雾,随着世界空间中高度的增加而降低密度的速度。高的衰减将产生急剧的过渡,而低的衰减将产生更平滑的过渡。\ ``0.0`` 的值会产生均匀密度的雾。高度阈值由关联的 :ref:`FogVolume` 的高度决定。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_fogvolume.rst b/classes/zh_CN/class_fogvolume.rst index 38751844a8..bc760852db 100644 --- a/classes/zh_CN/class_fogvolume.rst +++ b/classes/zh_CN/class_fogvolume.rst @@ -10,14 +10,14 @@ FogVolume ========= -**Inherits:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A region that contributes to the default volumetric fog from the world environment. +影响世界环境中默认体积雾的区块。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **FogVolume** 用于将局部雾添加到全局体积雾效果中。如果使用具有负 :ref:`FogMaterial.density` 的 :ref:`FogMaterial`\ ,\ **FogVolume** 也可以从特定区域移除体积雾。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Volumetric fog and fog volumes <../tutorials/3d/volumetric_fog>` +- :doc:`体积雾及规模 <../tutorials/3d/volumetric_fog>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_FogVolume_property_material: @@ -108,10 +108,10 @@ Property Descriptions \ **注意:**\ 如果 :ref:`shape` 为 :ref:`RenderingServer.FOG_VOLUME_SHAPE_CONE` 或 :ref:`RenderingServer.FOG_VOLUME_SHAPE_CYLINDER`\ ,圆锥体/圆柱体将被调整以适应该大小。不支持通过 :ref:`size` 属性对圆锥体/圆柱体形状进行非均匀缩放,但可以改为缩放该 **FogVolume** 节点。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_font.rst b/classes/zh_CN/class_font.rst index 1601f0053f..73b128d6de 100644 --- a/classes/zh_CN/class_font.rst +++ b/classes/zh_CN/class_font.rst @@ -10,23 +10,23 @@ Font ==== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`FontFile`, :ref:`FontVariation`, :ref:`SystemFont` +**派生:** :ref:`FontFile`, :ref:`FontVariation`, :ref:`SystemFont` 字体和字体变体的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 各种字体类型的抽象基类。提供了绘制文本以及内省字体字符的方法。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -37,8 +37,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -115,8 +115,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Font_property_fallbacks: @@ -129,9 +129,9 @@ Property Descriptions - void **set_fallbacks** **(** :ref:`Font[]` value **)** - :ref:`Font[]` **get_fallbacks** **(** **)** -Array of fallback **Font**\ s to use as a substitute if a glyph is not found in this current **Font**. +回退 **Font** 数组,会在这个当前 **Font** 中无法找到某个字形时用作替换。 -If this array is empty in a :ref:`FontVariation`, the :ref:`FontVariation.base_font`'s fallbacks are used instead. +如果 :ref:`FontVariation` 中的这个数组为空,则会改用 :ref:`FontVariation.base_font` 的回退字体。 .. rst-class:: classref-section-separator @@ -139,8 +139,8 @@ If this array is empty in a :ref:`FontVariation`, the :ref: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Font_method_draw_char: @@ -586,10 +586,10 @@ void **set_cache_capacity** **(** :ref:`int` single_line, :ref:`int` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Font` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 存放字体源数据和预渲染字形的缓存,从动态字体或位图字体导入。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **FontFile** 包含了一组字形,代表从字体文件中导入的 Unicode 字符,还包含了光栅化字形的缓存,以及一组备用的回退 :ref:`Font`\ 。 @@ -56,10 +56,17 @@ Description +.. rst-class:: classref-introduction-group + +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` + .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -73,6 +80,8 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`int` | :ref:`fixed_size` | ``0`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`FixedSizeScaleMode` | :ref:`fixed_size_scale_mode` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`String` | :ref:`font_name` | ``""`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`int` | :ref:`font_stretch` | ``100`` | @@ -104,8 +113,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -248,8 +257,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_FontFile_property_allow_system_fallback: @@ -319,6 +328,23 @@ Property Descriptions ---- +.. _class_FontFile_property_fixed_size_scale_mode: + +.. rst-class:: classref-property + +:ref:`FixedSizeScaleMode` **fixed_size_scale_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_fixed_size_scale_mode** **(** :ref:`FixedSizeScaleMode` value **)** +- :ref:`FixedSizeScaleMode` **get_fixed_size_scale_mode** **(** **)** + +缩放模式,只有 :ref:`fixed_size` 大于零的位图字体会使用。 + +.. rst-class:: classref-item-separator + +---- + .. _class_FontFile_property_font_name: .. rst-class:: classref-property @@ -563,8 +589,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_FontFile_method_clear_cache: @@ -732,7 +758,7 @@ void **clear_textures** **(** :ref:`int` cache_index, :ref:`Vector2i< :ref:`int` **get_extra_spacing** **(** :ref:`int` cache_index, :ref:`SpacingType` spacing **)** |const| -Returns spacing for ``spacing`` (see :ref:`SpacingType`) in pixels (not relative to the font size). +返回 ``spacing`` 的间距(见 :ref:`SpacingType`\ ),单位为像素(与字体大小无关)。 .. rst-class:: classref-item-separator @@ -744,7 +770,7 @@ Returns spacing for ``spacing`` (see :ref:`SpacingType` **get_face_index** **(** :ref:`int` cache_index **)** |const| -Returns an active face index in the TrueType / OpenType collection. +返回 TrueType / OpenType 集合中的活动字体索引。 .. rst-class:: classref-item-separator @@ -914,7 +940,7 @@ Returns an active face index in the TrueType / OpenType collection. :ref:`Vector2i[]` **get_size_cache_list** **(** :ref:`int` cache_index **)** |const| -返回缓存中字体大小的列表。每个大小都是由字体大小和轮廓大小组成的 ``Vector2i``\ 。 +返回缓存中字体大小的列表。每个大小都是由字体大小和轮廓大小组成的 :ref:`Vector2i`\ 。 .. rst-class:: classref-item-separator @@ -1198,7 +1224,7 @@ void **set_embolden** **(** :ref:`int` cache_index, :ref:`float` cache_index, :ref:`SpacingType` spacing, :ref:`int` value **)** -Sets the spacing for ``spacing`` (see :ref:`SpacingType`) to ``value`` in pixels (not relative to the font size). +将 ``spacing`` 的间距(见 :ref:`SpacingType`\ )设置为 ``value``\ ,单位为像素(与字体大小无关)。 .. rst-class:: classref-item-separator @@ -1358,10 +1384,10 @@ void **set_variation_coordinates** **(** :ref:`int` cache_index, :ref 为指定的字体缓存条目设置变体坐标。有关详细信息,请参阅 :ref:`Font.get_supported_variation_list`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_fontvariation.rst b/classes/zh_CN/class_fontvariation.rst index 89cbb0f8bd..d5c13451ef 100644 --- a/classes/zh_CN/class_fontvariation.rst +++ b/classes/zh_CN/class_fontvariation.rst @@ -10,14 +10,14 @@ FontVariation ============= -**Inherits:** :ref:`Font` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Font` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 字体的变体,提供额外的设置。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 提供 OpenType 变体,模拟的粗体/斜体,以及 OpenType 特性和额外间距等额外的字体设置。 @@ -55,8 +55,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -85,8 +85,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -101,8 +101,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_FontVariation_property_base_font: @@ -255,7 +255,7 @@ Property Descriptions 字体 OpenType 变体坐标。详见:\ `OpenType 变体标签 `__\ 。 -\ **注意:**\ 这个 :ref:`Dictionary` 使用 OpenType 标签作为键。变体轴既可以用标签来标识(\ ``int``\ ),也可以用名称来标识(\ ``string``\ )。有些轴可以通过多个名称来访问。例如,\ ``wght`` 和 ``weight`` 引用的是同一个轴。而标签则是唯一的。要在名称和标签之间转换,请使用 :ref:`TextServer.name_to_tag` 和 :ref:`TextServer.tag_to_name`\ 。 +\ **注意:**\ 这个 :ref:`Dictionary` 使用 OpenType 标签作为键。变体轴既可以用标签来标识(\ :ref:`int`\ ,例如 ``0x77678674``\ ),也可以用名称来标识(\ :ref:`String`\ ,例如 ``wght``\ )。有些轴可以通过多个名称来访问。例如,\ ``wght`` 和 ``weight`` 引用的是同一个轴。而标签则是唯一的。要在名称和标签之间转换,请使用 :ref:`TextServer.name_to_tag` 和 :ref:`TextServer.tag_to_name`\ 。 \ **注意:**\ 要获取字体的可用变体轴,请使用 :ref:`Font.get_supported_variation_list`\ 。 @@ -284,8 +284,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_FontVariation_method_set_spacing: @@ -293,12 +293,12 @@ Method Descriptions void **set_spacing** **(** :ref:`SpacingType` spacing, :ref:`int` value **)** -Sets the spacing for ``spacing`` (see :ref:`SpacingType`) to ``value`` in pixels (not relative to the font size). +将 ``spacing`` 的间距(见 :ref:`SpacingType`\ )设置为 ``value``\ ,单位为像素(与字体大小无关)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gdextension.rst b/classes/zh_CN/class_gdextension.rst index 2b6cf2dfee..1780999c3c 100644 --- a/classes/zh_CN/class_gdextension.rst +++ b/classes/zh_CN/class_gdextension.rst @@ -10,16 +10,16 @@ GDExtension =========== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -42,8 +42,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_GDExtension_InitializationLevel: @@ -89,8 +89,8 @@ enum **InitializationLevel**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GDExtension_method_close_library: @@ -100,7 +100,7 @@ void **close_library** **(** **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -114,7 +114,7 @@ void **close_library** **(** **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -128,7 +128,7 @@ void **initialize_library** **(** :ref:`InitializationLevel`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -142,7 +142,7 @@ void **initialize_library** **(** :ref:`InitializationLevel`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -156,12 +156,12 @@ void **initialize_library** **(** :ref:`InitializationLevel`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gdextensionmanager.rst b/classes/zh_CN/class_gdextensionmanager.rst index 7d0d47758a..d9f0a53f43 100644 --- a/classes/zh_CN/class_gdextensionmanager.rst +++ b/classes/zh_CN/class_gdextensionmanager.rst @@ -10,16 +10,16 @@ GDExtensionManager ================== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -44,8 +44,25 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +信号 +---- + +.. _class_GDExtensionManager_signal_extensions_reloaded: + +.. rst-class:: classref-signal + +**extensions_reloaded** **(** **)** + +在编辑器自动重新加载任何扩展后发出。 + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +枚举 +---- .. _enum_GDExtensionManager_LoadStatus: @@ -99,8 +116,8 @@ enum **LoadStatus**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GDExtensionManager_method_get_extension: @@ -110,7 +127,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -124,7 +141,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -138,7 +155,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -152,7 +169,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -166,7 +183,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -180,12 +197,12 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gdscript.rst b/classes/zh_CN/class_gdscript.rst index 774f25eaab..e8462200a9 100644 --- a/classes/zh_CN/class_gdscript.rst +++ b/classes/zh_CN/class_gdscript.rst @@ -10,14 +10,14 @@ GDScript ======== -**Inherits:** :ref:`Script` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Script` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用 GDScript 编程语言实现的脚本。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用 GDScript 编程语言实现的脚本,使用 ``.gd`` 扩展名保存。该脚本扩展了将其实例化的所有对象的功能。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`GDScript 文档索引 <../tutorials/scripting/gdscript/index>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GDScript_method_new: @@ -69,10 +69,10 @@ Method Descriptions var instance = MyClass.new() assert(instance.get_script() == MyClass) -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_generic6dofjoint3d.rst b/classes/zh_CN/class_generic6dofjoint3d.rst index eb14bf2dd5..b0683b917c 100644 --- a/classes/zh_CN/class_generic6dofjoint3d.rst +++ b/classes/zh_CN/class_generic6dofjoint3d.rst @@ -10,14 +10,14 @@ Generic6DOFJoint3D ================== -**Inherits:** :ref:`Joint3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Joint3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 一种物理关节,允许在两个 3D 物理对象之间进行复杂的移动和旋转。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **Generic6DOFJoint3D**\ (6 Degrees Of Freedom,六自由度)关节允许通过锁定某些轴的旋转和平移来实现自定义类型的关节。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -203,8 +203,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -241,8 +241,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Generic6DOFJoint3D_Param: @@ -506,8 +506,8 @@ enum **Flag**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Generic6DOFJoint3D_property_angular_limit_x/damping: @@ -1085,7 +1085,7 @@ Z 轴上电机的目标速度。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1104,7 +1104,7 @@ Z 轴上电机的目标速度。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1123,7 +1123,7 @@ Z 轴上电机的目标速度。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1142,7 +1142,7 @@ Z 轴上电机的目标速度。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1161,7 +1161,7 @@ Z 轴上电机的目标速度。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1180,7 +1180,7 @@ Z 轴上电机的目标速度。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1199,7 +1199,7 @@ Z 轴上电机的目标速度。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1218,7 +1218,7 @@ Z 轴上电机的目标速度。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1237,7 +1237,7 @@ Z 轴上电机的目标速度。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1256,7 +1256,7 @@ Z 轴上电机的目标速度。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1275,7 +1275,7 @@ Z 轴上电机的目标速度。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1294,7 +1294,7 @@ Z 轴上电机的目标速度。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1772,7 +1772,7 @@ Y 轴运动的恢复量。越低,动量损失越大。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1791,7 +1791,7 @@ Y 轴运动的恢复量。越低,动量损失越大。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1810,7 +1810,7 @@ Y 轴运动的恢复量。越低,动量损失越大。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1829,7 +1829,7 @@ Y 轴运动的恢复量。越低,动量损失越大。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1848,7 +1848,7 @@ Y 轴运动的恢复量。越低,动量损失越大。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1867,7 +1867,7 @@ Y 轴运动的恢复量。越低,动量损失越大。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1886,7 +1886,7 @@ Y 轴运动的恢复量。越低,动量损失越大。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1905,7 +1905,7 @@ Y 轴运动的恢复量。越低,动量损失越大。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1924,7 +1924,7 @@ Y 轴运动的恢复量。越低,动量损失越大。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1943,7 +1943,7 @@ Y 轴运动的恢复量。越低,动量损失越大。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1962,7 +1962,7 @@ Y 轴运动的恢复量。越低,动量损失越大。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1981,7 +1981,7 @@ Y 轴运动的恢复量。越低,动量损失越大。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-section-separator @@ -1989,8 +1989,8 @@ Y 轴运动的恢复量。越低,动量损失越大。 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Generic6DOFJoint3D_method_get_flag_x: @@ -2000,7 +2000,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2014,7 +2014,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2028,7 +2028,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2042,7 +2042,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2056,7 +2056,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2070,7 +2070,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2084,7 +2084,7 @@ void **set_flag_x** **(** :ref:`Flag` flag, :ref:` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2098,7 +2098,7 @@ void **set_flag_y** **(** :ref:`Flag` flag, :ref:` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2112,7 +2112,7 @@ void **set_flag_z** **(** :ref:`Flag` flag, :ref:` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2126,7 +2126,7 @@ void **set_param_x** **(** :ref:`Param` param, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2140,7 +2140,7 @@ void **set_param_y** **(** :ref:`Param` param, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2154,12 +2154,12 @@ void **set_param_z** **(** :ref:`Param` param, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_geometry2d.rst b/classes/zh_CN/class_geometry2d.rst index f8b372071d..04b2d4b562 100644 --- a/classes/zh_CN/class_geometry2d.rst +++ b/classes/zh_CN/class_geometry2d.rst @@ -10,21 +10,21 @@ Geometry2D ========== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 提供常见 2D 几何运算的方法。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 为创建几何形状,计算形状之间的交集,以及处理 2D 中的各种其他几何操作提供了一组辅助函数。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -83,8 +83,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Geometry2D_PolyBooleanOperation: @@ -214,8 +214,8 @@ enum **PolyEndType**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Geometry2D_method_clip_polygons: @@ -530,10 +530,10 @@ Method Descriptions 对由 ``polygon`` 中的点指定的多边形进行三角化。 返回一个 :ref:`PackedInt32Array`\ ,其中每个三角形由 ``polygon`` 中的三个连续点的索引组成(即返回的数组将具有 ``n * 3`` 个元素,其中 ``n`` 是找到的三角形的数量)。输出三角形将始终为逆时针旋转,如果为顺时针旋转,则轮廓将翻转。如果三角化没有成功,则返回一个空的 :ref:`PackedInt32Array`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_geometry3d.rst b/classes/zh_CN/class_geometry3d.rst index a336236690..a87ac2fe7b 100644 --- a/classes/zh_CN/class_geometry3d.rst +++ b/classes/zh_CN/class_geometry3d.rst @@ -10,21 +10,21 @@ Geometry3D ========== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 提供常见 3D 几何运算的方法。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 为创建几何形状,计算形状之间的交集,以及处理 3D 中的各种其他几何操作提供了一组辅助函数。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -65,8 +65,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Geometry3D_method_build_box_planes: @@ -122,7 +122,7 @@ Method Descriptions :ref:`PackedVector3Array` **compute_convex_mesh_points** **(** :ref:`Plane[]` planes **)** -Calculates and returns all the vertex points of a convex shape defined by an array of ``planes``. +计算并返回由一组 ``planes`` 定义的凸形状的所有顶点。 .. rst-class:: classref-item-separator @@ -170,9 +170,9 @@ Calculates and returns all the vertex points of a convex shape defined by an arr :ref:`Vector3` **get_triangle_barycentric_coords** **(** :ref:`Vector3` point, :ref:`Vector3` a, :ref:`Vector3` b, :ref:`Vector3` c **)** -Returns a :ref:`Vector3` containing weights based on how close a 3D position (``point``) is to a triangle's different vertices (``a``, ``b`` and ``c``). This is useful for interpolating between the data of different vertices in a triangle. One example use case is using this to smoothly rotate over a mesh instead of relying solely on face normals. +返回一个 :ref:`Vector3`\ ,其中包含基于 3D 位置(\ ``point``\ )与三角形不同顶点(\ ``a``\ 、\ ``b`` 和 ``c``\ )的接近程度的权重。这对于在三角形中不同顶点的数据之间进行插值非常有用。一个示例用例是使用它在网格上平滑旋转,而不是仅仅依赖于面法线。 -\ `Here is a more detailed explanation of barycentric coordinates. `__ +\ `这里是重心坐标的更详细解释。 `__ .. rst-class:: classref-item-separator @@ -234,10 +234,10 @@ Returns a :ref:`Vector3` containing weights based on how close a 测试线段(\ ``from``\ ,\ ``to``\ )是否与三角形 ``a``\ 、\ ``b``\ 、\ ``c`` 相交。如果相交,则将交点作为 :ref:`Vector3` 返回。如果不相交,则返回 ``null``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_geometryinstance3d.rst b/classes/zh_CN/class_geometryinstance3d.rst index e4e6a1b4ca..960ca634a9 100644 --- a/classes/zh_CN/class_geometryinstance3d.rst +++ b/classes/zh_CN/class_geometryinstance3d.rst @@ -10,30 +10,30 @@ GeometryInstance3D ================== -**Inherits:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`CPUParticles3D`, :ref:`CSGShape3D`, :ref:`GPUParticles3D`, :ref:`Label3D`, :ref:`MeshInstance3D`, :ref:`MultiMeshInstance3D`, :ref:`SpriteBase3D` +**派生:** :ref:`CPUParticles3D`, :ref:`CSGShape3D`, :ref:`GPUParticles3D`, :ref:`Label3D`, :ref:`MeshInstance3D`, :ref:`MultiMeshInstance3D`, :ref:`SpriteBase3D` 基于几何图形的视觉实例的基础节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 基于几何图形的视觉实例的基础节点。分享一些共同的机制,如可见性和自定义材质。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Visibility ranges (HLOD) <../tutorials/3d/visibility_ranges>` +- :doc:`可见范围(HLOD) <../tutorials/3d/visibility_ranges>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -72,8 +72,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -90,8 +90,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_GeometryInstance3D_ShadowCastingSetting: @@ -261,8 +261,8 @@ enum **VisibilityRangeFadeMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GeometryInstance3D_property_cast_shadow: @@ -539,8 +539,8 @@ GeometryInstance3D 将被隐藏的距离,同时考虑 :ref:`visibility_range_e .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GeometryInstance3D_method_get_instance_shader_parameter: @@ -568,10 +568,10 @@ void **set_instance_shader_parameter** **(** :ref:`StringName` \ **注意:**\ 逐实例着色器 uniform 目前仅在 3D 中可用,因此没有该方法的 2D 等效方法。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltfaccessor.rst b/classes/zh_CN/class_gltfaccessor.rst index 4bf79eebd9..197444c3b8 100644 --- a/classes/zh_CN/class_gltfaccessor.rst +++ b/classes/zh_CN/class_gltfaccessor.rst @@ -10,16 +10,23 @@ GLTFAccessor ============ -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-introduction-group + +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -60,8 +67,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GLTFAccessor_property_buffer_view: @@ -76,7 +83,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -95,7 +102,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -114,7 +121,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -133,7 +140,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -152,7 +159,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -171,7 +178,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -190,7 +197,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -209,7 +216,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -228,7 +235,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -247,7 +254,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -266,7 +273,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -285,7 +292,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -304,7 +311,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -323,12 +330,12 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltfanimation.rst b/classes/zh_CN/class_gltfanimation.rst index cf88430f2a..fdba48f13b 100644 --- a/classes/zh_CN/class_gltfanimation.rst +++ b/classes/zh_CN/class_gltfanimation.rst @@ -10,16 +10,23 @@ GLTFAnimation ============= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-introduction-group + +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -34,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GLTFAnimation_property_loop: @@ -50,12 +57,12 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltfbufferview.rst b/classes/zh_CN/class_gltfbufferview.rst index 054fd1f9da..21609f1079 100644 --- a/classes/zh_CN/class_gltfbufferview.rst +++ b/classes/zh_CN/class_gltfbufferview.rst @@ -10,16 +10,23 @@ GLTFBufferView ============== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-introduction-group + +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -42,8 +49,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GLTFBufferView_property_buffer: @@ -58,7 +65,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -77,7 +84,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -96,7 +103,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -115,7 +122,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -134,12 +141,12 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltfcamera.rst b/classes/zh_CN/class_gltfcamera.rst index d5bec7e33a..57c8421671 100644 --- a/classes/zh_CN/class_gltfcamera.rst +++ b/classes/zh_CN/class_gltfcamera.rst @@ -10,21 +10,23 @@ GLTFCamera ========== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表 GLTF 相机。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 代表基础 GLTF 规格中定义的相机。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` - `GLTF 相机的详细规格 `__ @@ -32,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +54,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -74,8 +76,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GLTFCamera_property_depth_far: @@ -164,8 +166,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GLTFCamera_method_from_dictionary: @@ -211,10 +213,10 @@ Method Descriptions 将这个 GLTFCamera 实例转换为 Godot :ref:`Camera3D` 节点。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltfdocument.rst b/classes/zh_CN/class_gltfdocument.rst index bc6a5e3dbe..9f819d9e67 100644 --- a/classes/zh_CN/class_gltfdocument.rst +++ b/classes/zh_CN/class_gltfdocument.rst @@ -10,48 +10,52 @@ GLTFDocument ============ -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Class for importing and exporting glTF files in and out of Godot. +用于在 Godot 中导入和导出 glTF 文件的类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -GLTFDocument supports reading data from a glTF file, buffer, or Godot scene. This data can then be written to the filesystem, buffer, or used to create a Godot scene. +GLTFDocument 支持从 glTF 文件、缓冲区、或 Godot 场景中读取数据。然后可以将该数据写入文件系统、缓冲区、或用于创建 Godot 场景。 -All of the data in a GLTF scene is stored in the :ref:`GLTFState` class. GLTFDocument processes state objects, but does not contain any scene data itself. GLTFDocument has member variables to store export configuration settings such as the image format, but is otherwise stateless. Multiple scenes can be processed with the same settings using the same GLTFDocument object and different :ref:`GLTFState` objects. +GLTF 场景中的所有数据都存储在 :ref:`GLTFState` 类中。GLTFDocument 处理状态对象,但本身不包含任何场景数据。GLTFDocument 有成员变量来存储如图像格式等导出配置设置,但在其他方面是无状态的。可以使用相同的 GLTFDocument 对象和不同的 :ref:`GLTFState` 对象以相同的设置处理多个场景。 -GLTFDocument can be extended with arbitrary functionality by extending the :ref:`GLTFDocumentExtension` class and registering it with GLTFDocument via :ref:`register_gltf_document_extension`. This allows for custom data to be imported and exported. +通过扩展 :ref:`GLTFDocumentExtension` 类并通过 :ref:`register_gltf_document_extension` 将其注册到 GLTFDocument,则可以使用任意功能来扩展 GLTFDocument。这允许自定义数据被导入和导出。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- `glTF 'What the duck?' guide `__ +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` -- `Khronos glTF specification `__ +- `glTF '鸭子是什么?' 指南 `__ + +- `Khronos glTF 规范 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto - +-----------------------------+-----------------------------------------------------------------+-----------+ - | :ref:`String` | :ref:`image_format` | ``"PNG"`` | - +-----------------------------+-----------------------------------------------------------------+-----------+ - | :ref:`float` | :ref:`lossy_quality` | ``0.75`` | - +-----------------------------+-----------------------------------------------------------------+-----------+ + +-----------------------------------------------------+-------------------------------------------------------------------+-----------+ + | :ref:`String` | :ref:`image_format` | ``"PNG"`` | + +-----------------------------------------------------+-------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`lossy_quality` | ``0.75`` | + +-----------------------------------------------------+-------------------------------------------------------------------+-----------+ + | :ref:`RootNodeMode` | :ref:`root_node_mode` | ``0`` | + +-----------------------------------------------------+-------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -80,8 +84,47 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +枚举 +---- + +.. _enum_GLTFDocument_RootNodeMode: + +.. rst-class:: classref-enumeration + +enum **RootNodeMode**: + +.. _class_GLTFDocument_constant_ROOT_NODE_MODE_SINGLE_ROOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`RootNodeMode` **ROOT_NODE_MODE_SINGLE_ROOT** = ``0`` + +将 Godot 场景的根节点视为 glTF 文件的根节点,并通过 ``GODOT_single_root`` glTF 扩展将其标记为单根节点。如果实现不支持 ``GODOT_single_root``\ ,这将与 :ref:`ROOT_NODE_MODE_KEEP_ROOT` 进行相同的解析。 + +.. _class_GLTFDocument_constant_ROOT_NODE_MODE_KEEP_ROOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`RootNodeMode` **ROOT_NODE_MODE_KEEP_ROOT** = ``1`` + +将 Godot 场景的根节点视为 glTF 文件的根节点,但不要将其标记为任何特殊的东西。导入 Godot 时会生成一个额外的根节点。这仅使用普通 glTF 功能。这相当于 Godot 4.1 及更早版本中的行为。 + +.. _class_GLTFDocument_constant_ROOT_NODE_MODE_MULTI_ROOT: + +.. rst-class:: classref-enumeration-constant + +:ref:`RootNodeMode` **ROOT_NODE_MODE_MULTI_ROOT** = ``2`` + +将 Godot 场景的根节点视为 glTF 场景的名称,并将其所有子节点添加为 glTF 文件的根节点。这仅使用普通 glTF 功能。这避免了额外的根节点,但只会保留 Godot 场景根节点的名称,因为它不会被保存为节点。 + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +属性说明 +-------- .. _class_GLTFDocument_property_image_format: @@ -94,9 +137,9 @@ Property Descriptions - void **set_image_format** **(** :ref:`String` value **)** - :ref:`String` **get_image_format** **(** **)** -The user-friendly name of the export image format. This is used when exporting the GLTF file, including writing to a file and writing to a byte array. +导出图像格式的用户友好名称。这被用于导出 GLTF 文件,包括写入文件和写入字节数组。 -By default, Godot allows the following options: "None", "PNG", "JPEG", "Lossless WebP", and "Lossy WebP". Support for more image formats can be added in :ref:`GLTFDocumentExtension` classes. +默认情况下,Godot 允许以下选项:“无”、“PNG”、“JPEG”、“无损 WebP”、和“有损 WebP”。可以使用 :ref:`GLTFDocumentExtension` 类添加对更多图像格式的支持。 .. rst-class:: classref-item-separator @@ -113,7 +156,26 @@ By default, Godot allows the following options: "None", "PNG", "JPEG", "Lossless - void **set_lossy_quality** **(** :ref:`float` value **)** - :ref:`float` **get_lossy_quality** **(** **)** -If :ref:`image_format` is a lossy image format, this determines the lossy quality of the image. On a range of ``0.0`` to ``1.0``, where ``0.0`` is the lowest quality and ``1.0`` is the highest quality. A lossy quality of ``1.0`` is not the same as lossless. +如果 :ref:`image_format` 是有损图像格式,则这决定了该图像的有损质量。在 ``0.0`` 到 ``1.0`` 范围内,其中 ``0.0`` 是最低质量,\ ``1.0`` 是最高质量。\ ``1.0`` 的有损质量不同于无损质量。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_GLTFDocument_property_root_node_mode: + +.. rst-class:: classref-property + +:ref:`RootNodeMode` **root_node_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_root_node_mode** **(** :ref:`RootNodeMode` value **)** +- :ref:`RootNodeMode` **get_root_node_mode** **(** **)** + +导出时如何处理根节点。详见 :ref:`RootNodeMode`\ 。默认和推荐值为 :ref:`ROOT_NODE_MODE_SINGLE_ROOT`\ 。 + +\ **注意:**\ 无论 glTF 文件如何导出,导入时,根节点类型和名称都可以在场景导入设置选项卡中被覆盖。 .. rst-class:: classref-section-separator @@ -121,8 +183,8 @@ If :ref:`image_format` is a lossy imag .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GLTFDocument_method_append_from_buffer: @@ -224,10 +286,10 @@ void **unregister_gltf_document_extension** **(** :ref:`GLTFDocumentExtension` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`GLTFDocumentExtensionConvertImporterMesh` +**派生:** :ref:`GLTFDocumentExtensionConvertImporterMesh` :ref:`GLTFDocument` 扩展类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 通过允许在 GLTF 导入或导出的各个阶段运行任意代码,来扩展 :ref:`GLTFDocument` 类的功能。 @@ -27,53 +27,60 @@ Description \ **注意:**\ 与 GLTFDocument 本身一样,所有 GLTFDocumentExtension 类都必须是无状态的才能正常运行。如果需要存储数据,请使用 :ref:`GLTFState` 或 :ref:`GLTFNode` 中的 ``set_additional_data`` 和 ``get_additional_data`` 方法。 +.. rst-class:: classref-introduction-group + +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` + .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_convert_scene_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_node **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_post` **(** :ref:`GLTFState` state **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_preflight` **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_preserialize` **(** :ref:`GLTFState` state **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node3D` | :ref:`_generate_scene_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_parent **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_image_file_extension` **(** **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_saveable_image_formats` **(** **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_supported_extensions` **(** **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_post` **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_post_parse` **(** :ref:`GLTFState` state **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_import_preflight` **(** :ref:`GLTFState` state, :ref:`PackedStringArray` extensions **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_parse_image_data` **(** :ref:`GLTFState` state, :ref:`PackedByteArray` image_data, :ref:`String` mime_type, :ref:`Image` ret_image **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_parse_node_extensions` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` extensions **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_parse_texture_json` **(** :ref:`GLTFState` state, :ref:`Dictionary` texture_json, :ref:`GLTFTexture` ret_gltf_texture **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_save_image_at_path` **(** :ref:`GLTFState` state, :ref:`Image` image, :ref:`String` file_path, :ref:`String` image_format, :ref:`float` lossy_quality **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`_serialize_image_to_bytes` **(** :ref:`GLTFState` state, :ref:`Image` image, :ref:`Dictionary` image_dict, :ref:`String` image_format, :ref:`float` lossy_quality **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_serialize_texture_json` **(** :ref:`GLTFState` state, :ref:`Dictionary` texture_json, :ref:`GLTFTexture` gltf_texture, :ref:`String` image_format **)** |virtual| | - +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_convert_scene_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_node **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_post` **(** :ref:`GLTFState` state **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_preflight` **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_export_preserialize` **(** :ref:`GLTFState` state **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node3D` | :ref:`_generate_scene_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_parent **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_image_file_extension` **(** **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_saveable_image_formats` **(** **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_supported_extensions` **(** **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_node` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_post` **(** :ref:`GLTFState` state, :ref:`Node` root **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_post_parse` **(** :ref:`GLTFState` state **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_import_preflight` **(** :ref:`GLTFState` state, :ref:`PackedStringArray` extensions **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_parse_image_data` **(** :ref:`GLTFState` state, :ref:`PackedByteArray` image_data, :ref:`String` mime_type, :ref:`Image` ret_image **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_parse_node_extensions` **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` extensions **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_parse_texture_json` **(** :ref:`GLTFState` state, :ref:`Dictionary` texture_json, :ref:`GLTFTexture` ret_gltf_texture **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_save_image_at_path` **(** :ref:`GLTFState` state, :ref:`Image` image, :ref:`String` file_path, :ref:`String` image_format, :ref:`float` lossy_quality **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`_serialize_image_to_bytes` **(** :ref:`GLTFState` state, :ref:`Image` image, :ref:`Dictionary` image_dict, :ref:`String` image_format, :ref:`float` lossy_quality **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_serialize_texture_json` **(** :ref:`GLTFState` state, :ref:`Dictionary` texture_json, :ref:`GLTFTexture` gltf_texture, :ref:`String` image_format **)** |virtual| | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -81,38 +88,38 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_GLTFDocumentExtension_method__convert_scene_node: +.. _class_GLTFDocumentExtension_private_method__convert_scene_node: .. rst-class:: classref-method void **_convert_scene_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_node **)** |virtual| -Part of the export process. This method is run after :ref:`_export_preflight` and before :ref:`_export_preserialize`. +导出过程的一部分。该方法在 :ref:`_export_preflight` 之后和 :ref:`_export_preserialize` 之前运行。 -Runs when converting the data from a Godot scene node. This method can be used to process the Godot scene node data into a format that can be used by :ref:`_export_node`. +在转换来自 Godot 场景节点的数据时运行。该方法可用于将 Godot 场景节点的数据,处理成可以被 :ref:`_export_node` 使用的格式。 .. rst-class:: classref-item-separator ---- -.. _class_GLTFDocumentExtension_method__export_node: +.. _class_GLTFDocumentExtension_private_method__export_node: .. rst-class:: classref-method :ref:`Error` **_export_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| -Part of the export process. This method is run after :ref:`_get_saveable_image_formats` and before :ref:`_export_post`. If this **GLTFDocumentExtension** is used for exporting images, this runs after :ref:`_serialize_texture_json`. +导出过程的一部分。该方法在 :ref:`_get_saveable_image_formats` 之后 :ref:`_export_post` 之前运行。如果该 **GLTFDocumentExtension** 用于导出图像,则会在 :ref:`_serialize_texture_json` 之后运行。 -This method can be used to modify the final JSON of each node. +该方法可用于修改每个节点的最终 JSON。 .. rst-class:: classref-item-separator ---- -.. _class_GLTFDocumentExtension_method__export_post: +.. _class_GLTFDocumentExtension_private_method__export_post: .. rst-class:: classref-method @@ -126,7 +133,7 @@ This method can be used to modify the final JSON of each node. ---- -.. _class_GLTFDocumentExtension_method__export_preflight: +.. _class_GLTFDocumentExtension_private_method__export_preflight: .. rst-class:: classref-method @@ -140,67 +147,69 @@ This method can be used to modify the final JSON of each node. ---- -.. _class_GLTFDocumentExtension_method__export_preserialize: +.. _class_GLTFDocumentExtension_private_method__export_preserialize: .. rst-class:: classref-method :ref:`Error` **_export_preserialize** **(** :ref:`GLTFState` state **)** |virtual| -Part of the export process. This method is run after :ref:`_convert_scene_node` and before :ref:`_get_saveable_image_formats`. +导入过程的一部分。该方法在 :ref:`_convert_scene_node` 之后 :ref:`_get_saveable_image_formats` 之前运行。 -This method can be used to alter the state before performing serialization. It runs every time when generating a buffer with :ref:`GLTFDocument.generate_buffer` or writing to the file system with :ref:`GLTFDocument.write_to_filesystem`. +该方法可用于在执行序列化之前更改状态。每次使用 :ref:`GLTFDocument.generate_buffer` 生成缓冲区或使用\ :ref:`GLTFDocument.write_to_filesystem`\ 写入文件系统时,它都会运行。 .. rst-class:: classref-item-separator ---- -.. _class_GLTFDocumentExtension_method__generate_scene_node: +.. _class_GLTFDocumentExtension_private_method__generate_scene_node: .. rst-class:: classref-method :ref:`Node3D` **_generate_scene_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Node` scene_parent **)** |virtual| -Part of the import process. This method is run after :ref:`_import_post_parse` and before :ref:`_import_node`. +导入过程的一部分。该方法在 :ref:`_import_post_parse` 之后 :ref:`_import_node` 之前运行。 -Runs when generating a Godot scene node from a GLTFNode. The returned node will be added to the scene tree. Multiple nodes can be generated in this step if they are added as a child of the returned node. +当从 GLTFNode 生成一个 Godot 场景节点时运行。返回的节点将被添加到场景树中。如果将多个节点添加为返回节点的子节点,则可以在该步骤中生成这些节点。 + +\ **注意:**\ 如果这是单个根节点,则 ``scene_parent`` 参数可以为 null。 .. rst-class:: classref-item-separator ---- -.. _class_GLTFDocumentExtension_method__get_image_file_extension: +.. _class_GLTFDocumentExtension_private_method__get_image_file_extension: .. rst-class:: classref-method :ref:`String` **_get_image_file_extension** **(** **)** |virtual| -Returns the file extension to use for saving image data into, for example, ``".png"``. If defined, when this extension is used to handle images, and the images are saved to a separate file, the image bytes will be copied to a file with this extension. If this is set, there should be a :ref:`ResourceImporter` class able to import the file. If not defined or empty, Godot will save the image into a PNG file. +返回用于保存图像数据的文件的文件扩展名,例如 ``".png"``\ 。如果定义了,当使用该扩展名处理图像并将图像保存到单独的文件时,图像字节将被复制到具有该扩展名的文件中。如果设置了该选项,则应该有一个能够导入该文件的 :ref:`ResourceImporter` 类。如果未定义或为空,则 Godot 会将该图像保存到 PNG 文件中。 .. rst-class:: classref-item-separator ---- -.. _class_GLTFDocumentExtension_method__get_saveable_image_formats: +.. _class_GLTFDocumentExtension_private_method__get_saveable_image_formats: .. rst-class:: classref-method :ref:`PackedStringArray` **_get_saveable_image_formats** **(** **)** |virtual| -Part of the export process. This method is run after :ref:`_convert_scene_node` and before :ref:`_export_node`. +导出过程的一部分。该方法在 :ref:`_convert_scene_node` 之后和 :ref:`_export_node` 之前运行。 -Returns an array of the image formats that can be saved/exported by this extension. This extension will only be selected as the image exporter if the :ref:`GLTFDocument`'s :ref:`GLTFDocument.image_format` is in this array. If this **GLTFDocumentExtension** is selected as the image exporter, one of the :ref:`_save_image_at_path` or :ref:`_serialize_image_to_bytes` methods will run next, otherwise :ref:`_export_node` will run next. If the format name contains ``"Lossy"``, the lossy quality slider will be displayed. +返回可以由该扩展保存/导出的图像格式的数组。仅当 :ref:`GLTFDocument` 的 :ref:`GLTFDocument.image_format` 在该数组中时,才会选择该扩展作为图像导出器。如果选择该 **GLTFDocumentExtension** 作为图像导出器,则接下来将运行 :ref:`_save_image_at_path` 或 :ref:`_serialize_image_to_bytes` 方法之一,否则接下来将运行 :ref:`_export_node`\ 。如果格式名称包含 ``"Lossy"``\ ,则会显示有损质量滑块。 .. rst-class:: classref-item-separator ---- -.. _class_GLTFDocumentExtension_method__get_supported_extensions: +.. _class_GLTFDocumentExtension_private_method__get_supported_extensions: .. rst-class:: classref-method :ref:`PackedStringArray` **_get_supported_extensions** **(** **)** |virtual| -导入过程的一部分。该方法在 :ref:`_import_preflight` 之后 :ref:`_parse_node_extensions` 之前运行。 +导入过程的一部分。该方法在 :ref:`_import_preflight` 之后 :ref:`_parse_node_extensions` 之前运行。 返回一组被该 GLTFDocumentExtension 类支持的 GLTF 扩展。这用于验证是否可以加载一个具有所需扩展名的 GLTF 文件。 @@ -208,21 +217,21 @@ Returns an array of the image formats that can be saved/exported by this extensi ---- -.. _class_GLTFDocumentExtension_method__import_node: +.. _class_GLTFDocumentExtension_private_method__import_node: .. rst-class:: classref-method :ref:`Error` **_import_node** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` json, :ref:`Node` node **)** |virtual| -Part of the import process. This method is run after :ref:`_generate_scene_node` and before :ref:`_import_post`. +导入过程的一部分。该方法在 :ref:`_generate_scene_node` 之后 :ref:`_import_post` 之前运行。 -This method can be used to make modifications to each of the generated Godot scene nodes. +该方法可用于对生成的每个 Godot 场景节点进行修改。 .. rst-class:: classref-item-separator ---- -.. _class_GLTFDocumentExtension_method__import_post: +.. _class_GLTFDocumentExtension_private_method__import_post: .. rst-class:: classref-method @@ -236,21 +245,21 @@ This method can be used to make modifications to each of the generated Godot sce ---- -.. _class_GLTFDocumentExtension_method__import_post_parse: +.. _class_GLTFDocumentExtension_private_method__import_post_parse: .. rst-class:: classref-method :ref:`Error` **_import_post_parse** **(** :ref:`GLTFState` state **)** |virtual| -Part of the import process. This method is run after :ref:`_parse_node_extensions` and before :ref:`_generate_scene_node`. +导入过程的一部分。该方法在 :ref:`_parse_node_extensions` 之后 :ref:`_generate_scene_node` 之前运行。 -This method can be used to modify any of the data imported so far, including any scene nodes, before running the final per-node import step. +在运行最终的各节点导入步骤之前,该方法可用于修改到目前为止导入的任何数据,包括任何场景节点。 .. rst-class:: classref-item-separator ---- -.. _class_GLTFDocumentExtension_method__import_preflight: +.. _class_GLTFDocumentExtension_private_method__import_preflight: .. rst-class:: classref-method @@ -264,13 +273,13 @@ This method can be used to modify any of the data imported so far, including any ---- -.. _class_GLTFDocumentExtension_method__parse_image_data: +.. _class_GLTFDocumentExtension_private_method__parse_image_data: .. rst-class:: classref-method :ref:`Error` **_parse_image_data** **(** :ref:`GLTFState` state, :ref:`PackedByteArray` image_data, :ref:`String` mime_type, :ref:`Image` ret_image **)** |virtual| -导入过程的一部分。该方法在 :ref:`_parse_node_extensions` 之后 :ref:`_parse_texture_json` 之前运行。 +导入过程的一部分。该方法在 :ref:`_parse_node_extensions` 之后 :ref:`_parse_texture_json` 之前运行。 从 GLTF 文件中解析图像数据时运行。数据可以从单独的文件、URI 或缓冲中获取,然后作为字节数组传递。 @@ -278,27 +287,27 @@ This method can be used to modify any of the data imported so far, including any ---- -.. _class_GLTFDocumentExtension_method__parse_node_extensions: +.. _class_GLTFDocumentExtension_private_method__parse_node_extensions: .. rst-class:: classref-method :ref:`Error` **_parse_node_extensions** **(** :ref:`GLTFState` state, :ref:`GLTFNode` gltf_node, :ref:`Dictionary` extensions **)** |virtual| -Part of the import process. This method is run after :ref:`_get_supported_extensions` and before :ref:`_import_post_parse`. +导入过程的一部分。该方法在 :ref:`_get_supported_extensions` 之后和 :ref:`_import_post_parse` 之前运行。 -Runs when parsing the node extensions of a GLTFNode. This method can be used to process the extension JSON data into a format that can be used by :ref:`_generate_scene_node`. The return value should be a member of the :ref:`Error` enum. +在解析 GLTFNode 的节点扩展时运行。该方法可用于将扩展 JSON 数据,处理成可被 :ref:`_generate_scene_node` 使用的格式。该返回值应该是 :ref:`Error` 枚举中的一个成员。 .. rst-class:: classref-item-separator ---- -.. _class_GLTFDocumentExtension_method__parse_texture_json: +.. _class_GLTFDocumentExtension_private_method__parse_texture_json: .. rst-class:: classref-method :ref:`Error` **_parse_texture_json** **(** :ref:`GLTFState` state, :ref:`Dictionary` texture_json, :ref:`GLTFTexture` ret_gltf_texture **)** |virtual| -导入过程的一部分。该方法在 :ref:`_parse_image_data` 之后 :ref:`_generate_scene_node` 之前运行。 +导入过程的一部分。该方法在 :ref:`_parse_image_data` 之后 :ref:`_generate_scene_node` 之前运行。 从 GLTF 纹理数组中解析纹理 JSON 时运行。可用于设置用作纹理的源图像索引。 @@ -306,50 +315,50 @@ Runs when parsing the node extensions of a GLTFNode. This method can be used to ---- -.. _class_GLTFDocumentExtension_method__save_image_at_path: +.. _class_GLTFDocumentExtension_private_method__save_image_at_path: .. rst-class:: classref-method :ref:`Error` **_save_image_at_path** **(** :ref:`GLTFState` state, :ref:`Image` image, :ref:`String` file_path, :ref:`String` image_format, :ref:`float` lossy_quality **)** |virtual| -Part of the export process. This method is run after :ref:`_get_saveable_image_formats` and before :ref:`_serialize_texture_json`. +导入过程的一部分。该方法在 :ref:`_get_saveable_image_formats` 之后 :ref:`_serialize_texture_json` 之前运行。 -This method is run when saving images separately from the GLTF file. When images are embedded, :ref:`_serialize_image_to_bytes` runs instead. Note that these methods only run when this **GLTFDocumentExtension** is selected as the image exporter. +当与 GLTF 文件分开保存图像时运行该方法。嵌入图像时,将运行 :ref:`_serialize_image_to_bytes`\ 。请注意,这些方法仅在选择该 **GLTFDocumentExtension** 作为图像导出器时运行。 .. rst-class:: classref-item-separator ---- -.. _class_GLTFDocumentExtension_method__serialize_image_to_bytes: +.. _class_GLTFDocumentExtension_private_method__serialize_image_to_bytes: .. rst-class:: classref-method :ref:`PackedByteArray` **_serialize_image_to_bytes** **(** :ref:`GLTFState` state, :ref:`Image` image, :ref:`Dictionary` image_dict, :ref:`String` image_format, :ref:`float` lossy_quality **)** |virtual| -Part of the export process. This method is run after :ref:`_get_saveable_image_formats` and before :ref:`_serialize_texture_json`. +导出过程的一部分。该方法在 :ref:`_get_saveable_image_formats` 之后和 :ref:`_serialize_texture_json` 之前运行。 -This method is run when embedding images in the GLTF file. When images are saved separately, :ref:`_save_image_at_path` runs instead. Note that these methods only run when this **GLTFDocumentExtension** is selected as the image exporter. +在 GLTF 文件中嵌入图像时运行该方法。当图像单独保存时,将运行 :ref:`_save_image_at_path`\ 。请注意,这些方法仅在选择该 **GLTFDocumentExtension** 作为图像导出器时运行。 -This method must set the image MIME type in the ``image_dict`` with the ``"mimeType"`` key. For example, for a PNG image, it would be set to ``"image/png"``. The return value must be a :ref:`PackedByteArray` containing the image data. +该方法必须使用 ``"mimeType"`` 键在 ``image_dict`` 中设置该图像的 MIME 类型。例如,对于 PNG 图像,它将被设置为 ``"image/png"``\ 。该返回值必须是包含该图像数据的 :ref:`PackedByteArray`\ 。 .. rst-class:: classref-item-separator ---- -.. _class_GLTFDocumentExtension_method__serialize_texture_json: +.. _class_GLTFDocumentExtension_private_method__serialize_texture_json: .. rst-class:: classref-method :ref:`Error` **_serialize_texture_json** **(** :ref:`GLTFState` state, :ref:`Dictionary` texture_json, :ref:`GLTFTexture` gltf_texture, :ref:`String` image_format **)** |virtual| -Part of the export process. This method is run after :ref:`_save_image_at_path` or :ref:`_serialize_image_to_bytes`, and before :ref:`_export_node`. Note that this method only runs when this **GLTFDocumentExtension** is selected as the image exporter. +导出过程的一部分。该方法在 :ref:`_save_image_at_path` 或 :ref:`_serialize_image_to_bytes` 之后、\ :ref:`_export_node` 之前运行。请注意,该方法仅在选择该 **GLTFDocumentExtension** 作为图像导出器时运行。 -This method can be used to set up the extensions for the texture JSON by editing ``texture_json``. The extension must also be added as used extension with :ref:`GLTFState.add_used_extension`, be sure to set ``required`` to ``true`` if you are not providing a fallback. +该方法可用于通过编辑 ``texture_json`` 设置该纹理 JSON 的扩展。还必须使用 :ref:`GLTFState.add_used_extension` 将该扩展添加为使用的扩展,如果你不提供后备,请务必将 ``required`` 设置为 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltfdocumentextensionconvertimportermesh.rst b/classes/zh_CN/class_gltfdocumentextensionconvertimportermesh.rst index 2af7845a34..14632a3f50 100644 --- a/classes/zh_CN/class_gltfdocumentextensionconvertimportermesh.rst +++ b/classes/zh_CN/class_gltfdocumentextensionconvertimportermesh.rst @@ -10,16 +10,23 @@ GLTFDocumentExtensionConvertImporterMesh ======================================== -**Inherits:** :ref:`GLTFDocumentExtension` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`GLTFDocumentExtension` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. rst-class:: classref-introduction-group + +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltflight.rst b/classes/zh_CN/class_gltflight.rst index 512885ae5e..f50b1426d4 100644 --- a/classes/zh_CN/class_gltflight.rst +++ b/classes/zh_CN/class_gltflight.rst @@ -10,28 +10,30 @@ GLTFLight ========= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表 GLTF 灯光。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 代表由 ``KHR_lights_punctual`` GLTF 扩展定义的灯光。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` - `KHR_lights_punctual GLTF 扩展规格 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +54,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -74,8 +76,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GLTFLight_property_color: @@ -185,8 +187,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GLTFLight_method_from_dictionary: @@ -232,10 +234,10 @@ Method Descriptions 将这个 GLTFLight 实例转换为 Godot :ref:`Light3D` 节点。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltfmesh.rst b/classes/zh_CN/class_gltfmesh.rst index 1aa58a6267..61e35e26ca 100644 --- a/classes/zh_CN/class_gltfmesh.rst +++ b/classes/zh_CN/class_gltfmesh.rst @@ -10,16 +10,23 @@ GLTFMesh ======== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-introduction-group + +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -38,8 +45,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GLTFMesh_property_blend_weights: @@ -54,7 +61,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -73,7 +80,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -92,12 +99,12 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltfnode.rst b/classes/zh_CN/class_gltfnode.rst index 0ab73a00f9..81284d38bb 100644 --- a/classes/zh_CN/class_gltfnode.rst +++ b/classes/zh_CN/class_gltfnode.rst @@ -10,14 +10,14 @@ GLTFNode ======== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` GLTF 节点类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 代表 GLTF 节点。GLTF 节点中可以包含名称、变换、子节点(GLTF 节点)以及其他专门的属性(由各自不同的类表示)。 @@ -25,15 +25,17 @@ GLTF 节点通常存在于表示 GLTF 文件中的所有数据的 :ref:`GLTFStat .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` - `GLTF 场景和节点规格 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -66,8 +68,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -84,8 +86,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GLTFNode_property_camera: @@ -293,8 +295,8 @@ GLTF 节点相对于其父节点的变换。由于通常首选位置、旋转和 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GLTFNode_method_get_additional_data: @@ -320,10 +322,10 @@ void **set_additional_data** **(** :ref:`StringName` extension 第一个参数应该是 :ref:`GLTFDocumentExtension` 的名字(不必与 GLTF 文件中的扩展名相匹配),第二个参数可以是任何你想要的东西。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltfphysicsbody.rst b/classes/zh_CN/class_gltfphysicsbody.rst index 76b27245db..a363cf92a5 100644 --- a/classes/zh_CN/class_gltfphysicsbody.rst +++ b/classes/zh_CN/class_gltfphysicsbody.rst @@ -10,28 +10,30 @@ GLTFPhysicsBody =============== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表 GLTF 物理体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 代表 ``OMI_physics_body`` GLTF 扩展中定义的物理体。这个类是 GLTF 数据与 Godot 节点的中介,并且经过了抽象,支持将来加入各种 GLTF 物理扩展。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` - `OMI_physics_body GLTF 扩展 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +54,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -74,8 +76,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GLTFPhysicsBody_property_angular_velocity: @@ -105,7 +107,7 @@ Property Descriptions - void **set_body_type** **(** :ref:`String` value **)** - :ref:`String` **get_body_type** **(** **)** -The type of the body. When importing, this controls what type of :ref:`CollisionObject3D` node Godot should generate. Valid values are "static", "kinematic", "character", "rigid", "vehicle", and "trigger". +该物体的类型。导入时,控制 Godot 应该生成何种类型的 :ref:`CollisionObject3D` 节点。有效值有“static”“kinematic”“character”“rigid”“vehicle”“trigger”。 .. rst-class:: classref-item-separator @@ -122,7 +124,7 @@ The type of the body. When importing, this controls what type of :ref:`Collision - void **set_center_of_mass** **(** :ref:`Vector3` value **)** - :ref:`Vector3` **get_center_of_mass** **(** **)** -The center of mass of the body, in meters. This is in local space relative to the body. By default, the center of the mass is the body's origin. +该物体的质心,单位为米。使用相对于物体的局部空间。质心默认为物体的原点。 .. rst-class:: classref-item-separator @@ -183,8 +185,8 @@ The center of mass of the body, in meters. This is in local space relative to th .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GLTFPhysicsBody_method_from_dictionary: @@ -230,10 +232,10 @@ Method Descriptions 将这个 GLTFPhysicsBody 实例转换为 Godot :ref:`CollisionObject3D` 节点。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltfphysicsshape.rst b/classes/zh_CN/class_gltfphysicsshape.rst index ee6a3ff382..0a9505c512 100644 --- a/classes/zh_CN/class_gltfphysicsshape.rst +++ b/classes/zh_CN/class_gltfphysicsshape.rst @@ -10,28 +10,30 @@ GLTFPhysicsShape ================ -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表 GLTF 物理形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 代表 ``OMI_collider`` GLTF 扩展中定义的物理形状。这个类是 GLTF 数据与 Godot 节点的中介,并且经过了抽象,支持将来加入各种 GLTF 物理扩展。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` - `OMI_collider GLTF 扩展 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +56,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -76,8 +78,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GLTFPhysicsShape_property_height: @@ -202,8 +204,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GLTFPhysicsShape_method_from_dictionary: @@ -249,10 +251,10 @@ Method Descriptions 将这个 GLTFPhysicsShape 实例转换为 Godot :ref:`CollisionShape3D` 节点。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltfskeleton.rst b/classes/zh_CN/class_gltfskeleton.rst index 3281ab131a..dd333a4459 100644 --- a/classes/zh_CN/class_gltfskeleton.rst +++ b/classes/zh_CN/class_gltfskeleton.rst @@ -10,16 +10,23 @@ GLTFSkeleton ============ -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-introduction-group + +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -32,8 +39,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -60,8 +67,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GLTFSkeleton_property_joints: @@ -76,7 +83,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -95,7 +102,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-section-separator @@ -103,8 +110,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GLTFSkeleton_method_get_bone_attachment: @@ -114,7 +121,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -128,7 +135,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -154,7 +161,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -168,7 +175,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -194,12 +201,12 @@ void **set_unique_names** **(** :ref:`String[]` unique_names **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltfskin.rst b/classes/zh_CN/class_gltfskin.rst index 868b66c4b0..27db991f08 100644 --- a/classes/zh_CN/class_gltfskin.rst +++ b/classes/zh_CN/class_gltfskin.rst @@ -10,16 +10,23 @@ GLTFSkin ======== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-introduction-group + +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -42,8 +49,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -68,8 +75,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GLTFSkin_property_godot_skin: @@ -84,7 +91,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -103,7 +110,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -122,7 +129,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -141,7 +148,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -160,7 +167,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -179,7 +186,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -198,7 +205,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-section-separator @@ -206,8 +213,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GLTFSkin_method_get_inverse_binds: @@ -217,7 +224,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -231,7 +238,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -245,7 +252,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -259,7 +266,7 @@ void **set_inverse_binds** **(** :ref:`Transform3D[]` inverse .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -273,7 +280,7 @@ void **set_joint_i_to_bone_i** **(** :ref:`Dictionary` joint_i .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -287,12 +294,12 @@ void **set_joint_i_to_name** **(** :ref:`Dictionary` joint_i_t .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltfspecgloss.rst b/classes/zh_CN/class_gltfspecgloss.rst index 730361acf5..0feb13e1ec 100644 --- a/classes/zh_CN/class_gltfspecgloss.rst +++ b/classes/zh_CN/class_gltfspecgloss.rst @@ -10,28 +10,30 @@ GLTFSpecGloss ============= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 已归档的 GLTF 扩展,用于镜面/光泽材质。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- KHR_materials_pbrSpecularGlossiness 是一个已归档的 GLTF 扩展。这意味着它已被弃用,不推荐用于新文件。但是,它仍然被支持用于加载旧文件。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` - `KHR_materials_pbrSpecularGlossiness GLTF 扩展规范 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +56,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GLTFSpecGloss_property_diffuse_factor: @@ -138,10 +140,10 @@ Property Descriptions 材质的镜面反射 RGB 颜色。不使用 Alpha 通道。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltfstate.rst b/classes/zh_CN/class_gltfstate.rst index 0ffd85f857..097e800530 100644 --- a/classes/zh_CN/class_gltfstate.rst +++ b/classes/zh_CN/class_gltfstate.rst @@ -10,14 +10,14 @@ GLTFState ========= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表 GLTF 文件中的所有数据。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 包含 GLTF 文件中的所有节点和资源。用于 :ref:`GLTFDocument` 的数据存储,能够让 :ref:`GLTFDocument` 和所有 :ref:`GLTFDocumentExtension` 类保持无状态。 @@ -25,15 +25,17 @@ GLTFState 的填写可以通过 :ref:`GLTFDocument` 读取 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- `GLTF asset header schema `__ +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` + +- `GLTF 资产头的模式 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -66,8 +68,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -158,8 +160,8 @@ Methods .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_GLTFState_constant_HANDLE_BINARY_DISCARD_TEXTURES: @@ -199,8 +201,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GLTFState_property_base_path: @@ -213,7 +215,7 @@ Property Descriptions - void **set_base_path** **(** :ref:`String` value **)** - :ref:`String` **get_base_path** **(** **)** -The folder path associated with this GLTF data. This is used to find other files the GLTF file references, like images or binary buffers. This will be set during import when appending from a file, and will be set during export when writing to a file. +与该 GLTF 数据关联的文件夹路径。这用于查找该 GLTF 文件引用的其他文件,例如图像或二进制缓冲区。这将在导入期间从文件追加时设置,并将在导出期间写入文件时设置。 .. rst-class:: classref-item-separator @@ -232,7 +234,7 @@ The folder path associated with this GLTF data. This is used to find other files .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -249,7 +251,7 @@ The folder path associated with this GLTF data. This is used to find other files - void **set_copyright** **(** :ref:`String` value **)** - :ref:`String` **get_copyright** **(** **)** -The copyright string in the asset header of the GLTF file. This is set during import if present and export if non-empty. See the GLTF asset header documentation for more information. +该 GLTF 文件的资产标头中的版权字符串。如果存在,则在导入期间设置;如果非空则在导出期间设置。详见 GLTF 资产标头文档。 .. rst-class:: classref-item-separator @@ -268,7 +270,7 @@ The copyright string in the asset header of the GLTF file. This is set during im .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -285,7 +287,7 @@ The copyright string in the asset header of the GLTF file. This is set during im - void **set_filename** **(** :ref:`String` value **)** - :ref:`String` **get_filename** **(** **)** -The file name associated with this GLTF data. If it ends with ``.gltf``, this is text-based GLTF, otherwise this is binary GLB. This will be set during import when appending from a file, and will be set during export when writing to a file. If writing to a buffer, this will be an empty string. +与该 GLTF 数据关联的文件名。如果它以 ``.gltf`` 结尾,则这是基于文本的 GLTF,否则这是二进制 GLB。这将在导入期间从文件追加时设置,并将在导出期间写入文件时设置。如果写入到缓冲区,这将是一个空字符串。 .. rst-class:: classref-item-separator @@ -304,7 +306,7 @@ The file name associated with this GLTF data. If it ends with ``.gltf``, this is .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -323,7 +325,7 @@ The file name associated with this GLTF data. If it ends with ``.gltf``, this is .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -342,7 +344,7 @@ The file name associated with this GLTF data. If it ends with ``.gltf``, this is .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -361,7 +363,7 @@ The file name associated with this GLTF data. If it ends with ``.gltf``, this is .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -414,7 +416,7 @@ GLTF 文件的根节点。通常,一个 GLTF 文件只有一个场景,因此 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-section-separator @@ -422,8 +424,8 @@ GLTF 文件的根节点。通常,一个 GLTF 文件只有一个场景,因此 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GLTFState_method_add_used_extension: @@ -431,7 +433,7 @@ Method Descriptions void **add_used_extension** **(** :ref:`String` extension_name, :ref:`bool` required **)** -在序列化期间,将一个扩展名追加到该 GLTF 文件使用的扩展名列表在。如果 ``required`` 为 true,则该扩展名也将被添加到所需扩展名列表中。不要在 :ref:`GLTFDocumentExtension._export_post` 中运行它,因为那个阶段已来不及添加扩展。最终的列表将按字母顺序排序。 +在序列化期间,将一个扩展名追加到该 GLTF 文件使用的扩展名列表在。如果 ``required`` 为 true,则该扩展名也将被添加到所需扩展名列表中。不要在 :ref:`GLTFDocumentExtension._export_post` 中运行它,因为那个阶段已来不及添加扩展。最终的列表将按字母顺序排序。 .. rst-class:: classref-item-separator @@ -445,7 +447,7 @@ void **add_used_extension** **(** :ref:`String` extension_name, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -509,7 +511,7 @@ void **add_used_extension** **(** :ref:`String` extension_name, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -535,7 +537,7 @@ void **add_used_extension** **(** :ref:`String` extension_name, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -573,7 +575,7 @@ void **add_used_extension** **(** :ref:`String` extension_name, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -675,7 +677,7 @@ void **add_used_extension** **(** :ref:`String` extension_name, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -713,7 +715,7 @@ void **set_accessors** **(** :ref:`GLTFAccessor[]` accessors .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -753,7 +755,7 @@ void **set_buffer_views** **(** :ref:`GLTFBufferView[]` bu .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -779,7 +781,7 @@ void **set_handle_binary_image** **(** :ref:`int` method **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -817,7 +819,7 @@ void **set_materials** **(** :ref:`Material[]` materials **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -891,7 +893,7 @@ void **set_textures** **(** :ref:`GLTFTexture[]` textures **) .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -917,10 +919,10 @@ void **set_unique_names** **(** :ref:`String[]` unique_names **)** 设置该状态中的唯一节点名称。这用于导入过程和导出过程。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltftexture.rst b/classes/zh_CN/class_gltftexture.rst index 6342ea0cd1..5315c55ff2 100644 --- a/classes/zh_CN/class_gltftexture.rst +++ b/classes/zh_CN/class_gltftexture.rst @@ -10,16 +10,23 @@ GLTFTexture =========== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-introduction-group + +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -36,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GLTFTexture_property_sampler: @@ -69,10 +76,10 @@ Property Descriptions 与该纹理关联的图像索引,见 :ref:`GLTFState.get_images`\ 。如果为 -1,则该纹理未与图像相关联。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gltftexturesampler.rst b/classes/zh_CN/class_gltftexturesampler.rst index 0e8a7626f8..bd61bbee33 100644 --- a/classes/zh_CN/class_gltftexturesampler.rst +++ b/classes/zh_CN/class_gltftexturesampler.rst @@ -10,21 +10,28 @@ GLTFTextureSampler ================== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表 GLTF 纹理采样器 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 表示由基本 GLTF 规范定义的纹理采样器。GLTF 中的纹理采样器指定在对象上渲染纹理时,如何从纹理的基础图像中采样数据。 +.. rst-class:: classref-introduction-group + +教程 +---- + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` + .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +52,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GLTFTextureSampler_property_mag_filter: @@ -112,10 +119,10 @@ Property Descriptions 用于 T 轴(垂直)纹理坐标的环绕模式。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_godotsharp.rst b/classes/zh_CN/class_godotsharp.rst index a47a343df0..1a8014208e 100644 --- a/classes/zh_CN/class_godotsharp.rst +++ b/classes/zh_CN/class_godotsharp.rst @@ -10,14 +10,14 @@ GodotSharp ========== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` Bridge between Godot and the Mono runtime (Mono-enabled builds only). .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- This class is a bridge between Godot and the Mono runtime. It exposes several low-level operations and is only available in Mono-enabled Godot builds. @@ -25,8 +25,8 @@ See also :ref:`CSharpScript`. .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GodotSharp_method_is_runtime_initialized: @@ -52,10 +52,10 @@ Method Descriptions Returns ``true`` if the .NET runtime is initialized, ``false`` otherwise. -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gpuparticles2d.rst b/classes/zh_CN/class_gpuparticles2d.rst index 47198c79a1..0f29f86e21 100644 --- a/classes/zh_CN/class_gpuparticles2d.rst +++ b/classes/zh_CN/class_gpuparticles2d.rst @@ -10,25 +10,25 @@ GPUParticles2D ============== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -A 2D particle emitter. +2D 粒子发射器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -2D particle node used to create a variety of particle systems and effects. **GPUParticles2D** features an emitter that generates some number of particles at a given rate. +2D 粒子节点,用于创建各种粒子系统和效果。\ **GPUParticles2D** 是一个发射器,特点是以给定的速度生成一定数量的粒子。 -Use the :ref:`process_material` property to add a :ref:`ParticleProcessMaterial` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial` which will be applied to all particles. +使用 :ref:`process_material` 属性来添加一个配置粒子的外观和行为的 :ref:`ParticleProcessMaterial`\ 。或者,你可以添加一个应用于所有粒子的 :ref:`ShaderMaterial`\ 。 -2D particles can optionally collide with :ref:`LightOccluder2D`, but they don't collide with :ref:`PhysicsBody2D` nodes. +2D 粒子可以选择与 :ref:`LightOccluder2D` 碰撞,但它们不会与 :ref:`PhysicsBody2D` 节点碰撞。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`粒子系统(2D) <../tutorials/2d/particle_systems_2d>` @@ -38,8 +38,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,6 +47,8 @@ Properties +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`int` | :ref:`amount` | ``8`` | +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`float` | :ref:`amount_ratio` | ``1.0`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`float` | :ref:`collision_base_size` | ``1.0`` | +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`DrawOrder` | :ref:`draw_order` | ``1`` | @@ -59,6 +61,8 @@ Properties +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`bool` | :ref:`fract_delta` | ``true`` | +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ + | :ref:`float` | :ref:`interp_to_end` | ``0.0`` | + +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`bool` | :ref:`interpolate` | ``true`` | +-------------------------------------------------+---------------------------------------------------------------------------------------------+---------------------------------+ | :ref:`float` | :ref:`lifetime` | ``1.0`` | @@ -92,8 +96,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -114,8 +118,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_GPUParticles2D_signal_finished: @@ -123,9 +127,9 @@ Signals **finished** **(** **)** -Emitted when all active particles have finished processing. When :ref:`one_shot` is disabled, particles will process continuously, so this is never emitted. +当所有活动粒子完成处理时发出。当 :ref:`one_shot` 被禁用时,粒子将连续处理,因此它永远不会发出。 -\ **Note:** Due to the particles being computed on the GPU there might be a delay before the signal gets emitted. +\ **注意:**\ 由于粒子是在 GPU 上计算的,因此在该信号发出之前可能会有延迟。 .. rst-class:: classref-section-separator @@ -133,8 +137,8 @@ Emitted when all active particles have finished processing. When :ref:`one_shot< .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_GPUParticles2D_DrawOrder: @@ -156,7 +160,7 @@ enum **DrawOrder**: :ref:`DrawOrder` **DRAW_ORDER_LIFETIME** = ``1`` -粒子按剩余寿命的顺序绘制。 +粒子按照剩余寿命的顺序绘制。换句话说,寿命最长的粒子被绘制在前面。 .. _class_GPUParticles2D_constant_DRAW_ORDER_REVERSE_LIFETIME: @@ -164,7 +168,7 @@ enum **DrawOrder**: :ref:`DrawOrder` **DRAW_ORDER_REVERSE_LIFETIME** = ``2`` - +粒子按照剩余寿命的相反顺序绘制。换句话说,寿命最短的粒子被绘制在前面。 .. rst-class:: classref-item-separator @@ -222,8 +226,8 @@ enum **EmitFlags**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GPUParticles2D_property_amount: @@ -236,7 +240,28 @@ Property Descriptions - void **set_amount** **(** :ref:`int` value **)** - :ref:`int` **get_amount** **(** **)** -单个发射周期内发射的粒子数。 +一个发射周期内发射的粒子数。有效发射速率为每秒 ``(amount * amount_ratio) / lifetime`` 个粒子。较高的值会增加 GPU 要求,即使在给定时间并非所有粒子都可见或 :ref:`amount_ratio` 减少。 + +\ **注意:**\ 更改该值将导致粒子系统重新启动。为了避免这种情况,请更改 :ref:`amount_ratio`\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_GPUParticles2D_property_amount_ratio: + +.. rst-class:: classref-property + +:ref:`float` **amount_ratio** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_amount_ratio** **(** :ref:`float` value **)** +- :ref:`float` **get_amount_ratio** **(** **)** + +实际应该发射的粒子的比率。如果被设置为低于 ``1.0`` 的值,则会将整个生命周期内发射的粒子数量设置为 ``amount * amount_ratio``\ 。与更改 :ref:`amount` 不同,发射时更改 :ref:`amount_ratio` 不会影响已发射的粒子,也不会导致粒子系统重新启动。\ :ref:`amount_ratio` 可用于创建使发射粒子的数量随时间变化的效果。 + +\ **注意:**\ 减少 :ref:`amount_ratio` 不会带来性能优势,因为无论 :ref:`amount_ratio` 是多少,都需要为粒子总数 :ref:`amount` 分配和处理资源。如果你不打算在粒子发射时更改发射的粒子数量,请确保将 :ref:`amount_ratio` 设置为 ``1`` 并根据你的喜好更改 :ref:`amount`\ 。 .. rst-class:: classref-item-separator @@ -253,7 +278,9 @@ Property Descriptions - void **set_collision_base_size** **(** :ref:`float` value **)** - :ref:`float` **get_collision_base_size** **(** **)** -粒子碰撞半径的乘数。 ``1.0``\ 对应精灵的大小。 +粒子碰撞半径的乘数。\ ``1.0`` 对应于该精灵的大小。如果碰撞时粒子似乎沉入地下,请增加该值。如果粒子在碰撞时出现漂浮,请减小该值。仅当 :ref:`ParticleProcessMaterial.collision_mode` 为 :ref:`ParticleProcessMaterial.COLLISION_RIGID` 或 :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT` 时有效。 + +\ **注意:**\ 粒子始终具有球形碰撞形状。 .. rst-class:: classref-item-separator @@ -287,7 +314,7 @@ Property Descriptions - void **set_emitting** **(** :ref:`bool` value **)** - :ref:`bool` **is_emitting** **(** **)** -If ``true``, particles are being emitted. :ref:`emitting` can be used to start and stop particles from emitting. However, if :ref:`one_shot` is ``true`` setting :ref:`emitting` to ``true`` will not restart the emission cycle until after all active particles finish processing. You can use the :ref:`finished` signal to be notified once all active particles finish processing. +如果为 ``true``\ ,则正在发射粒子。\ :ref:`emitting` 可用于启动和停止粒子发射。但是,如果 :ref:`one_shot` 为 ``true``\ ,则将 :ref:`emitting` 设置为 ``true`` 将不会重新启动该发射循环,直到所有活动粒子完成处理为止。一旦所有活动粒子完成处理,你可以使用 :ref:`finished` 信号来收取通知。 .. rst-class:: classref-item-separator @@ -344,6 +371,25 @@ If ``true``, particles are being emitted. :ref:`emitting` **interp_to_end** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_interp_to_end** **(** :ref:`float` value **)** +- :ref:`float` **get_interp_to_end** **(** **)** + +导致该节点中的所有粒子插值到其生命周期结束时。 + +\ **注意:**\ 这仅在与 :ref:`ParticleProcessMaterial` 一起使用时才有效。对于自定义进程着色器,需要手动实现。 + +.. rst-class:: classref-item-separator + +---- + .. _class_GPUParticles2D_property_interpolate: .. rst-class:: classref-property @@ -372,7 +418,7 @@ If ``true``, particles are being emitted. :ref:`emitting` value **)** - :ref:`float` **get_lifetime** **(** **)** -每个粒子存在的时间。 +每个粒子存在的时间(以秒为单位)。有效发射速率为每秒 ``(amount * amount_ratio) / lifetime`` 个粒子。 .. rst-class:: classref-item-separator @@ -491,7 +537,9 @@ If ``true``, particles are being emitted. :ref:`emitting` value **)** - :ref:`NodePath` **get_sub_emitter** **(** **)** -到用于子发射的 **GPUParticles2D** 的 :ref:`NodePath`\ 。 +到将被用作子发射器(请参阅 :ref:`ParticleProcessMaterial.sub_emitter_mode`\ )的另一个 **GPUParticles2D** 节点的路径。子发射器可被用于实现烟花、碰撞火花、气泡弹出水滴等效果。 + +\ **注意:**\ 当 :ref:`sub_emitter` 被设置时,该目标 **GPUParticles2D** 节点将不再自行发射粒子。 .. rst-class:: classref-item-separator @@ -508,7 +556,9 @@ If ``true``, particles are being emitted. :ref:`emitting` value **)** - :ref:`Texture2D` **get_texture** **(** **)** -粒子纹理。如果为 ``null``\ ,则粒子将为正方形。 +粒子纹理。如果为 ``null``\ ,则粒子将是大小为 1×1 像素的正方形。 + +\ **注意:**\ 要使用翻页纹理,请将新的 :ref:`CanvasItemMaterial` 分配给 **GPUParticles2D** 的 :ref:`CanvasItem.material` 属性,然后启用 :ref:`CanvasItemMaterial.particles_animation` 并设置 :ref:`CanvasItemMaterial.particles_anim_h_frames`\ 、\ :ref:`CanvasItemMaterial.particles_anim_v_frames`\ 、和 :ref:`CanvasItemMaterial.particles_anim_loop` 来匹配该翻页纹理。 .. rst-class:: classref-item-separator @@ -605,8 +655,8 @@ If ``true``, particles are being emitted. :ref:`emitting` **capture_rect** **(** **)** |const| -Returns a rectangle containing the positions of all existing particles. +返回一个包含所有已有粒子位置的矩形。 -\ **Note:** When using threaded rendering this method synchronizes the rendering thread. Calling it often may have a negative impact on performance. +\ **注意:**\ 当使用线程渲染时,该方法会同步渲染线程。经常调用它可能会对性能产生负面影响。 .. rst-class:: classref-item-separator @@ -628,7 +678,7 @@ Returns a rectangle containing the positions of all existing particles. void **convert_from_particles** **(** :ref:`Node` particles **)** -Sets this node's properties to match a given :ref:`CPUParticles2D` node. +设置该节点的属性以匹配给定的 :ref:`CPUParticles2D` 节点。 .. rst-class:: classref-item-separator @@ -654,10 +704,10 @@ void **restart** **(** **)** 重新启动所有现有的粒子。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gpuparticles3d.rst b/classes/zh_CN/class_gpuparticles3d.rst index 9d196751a1..cadbef1363 100644 --- a/classes/zh_CN/class_gpuparticles3d.rst +++ b/classes/zh_CN/class_gpuparticles3d.rst @@ -10,23 +10,23 @@ GPUParticles3D ============== -**Inherits:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A 3D particle emitter. +3D 粒子发射器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -3D粒子节点,用于创建各种粒子系统和效果。\ **GPUParticles3D**\ 的特点是,发射器以给定的速度产生一定数量的粒子。 +3D 粒子节点,用于创建各种粒子系统和效果。\ **GPUParticles3D** 的特点是,发射器以给定的速度产生一定数量的粒子。 -使用\ ``process_material`` 属性来添加一个配置粒子外观和行为的\ :ref:`ParticleProcessMaterial`\ 。或者,你可以添加一个应用于所有粒子的\ :ref:`ShaderMaterial`\ 。 +使用 :ref:`process_material` 属性来添加一个配置粒子外观和行为的 :ref:`ParticleProcessMaterial`\ 。或者,你可以添加一个应用于所有粒子的 :ref:`ShaderMaterial`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`粒子系统(3D) <../tutorials/3d/particles/index>` @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,6 +45,8 @@ Properties +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ | :ref:`int` | :ref:`amount` | ``8`` | +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`float` | :ref:`amount_ratio` | ``1.0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ | :ref:`float` | :ref:`collision_base_size` | ``0.01`` | +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ | :ref:`DrawOrder` | :ref:`draw_order` | ``0`` | @@ -69,6 +71,8 @@ Properties +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ | :ref:`bool` | :ref:`fract_delta` | ``true`` | +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ + | :ref:`float` | :ref:`interp_to_end` | ``0.0`` | + +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ | :ref:`bool` | :ref:`interpolate` | ``true`` | +-----------------------------------------------------------+-------------------------------------------------------------------------------+-------------------------------+ | :ref:`float` | :ref:`lifetime` | ``1.0`` | @@ -98,8 +102,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -124,8 +128,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_GPUParticles3D_signal_finished: @@ -133,9 +137,9 @@ Signals **finished** **(** **)** -Emitted when all active particles have finished processing. When :ref:`one_shot` is disabled, particles will process continuously, so this is never emitted. +当所有活动粒子完成处理时发出。当 :ref:`one_shot` 被禁用时,粒子将连续处理,因此它永远不会发出。 -\ **Note:** Due to the particles being computed on the GPU there might be a delay before the signal gets emitted. +\ **注意:**\ 由于粒子是在 GPU 上计算的,因此在该信号发出之前可能会有延迟。 .. rst-class:: classref-section-separator @@ -143,8 +147,8 @@ Emitted when all active particles have finished processing. When :ref:`one_shot< .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_GPUParticles3D_DrawOrder: @@ -166,7 +170,7 @@ enum **DrawOrder**: :ref:`DrawOrder` **DRAW_ORDER_LIFETIME** = ``1`` -粒子按剩余寿命的顺序绘制。 +粒子按照剩余寿命的顺序绘制。换句话说,寿命最长的粒子被绘制在前面。 .. _class_GPUParticles3D_constant_DRAW_ORDER_REVERSE_LIFETIME: @@ -174,7 +178,7 @@ enum **DrawOrder**: :ref:`DrawOrder` **DRAW_ORDER_REVERSE_LIFETIME** = ``2`` - +粒子按照剩余寿命的相反顺序绘制。换句话说,寿命最短的粒子被绘制在前面。 .. _class_GPUParticles3D_constant_DRAW_ORDER_VIEW_DEPTH: @@ -282,8 +286,8 @@ enum **TransformAlign**: .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_GPUParticles3D_constant_MAX_DRAW_PASSES: @@ -299,8 +303,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GPUParticles3D_property_amount: @@ -313,7 +317,28 @@ Property Descriptions - void **set_amount** **(** :ref:`int` value **)** - :ref:`int` **get_amount** **(** **)** -要发射的粒子数。 +一个发射周期内发射的粒子数。有效发射速率为每秒 ``(amount * amount_ratio) / lifetime`` 个粒子。较高的值会增加 GPU 要求,即使在给定时间并非所有粒子都可见或 :ref:`amount_ratio` 减少。 + +\ **注意:**\ 更改该值将导致粒子系统重新启动。为了避免这种情况,请更改 :ref:`amount_ratio`\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_GPUParticles3D_property_amount_ratio: + +.. rst-class:: classref-property + +:ref:`float` **amount_ratio** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_amount_ratio** **(** :ref:`float` value **)** +- :ref:`float` **get_amount_ratio** **(** **)** + +实际应该发射的粒子的比率。如果被设置为低于 ``1.0`` 的值,则会将整个生命周期内发射的粒子数量设置为 ``amount * amount_ratio``\ 。与更改 :ref:`amount` 不同,发射时更改 :ref:`amount_ratio` 不会影响已发射的粒子,也不会导致粒子系统重新启动。\ :ref:`amount_ratio` 可用于创建使发射粒子的数量随时间变化的效果。 + +\ **注意:**\ 减少 :ref:`amount_ratio` 不会带来性能优势,因为无论 :ref:`amount_ratio` 是多少,都需要为粒子总数 :ref:`amount` 分配和处理资源。如果你不打算在粒子发射时更改发射的粒子数量,请确保将 :ref:`amount_ratio` 设置为 ``1`` 并根据你的喜好更改 :ref:`amount`\ 。 .. rst-class:: classref-item-separator @@ -330,9 +355,9 @@ Property Descriptions - void **set_collision_base_size** **(** :ref:`float` value **)** - :ref:`float` **get_collision_base_size** **(** **)** -.. container:: contribute +粒子碰撞的基本直径(以米为单位)。如果碰撞时粒子似乎沉入地下,请增加该值。如果粒子在碰撞时出现漂浮,请减小该值。仅当 :ref:`ParticleProcessMaterial.collision_mode` 为 :ref:`ParticleProcessMaterial.COLLISION_RIGID` 或 :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT` 时有效。 - There is currently no description for this property. Please help us by :ref:`contributing one `! +\ **注意:**\ 粒子始终具有球形碰撞形状。 .. rst-class:: classref-item-separator @@ -349,9 +374,9 @@ Property Descriptions - void **set_draw_order** **(** :ref:`DrawOrder` value **)** - :ref:`DrawOrder` **get_draw_order** **(** **)** -Particle draw order. Uses :ref:`DrawOrder` values. +粒子绘制顺序。使用 :ref:`DrawOrder` 值。 -\ **Note:** :ref:`DRAW_ORDER_INDEX` is the only option that supports motion vectors for effects like TAA. It is suggested to use this draw order if the particles are opaque to fix ghosting artifacts. +\ **注意:**\ :ref:`DRAW_ORDER_INDEX` 是支持 TAA 等效果的运动向量的唯一选项。如果粒子不透明,建议使用该绘制顺序来修复重影伪影。 .. rst-class:: classref-item-separator @@ -455,7 +480,7 @@ Particle draw order. Uses :ref:`DrawOrder` values .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -472,7 +497,7 @@ Particle draw order. Uses :ref:`DrawOrder` values - void **set_emitting** **(** :ref:`bool` value **)** - :ref:`bool` **is_emitting** **(** **)** -If ``true``, particles are being emitted. :ref:`emitting` can be used to start and stop particles from emitting. However, if :ref:`one_shot` is ``true`` setting :ref:`emitting` to ``true`` will not restart the emission cycle until after all active particles finish processing. You can use the :ref:`finished` signal to be notified once all active particles finish processing. +如果为 ``true``\ ,则正在发射粒子。\ :ref:`emitting` 可用于启动和停止粒子发射。但是,如果 :ref:`one_shot` 为 ``true``\ ,则将 :ref:`emitting` 设置为 ``true`` 将不会重新启动该发射循环,直到所有活动粒子完成处理为止。一旦所有活动粒子完成处理,你可以使用 :ref:`finished` 信号来收取通知。 .. rst-class:: classref-item-separator @@ -529,6 +554,25 @@ If ``true``, particles are being emitted. :ref:`emitting` **interp_to_end** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_interp_to_end** **(** :ref:`float` value **)** +- :ref:`float` **get_interp_to_end** **(** **)** + +导致该节点中的所有粒子插值到其生命周期结束时。 + +\ **注意:**\ 这仅在与 :ref:`ParticleProcessMaterial` 一起使用时才有效。对于自定义进程着色器,需要手动实现。 + +.. rst-class:: classref-item-separator + +---- + .. _class_GPUParticles3D_property_interpolate: .. rst-class:: classref-property @@ -557,7 +601,7 @@ If ``true``, particles are being emitted. :ref:`emitting` value **)** - :ref:`float` **get_lifetime** **(** **)** -每个粒子存在的时间。 +每个粒子存在的时间(以秒为单位)。有效发射速率为每秒 ``(amount * amount_ratio) / lifetime`` 个粒子。 .. rst-class:: classref-item-separator @@ -591,7 +635,7 @@ If ``true``, particles are being emitted. :ref:`emitting` value **)** - :ref:`bool` **get_one_shot** **(** **)** -如果为 ``true``\ ,将只发出 ``amount`` 数量的粒子。 +如果为 ``true``\ ,将只发出 :ref:`amount` 数量的粒子。 .. rst-class:: classref-item-separator @@ -676,9 +720,9 @@ If ``true``, particles are being emitted. :ref:`emitting` value **)** - :ref:`NodePath` **get_sub_emitter** **(** **)** -.. container:: contribute +到将被用作子发射器(请参阅 :ref:`ParticleProcessMaterial.sub_emitter_mode`\ )的另一个 **GPUParticles3D** 节点的路径。子发射器可被用于实现烟花、碰撞火花、气泡弹出水滴等效果。 - There is currently no description for this property. Please help us by :ref:`contributing one `! +\ **注意:**\ 当 :ref:`sub_emitter` 被设置时,该目标 **GPUParticles3D** 节点将不再自行发射粒子。 .. rst-class:: classref-item-separator @@ -735,7 +779,7 @@ If ``true``, particles are being emitted. :ref:`emitting`! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -752,18 +796,20 @@ If ``true``, particles are being emitted. :ref:`emitting` value **)** - :ref:`AABB` **get_visibility_aabb** **(** **)** -:ref:`AABB` 确定节点的区域,该区域需要在屏幕上可见,才能使粒子系统处于活动状态。 +:ref:`AABB` 确定节点的区域,该区域需要在屏幕上可见,才能使粒子系统处于活动状态。\ :ref:`GeometryInstance3D.extra_cull_margin` 被添加到 AABB 的每个轴上。粒子碰撞和吸引只会发生在该区域内。 如果在节点进入/退出屏幕时,粒子突然出现/消失,则应该增大矩形。\ :ref:`AABB` 可以通过代码,或使用 **粒子 → 生成 AABB** 编辑器工具生成。 +\ **注意:**\ 如果该属性被设置为非默认值,\ :ref:`visibility_aabb` 会被 :ref:`GeometryInstance3D.custom_aabb` 覆盖。 + .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GPUParticles3D_method_capture_aabb: @@ -783,7 +829,7 @@ Method Descriptions void **convert_from_particles** **(** :ref:`Node` particles **)** -Sets this node's properties to match a given :ref:`CPUParticles3D` node. +设置该节点的属性以匹配给定的 :ref:`CPUParticles3D` 节点。 .. rst-class:: classref-item-separator @@ -833,10 +879,10 @@ void **set_draw_pass_mesh** **(** :ref:`int` pass, :ref:`Mesh` 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gpuparticlesattractor3d.rst b/classes/zh_CN/class_gpuparticlesattractor3d.rst index 91a3787fcc..074d6d9311 100644 --- a/classes/zh_CN/class_gpuparticlesattractor3d.rst +++ b/classes/zh_CN/class_gpuparticlesattractor3d.rst @@ -10,16 +10,16 @@ GPUParticlesAttractor3D ======================= -**Inherits:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`GPUParticlesAttractorBox3D`, :ref:`GPUParticlesAttractorSphere3D`, :ref:`GPUParticlesAttractorVectorField3D` +**派生:** :ref:`GPUParticlesAttractorBox3D`, :ref:`GPUParticlesAttractorSphere3D`, :ref:`GPUParticlesAttractorVectorField3D` -Abstract base class for 3D particle attractors. +3D 粒子吸引器的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 粒子吸引器可以将粒子朝吸引器的原点吸,也可以将粒子推离吸引器的原点。 @@ -31,8 +31,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -53,8 +53,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GPUParticlesAttractor3D_property_attenuation: @@ -124,12 +124,12 @@ Property Descriptions - void **set_strength** **(** :ref:`float` value **)** - :ref:`float` **get_strength** **(** **)** -Adjusts the strength of the attractor. If :ref:`strength` is negative, particles will be pushed in the opposite direction. Particles will be pushed *away* from the attractor's origin if :ref:`directionality` is ``0.0``, or towards local +Z if :ref:`directionality` is greater than ``0.0``. +调整吸引器的强度。如果 :ref:`strength` 为负,则粒子将被反向推动。如果 :ref:`directionality` 为 ``0.0``\ ,则粒子将被推\ *离*\ 吸引器的原点;如果 :ref:`directionality` 大于 ``0.0``\ ,则粒子将被推向局部 +Z。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gpuparticlesattractorbox3d.rst b/classes/zh_CN/class_gpuparticlesattractorbox3d.rst index 2e2f30135b..2a73dd5fbb 100644 --- a/classes/zh_CN/class_gpuparticlesattractorbox3d.rst +++ b/classes/zh_CN/class_gpuparticlesattractorbox3d.rst @@ -10,25 +10,25 @@ GPUParticlesAttractorBox3D ========================== -**Inherits:** :ref:`GPUParticlesAttractor3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`GPUParticlesAttractor3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A box-shaped attractor that influences particles from :ref:`GPUParticles3D` nodes. +影响来自 :ref:`GPUParticles3D` 节点的粒子的盒形吸引器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A box-shaped attractor that influences particles from :ref:`GPUParticles3D` nodes. Can be used to attract particles towards its origin, or to push them away from its origin. +影响来自 :ref:`GPUParticles3D` 节点的粒子的盒形吸引器。可用于将粒子吸引到其原点,或将它们推离其原点。 -Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported. +粒子吸引器是实时工作的,可以在游戏过程中进行移动、旋转、缩放。与碰撞形状不同,吸引器还支持不统一的缩放。 -\ **Note:** Particle attractors only affect :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. +\ **注意:**\ 粒子吸引器只会影响 :ref:`GPUParticles3D`\ ,不影响 :ref:`CPUParticles3D`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GPUParticlesAttractorBox3D_property_size: @@ -59,10 +59,10 @@ Property Descriptions 吸引器盒的尺寸,使用 3D 单位。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gpuparticlesattractorsphere3d.rst b/classes/zh_CN/class_gpuparticlesattractorsphere3d.rst index 81bb862eac..b5e623e06b 100644 --- a/classes/zh_CN/class_gpuparticlesattractorsphere3d.rst +++ b/classes/zh_CN/class_gpuparticlesattractorsphere3d.rst @@ -10,25 +10,25 @@ GPUParticlesAttractorSphere3D ============================= -**Inherits:** :ref:`GPUParticlesAttractor3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`GPUParticlesAttractor3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A spheroid-shaped attractor that influences particles from :ref:`GPUParticles3D` nodes. +影响来自 :ref:`GPUParticles3D` 节点的粒子的球形吸引器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A spheroid-shaped attractor that influences particles from :ref:`GPUParticles3D` nodes. Can be used to attract particles towards its origin, or to push them away from its origin. +影响来自 :ref:`GPUParticles3D` 节点的粒子的球形吸引器。可用于将粒子吸引到其原点,或将它们推离其原点。 -Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported. +粒子吸引器是实时工作的,可以在游戏过程中进行移动、旋转、缩放。与碰撞形状不同,吸引器还支持不统一的缩放。 -\ **Note:** Particle attractors only affect :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. +\ **注意:**\ 粒子吸引器只会影响 :ref:`GPUParticles3D`\ ,不影响 :ref:`CPUParticles3D`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GPUParticlesAttractorSphere3D_property_radius: @@ -61,10 +61,10 @@ Property Descriptions \ **注意:**\ 要得到拉伸椭圆形,可以对 **GPUParticlesAttractorSphere3D** 节点使用非统一缩放。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gpuparticlesattractorvectorfield3d.rst b/classes/zh_CN/class_gpuparticlesattractorvectorfield3d.rst index e368d7305b..ccf280b205 100644 --- a/classes/zh_CN/class_gpuparticlesattractorvectorfield3d.rst +++ b/classes/zh_CN/class_gpuparticlesattractorvectorfield3d.rst @@ -10,27 +10,27 @@ GPUParticlesAttractorVectorField3D ================================== -**Inherits:** :ref:`GPUParticlesAttractor3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`GPUParticlesAttractor3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A box-shaped attractor with varying directions and strengths defined in it that influences particles from :ref:`GPUParticles3D` nodes. +盒形吸引器,其中定义了不同的方向和强度,会影响来自 :ref:`GPUParticles3D` 节点的粒子。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A box-shaped attractor with varying directions and strengths defined in it that influences particles from :ref:`GPUParticles3D` nodes. +盒形吸引器,其中定义了不同的方向和强度,会影响来自 :ref:`GPUParticles3D` 节点的粒子。 -Unlike :ref:`GPUParticlesAttractorBox3D`, **GPUParticlesAttractorVectorField3D** uses a :ref:`texture` to affect attraction strength within the box. This can be used to create complex attraction scenarios where particles travel in different directions depending on their location. This can be useful for weather effects such as sandstorms. +与 :ref:`GPUParticlesAttractorBox3D` 不同,\ **GPUParticlesAttractorVectorField3D** 使用 :ref:`texture` 来影响盒子内的吸引力强度。可用于创建复杂的吸引场景,其中粒子根据其位置向不同方向移动。这对于沙尘暴等天气影响很有用。 -Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported. +粒子吸引器是实时工作的,可以在游戏过程中进行移动、旋转、缩放。与碰撞形状不同,吸引器还支持不统一的缩放。 -\ **Note:** Particle attractors only affect :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. +\ **注意:**\ 粒子吸引器只会影响 :ref:`GPUParticles3D`\ ,不影响 :ref:`CPUParticles3D`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GPUParticlesAttractorVectorField3D_property_size: @@ -82,10 +82,10 @@ Property Descriptions \ **注意:**\ 为了获得更好的性能,3D 纹理的分辨率应该反映该吸引器的 :ref:`size`\ 。由于粒子吸引力通常是低频数据,因此可以将纹理保持在较低分辨率,例如 64×64×64。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gpuparticlescollision3d.rst b/classes/zh_CN/class_gpuparticlescollision3d.rst index 4fbc25c2ba..674421a7a0 100644 --- a/classes/zh_CN/class_gpuparticlescollision3d.rst +++ b/classes/zh_CN/class_gpuparticlescollision3d.rst @@ -10,33 +10,33 @@ GPUParticlesCollision3D ======================= -**Inherits:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`GPUParticlesCollisionBox3D`, :ref:`GPUParticlesCollisionHeightField3D`, :ref:`GPUParticlesCollisionSDF3D`, :ref:`GPUParticlesCollisionSphere3D` +**派生:** :ref:`GPUParticlesCollisionBox3D`, :ref:`GPUParticlesCollisionHeightField3D`, :ref:`GPUParticlesCollisionSDF3D`, :ref:`GPUParticlesCollisionSphere3D` -Abstract base class for 3D particle collision shapes affecting :ref:`GPUParticles3D` nodes. +影响 :ref:`GPUParticles3D` 节点的 3D 粒子碰撞形状的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Particle collision shapes can be used to make particles stop or bounce against them. +粒子碰撞形状可用于使粒子停止或对其反弹。 -Particle collision shapes work in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is *not* supported. +粒子碰撞形状是实时工作的,在游戏过程中可以移动、旋转和缩放。与吸引器不同,碰撞形状的非均匀缩放\ *不*\ 受支持。 -Particle collision shapes can be temporarily disabled by hiding them. +粒子碰撞形状可以通过隐藏而暂时禁用。 -\ **Note:** :ref:`ParticleProcessMaterial.collision_mode` must be :ref:`ParticleProcessMaterial.COLLISION_RIGID` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT` on the :ref:`GPUParticles3D`'s process material for collision to work. +\ **注意:**\ 在 :ref:`GPUParticles3D` 的处理材质上,\ :ref:`ParticleProcessMaterial.collision_mode` 必须是 :ref:`ParticleProcessMaterial.COLLISION_RIGID` 或 :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT`\ ,才能使碰撞生效。 -\ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. +\ **注意:**\ 粒子碰撞只影响 :ref:`GPUParticles3D`\ ,不影响 :ref:`CPUParticles3D`\ 。 -\ **Note:** Particles pushed by a collider that is being moved will not be interpolated, which can result in visible stuttering. This can be alleviated by setting :ref:`GPUParticles3D.fixed_fps` to ``0`` or a value that matches or exceeds the target framerate. +\ **注意:**\ 由正在移动的碰撞器推动的粒子不会被插值,这可能会导致可见的卡顿。这可以通过将 :ref:`GPUParticles3D.fixed_fps` 设置为 ``0`` 或一个符合或超过目标帧速率的值来缓解。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -51,8 +51,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GPUParticlesCollision3D_property_cull_mask: @@ -71,10 +71,10 @@ Property Descriptions 通过在 :ref:`GPUParticles3D` 节点上设置 :ref:`ParticleProcessMaterial.attractor_interaction_enabled`\ ,也可以在每个进程材质的基础上禁用粒子吸引。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gpuparticlescollisionbox3d.rst b/classes/zh_CN/class_gpuparticlescollisionbox3d.rst index 0aac399e09..e929d223bc 100644 --- a/classes/zh_CN/class_gpuparticlescollisionbox3d.rst +++ b/classes/zh_CN/class_gpuparticlescollisionbox3d.rst @@ -10,27 +10,27 @@ GPUParticlesCollisionBox3D ========================== -**Inherits:** :ref:`GPUParticlesCollision3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`GPUParticlesCollision3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A box-shaped 3D particle collision shape affecting :ref:`GPUParticles3D` nodes. +影响 :ref:`GPUParticles3D` 节点的盒形 3D 粒子碰撞形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A box-shaped 3D particle collision shape affecting :ref:`GPUParticles3D` nodes. +影响 :ref:`GPUParticles3D` 节点的盒形 3D 粒子碰撞形状。 -Particle collision shapes work in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is *not* supported. +粒子碰撞形状是实时工作的,可以在游戏过程中进行移动、旋转、缩放。与吸引器不同,碰撞形状的非均匀缩放\ *不*\ 被支持。 -\ **Note:** :ref:`ParticleProcessMaterial.collision_mode` must be :ref:`ParticleProcessMaterial.COLLISION_RIGID` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT` on the :ref:`GPUParticles3D`'s process material for collision to work. +\ **注意:**\ :ref:`GPUParticles3D` 的处理材质上的 :ref:`ParticleProcessMaterial.collision_mode` 必须为 :ref:`ParticleProcessMaterial.COLLISION_RIGID` 或 :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT`\ ,碰撞才能发挥作用。 -\ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. +\ **注意:**\ 粒子碰撞只会影响 :ref:`GPUParticles3D`\ ,不影响 :ref:`CPUParticles3D`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GPUParticlesCollisionBox3D_property_size: @@ -61,10 +61,10 @@ Property Descriptions 碰撞框的范围,使用 3D 单位。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gpuparticlescollisionheightfield3d.rst b/classes/zh_CN/class_gpuparticlescollisionheightfield3d.rst index 49a84ae36e..44348c4f6a 100644 --- a/classes/zh_CN/class_gpuparticlescollisionheightfield3d.rst +++ b/classes/zh_CN/class_gpuparticlescollisionheightfield3d.rst @@ -10,29 +10,29 @@ GPUParticlesCollisionHeightField3D ================================== -**Inherits:** :ref:`GPUParticlesCollision3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`GPUParticlesCollision3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A real-time heightmap-shaped 3D particle collision shape affecting :ref:`GPUParticles3D` nodes. +影响 :ref:`GPUParticles3D` 节点的实时高度图形状 3D 粒子碰撞形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A real-time heightmap-shaped 3D particle collision shape affecting :ref:`GPUParticles3D` nodes. +影响 :ref:`GPUParticles3D` 节点的实时高度图形状的 3D 粒子碰撞形状。 -Heightmap shapes allow for efficiently representing collisions for convex and concave objects with a single "floor" (such as terrain). This is less flexible than :ref:`GPUParticlesCollisionSDF3D`, but it doesn't require a baking step. +高度图形状允许有效地表示凸面和凹面对象与单个“地板”(例如地形)的碰撞。它不如 :ref:`GPUParticlesCollisionSDF3D` 灵活,但不需要烘焙步骤。 -\ **GPUParticlesCollisionHeightField3D** can also be regenerated in real-time when it is moved, when the camera moves, or even continuously. This makes **GPUParticlesCollisionHeightField3D** a good choice for weather effects such as rain and snow and games with highly dynamic geometry. However, this class is limited since heightmaps cannot represent overhangs (e.g. indoors or caves). +也可以在移动时、相机移动时、甚至连续时,实时重新生成 **GPUParticlesCollisionHeightField3D**\ 。这对雨雪等天气效果、以及具有高度动态几何体的游戏来说,\ **GPUParticlesCollisionHeightField3D** 是一个不错的选择。但是,该类有限制,因为高度图无法表示悬垂(例如室内或洞穴)。 -\ **Note:** :ref:`ParticleProcessMaterial.collision_mode` must be ``true`` on the :ref:`GPUParticles3D`'s process material for collision to work. +\ **注意:**\ 在 :ref:`GPUParticles3D` 的处理材质上,\ :ref:`ParticleProcessMaterial.collision_mode` 必须为 ``true``\ ,才能使碰撞生效。 -\ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. +\ **注意:**\ 粒子碰撞只影响 :ref:`GPUParticles3D`\ ,不影响 :ref:`CPUParticles3D`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -53,8 +53,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_GPUParticlesCollisionHeightField3D_Resolution: @@ -150,8 +150,8 @@ enum **UpdateMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GPUParticlesCollisionHeightField3D_property_follow_camera_enabled: @@ -219,10 +219,10 @@ Property Descriptions 生成的高度图的更新策略。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gpuparticlescollisionsdf3d.rst b/classes/zh_CN/class_gpuparticlescollisionsdf3d.rst index dc0700bbaa..5cb24315d0 100644 --- a/classes/zh_CN/class_gpuparticlescollisionsdf3d.rst +++ b/classes/zh_CN/class_gpuparticlescollisionsdf3d.rst @@ -10,31 +10,31 @@ GPUParticlesCollisionSDF3D ========================== -**Inherits:** :ref:`GPUParticlesCollision3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`GPUParticlesCollision3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A baked signed distance field 3D particle collision shape affecting :ref:`GPUParticles3D` nodes. +影响 :ref:`GPUParticles3D` 节点的烘焙的带符号距离场 3D 粒子碰撞形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A baked signed distance field 3D particle collision shape affecting :ref:`GPUParticles3D` nodes. +影响 :ref:`GPUParticles3D` 节点的烘焙的带符号距离场 3D 粒子碰撞形状。 -Signed distance fields (SDF) allow for efficiently representing approximate collision shapes for convex and concave objects of any shape. This is more flexible than :ref:`GPUParticlesCollisionHeightField3D`, but it requires a baking step. +有符号的距离场(SDF)允许有效地表示任何形状的凸面和凹面对象的近似碰撞形状。它比 :ref:`GPUParticlesCollisionHeightField3D` 更灵活,但需要一个烘焙步骤。 -\ **Baking:** The signed distance field texture can be baked by selecting the **GPUParticlesCollisionSDF3D** node in the editor, then clicking **Bake SDF** at the top of the 3D viewport. Any *visible* :ref:`MeshInstance3D`\ s within the :ref:`size` will be taken into account for baking, regardless of their :ref:`GeometryInstance3D.gi_mode`. +\ **烘焙:**\ 可以通过在编辑器中选择 **GPUParticlesCollisionSDF3D** 节点,然后点击 3D 视口顶部的\ **烘焙 SDF**\ ,来烘焙有符号的距离场纹理。\ :ref:`size` 内的任何\ *可见* :ref:`MeshInstance3D`\ ,无论它们的 :ref:`GeometryInstance3D.gi_mode` 如何,都将被考虑用于烘焙。 -\ **Note:** Baking a **GPUParticlesCollisionSDF3D**'s :ref:`texture` is only possible within the editor, as there is no bake method exposed for use in exported projects. However, it's still possible to load pre-baked :ref:`Texture3D`\ s into its :ref:`texture` property in an exported project. +\ **注意:**\ 烘焙 **GPUParticlesCollisionSDF3D** 的 :ref:`texture` 只能在编辑器中进行,因为没有公开的烘焙方法可用于导出的游戏项目中。但是,在导出的游戏项目中,仍然可以将预先烘焙的 :ref:`Texture3D` 加载到 :ref:`texture` 属性中。 -\ **Note:** :ref:`ParticleProcessMaterial.collision_mode` must be :ref:`ParticleProcessMaterial.COLLISION_RIGID` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT` on the :ref:`GPUParticles3D`'s process material for collision to work. +\ **注意:**\ 在 :ref:`GPUParticles3D` 的处理材质上,\ :ref:`ParticleProcessMaterial.collision_mode` 必须是 :ref:`ParticleProcessMaterial.COLLISION_RIGID` 或 :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT`\ ,才能使碰撞生效。 -\ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. +\ **注意:**\ 粒子碰撞只影响 :ref:`GPUParticles3D`\ ,不影响 :ref:`CPUParticles3D`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -53,8 +53,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -71,8 +71,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_GPUParticlesCollisionSDF3D_Resolution: @@ -142,8 +142,8 @@ enum **Resolution**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GPUParticlesCollisionSDF3D_property_bake_mask: @@ -232,8 +232,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GPUParticlesCollisionSDF3D_method_get_bake_mask_value: @@ -255,10 +255,10 @@ void **set_bake_mask_value** **(** :ref:`int` layer_number, :ref:`boo 基于 ``value``\ ,启用或禁用 :ref:`bake_mask` 中的指定层,该层由给定的一个介于 1 和 32 之间的 ``layer_number`` 指定。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gpuparticlescollisionsphere3d.rst b/classes/zh_CN/class_gpuparticlescollisionsphere3d.rst index 998f999922..f8ecd1bd94 100644 --- a/classes/zh_CN/class_gpuparticlescollisionsphere3d.rst +++ b/classes/zh_CN/class_gpuparticlescollisionsphere3d.rst @@ -10,27 +10,27 @@ GPUParticlesCollisionSphere3D ============================= -**Inherits:** :ref:`GPUParticlesCollision3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`GPUParticlesCollision3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -A sphere-shaped 3D particle collision shape affecting :ref:`GPUParticles3D` nodes. +影响 :ref:`GPUParticles3D` 节点的球形 3D 粒子碰撞形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A sphere-shaped 3D particle collision shape affecting :ref:`GPUParticles3D` nodes. +影响 :ref:`GPUParticles3D` 节点的球形 3D 粒子碰撞形状。 -Particle collision shapes work in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is *not* supported. +粒子碰撞形状是实时工作的,可以在游戏过程中进行移动、旋转、缩放。与吸引器不同,碰撞形状的非均匀缩放\ *不*\ 被支持。 -\ **Note:** :ref:`ParticleProcessMaterial.collision_mode` must be :ref:`ParticleProcessMaterial.COLLISION_RIGID` or :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT` on the :ref:`GPUParticles3D`'s process material for collision to work. +\ **注意:**\ :ref:`GPUParticles3D` 的处理材质上的 :ref:`ParticleProcessMaterial.collision_mode` 必须为 :ref:`ParticleProcessMaterial.COLLISION_RIGID` 或 :ref:`ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT`\ ,碰撞才能发挥作用。 -\ **Note:** Particle collision only affects :ref:`GPUParticles3D`, not :ref:`CPUParticles3D`. +\ **注意:**\ 粒子碰撞只会影响 :ref:`GPUParticles3D`\ ,不影响 :ref:`CPUParticles3D`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GPUParticlesCollisionSphere3D_property_radius: @@ -61,10 +61,10 @@ Property Descriptions 碰撞球的半径,以 3D 单位表示。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gradient.rst b/classes/zh_CN/class_gradient.rst index 9cfa7656e4..7b0ff3f036 100644 --- a/classes/zh_CN/class_gradient.rst +++ b/classes/zh_CN/class_gradient.rst @@ -10,23 +10,23 @@ Gradient ======== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A color transition. +颜色过渡。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This resource describes a color transition by defining a set of colored points and how to interpolate between them. +该资源通过定义一组彩色点以及如何在它们之间进行插值来描述颜色过渡。 -See also :ref:`Curve` which supports more complex easing methods, but does not support colors. +另见 :ref:`Curve`\ ,它支持更复杂的缓动方法,但不支持颜色。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -75,8 +75,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Gradient_InterpolationMode: @@ -148,8 +148,8 @@ sRGB 色彩空间。 .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Gradient_property_colors: @@ -227,8 +227,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Gradient_method_add_point: @@ -236,7 +236,7 @@ Method Descriptions void **add_point** **(** :ref:`float` offset, :ref:`Color` color **)** -Adds the specified color to the gradient, with the specified offset. +使用指定的偏移,将指定的颜色添加到该渐变中。 .. rst-class:: classref-item-separator @@ -284,7 +284,7 @@ Adds the specified color to the gradient, with the specified offset. void **remove_point** **(** :ref:`int` point **)** -Removes the color at index ``point``. +移除索引 ``point`` 处的颜色。 .. rst-class:: classref-item-separator @@ -336,10 +336,10 @@ void **set_offset** **(** :ref:`int` point, :ref:`float` 设置渐变色在索引 ``point`` 处的偏移。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gradienttexture1d.rst b/classes/zh_CN/class_gradienttexture1d.rst index f3e2bdd9c6..85f13003bd 100644 --- a/classes/zh_CN/class_gradienttexture1d.rst +++ b/classes/zh_CN/class_gradienttexture1d.rst @@ -10,21 +10,21 @@ GradientTexture1D ================= -**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A 1D texture that uses colors obtained from a :ref:`Gradient`. +使用从 :ref:`Gradient` 获得的颜色的一维纹理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A 1D texture that obtains colors from a :ref:`Gradient` to fill the texture data. The texture is filled by sampling the gradient for each pixel. Therefore, the texture does not necessarily represent an exact copy of the gradient, as it may miss some colors if there are not enough pixels. See also :ref:`GradientTexture2D`, :ref:`CurveTexture` and :ref:`CurveXYZTexture`. +从 :ref:`Gradient` 获取颜色来填充纹理数据的一维纹理。通过为每个像素采样渐变来填充纹理。因此,该纹理不一定代表渐变的精确副本,因为如果没有足够的像素,它可能会丢失一些颜色。另见 :ref:`GradientTexture2D`\ 、\ :ref:`CurveTexture` 和 :ref:`CurveXYZTexture`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GradientTexture1D_property_gradient: @@ -95,10 +95,10 @@ Property Descriptions 将从 :ref:`Gradient` 中获得的颜色样本的数量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gradienttexture2d.rst b/classes/zh_CN/class_gradienttexture2d.rst index 322e9c536a..e4026e7168 100644 --- a/classes/zh_CN/class_gradienttexture2d.rst +++ b/classes/zh_CN/class_gradienttexture2d.rst @@ -10,21 +10,21 @@ GradientTexture2D ================= -**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A 2D texture that creates a pattern with colors obtained from a :ref:`Gradient`. +使用从 :ref:`Gradient` 获得的颜色创建图案的 2D 纹理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A 2D texture that obtains colors from a :ref:`Gradient` to fill the texture data. This texture is able to transform a color transition into different patterns such as a linear or a radial gradient. The gradient is sampled individually for each pixel so it does not necessarily represent an exact copy of the gradient(see :ref:`width` and :ref:`height`). See also :ref:`GradientTexture1D`, :ref:`CurveTexture` and :ref:`CurveXYZTexture`. +2D纹理,从一个 :ref:`Gradient` 中获取颜色来填充纹理数据。该纹理能够将颜色过渡转换为不同的图案,例如线性或径向渐变。渐变是针对每个像素单独采样的,因此它不一定代表渐变的精确副本(请参阅 :ref:`width` 和 :ref:`height`\ )。另见 :ref:`GradientTexture1D`\ 、\ :ref:`CurveTexture` 和 :ref:`CurveXYZTexture`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_GradientTexture2D_Fill: @@ -128,8 +128,8 @@ enum **Repeat**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GradientTexture2D_property_fill: @@ -263,10 +263,10 @@ Property Descriptions 从 :ref:`Gradient` 上获取的水平颜色采样数,也表示纹理的宽度。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_graphedit.rst b/classes/zh_CN/class_graphedit.rst index 3084cd01aa..db928f9649 100644 --- a/classes/zh_CN/class_graphedit.rst +++ b/classes/zh_CN/class_graphedit.rst @@ -10,31 +10,29 @@ GraphEdit ========= -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 图结构编辑器,使用 :ref:`GraphNode`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **GraphEdit** 提供了用于对各种图进行创建、操作、显示的工具。它在引擎中的主要目的是驱动可视化编程系统,例如可视化着色器,但也可以在用户项目中使用。 -\ **GraphEdit** 本身只是一个空容器,表示一个可以放置 :ref:`GraphNode` 的无限栅格。每个 :ref:`GraphNode` 代表图中的一个节点,是连接方案中的单个数据单元。而 **GraphEdit** 则有助于控制节点和节点之间的各种交互。当用户尝试连接、断开或关闭 :ref:`GraphNode` 时,\ **GraphEdit** 中会发出对应的信号,但默认情况下不执行任何动作。使用此控件的程序员负责实现必要的逻辑,来确定应如何处理每个请求。 +\ **GraphEdit** 本身只是一个空容器,表示一个可以放置 :ref:`GraphNode` 的无限栅格。每个 :ref:`GraphNode` 代表图中的一个节点,是连接方案中的单个数据单元。而 **GraphEdit** 则有助于控制节点和节点之间的各种交互。当用户尝试连接、断开或删除一个 :ref:`GraphNode` 时,\ **GraphEdit** 中会发出对应的信号,但默认情况下不执行任何动作。使用此控件的程序员负责实现必要的逻辑,来确定应如何处理每个请求。 \ **性能:**\ 强烈建议在使用 GraphEdit 时启用低处理器使用模式(见 :ref:`OS.low_processor_usage_mode`\ )。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto - +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`arrange_nodes_button_hidden` | ``false`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | clip_contents | ``true`` (overrides :ref:`Control`) | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ @@ -58,8 +56,18 @@ Properties +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`scroll_offset` | ``Vector2(0, 0)`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`show_arrange_button` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`show_grid` | ``true`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`show_grid_buttons` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`show_menu` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`show_minimap_button` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`show_zoom_buttons` | ``true`` | + +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`bool` | :ref:`show_zoom_label` | ``false`` | +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+ | :ref:`int` | :ref:`snapping_distance` | ``20`` | @@ -77,20 +85,20 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`_get_connection_line` **(** :ref:`Vector2` from_position, :ref:`Vector2` to_position **)** |virtual| |const| | + | :ref:`PackedVector2Array` | :ref:`_get_connection_line` **(** :ref:`Vector2` from_position, :ref:`Vector2` to_position **)** |virtual| |const| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_in_input_hotzone` **(** :ref:`Object` in_node, :ref:`int` in_port, :ref:`Vector2` mouse_position **)** |virtual| | + | :ref:`bool` | :ref:`_is_in_input_hotzone` **(** :ref:`Object` in_node, :ref:`int` in_port, :ref:`Vector2` mouse_position **)** |virtual| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_in_output_hotzone` **(** :ref:`Object` in_node, :ref:`int` in_port, :ref:`Vector2` mouse_position **)** |virtual| | + | :ref:`bool` | :ref:`_is_in_output_hotzone` **(** :ref:`Object` in_node, :ref:`int` in_port, :ref:`Vector2` mouse_position **)** |virtual| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_node_hover_valid` **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** |virtual| | + | :ref:`bool` | :ref:`_is_node_hover_valid` **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port **)** |virtual| | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_valid_connection_type` **(** :ref:`int` from_type, :ref:`int` to_type **)** | +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -131,8 +139,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -166,6 +174,8 @@ Theme Properties +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ | :ref:`Texture2D` | :ref:`zoom_reset` | | +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ + | :ref:`StyleBox` | :ref:`menu_panel` | | + +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ | :ref:`StyleBox` | :ref:`panel` | | +-----------------------------------+--------------------------------------------------------------------------------------------+--------------------------+ @@ -175,8 +185,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_GraphEdit_signal_begin_node_move: @@ -190,18 +200,6 @@ Signals ---- -.. _class_GraphEdit_signal_close_nodes_request: - -.. rst-class:: classref-signal - -**close_nodes_request** **(** :ref:`StringName[]` nodes **)** - -Emitted when attempting to remove a GraphNode from the GraphEdit. Provides a list of node names to be removed (all selected nodes, excluding nodes without closing button). - -.. rst-class:: classref-item-separator - ----- - .. _class_GraphEdit_signal_connection_drag_ended: .. rst-class:: classref-signal @@ -274,6 +272,18 @@ Emitted when attempting to remove a GraphNode from the GraphEdit. Provides a lis ---- +.. _class_GraphEdit_signal_delete_nodes_request: + +.. rst-class:: classref-signal + +**delete_nodes_request** **(** :ref:`StringName[]` nodes **)** + +当尝试从该 GraphEdit 中移除一个 GraphNode 时触发。提供要移除的节点名称列表(所有选中的节点,除去不包含关闭按钮的节点)。 + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphEdit_signal_disconnection_request: .. rst-class:: classref-signal @@ -318,7 +328,7 @@ Emitted when attempting to remove a GraphNode from the GraphEdit. Provides a lis .. container:: contribute - There is currently no description for this signal. Please help us by :ref:`contributing one `! + 目前没有这个信号的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -374,8 +384,8 @@ Emitted when attempting to remove a GraphNode from the GraphEdit. Provides a lis .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_GraphEdit_PanningScheme: @@ -405,25 +415,8 @@ enum **PanningScheme**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- - -.. _class_GraphEdit_property_arrange_nodes_button_hidden: - -.. rst-class:: classref-property - -:ref:`bool` **arrange_nodes_button_hidden** = ``false`` - -.. rst-class:: classref-property-setget - -- void **set_arrange_nodes_button_hidden** **(** :ref:`bool` value **)** -- :ref:`bool` **is_arrange_nodes_button_hidden** **(** **)** - -如果为 ``true``\ ,则隐藏排列节点按钮。 - -.. rst-class:: classref-item-separator - ----- +属性说明 +-------- .. _class_GraphEdit_property_connection_lines_antialiased: @@ -578,6 +571,23 @@ Property Descriptions ---- +.. _class_GraphEdit_property_show_arrange_button: + +.. rst-class:: classref-property + +:ref:`bool` **show_arrange_button** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_show_arrange_button** **(** :ref:`bool` value **)** +- :ref:`bool` **is_showing_arrange_button** **(** **)** + +如果为 ``true``\ ,则自动排列图形节点的按钮可见。 + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphEdit_property_show_grid: .. rst-class:: classref-property @@ -589,7 +599,75 @@ Property Descriptions - void **set_show_grid** **(** :ref:`bool` value **)** - :ref:`bool` **is_showing_grid** **(** **)** -If ``true``, the grid is visible. +如果为 ``true``\ ,则该网格可见。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_property_show_grid_buttons: + +.. rst-class:: classref-property + +:ref:`bool` **show_grid_buttons** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_show_grid_buttons** **(** :ref:`bool` value **)** +- :ref:`bool` **is_showing_grid_buttons** **(** **)** + +如果为 ``true``\ ,则允许配置栅格和吸附选项的按钮可见。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_property_show_menu: + +.. rst-class:: classref-property + +:ref:`bool` **show_menu** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_show_menu** **(** :ref:`bool` value **)** +- :ref:`bool` **is_showing_menu** **(** **)** + +如果为 ``true``\ ,则菜单栏可见。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_property_show_minimap_button: + +.. rst-class:: classref-property + +:ref:`bool` **show_minimap_button** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_show_minimap_button** **(** :ref:`bool` value **)** +- :ref:`bool` **is_showing_minimap_button** **(** **)** + +如果为 ``true``\ ,则切换小地图的按钮可见。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_GraphEdit_property_show_zoom_buttons: + +.. rst-class:: classref-property + +:ref:`bool` **show_zoom_buttons** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_show_zoom_buttons** **(** :ref:`bool` value **)** +- :ref:`bool` **is_showing_zoom_buttons** **(** **)** + +如果为 ``true``\ ,则允许更改和重置缩放级别的按钮可见。 .. rst-class:: classref-item-separator @@ -606,7 +684,7 @@ If ``true``, the grid is visible. - void **set_show_zoom_label** **(** :ref:`bool` value **)** - :ref:`bool` **is_showing_zoom_label** **(** **)** -如果为 ``true``\ ,则使当前缩放级别的标签可见。缩放值以百分比显示。 +如果为 ``true``\ ,则使带有当前缩放级别的标签可见。缩放级别以百分比显示。 .. rst-class:: classref-item-separator @@ -623,7 +701,7 @@ If ``true``, the grid is visible. - void **set_snapping_distance** **(** :ref:`int` value **)** - :ref:`int` **get_snapping_distance** **(** **)** -The snapping distance in pixels, also determines the grid line distance. +吸附距离,单位为像素,也决定了栅格线距离。 .. rst-class:: classref-item-separator @@ -716,10 +794,10 @@ The snapping distance in pixels, also determines the grid line distance. .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_GraphEdit_method__get_connection_line: +.. _class_GraphEdit_private_method__get_connection_line: .. rst-class:: classref-method @@ -731,17 +809,17 @@ Method Descriptions ---- -.. _class_GraphEdit_method__is_in_input_hotzone: +.. _class_GraphEdit_private_method__is_in_input_hotzone: .. rst-class:: classref-method :ref:`bool` **_is_in_input_hotzone** **(** :ref:`Object` in_node, :ref:`int` in_port, :ref:`Vector2` mouse_position **)** |virtual| -Returns whether the ``mouse_position`` is in the input hot zone. +返回 ``mouse_position`` 是否在输入热区。 -By default, a hot zone is a :ref:`Rect2` positioned such that its center is at ``in_node``.\ :ref:`GraphNode.get_input_port_position`\ (``in_port``) (For output's case, call :ref:`GraphNode.get_output_port_position` instead). The hot zone's width is twice the Theme Property ``port_grab_distance_horizontal``, and its height is twice the ``port_grab_distance_vertical``. +默认情况下,热区是一个 :ref:`Rect2`\ ,其中心位于 ``in_node``.\ :ref:`GraphNode.get_input_port_position`\ (``in_port``)(对于输出的情况,请改为调用 :ref:`GraphNode.get_output_port_position`\ )。热区的宽度是主题属性 ``port_grab_distance_horizontal`` 的两倍,高度是 ``port_grab_distance_vertical`` 的两倍。 -Below is a sample code to help get started: +下面是一个示例代码,以帮助入门: :: @@ -756,15 +834,15 @@ Below is a sample code to help get started: ---- -.. _class_GraphEdit_method__is_in_output_hotzone: +.. _class_GraphEdit_private_method__is_in_output_hotzone: .. rst-class:: classref-method :ref:`bool` **_is_in_output_hotzone** **(** :ref:`Object` in_node, :ref:`int` in_port, :ref:`Vector2` mouse_position **)** |virtual| -Returns whether the ``mouse_position`` is in the output hot zone. For more information on hot zones, see :ref:`_is_in_input_hotzone`. +返回 ``mouse_position`` 是否在输出热区。有关热区的更多信息,请参阅 :ref:`_is_in_input_hotzone`\ 。 -Below is a sample code to help get started: +下面是一个示例代码,以帮助入门: :: @@ -779,7 +857,7 @@ Below is a sample code to help get started: ---- -.. _class_GraphEdit_method__is_node_hover_valid: +.. _class_GraphEdit_private_method__is_node_hover_valid: .. rst-class:: classref-method @@ -1022,7 +1100,7 @@ void **remove_valid_right_disconnect_type** **(** :ref:`int` type **) void **set_connection_activity** **(** :ref:`StringName` from_node, :ref:`int` from_port, :ref:`StringName` to_node, :ref:`int` to_port, :ref:`float` amount **)** -使用 :ref:`activity` 主题属性中提供的颜色,设置 ``from_node`` 的 ``from_port`` 和 ``to_node`` 的 ``to_port`` 之间的连接的颜色。 +使用 :ref:`activity` 主题属性中提供的颜色,设置 ``from_node`` 的 ``from_port`` 和 ``to_node`` 的 ``to_port`` 之间的连接的颜色。使用 ``amount`` 作为权重,在连接颜色和活动颜色之间线性插值颜色。 .. rst-class:: classref-item-separator @@ -1042,8 +1120,8 @@ void **set_selected** **(** :ref:`Node` node **)** .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_GraphEdit_theme_color_activity: @@ -1051,9 +1129,7 @@ Theme Property Descriptions :ref:`Color` **activity** = ``Color(1, 1, 1, 1)`` -.. container:: contribute - - There is currently no description for this theme property. Please help us by :ref:`contributing one `! +该连接活动的颜色(请参阅 :ref:`set_connection_activity`\ )。 .. rst-class:: classref-item-separator @@ -1137,7 +1213,7 @@ Theme Property Descriptions :ref:`Texture2D` **grid_toggle** -The icon for the grid toggle button. +网格开关按钮的图标。 .. rst-class:: classref-item-separator @@ -1149,7 +1225,7 @@ The icon for the grid toggle button. :ref:`Texture2D` **layout** -The icon for the layout button for auto-arranging the graph. +用于自动排列图形的布局按钮的图标。 .. rst-class:: classref-item-separator @@ -1161,7 +1237,7 @@ The icon for the layout button for auto-arranging the graph. :ref:`Texture2D` **minimap_toggle** -The icon for the minimap toggle button. +小地图开关按钮的图标。 .. rst-class:: classref-item-separator @@ -1173,7 +1249,7 @@ The icon for the minimap toggle button. :ref:`Texture2D` **snapping_toggle** -The icon for the snapping toggle button. +吸附开关按钮的图标。 .. rst-class:: classref-item-separator @@ -1215,6 +1291,20 @@ The icon for the snapping toggle button. ---- +.. _class_GraphEdit_theme_style_menu_panel: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **menu_panel** + +.. container:: contribute + + 目前没有这个主题属性的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-item-separator + +---- + .. _class_GraphEdit_theme_style_panel: .. rst-class:: classref-themeproperty @@ -1223,10 +1313,10 @@ The icon for the snapping toggle button. 绘制在栅格下方的背景。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_graphelement.rst b/classes/zh_CN/class_graphelement.rst index daab4e99ba..0d2487c270 100644 --- a/classes/zh_CN/class_graphelement.rst +++ b/classes/zh_CN/class_graphelement.rst @@ -10,23 +10,23 @@ GraphElement ============ -**Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`GraphNode` +**派生:** :ref:`GraphNode` -A container that represents a basic element that can be placed inside a :ref:`GraphEdit` control. +表示可以放置在 :ref:`GraphEdit` 控件内的基本元素的容器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**GraphElement** allows to create custom elements for a :ref:`GraphEdit` graph. By default such elements can be selected, resized, and repositioned, but they cannot be connected. For a graph element that allows for connections see :ref:`GraphNode`. +**GraphElement** 允许为 :ref:`GraphEdit` 图表创建自定义元素。默认情况下,可以此类元素可以被选择、调整大小、和重新定位,但它们无法被连接。对于允许连接的图形元素,请参阅 :ref:`GraphNode`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,22 +43,34 @@ Properties | :ref:`bool` | :ref:`selected` | ``false`` | +-------------------------------+---------------------------------------------------------------------+-------------------+ +.. rst-class:: classref-reftable-group + +主题属性 +-------- + +.. table:: + :widths: auto + + +-----------------------------------+-------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`resizer` | + +-----------------------------------+-------------------------------------------------------+ + .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- -.. _class_GraphElement_signal_close_request: +.. _class_GraphElement_signal_delete_request: .. rst-class:: classref-signal -**close_request** **(** **)** +**delete_request** **(** **)** -Emitted when closing the GraphElement is requested. +请求删除 GraphElement 时发出。 .. rst-class:: classref-item-separator @@ -70,7 +82,7 @@ Emitted when closing the GraphElement is requested. **dragged** **(** :ref:`Vector2` from, :ref:`Vector2` to **)** -Emitted when the GraphElement is dragged. +当 GraphElement 被拖动时发出。 .. rst-class:: classref-item-separator @@ -82,7 +94,7 @@ Emitted when the GraphElement is dragged. **node_deselected** **(** **)** -Emitted when the GraphElement is deselected. +当 GraphElement 被取消选择时发出。 .. rst-class:: classref-item-separator @@ -94,7 +106,7 @@ Emitted when the GraphElement is deselected. **node_selected** **(** **)** -Emitted when the GraphElement is selected. +当 GraphElement 被选中时发出。 .. rst-class:: classref-item-separator @@ -106,7 +118,7 @@ Emitted when the GraphElement is selected. **position_offset_changed** **(** **)** -Emitted when the GraphElement is moved. +当 GraphElement 被移动时触发。 .. rst-class:: classref-item-separator @@ -118,7 +130,7 @@ Emitted when the GraphElement is moved. **raise_request** **(** **)** -Emitted when displaying the GraphElement over other ones is requested. Happens on focusing (clicking into) the GraphElement. +当 GraphElement 被要求显示在其他节点之上时触发。在 GraphElement 获得焦点(鼠标点击进入)时触发。 .. rst-class:: classref-item-separator @@ -130,7 +142,7 @@ Emitted when displaying the GraphElement over other ones is requested. Happens o **resize_request** **(** :ref:`Vector2` new_minsize **)** -Emitted when resizing the GraphElement is requested. Happens on dragging the resizer handle (see :ref:`resizable`). +当 GraphElement 被要求调整大小时发出。在拖动调整器手柄时发生(见 :ref:`resizable`\ )。 .. rst-class:: classref-section-separator @@ -138,8 +150,8 @@ Emitted when resizing the GraphElement is requested. Happens on dragging the res .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GraphElement_property_draggable: @@ -152,7 +164,7 @@ Property Descriptions - void **set_draggable** **(** :ref:`bool` value **)** - :ref:`bool` **is_draggable** **(** **)** -If ``true``, the user can drag the GraphElement. +如果为 ``true``\ ,则用户能够拖动该 GraphElement。 .. rst-class:: classref-item-separator @@ -169,7 +181,7 @@ If ``true``, the user can drag the GraphElement. - void **set_position_offset** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_position_offset** **(** **)** -The offset of the GraphElement, relative to the scroll offset of the :ref:`GraphEdit`. +GraphElement 的偏移量,相对于 :ref:`GraphEdit` 的滚动偏移量。 .. rst-class:: classref-item-separator @@ -186,9 +198,9 @@ The offset of the GraphElement, relative to the scroll offset of the :ref:`Graph - void **set_resizable** **(** :ref:`bool` value **)** - :ref:`bool` **is_resizable** **(** **)** -If ``true``, the user can resize the GraphElement. +如果为 ``true``\ ,则用户可以调整 GraphElement 的大小。 -\ **Note:** Dragging the handle will only emit the :ref:`resize_request` signal, the GraphElement needs to be resized manually. +\ **注意:**\ 拖动手柄只会发出 :ref:`resize_request` 信号,GraphElement 需要手动调整大小。 .. rst-class:: classref-item-separator @@ -205,7 +217,7 @@ If ``true``, the user can resize the GraphElement. - void **set_selectable** **(** :ref:`bool` value **)** - :ref:`bool` **is_selectable** **(** **)** -If ``true``, the user can select the GraphElement. +如果为 ``true``\ ,则用户能够选中该 GraphElement。 .. rst-class:: classref-item-separator @@ -222,12 +234,29 @@ If ``true``, the user can select the GraphElement. - void **set_selected** **(** :ref:`bool` value **)** - :ref:`bool` **is_selected** **(** **)** -If ``true``, the GraphElement is selected. +如果为 ``true``\ ,则选中该 GraphElement 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +主题属性说明 +------------ + +.. _class_GraphElement_theme_icon_resizer: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **resizer** + +用于调整大小的图标,在 :ref:`resizable` 被启用时可见。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_graphnode.rst b/classes/zh_CN/class_graphnode.rst index b38f14d42b..519a353433 100644 --- a/classes/zh_CN/class_graphnode.rst +++ b/classes/zh_CN/class_graphnode.rst @@ -10,27 +10,27 @@ GraphNode ========= -**Inherits:** :ref:`GraphElement` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`GraphElement` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 带有连接端口的容器,代表 :ref:`GraphEdit` 中的一个节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**GraphNode** allows to create nodes for a :ref:`GraphEdit` graph with customizable content based on its child controls. **GraphNode** is derived from :ref:`Container` and it is responsible for placing its children on screen. This works similar to :ref:`VBoxContainer`. Children, in turn, provide **GraphNode** with so-called slots, each of which can have a connection port on either side. +**GraphNode** 能够在 :ref:`GraphEdit` 图中创建节点,节点会根据其子控件定制内容。\ **GraphNode** 派生自 :ref:`Container`\ ,负责将其子节点放置在屏幕上。工作原理类似于 :ref:`VBoxContainer`\ 。而子节点为 **GraphNode** 提供所谓的插槽,每个插槽的两侧都可以有一个连接端口。 -Each **GraphNode** slot is defined by its index and can provide the node with up to two ports: one on the left, and one on the right. By convention the left port is also referred to as the **input port** and the right port is referred to as the **output port**. Each port can be enabled and configured individually, using different type and color. The type is an arbitrary value that you can define using your own considerations. The parent :ref:`GraphEdit` will receive this information on each connect and disconnect request. +\ **GraphNode** 的插槽由其索引定义,一个插槽可以为节点提供最多两个端口:一个在左侧,一个在右侧。根据惯例,左侧端口也被称为\ **输入端口**\ ,右侧端口被称为\ **输出端口**\ 。每个端口都可以单独启用和配置,使用不同的类型和颜色。类型是你按照自己的需要来定义的任意值。父 :ref:`GraphEdit` 将在每个连接和断开连接请求中收到此信息。 -Slots can be configured in the Inspector dock once you add at least one child :ref:`Control`. The properties are grouped by each slot's index in the "Slot" section. +添加至少一个子 :ref:`Control` 后,就可以在“检查器”面板中配置插槽。这些属性在“Slot”部分中按每个插槽的索引进行分组。 -\ **Note:** While GraphNode is set up using slots and slot indices, connections are made between the ports which are enabled. Because of that :ref:`GraphEdit` uses the port's index and not the slot's index. You can use :ref:`get_input_port_slot` and :ref:`get_output_port_slot` to get the slot index from the port index. +\ **注意:**\ 虽然 GraphNode 是使用插槽和插槽索引设置的,但连接是在启用的端口之间建立的。因此 :ref:`GraphEdit` 使用端口的索引,而不是插槽的索引。可以使用 :ref:`get_input_port_slot` 和 :ref:`get_output_port_slot` 从端口索引中获取插槽索引。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,14 +43,14 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw_port` **(** :ref:`int` slot_index, :ref:`Vector2i` position, :ref:`bool` left, :ref:`Color` color **)** |virtual| | + | void | :ref:`_draw_port` **(** :ref:`int` slot_index, :ref:`Vector2i` position, :ref:`bool` left, :ref:`Color` color **)** |virtual| | +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear_all_slots` **(** **)** | +-------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -111,8 +111,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -126,8 +126,6 @@ Theme Properties +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ | :ref:`Texture2D` | :ref:`port` | | +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Texture2D` | :ref:`resizer` | | - +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ | :ref:`StyleBox` | :ref:`panel` | | +-----------------------------------+-------------------------------------------------------------------------+-----------------------------------+ | :ref:`StyleBox` | :ref:`panel_selected` | | @@ -145,8 +143,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_GraphNode_signal_slot_updated: @@ -162,8 +160,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GraphNode_property_title: @@ -184,10 +182,10 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_GraphNode_method__draw_port: +.. _class_GraphNode_private_method__draw_port: .. rst-class:: classref-method @@ -195,7 +193,7 @@ void **_draw_port** **(** :ref:`int` slot_index, :ref:`Vector2i`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -207,7 +205,7 @@ void **_draw_port** **(** :ref:`int` slot_index, :ref:`Vector2i` slot_index **)** -Disables the slot with the given ``slot_index``. This will remove the corresponding input and output port from the GraphNode. +禁用索引为 ``slot_index`` 的插槽。会移除该 GraphNode 的对应输入和输出端口。 .. rst-class:: classref-item-separator @@ -231,7 +229,7 @@ Disables the slot with the given ``slot_index``. This will remove the correspond :ref:`Color` **get_input_port_color** **(** :ref:`int` port_idx **)** -Returns the :ref:`Color` of the input port with the given ``port_idx``. +返回索引为 ``port_idx`` 的输入端口的 :ref:`Color`\ 。 .. rst-class:: classref-item-separator @@ -243,7 +241,7 @@ Returns the :ref:`Color` of the input port with the given ``port_id :ref:`int` **get_input_port_count** **(** **)** -Returns the number of slots with an enabled input port. +返回启用了输入端口的插槽数。 .. rst-class:: classref-item-separator @@ -255,7 +253,7 @@ Returns the number of slots with an enabled input port. :ref:`Vector2` **get_input_port_position** **(** :ref:`int` port_idx **)** -Returns the position of the input port with the given ``port_idx``. +返回索引为 ``port_idx`` 的输入端口的位置。 .. rst-class:: classref-item-separator @@ -267,7 +265,7 @@ Returns the position of the input port with the given ``port_idx``. :ref:`int` **get_input_port_slot** **(** :ref:`int` port_idx **)** -Returns the corresponding slot index of the input port with the given ``port_idx``. +返回索引为 ``port_idx`` 的输入端口的对应插槽索引。 .. rst-class:: classref-item-separator @@ -279,7 +277,7 @@ Returns the corresponding slot index of the input port with the given ``port_idx :ref:`int` **get_input_port_type** **(** :ref:`int` port_idx **)** -Returns the type of the input port with the given ``port_idx``. +返回索引为 ``port_idx`` 的输入端口的类型。 .. rst-class:: classref-item-separator @@ -291,7 +289,7 @@ Returns the type of the input port with the given ``port_idx``. :ref:`Color` **get_output_port_color** **(** :ref:`int` port_idx **)** -Returns the :ref:`Color` of the output port with the given ``port_idx``. +返回索引为 ``port_idx`` 的输出端口的 :ref:`Color`\ 。 .. rst-class:: classref-item-separator @@ -303,7 +301,7 @@ Returns the :ref:`Color` of the output port with the given ``port_i :ref:`int` **get_output_port_count** **(** **)** -Returns the number of slots with an enabled output port. +返回启用了输出端口的插槽数。 .. rst-class:: classref-item-separator @@ -315,7 +313,7 @@ Returns the number of slots with an enabled output port. :ref:`Vector2` **get_output_port_position** **(** :ref:`int` port_idx **)** -Returns the position of the output port with the given ``port_idx``. +返回索引为 ``port_idx`` 的输出端口的位置。 .. rst-class:: classref-item-separator @@ -327,7 +325,7 @@ Returns the position of the output port with the given ``port_idx``. :ref:`int` **get_output_port_slot** **(** :ref:`int` port_idx **)** -Returns the corresponding slot index of the output port with the given ``port_idx``. +返回索引为 ``port_idx`` 的输出端口的对应插槽索引。 .. rst-class:: classref-item-separator @@ -339,7 +337,7 @@ Returns the corresponding slot index of the output port with the given ``port_id :ref:`int` **get_output_port_type** **(** :ref:`int` port_idx **)** -Returns the type of the output port with the given ``port_idx``. +返回索引为 ``port_idx`` 的输出端口的类型。 .. rst-class:: classref-item-separator @@ -351,7 +349,7 @@ Returns the type of the output port with the given ``port_idx``. :ref:`Color` **get_slot_color_left** **(** :ref:`int` slot_index **)** |const| -Returns the left (input) :ref:`Color` of the slot with the given ``slot_index``. +返回索引为 ``slot_index`` 的插槽左侧(输入)的 :ref:`Color`\ 。 .. rst-class:: classref-item-separator @@ -363,7 +361,7 @@ Returns the left (input) :ref:`Color` of the slot with the given `` :ref:`Color` **get_slot_color_right** **(** :ref:`int` slot_index **)** |const| -Returns the right (output) :ref:`Color` of the slot with the given ``slot_index``. +返回索引为 ``slot_index`` 的插槽右侧(输出)的 :ref:`Color`\ 。 .. rst-class:: classref-item-separator @@ -375,7 +373,7 @@ Returns the right (output) :ref:`Color` of the slot with the given :ref:`int` **get_slot_type_left** **(** :ref:`int` slot_index **)** |const| -Returns the left (input) type of the slot with the given ``slot_index``. +返回索引为 ``slot_index`` 的插槽左侧(输入)的类型。 .. rst-class:: classref-item-separator @@ -387,7 +385,7 @@ Returns the left (input) type of the slot with the given ``slot_index``. :ref:`int` **get_slot_type_right** **(** :ref:`int` slot_index **)** |const| -Returns the right (output) type of the slot with the given ``slot_index``. +返回索引为 ``slot_index`` 的插槽右侧(输出)的类型。 .. rst-class:: classref-item-separator @@ -399,7 +397,7 @@ Returns the right (output) type of the slot with the given ``slot_index``. :ref:`HBoxContainer` **get_titlebar_hbox** **(** **)** -Returns the :ref:`HBoxContainer` used for the title bar, only containing a :ref:`Label` for displaying the title by default. This can be used to add custom controls to the title bar such as option or close buttons. +返回标题栏所使用的 :ref:`HBoxContainer`\ ,默认只包含一个 :ref:`Label`\ ,用于显示标题。可用于向标题栏添加自定义控件,例如选项和关闭按钮等。 .. rst-class:: classref-item-separator @@ -411,7 +409,7 @@ Returns the :ref:`HBoxContainer` used for the title bar, on :ref:`bool` **is_slot_draw_stylebox** **(** :ref:`int` slot_index **)** |const| -Returns true if the background :ref:`StyleBox` of the slot with the given ``slot_index`` is drawn. +如果绘制索引为 ``slot_index`` 的插槽的背景 :ref:`StyleBox`\ ,则返回 true。 .. rst-class:: classref-item-separator @@ -423,7 +421,7 @@ Returns true if the background :ref:`StyleBox` of the slot with :ref:`bool` **is_slot_enabled_left** **(** :ref:`int` slot_index **)** |const| -Returns ``true`` if left (input) side of the slot with the given ``slot_index`` is enabled. +如果启用了索引为 ``slot_index`` 的插槽的左侧(输入),则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -435,7 +433,7 @@ Returns ``true`` if left (input) side of the slot with the given ``slot_index`` :ref:`bool` **is_slot_enabled_right** **(** :ref:`int` slot_index **)** |const| -Returns ``true`` if right (output) side of the slot with the given ``slot_index`` is enabled. +如果启用了索引为 ``slot_index`` 的插槽的右侧(输出),则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -447,19 +445,19 @@ Returns ``true`` if right (output) side of the slot with the given ``slot_index` void **set_slot** **(** :ref:`int` slot_index, :ref:`bool` enable_left_port, :ref:`int` type_left, :ref:`Color` color_left, :ref:`bool` enable_right_port, :ref:`int` type_right, :ref:`Color` color_right, :ref:`Texture2D` custom_icon_left=null, :ref:`Texture2D` custom_icon_right=null, :ref:`bool` draw_stylebox=true **)** -Sets properties of the slot with the given ``slot_index``. +设置索引为 ``slot_index`` 的插槽的属性。 -If ``enable_left_port``/``enable_right_port`` is ``true``, a port will appear and the slot will be able to be connected from this side. +如果 ``enable_left_port``/``enable_right_port`` 为 ``true``\ ,则将出现一个端口,插槽将能够从这一侧连接。 -With ``type_left``/``type_right`` an arbitrary type can be assigned to each port. Two ports can be connected if they share the same type, or if the connection between their types is allowed in the parent :ref:`GraphEdit` (see :ref:`GraphEdit.add_valid_connection_type`). Keep in mind that the :ref:`GraphEdit` has the final say in accepting the connection. Type compatibility simply allows the :ref:`GraphEdit.connection_request` signal to be emitted. +使用 ``type_left``/``type_right`` 可以为每个端口分配一个任意类型。如果两个端口具有相同的类型,或者如果它们的类型之间的连接在父 :ref:`GraphEdit` 中被允许(参见 :ref:`GraphEdit.add_valid_connection_type`\ ),那么这两个端口就可以被连接。请记住,\ :ref:`GraphEdit` 在接受连接上拥有最终决定权。类型兼容性只允许发出 :ref:`GraphEdit.connection_request` 信号。 -Ports can be further customized using ``color_left``/``color_right`` and ``custom_icon_left``/``custom_icon_right``. The color parameter adds a tint to the icon. The custom icon can be used to override the default port dot. +可以使用 ``color_left``/``color_right`` 和 ``custom_icon_left``/``custom_icon_right`` 进一步定制端口。颜色参数为图标添加了一个色调。自定义图标可以用来覆盖默认的端口点。 -Additionally, ``draw_stylebox`` can be used to enable or disable drawing of the background stylebox for each slot. See :ref:`slot`. +此外,\ ``draw_stylebox`` 可以用来启用或禁用每个插槽的背景样式框的绘制。参见 :ref:`slot`\ 。 -Individual properties can also be set using one of the ``set_slot_*`` methods. +单个属性也可以使用 ``set_slot_*`` 方法之一来设置。 -\ **Note:** This method only sets properties of the slot. To create the slot itself, add a :ref:`Control`-derived child to the GraphNode. +\ **注意:**\ 该方法只设置插槽的属性。要创建插槽本身,请将 :ref:`Control` 派生的子节点添加到该 GraphNode。 .. rst-class:: classref-item-separator @@ -471,7 +469,7 @@ Individual properties can also be set using one of the ``set_slot_*`` methods. void **set_slot_color_left** **(** :ref:`int` slot_index, :ref:`Color` color **)** -Sets the :ref:`Color` of the left (input) side of the slot with the given ``slot_index`` to ``color``. +将索引为 ``slot_index`` 的插槽的左侧(输入)的 :ref:`Color` 设置为 ``color``\ 。 .. rst-class:: classref-item-separator @@ -483,7 +481,7 @@ Sets the :ref:`Color` of the left (input) side of the slot with the void **set_slot_color_right** **(** :ref:`int` slot_index, :ref:`Color` color **)** -Sets the :ref:`Color` of the right (output) side of the slot with the given ``slot_index`` to ``color``. +将索引为 ``slot_index`` 的插槽的右侧(输出)的 :ref:`Color` 设置为 ``color``\ 。 .. rst-class:: classref-item-separator @@ -495,7 +493,7 @@ Sets the :ref:`Color` of the right (output) side of the slot with t void **set_slot_draw_stylebox** **(** :ref:`int` slot_index, :ref:`bool` enable **)** -Toggles the background :ref:`StyleBox` of the slot with the given ``slot_index``. +开关索引为 ``slot_index`` 的插槽的背景 :ref:`StyleBox`\ 。 .. rst-class:: classref-item-separator @@ -507,7 +505,7 @@ Toggles the background :ref:`StyleBox` of the slot with the give void **set_slot_enabled_left** **(** :ref:`int` slot_index, :ref:`bool` enable **)** -Toggles the left (input) side of the slot with the given ``slot_index``. If ``enable`` is ``true``, a port will appear on the left side and the slot will be able to be connected from this side. +切换给定插槽 ``slot_index`` 的左侧(输入)端口。如果 ``enable`` 为 ``true``\ ,则左侧会出现一个端口,并且该插槽可以从这一侧连接。 .. rst-class:: classref-item-separator @@ -519,7 +517,7 @@ Toggles the left (input) side of the slot with the given ``slot_index``. If ``en void **set_slot_enabled_right** **(** :ref:`int` slot_index, :ref:`bool` enable **)** -Toggles the right (output) side of the slot with the given ``slot_index``. If ``enable`` is ``true``, a port will appear on the right side and the slot will be able to be connected from this side. +切换给定插槽 ``slot_index`` 的右侧(输出)端口。如果 ``enable`` 为 ``true``\ ,则右侧会出现一个端口,并且该插槽可以从这一侧连接。 .. rst-class:: classref-item-separator @@ -531,7 +529,7 @@ Toggles the right (output) side of the slot with the given ``slot_index``. If `` void **set_slot_type_left** **(** :ref:`int` slot_index, :ref:`int` type **)** -Sets the left (input) type of the slot with the given ``slot_index`` to ``type``. If the value is negative, all connections will be disallowed to be created via user inputs. +将给定插槽 ``slot_index`` 的左侧(输入)类型设置为 ``type``\ 。如果该值为负,则所有的连接将不允许通过用户输入来创建。 .. rst-class:: classref-item-separator @@ -543,7 +541,7 @@ Sets the left (input) type of the slot with the given ``slot_index`` to ``type`` void **set_slot_type_right** **(** :ref:`int` slot_index, :ref:`int` type **)** -Sets the right (output) type of the slot with the given ``slot_index`` to ``type``. If the value is negative, all connections will be disallowed to be created via user inputs. +将给定插槽 ``slot_index`` 的右侧(输出)类型设置为 ``type``\ 。如果该值为负,则所有的连接将不允许通过用户输入来创建。 .. rst-class:: classref-section-separator @@ -551,8 +549,8 @@ Sets the right (output) type of the slot with the given ``slot_index`` to ``type .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_GraphNode_theme_color_resizer_color: @@ -602,25 +600,13 @@ Theme Property Descriptions ---- -.. _class_GraphNode_theme_icon_resizer: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **resizer** - -The icon used for the resizer, visible when :ref:`GraphElement.resizable` is enabled. - -.. rst-class:: classref-item-separator - ----- - .. _class_GraphNode_theme_style_panel: .. rst-class:: classref-themeproperty :ref:`StyleBox` **panel** -The default background for the slot area of the **GraphNode**. +**GraphNode** 槽区域的默认背景。 .. rst-class:: classref-item-separator @@ -632,7 +618,7 @@ The default background for the slot area of the **GraphNode**. :ref:`StyleBox` **panel_selected** -The :ref:`StyleBox` used for the slot area when selected. +用于被选中时的插槽区域的 :ref:`StyleBox`\ 。 .. rst-class:: classref-item-separator @@ -656,7 +642,7 @@ The :ref:`StyleBox` used for the slot area when selected. :ref:`StyleBox` **titlebar** -The :ref:`StyleBox` used for the title bar of the **GraphNode**. +用于该 **GraphNode** 标题栏的 :ref:`StyleBox`\ 。 .. rst-class:: classref-item-separator @@ -668,12 +654,12 @@ The :ref:`StyleBox` used for the title bar of the **GraphNode**. :ref:`StyleBox` **titlebar_selected** -The :ref:`StyleBox` used for the title bar of the **GraphNode** when it is selected. +当 **GraphNode** 被选中时,用于其标题栏的 :ref:`StyleBox`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gridcontainer.rst b/classes/zh_CN/class_gridcontainer.rst index aca166f55d..9f8fe8757b 100644 --- a/classes/zh_CN/class_gridcontainer.rst +++ b/classes/zh_CN/class_gridcontainer.rst @@ -10,14 +10,14 @@ GridContainer ============= -**Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 将子控件按照网格布局排列的容器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **GridContainer** 会将其子控件按照网格布局排列。网格的列数由 :ref:`columns` 属性指定,行数取决于容器中子控件的数量。将保留每个大小的容器的列和行。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` @@ -34,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +46,8 @@ Properties .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -64,8 +64,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GridContainer_property_columns: @@ -86,8 +86,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_GridContainer_theme_constant_h_separation: @@ -109,10 +109,10 @@ Theme Property Descriptions 子节点的垂直分隔量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_gridmap.rst b/classes/zh_CN/class_gridmap.rst index 3bd6c339eb..569e77ce91 100644 --- a/classes/zh_CN/class_gridmap.rst +++ b/classes/zh_CN/class_gridmap.rst @@ -10,14 +10,14 @@ GridMap ======= -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 基于 3D 图块地图的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- GridMap 允许以交互的方式将网格放置在栅格上。它在编辑器和脚本中均可使用,可帮助创建游戏内的关卡编辑器。 @@ -31,8 +31,8 @@ GridMap 包含一组单元格。每个栅格单元格引用 :ref:`MeshLibrary` @@ -42,8 +42,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -76,8 +76,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -136,8 +136,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_GridMap_signal_cell_size_changed: @@ -157,7 +157,7 @@ Signals **changed** **(** **)** -Emitted when the :ref:`MeshLibrary` of this GridMap changes. +该 GridMap 的 :ref:`MeshLibrary` 发生改变时发出。 .. rst-class:: classref-section-separator @@ -165,8 +165,8 @@ Emitted when the :ref:`MeshLibrary` of this GridMap changes. .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_GridMap_constant_INVALID_CELL_ITEM: @@ -182,8 +182,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GridMap_property_bake_navigation: @@ -397,8 +397,8 @@ GridMap 作为静态体,意味着它们不会受到重力或是其他力的影 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_GridMap_method_clear: @@ -624,7 +624,7 @@ void **make_baked_meshes** **(** :ref:`bool` gen_lightmap_uv=false, void **resource_changed** **(** :ref:`Resource` resource **)** -*Obsoleted.* Use :ref:`Resource.changed` instead. +*已废弃 * 请改用 :ref:`Resource.changed` 。 .. rst-class:: classref-item-separator @@ -678,10 +678,10 @@ void **set_navigation_map** **(** :ref:`RID` navigation_map **)** 设置该导航地图的 :ref:`RID`\ ,该 GridMap 节点应该用于其单元格烘焙导航网格。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_groovejoint2d.rst b/classes/zh_CN/class_groovejoint2d.rst index 05510b118d..96776cf463 100644 --- a/classes/zh_CN/class_groovejoint2d.rst +++ b/classes/zh_CN/class_groovejoint2d.rst @@ -10,21 +10,21 @@ GrooveJoint2D ============= -**Inherits:** :ref:`Joint2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Joint2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 将两个物理体的运动限制在某个固定轴上的物理关节。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 将两个物理体的运动限制在某个固定轴上的物理关节。例如代表活塞基底的 :ref:`StaticBody2D` 可以附加至代表能够上下移动的活塞头的 :ref:`RigidBody2D` 之上。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_GrooveJoint2D_property_initial_offset: @@ -74,10 +74,10 @@ Property Descriptions 沟槽的长度。沟槽是从关键原点沿着关节局部 Y 轴朝向 :ref:`length` 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_hashingcontext.rst b/classes/zh_CN/class_hashingcontext.rst index 55ddbb79fe..2c09fb314c 100644 --- a/classes/zh_CN/class_hashingcontext.rst +++ b/classes/zh_CN/class_hashingcontext.rst @@ -10,14 +10,14 @@ HashingContext ============== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 提供分段计算加密哈希的功能。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- HashingContext 类提供了一个接口,用于在多次迭代中计算加密哈希值。常用于计算大文件(不必全部加载到内存中)、网络流和一般数据流(不必持有缓冲区)的哈希值。 @@ -78,8 +78,8 @@ HashingContext 类提供了一个接口,用于在多次迭代中计算加密 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -98,8 +98,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_HashingContext_HashType: @@ -137,8 +137,8 @@ enum **HashType**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_HashingContext_method_finish: @@ -172,10 +172,10 @@ Method Descriptions 使用给定的数据块 ``chunk`` 更新计算。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_hboxcontainer.rst b/classes/zh_CN/class_hboxcontainer.rst index 1d37fc221d..434eeda78d 100644 --- a/classes/zh_CN/class_hboxcontainer.rst +++ b/classes/zh_CN/class_hboxcontainer.rst @@ -10,59 +10,30 @@ HBoxContainer ============= -**Inherits:** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`EditorResourcePicker` +**派生:** :ref:`EditorResourcePicker` 将子控件横向排列的容器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`BoxContainer` 的变体,只会将子控件横向排列。子控件的最小尺寸发生变化时会自动进行重新排列。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------+------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`separation` | ``4`` | - +-----------------------+------------------------------------------------------------------+-------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_HBoxContainer_theme_constant_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **separation** = ``4`` - -**HBoxContainer** 的元素之间的水平间隙。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_heightmapshape3d.rst b/classes/zh_CN/class_heightmapshape3d.rst index db031464e0..90fee05885 100644 --- a/classes/zh_CN/class_heightmapshape3d.rst +++ b/classes/zh_CN/class_heightmapshape3d.rst @@ -10,14 +10,14 @@ HeightMapShape3D ================ -**Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 3D 高度图形状,用于物理碰撞。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 3D 高度图形状,旨在用于物理。常用于为 :ref:`CollisionShape3D` 提供形状。可用于地形,但是有无法存储悬垂部分(如洞窟)的限制。\ **HeightMapShape3D** 中创建洞的方法是为所需区域分配极低的值。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_HeightMapShape3D_property_map_data: @@ -95,10 +95,10 @@ Property Descriptions 高度图宽度中的顶点数。更改该项将调整 :ref:`map_data` 的大小。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_hflowcontainer.rst b/classes/zh_CN/class_hflowcontainer.rst index 457ef4bc56..2e8de1fae9 100644 --- a/classes/zh_CN/class_hflowcontainer.rst +++ b/classes/zh_CN/class_hflowcontainer.rst @@ -10,71 +10,28 @@ HFlowContainer ============== -**Inherits:** :ref:`FlowContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`FlowContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 将子控件横向排列并在边界处换行的容器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`FlowContainer` 的一种,只能将其子控件横向排列并在边界处换行。类似于书本中文字在一行中写不下以后的换行方式。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------+-----------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`h_separation` | ``4`` | - +-----------------------+-----------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`v_separation` | ``4`` | - +-----------------------+-----------------------------------------------------------------------+-------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_HFlowContainer_theme_constant_h_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **h_separation** = ``4`` - -子节点的水平分隔量。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HFlowContainer_theme_constant_v_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **v_separation** = ``4`` - -子节点的垂直分隔量。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_hingejoint3d.rst b/classes/zh_CN/class_hingejoint3d.rst index 479eea120d..657eccd353 100644 --- a/classes/zh_CN/class_hingejoint3d.rst +++ b/classes/zh_CN/class_hingejoint3d.rst @@ -10,21 +10,21 @@ HingeJoint3D ============ -**Inherits:** :ref:`Joint3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Joint3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 限制 3D 物理体旋转轴的物理关节,旋转轴相对于另一个物理体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 限制 3D 物理体旋转轴的物理关节,旋转轴相对于另一个物理体。例如甲物体可以是代表门铰链的 :ref:`StaticBody3D`\ ,\ :ref:`RigidBody3D` 可以围绕它旋转。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -53,8 +53,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -75,8 +75,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_HingeJoint3D_Param: @@ -196,8 +196,8 @@ enum **Flag**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_HingeJoint3D_property_angular_limit/bias: @@ -280,7 +280,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -373,8 +373,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_HingeJoint3D_method_get_flag: @@ -420,10 +420,10 @@ void **set_param** **(** :ref:`Param` param, :ref:`floa 设置指定参数的值。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_hmaccontext.rst b/classes/zh_CN/class_hmaccontext.rst index 87533d1450..74fd0f1056 100644 --- a/classes/zh_CN/class_hmaccontext.rst +++ b/classes/zh_CN/class_hmaccontext.rst @@ -10,14 +10,14 @@ HMACContext =========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 用来为一个使用密钥的信息创建 HMAC。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- HMACContext 类对于高级的 HMAC 用例非常有用,例如流式消息,因为它支持在一段时间内创建消息,而非一次性提供。 @@ -72,8 +72,8 @@ HMACContext 类对于高级的 HMAC 用例非常有用,例如流式消息, .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -92,8 +92,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_HMACContext_method_finish: @@ -127,10 +127,10 @@ Method Descriptions 更新要进行 HMAC 处理的消息。在 :ref:`finish` 被调用以将 ``data`` 追加到该消息之前,该函数可以多次被调用,但在 :ref:`start` 被调用之前不能被调用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_hscrollbar.rst b/classes/zh_CN/class_hscrollbar.rst index da6d2dd957..6cbeefcced 100644 --- a/classes/zh_CN/class_hscrollbar.rst +++ b/classes/zh_CN/class_hscrollbar.rst @@ -10,190 +10,21 @@ HScrollBar ========== -**Inherits:** :ref:`ScrollBar` **<** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`ScrollBar` **<** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 水平滚动条,从左侧(最小)滚动到右侧(最大)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 水平滚动条,通常用于为超出控件可见宽度的内容进行导航。这是基于 :ref:`Range` 的控件,从左侧(最小)滚动到右侧(最大)。 -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`decrement` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`decrement_highlight` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`decrement_pressed` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`increment` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`increment_highlight` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`increment_pressed` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox` | :ref:`grabber` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox` | :ref:`grabber_highlight` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox` | :ref:`grabber_pressed` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox` | :ref:`scroll` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox` | :ref:`scroll_focus` | - +-----------------------------------+-----------------------------------------------------------------------------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_HScrollBar_theme_icon_decrement: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **decrement** - -作为按钮使用的图标,它用于使 :ref:`ScrollBar` 向左滚动。滚动步长由 :ref:`ScrollBar.custom_step` 属性值自定义。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_icon_decrement_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **decrement_highlight** - -当鼠标指针悬停在递减按钮上时显示。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_icon_decrement_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **decrement_pressed** - -在按下递减按钮时显示。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_icon_increment: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **increment** - -作为按钮使用的图标,它用于使 :ref:`ScrollBar` 向右滚动。滚动步长由 :ref:`ScrollBar.custom_step` 属性值自定义。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_icon_increment_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **increment_highlight** - -当鼠标指针悬停在增量按钮上时显示。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_icon_increment_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **increment_pressed** - -在按下增量按钮时显示。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_style_grabber: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **grabber** - -用作拖动条的纹理,表示当前的可拖动元素。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_style_grabber_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **grabber_highlight** - -当鼠标悬停在拖动条上时使用。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_style_grabber_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **grabber_pressed** - -在拖动条被拖动时使用。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_style_scroll: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **scroll** - -用作此 :ref:`ScrollBar` 的背景。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HScrollBar_theme_style_scroll_focus: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **scroll_focus** - -当 :ref:`ScrollBar` 具有 GUI 焦点时用作背景。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_hseparator.rst b/classes/zh_CN/class_hseparator.rst index ece8ed08f7..a0bada9629 100644 --- a/classes/zh_CN/class_hseparator.rst +++ b/classes/zh_CN/class_hseparator.rst @@ -10,64 +10,21 @@ HSeparator ========== -**Inherits:** :ref:`Separator` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Separator` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 分隔其他控件的水平线。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 分隔其他\ **垂直**\ 排列的控件的水平线。\ **HSeparator** 只提供视觉上的分隔,通常用 :ref:`StyleBoxLine` 绘制。 -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +---------------------------------+---------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`separation` | ``4`` | - +---------------------------------+---------------------------------------------------------------+-------+ - | :ref:`StyleBox` | :ref:`separator` | | - +---------------------------------+---------------------------------------------------------------+-------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_HSeparator_theme_constant_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **separation** = ``4`` - -分隔器覆盖区域的高度。效果上和最小高度一致。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSeparator_theme_style_separator: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **separator** - -分隔器的线条样式。与 :ref:`StyleBoxLine` 配合使用效果更佳。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_hslider.rst b/classes/zh_CN/class_hslider.rst index 4af492a486..658370b618 100644 --- a/classes/zh_CN/class_hslider.rst +++ b/classes/zh_CN/class_hslider.rst @@ -10,162 +10,21 @@ HSlider ======= -**Inherits:** :ref:`Slider` **<** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Slider` **<** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 从左(最小)到右(最大)的水平滚动条。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 水平滚动条,可用通过沿着水平轴移动抓取器来调整取值。这个控件继承自 :ref:`Range`\ ,从左(最小)到右(最大)滚动。 -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`center_grabber` | ``0`` | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`grabber_offset` | ``0`` | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`grabber` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`grabber_disabled` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`grabber_highlight` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`tick` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`StyleBox` | :ref:`grabber_area` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`StyleBox` | :ref:`grabber_area_highlight` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`StyleBox` | :ref:`slider` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_HSlider_theme_constant_center_grabber: - -.. rst-class:: classref-themeproperty - -:ref:`int` **center_grabber** = ``0`` - -布尔常量。如果为 ``1``\ ,则会忽略抓取器纹理的大小,根据其中心位置将其缩放到滚动条的边界。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSlider_theme_constant_grabber_offset: - -.. rst-class:: classref-themeproperty - -:ref:`int` **grabber_offset** = ``0`` - -抓取器的垂直偏移。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSlider_theme_icon_grabber: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **grabber** - -用作拖动条的纹理(可拖动的元素)。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSlider_theme_icon_grabber_disabled: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **grabber_disabled** - -抓取器禁用时的材质。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSlider_theme_icon_grabber_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **grabber_highlight** - -抓取器获得焦点时的材质。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSlider_theme_icon_tick: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **tick** - -刻度的纹理。当 :ref:`Slider.tick_count` 大于 0 时可见。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSlider_theme_style_grabber_area: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **grabber_area** - -抓取器左侧区域的背景。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSlider_theme_style_grabber_area_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **grabber_area_highlight** - -抓取器左边区域的背景,当它被悬停或聚焦时显示。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSlider_theme_style_slider: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **slider** - -整个滑动条的背景。受 ``grabber_area`` 高度的影响。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_hsplitcontainer.rst b/classes/zh_CN/class_hsplitcontainer.rst index 571bb8820f..017d161adf 100644 --- a/classes/zh_CN/class_hsplitcontainer.rst +++ b/classes/zh_CN/class_hsplitcontainer.rst @@ -10,99 +10,28 @@ HSplitContainer =============== -**Inherits:** :ref:`SplitContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`SplitContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 会将两个子控件进行水平分隔的容器,并且提供了用于调整分隔比例的抓取器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 仅接受两个子控件的容器,会将这两个控件水平排列,在两者之间创建一条分隔线。分隔线可以拖动,从而改变两个子控件之间的大小关系。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - | :ref:`int` | :ref:`autohide` | ``1`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - | :ref:`int` | :ref:`minimum_grab_thickness` | ``6`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - | :ref:`int` | :ref:`separation` | ``12`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - | :ref:`Texture2D` | :ref:`grabber` | | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_HSplitContainer_theme_constant_autohide: - -.. rst-class:: classref-themeproperty - -:ref:`int` **autohide** = ``1`` - -布尔值。如果1 (``true``),抓取器将在不在光标下时自动隐藏。如果0 (``false``),抓取器总是可见。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSplitContainer_theme_constant_minimum_grab_thickness: - -.. rst-class:: classref-themeproperty - -:ref:`int` **minimum_grab_thickness** = ``6`` - -用户可以点击的区域的最小粗细,点击该区域将抓取分割线。如果 :ref:`separation` 或 :ref:`grabber` 的粗细太小,这将保证分割线仍然可以被拖动。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSplitContainer_theme_constant_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **separation** = ``12`` - -容器两侧之间的空间。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_HSplitContainer_theme_icon_grabber: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **grabber** - -在中间区域绘制的抓取图标。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_httpclient.rst b/classes/zh_CN/class_httpclient.rst index ac92c07992..f8246c6cb0 100644 --- a/classes/zh_CN/class_httpclient.rst +++ b/classes/zh_CN/class_httpclient.rst @@ -10,14 +10,14 @@ HTTPClient ========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 低级别的超文本传输协议客户端。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 超文本传输协议客户端(有时称为“用户代理”)。用于发出 HTTP 请求以下载网络内容,上传文件和其他数据、或与各种服务通信,以及其他用例。 @@ -41,8 +41,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`HTTP 客户端类 <../tutorials/networking/http_client_class>` @@ -50,8 +50,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -66,8 +66,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -112,8 +112,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_HTTPClient_Method: @@ -795,8 +795,8 @@ HTTP 状态码 ``511 Network Authentication Required``\ 。客户端需要身份 .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_HTTPClient_property_blocking_mode_enabled: @@ -851,8 +851,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_HTTPClient_method_close: @@ -886,11 +886,11 @@ void **close** **(** **)** :ref:`int` **get_response_body_length** **(** **)** |const| -Returns the response's body length. +返回响应体长度。 -\ **Note:** Some Web servers may not send a body length. In this case, the value returned will be ``-1``. If using chunked transfer encoding, the body length will also be ``-1``. +\ **注意:**\ 部分 Web 服务器可能不发送响应体长度,此时返回值将为 ``-1``\ 。如果使用分块传输编码,响应体的长度也将为 ``-1``\ 。 -\ **Note:** This function always returns ``-1`` on the Web platform due to browsers limitations. +\ **注意:**\ 由于浏览器的限制,该函数在 Web 平台上始终返回 ``-1``\ 。 .. rst-class:: classref-item-separator @@ -1135,10 +1135,10 @@ void **set_https_proxy** **(** :ref:`String` host, :ref:`int` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` 具有发送 HTTP(S) 请求能力的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 一种具有发送 HTTP 请求能力的节点。内部使用 :ref:`HTTPClient`\ 。 @@ -185,8 +185,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`发出 HTTP 请求 <../tutorials/networking/http_request_class>` @@ -194,8 +194,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -218,8 +218,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -250,8 +250,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_HTTPRequest_signal_request_completed: @@ -267,8 +267,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_HTTPRequest_Result: @@ -394,8 +394,8 @@ HTTPRequest 无法写入下载文件。 .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_HTTPRequest_property_accept_gzip: @@ -410,11 +410,11 @@ Property Descriptions 如果为 ``true``\ ,这个报头会被添加到每个请求中:\ ``Accept-Encoding: gzip, deflate`` 告诉服务器可以压缩响应正文。 -任何声明 ``gzip`` 或 ``deflate`` 的 ``Content-Encoding`` 的响应正文,将被自动解压缩,并且未压缩的字节将通过 ``request_completed`` 被传递。 +任何声明 ``gzip`` 或 ``deflate`` 的 ``Content-Encoding`` 的响应正文,将被自动解压缩,并且未压缩的字节将通过 :ref:`request_completed` 被传递。 -如果用户指定了自己的 ``Accept-Encoding`` 报头,那么无论 ``accept_gzip`` 是什么,都不会添加任何报头。 +如果用户指定了自己的 ``Accept-Encoding`` 报头,那么无论 :ref:`accept_gzip` 是什么,都不会添加任何报头。 -如果为 ``false``\ ,这将不会添加报头,并且不会对响应正文执行任何解压缩。响应正文的原始字节将通过 ``request_completed`` 返回。 +如果为 ``false``\ ,这将不会添加报头,并且不会对响应正文执行任何解压缩。响应正文的原始字节将通过 :ref:`request_completed` 返回。 .. rst-class:: classref-item-separator @@ -526,8 +526,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_HTTPRequest_method_cancel_request: @@ -589,7 +589,7 @@ void **cancel_request** **(** **)** 如果成功创建请求,则返回 :ref:`@GlobalScope.OK`\ 。(并不意味着服务器已响应),如果不在树中,则返回 :ref:`@GlobalScope.ERR_UNCONFIGURED`\ ;如果仍在处理先前的请求,则返回 :ref:`@GlobalScope.ERR_BUSY`\ ;如果给定的字符串不是有效的 URL 格式,则返回 :ref:`@GlobalScope.ERR_INVALID_PARAMETER`\ ;或者如果不使用线程并且 :ref:`HTTPClient` 无法连接到主机,则返回 :ref:`@GlobalScope.ERR_CANT_CONNECT`\ 。 -\ **注意:**\ 当 ``method`` 为 :ref:`HTTPClient.METHOD_GET` 时,通过 ``request_data`` 发送的有效载荷可能会被服务器忽略,甚至导致服务器拒绝请求(参阅 `RFC 7231 第 4.3.1 节 `__\ 了解更多详情)。作为一种变通方法,可以在 URL 中将数据作为查询字符串发送(有关示例,请参见 :ref:`String.uri_encode`\ )。 +\ **注意:**\ 当 ``method`` 为 :ref:`HTTPClient.METHOD_GET` 时,通过 ``request_data`` 发送的有效载荷可能会被服务器忽略,甚至导致服务器拒绝请求(见 `RFC 7231 第 4.3.1 节 `__\ 了解更多详情)。作为一种变通方法,可以在 URL 中将数据作为查询字符串发送(有关示例,请参见 :ref:`String.uri_encode`\ )。 \ **注意:**\ 建议使用传输加密(TLS)并避免在 HTTP GET URL 参数中发送敏感信息(例如登录凭据)。考虑改用 HTTP POST 请求或 HTTP 报头来获取此类信息。 @@ -647,10 +647,10 @@ void **set_tls_options** **(** :ref:`TLSOptions` client_option 设置连接到 HTTPS 服务器时使用的 :ref:`TLSOptions`\ 。见 :ref:`TLSOptions.client`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_image.rst b/classes/zh_CN/class_image.rst index cc1cc74121..1e5b22e643 100644 --- a/classes/zh_CN/class_image.rst +++ b/classes/zh_CN/class_image.rst @@ -10,32 +10,34 @@ Image ===== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 图像数据类型。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 本机图像数据类型。包含可以被转换为 :ref:`ImageTexture` 的图像数据,并提供常用的\ *图像处理*\ 方法。\ **Image** 的最大宽度和高度为 :ref:`MAX_WIDTH` 和 :ref:`MAX_HEIGHT`\ 。 -\ **Image** 不能被直接分配给对象(例如 :ref:`Sprite2D`\ )的 ``texture`` 属性,必须先手动转换为 :ref:`ImageTexture`\ 。 +\ **Image** 不能被直接分配给对象的纹理属性(例如 :ref:`Sprite2D.texture`\ ),必须先手动转换为 :ref:`ImageTexture`\ 。 \ **注意:**\ 由于图形硬件限制,最大图像大小为 16384×16384 像素。较大的图像可能无法导入。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`导入图像 <../tutorials/assets_pipeline/importing_images>` +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` + .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +48,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -198,8 +200,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Image_Format: @@ -313,7 +315,7 @@ OpenGL 纹理格式 ``GL_RGBA32F``\ ,其中有四个部分,每个部分都 :ref:`Format` **FORMAT_RH** = ``12`` -OpenGL texture format ``GL_R16F`` where there's one component, a 16-bit "half-precision" floating-point value. +OpenGL 纹理格式 ``GL_R16F``\ ,其中有一个分量,即 16 位“半精度”浮点值。 .. _class_Image_constant_FORMAT_RGH: @@ -321,7 +323,7 @@ OpenGL texture format ``GL_R16F`` where there's one component, a 16-bit "half-pr :ref:`Format` **FORMAT_RGH** = ``13`` -OpenGL texture format ``GL_RG16F`` where there are two components, each a 16-bit "half-precision" floating-point value. +OpenGL 纹理格式 ``GL_RG16F``\ ,其中有两个分量,每个分量都是 16 位“半精度”浮点值。 .. _class_Image_constant_FORMAT_RGBH: @@ -329,7 +331,7 @@ OpenGL texture format ``GL_RG16F`` where there are two components, each a 16-bit :ref:`Format` **FORMAT_RGBH** = ``14`` -OpenGL texture format ``GL_RGB16F`` where there are three components, each a 16-bit "half-precision" floating-point value. +OpenGL 纹理格式 ``GL_RGB16F``\ ,其中有三个分量,每个分量都是 16 位“半精度”浮点值。 .. _class_Image_constant_FORMAT_RGBAH: @@ -337,7 +339,7 @@ OpenGL texture format ``GL_RGB16F`` where there are three components, each a 16- :ref:`Format` **FORMAT_RGBAH** = ``15`` -OpenGL texture format ``GL_RGBA16F`` where there are four components, each a 16-bit "half-precision" floating-point value. +OpenGL 纹理格式 ``GL_RGBA16F``\ ,其中有四个分量,每个都是 16 位“半精度”浮点值。 .. _class_Image_constant_FORMAT_RGBE9995: @@ -511,7 +513,7 @@ OpenGL texture format ``GL_RGBA16F`` where there are four components, each a 16- :ref:`Format` **FORMAT_ASTC_4x4** = ``35`` -`Adaptive Scalable Texture Compression `__. This implements the 4x4 (high quality) mode. +`自适应可伸缩纹理压缩 `__\ 。这实现了 4x4(高质量)模式。 .. _class_Image_constant_FORMAT_ASTC_4x4_HDR: @@ -527,7 +529,7 @@ OpenGL texture format ``GL_RGBA16F`` where there are four components, each a 16- :ref:`Format` **FORMAT_ASTC_8x8** = ``37`` -`Adaptive Scalable Texture Compression `__. This implements the 8x8 (low quality) mode. +`自适应可伸缩纹理压缩 `__\ 。这实现了 8x8(低质量)模式。 .. _class_Image_constant_FORMAT_ASTC_8x8_HDR: @@ -819,8 +821,8 @@ enum **ASTCFormat**: .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Image_constant_MAX_WIDTH: @@ -844,8 +846,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Image_property_data: @@ -861,8 +863,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Image_method_adjust_bcs: @@ -872,7 +874,7 @@ void **adjust_bcs** **(** :ref:`float` brightness, :ref:`float`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1090,7 +1092,7 @@ void **crop** **(** :ref:`int` width, :ref:`int` height ** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1162,9 +1164,9 @@ void **flip_y** **(** **)** :ref:`Error` **generate_mipmaps** **(** :ref:`bool` renormalize=false **)** -Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is ``0``. Enabling ``renormalize`` when generating mipmaps for normal textures will make sure all resulting vector values are normalized. +为图像生成多级渐远纹理(Mipmap)。多级渐远纹理是预先计算好的图像的低分辨率副本,如果图像在渲染时需要按比例缩小,则会自动使用这些副本。它们有助于在渲染时提高图像质量和性能。如果图像被压缩,或采用自定义格式,或图像的宽度或高度为 ``0``\ ,则该方法返回错误。在为法线纹理生成多级渐远纹理时启用 ``renormalize`` 能够确保得到的所有向量值都是归一化的。 -It is possible to check if the image has mipmaps by calling :ref:`has_mipmaps` or :ref:`get_mipmap_count`. +调用 :ref:`has_mipmaps` 或 :ref:`get_mipmap_count` 能够检查图像是否使用多级渐远纹理。在已拥有多级渐远纹理的图像上调用 :ref:`generate_mipmaps` 将替换该图像中已有的多级渐远纹理。 .. rst-class:: classref-item-separator @@ -1212,7 +1214,7 @@ It is possible to check if the image has mipmaps by calling :ref:`has_mipmaps` **get_mipmap_count** **(** **)** |const| -Returns the number of mipmap levels or 0 if the image has no mipmaps. The largest main level image is not counted as a mipmap level by this method, so if you want to include it you can add 1 to this count. +返回多级渐远纹理级别数;如果该图像没有多级渐远纹理,则返回 0。该方法不会将最大的主要级别图像计为一个多级渐远纹理级别,因此如果你想将其包括在内,可以在该计数中加 1。 .. rst-class:: classref-item-separator @@ -1224,7 +1226,7 @@ Returns the number of mipmap levels or 0 if the image has no mipmaps. The larges :ref:`int` **get_mipmap_offset** **(** :ref:`int` mipmap **)** |const| -返回存储在图像的 ``data`` 字典中的索引为 ``mipmap`` 的多级渐远纹理的偏移量。 +返回存储在图像的 :ref:`data` 字典中的索引为 ``mipmap`` 的多级渐远纹理的偏移量。 .. rst-class:: classref-item-separator @@ -1376,9 +1378,11 @@ Returns the number of mipmap levels or 0 if the image has no mipmaps. The larges :ref:`Error` **load_bmp_from_buffer** **(** :ref:`PackedByteArray` buffer **)** -从 BMP 文件的二进制内容中加载图像。 +从 BMP 文件的二进制内容加载图像。 -\ **注意:**\ Godot 的 BMP 模块不支持 16 位像素的图像。只支持 1 位、4 位、8 位、24 位和 32 位像素的图像。 +\ **注意:**\ Godot 的 BMP 模块不支持每像素 16 位的图像。仅支持每像素 1 位、4 位、8 位、24 位和 32 位的图像。 + +\ **注意:**\ 该方法仅在启用了 BMP 模块的引擎版本中可用。默认情况下,BMP 模块是启用的,但可以在构建时使用 ``module_bmp_enabled=no`` SCons 选项禁用它。 .. rst-class:: classref-item-separator @@ -1414,7 +1418,11 @@ Returns the number of mipmap levels or 0 if the image has no mipmaps. The larges :ref:`Error` **load_ktx_from_buffer** **(** :ref:`PackedByteArray` buffer **)** -Loads an image from the binary contents of a KTX file. +从 `KTX `__ 文件的二进制内容加载图像。与大多数图像格式不同,KTX 可以存储 VRAM 压缩数据并嵌入 mipmap。 + +\ **注意:**\ Godot 的 libktx 实现仅支持 2D 图像。不支持立方体贴图、纹理数组、和去填充。 + +\ **注意:**\ 该方法仅在启用了 KTX 模块的引擎版本中可用。默认情况下,KTX 模块是启用的,但可以在构建时使用 ``module_ktx_enabled=no`` SCons 选项禁用它。 .. rst-class:: classref-item-separator @@ -1438,11 +1446,11 @@ Loads an image from the binary contents of a KTX file. :ref:`Error` **load_svg_from_buffer** **(** :ref:`PackedByteArray` buffer, :ref:`float` scale=1.0 **)** -Loads an image from the UTF-8 binary contents of an **uncompressed** SVG file (**.svg**). +从\ **未压缩** SVG 文件(\ **.svg**\ )的 UTF-8 二进制内容加载图像。 -\ **Note:** Beware when using compressed SVG files (like **.svgz**), they need to be ``decompressed`` before loading. +\ **注意:**\ 使用压缩的 SVG 文件(如 **.svgz**\ )时请注意,在加载之前需要对其进行 ``decompressed``\ 。 -\ **Note:** This method is only available in engine builds with the SVG module enabled. By default, the SVG module is enabled, but it can be disabled at build-time using the ``module_svg_enabled=no`` SCons option. +\ **注意:**\ 该方法仅在启用了 SVG 模块的引擎版本中可用。默认情况下,SVG 模块是启用的,但可以在构建时使用 ``module_svg_enabled=no`` SCons 选项禁用它。 .. rst-class:: classref-item-separator @@ -1454,9 +1462,9 @@ Loads an image from the UTF-8 binary contents of an **uncompressed** SVG file (* :ref:`Error` **load_svg_from_string** **(** :ref:`String` svg_str, :ref:`float` scale=1.0 **)** -Loads an image from the string contents of a SVG file (**.svg**). +从 SVG 文件(\ **.svg**\ )的字符串内容加载图像。 -\ **Note:** This method is only available in engine builds with the SVG module enabled. By default, the SVG module is enabled, but it can be disabled at build-time using the ``module_svg_enabled=no`` SCons option. +\ **注意:**\ 该方法仅在启用了 SVG 模块的引擎版本中可用。默认情况下,SVG 模块是启用的,但可以在构建时使用 ``module_svg_enabled=no`` SCons 选项禁用它。 .. rst-class:: classref-item-separator @@ -1470,6 +1478,8 @@ Loads an image from the string contents of a SVG file (**.svg**). 从 TGA 文件的二进制内容加载图像。 +\ **注意:**\ 该方法仅在启用了 TGA 模块的引擎版本中可用。默认情况下,TGA 模块是启用的,但可以在构建时使用 ``module_tga_enabled=no`` SCons 选项禁用它。 + .. rst-class:: classref-item-separator ---- @@ -1504,7 +1514,7 @@ void **normal_map_to_xy** **(** **)** void **premultiply_alpha** **(** **)** -将颜色值与 Alpha 值相乘。像素的结果颜色值为 ``(color * alpha)/256``\ 。 +将颜色值与 Alpha 值相乘。像素的最终颜色值为 ``(color * alpha)/256``\ 。另见 :ref:`CanvasItemMaterial.blend_mode`\ 。 .. rst-class:: classref-item-separator @@ -1656,7 +1666,9 @@ void **rotate_180** **(** **)** :ref:`Error` **save_webp** **(** :ref:`String` path, :ref:`bool` lossy=false, :ref:`float` quality=0.75 **)** |const| -将该图像作为 WebP(Web 图片)文件保存到 ``path`` 中的文件中。默认情况下,它将无损保存。如果 ``lossy`` 为真,则该图像将使用介于 0.0 和 1.0(包含)之间的 ``quality`` 设置进行有损保存。 +将该图像作为 WebP(Web 图片)文件保存到 ``path`` 中的文件中。默认情况下,它将无损保存。如果 ``lossy`` 为真,则该图像将使用介于 0.0 和 1.0(包含)之间的 ``quality`` 设置进行有损保存。无损 WebP 提供比 PNG 更有效的压缩。 + +\ **注意:**\ WebP 格式的大小限制为 16383×16383 像素,而 PNG 可以保存更大的图像。 .. rst-class:: classref-item-separator @@ -1668,7 +1680,9 @@ void **rotate_180** **(** **)** :ref:`PackedByteArray` **save_webp_to_buffer** **(** :ref:`bool` lossy=false, :ref:`float` quality=0.75 **)** |const| -将该图像作为 WebP(Web 图片)文件保存到字节数组中。默认情况下,它将无损保存。如果 ``lossy`` 为真,则该图像将使用介于 0.0 和 1.0(包含)之间的 ``quality`` 设置进行有损保存。 +将该图像作为 WebP(Web 图片)文件保存到字节数组中。默认情况下,它将无损保存。如果 ``lossy`` 为真,则该图像将使用介于 0.0 和 1.0(包含)之间的 ``quality`` 设置进行有损保存。无损 WebP 提供比 PNG 更有效的压缩。 + +\ **注意:**\ WebP 格式的大小限制为 16383×16383 像素,而 PNG 可以保存更大的图像。 .. rst-class:: classref-item-separator @@ -1766,7 +1780,7 @@ void **set_pixelv** **(** :ref:`Vector2i` point, :ref:`Color` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`ImageFormatLoaderExtension` +**派生:** :ref:`ImageFormatLoaderExtension` 用于添加特定图像格式支持的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该引擎支持多种开箱即用的图像格式(PNG、SVG、JPEG、WebP 等),但也可以选择通过扩展 :ref:`ImageFormatLoaderExtension`\ ,来实现对其他图像格式的支持。 @@ -29,8 +29,8 @@ Description .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_ImageFormatLoader_LoaderFlags: @@ -62,10 +62,10 @@ flags **LoaderFlags**: -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_imageformatloaderextension.rst b/classes/zh_CN/class_imageformatloaderextension.rst index 1eefc5a449..22406508ed 100644 --- a/classes/zh_CN/class_imageformatloaderextension.rst +++ b/classes/zh_CN/class_imageformatloaderextension.rst @@ -10,14 +10,14 @@ ImageFormatLoaderExtension ========================== -**Inherits:** :ref:`ImageFormatLoader` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ImageFormatLoader` **<** :ref:`RefCounted` **<** :ref:`Object` 用于创建 :ref:`ImageFormatLoader` 扩展的基类(添加对额外图像格式的支持)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该引擎支持多种开箱即用的图像格式(PNG、SVG、JPEG、WebP 等),但也可以选择通过扩展该类,来实现对其他图像格式的支持。 @@ -25,21 +25,21 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_load_image` **(** :ref:`Image` image, :ref:`FileAccess` fileaccess, |bitfield|\<:ref:`LoaderFlags`\> flags, :ref:`float` scale **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_format_loader` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_format_loader` **(** **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_load_image` **(** :ref:`Image` image, :ref:`FileAccess` fileaccess, |bitfield|\<:ref:`LoaderFlags`\> flags, :ref:`float` scale **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_format_loader` **(** **)** | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_format_loader` **(** **)** | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -47,10 +47,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_ImageFormatLoaderExtension_method__get_recognized_extensions: +.. _class_ImageFormatLoaderExtension_private_method__get_recognized_extensions: .. rst-class:: classref-method @@ -62,7 +62,7 @@ Method Descriptions ---- -.. _class_ImageFormatLoaderExtension_method__load_image: +.. _class_ImageFormatLoaderExtension_private_method__load_image: .. rst-class:: classref-method @@ -80,7 +80,7 @@ Method Descriptions void **add_format_loader** **(** **)** -将这个格式加载器添加至引擎,使其能够识别 :ref:`_get_recognized_extensions` 返回的文件扩展名。 +将这个格式加载器添加至引擎,使其能够识别 :ref:`_get_recognized_extensions` 返回的文件扩展名。 .. rst-class:: classref-item-separator @@ -94,10 +94,10 @@ void **remove_format_loader** **(** **)** 从引擎中移除这个格式加载器。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_imagetexture.rst b/classes/zh_CN/class_imagetexture.rst index a6c1c9e1aa..b20a7bca22 100644 --- a/classes/zh_CN/class_imagetexture.rst +++ b/classes/zh_CN/class_imagetexture.rst @@ -10,14 +10,14 @@ ImageTexture ============ -**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 基于 :ref:`Image` 的 :ref:`Texture2D`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 基于 :ref:`Image` 的 :ref:`Texture2D`\ 。对于图像的显示,必须使用 :ref:`create_from_image` 方法从中创建一个 **ImageTexture**\ : @@ -51,15 +51,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`导入图像 <../tutorials/assets_pipeline/importing_images>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -70,8 +70,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -94,8 +94,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ImageTexture_method_create_from_image: @@ -159,10 +159,10 @@ void **update** **(** :ref:`Image` image **)** 如果需要频繁更新纹理,请使用该方法而不是 :ref:`set_image`\ ,这比每次为一个新纹理分配额外内存要快。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_imagetexture3d.rst b/classes/zh_CN/class_imagetexture3d.rst index 4121c80c55..e7cf021a31 100644 --- a/classes/zh_CN/class_imagetexture3d.rst +++ b/classes/zh_CN/class_imagetexture3d.rst @@ -10,14 +10,14 @@ ImageTexture3D ============== -**Inherits:** :ref:`Texture3D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture3D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 具有 3 个维度的纹理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **ImageTexture3D** 是一种具有宽度、高度、和深度的三维 :ref:`ImageTexture`\ 。另请参阅 :ref:`ImageTextureLayered`\ 。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ImageTexture3D_method_create: @@ -66,10 +66,10 @@ void **update** **(** :ref:`Image[]` data **)** 将纹理的现有数据替换为 ``data`` 中指定的图层。\ ``data`` 的大小必须与用于 :ref:`create` 的参数一致。换句话说,不能通过调用 :ref:`update` 来调整纹理的大小或改变其格式。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_imagetexturelayered.rst b/classes/zh_CN/class_imagetexturelayered.rst index 4fae1a4312..9b0c00d664 100644 --- a/classes/zh_CN/class_imagetexturelayered.rst +++ b/classes/zh_CN/class_imagetexturelayered.rst @@ -10,23 +10,23 @@ ImageTextureLayered =================== -**Inherits:** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`Cubemap`, :ref:`CubemapArray`, :ref:`Texture2DArray` +**派生:** :ref:`Cubemap`, :ref:`CubemapArray`, :ref:`Texture2DArray` 纹理类型的基类,包含多个 :ref:`ImageTexture` 的数据。各个图像具有相同的大小和格式。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`Texture2DArray`\ 、\ :ref:`Cubemap` 和 :ref:`CubemapArray` 的基类。不能直接使用,但包含了访问派生资源类型所需的所有函数。另请参阅 :ref:`Texture3D`\ 。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ImageTextureLayered_method_create_from_images: @@ -68,16 +68,16 @@ void **update_layer** **(** :ref:`Image` image, :ref:`int` 数据。 -给定的 :ref:`Image` 必须与其他引用的图像具有相同的宽度、高度、图像格式和 mipmapping 设置(\ ``bool`` 值)。 +给定的 :ref:`Image` 必须与其余引用的图像具有相同的宽度、高度、图像格式、和多级渐远纹理标志。 如果图像格式不受支持,它将被解压缩并转换为一个相似且受支持的 :ref:`Format`\ 。 更新是即时的:它与绘制同步。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_immediatemesh.rst b/classes/zh_CN/class_immediatemesh.rst index 50879e7cb0..4cdf9a2e16 100644 --- a/classes/zh_CN/class_immediatemesh.rst +++ b/classes/zh_CN/class_immediatemesh.rst @@ -10,14 +10,14 @@ ImmediateMesh ============= -**Inherits:** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 为手动创建几何体,而优化的网格。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 针对手动创建几何体优化的网格类型,与 OpenGL 1.x 的立即模式类似。 @@ -35,21 +35,30 @@ Description mesh.surface_add_vertex(Vector3.ZERO) mesh.surface_end() + .. code-tab:: csharp + + var mesh = new ImmediateMesh(); + mesh.SurfaceBegin(Mesh.PrimitiveType.Triangles); + mesh.SurfaceAddVertex(Vector3.Left); + mesh.SurfaceAddVertex(Vector3.Forward); + mesh.SurfaceAddVertex(Vector3.Zero); + mesh.SurfaceEnd(); + \ **注意:**\ 使用 **ImmediateMesh** 生成复杂的几何体极其低效。这种网格的设计目的是用来生成经常变化的简单几何体。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 ImmediateMesh <../tutorials/3d/procedural_geometry/immediatemesh>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -82,8 +91,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ImmediateMesh_method_clear_surfaces: @@ -201,10 +210,10 @@ void **surface_set_uv2** **(** :ref:`Vector2` uv2 **)** 设置将与下一个顶点一起推送的 UV2 属性。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_importermesh.rst b/classes/zh_CN/class_importermesh.rst index 5fb2fb7a57..890c1f4538 100644 --- a/classes/zh_CN/class_importermesh.rst +++ b/classes/zh_CN/class_importermesh.rst @@ -10,14 +10,14 @@ ImporterMesh ============ -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在导入过程中,包含基于顶点数组的几何体的 :ref:`Resource`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- ImporterMesh 是一种类似于 :ref:`ArrayMesh` 的 :ref:`Resource`\ 。它包含基于顶点数组的几何体,被分为\ *表面*\ 。每个表面都包含一个完全独立的数组和一个用于绘制它的材质。在设计方面,具有多个表面的网格优于单个表面,因为在 3D 编辑软件中创建的对象通常包含多种材质。 @@ -25,8 +25,8 @@ ImporterMesh 是一种类似于 :ref:`ArrayMesh` 的 :ref:`Reso .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -37,8 +37,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -97,8 +97,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ImporterMesh_property__data: @@ -108,7 +108,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-section-separator @@ -116,8 +116,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ImporterMesh_method_add_blend_shape: @@ -413,10 +413,10 @@ void **set_surface_name** **(** :ref:`int` surface_idx, :ref:`String< 设置给定曲面的名称。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_importermeshinstance3d.rst b/classes/zh_CN/class_importermeshinstance3d.rst index 805b639bf6..4a9b9bea07 100644 --- a/classes/zh_CN/class_importermeshinstance3d.rst +++ b/classes/zh_CN/class_importermeshinstance3d.rst @@ -10,27 +10,41 @@ ImporterMeshInstance3D ====================== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto - +-----------------------------------------+---------------------------------------------------------------------------+------------------+ - | :ref:`ImporterMesh` | :ref:`mesh` | | - +-----------------------------------------+---------------------------------------------------------------------------+------------------+ - | :ref:`NodePath` | :ref:`skeleton_path` | ``NodePath("")`` | - +-----------------------------------------+---------------------------------------------------------------------------+------------------+ - | :ref:`Skin` | :ref:`skin` | | - +-----------------------------------------+---------------------------------------------------------------------------+------------------+ + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`ShadowCastingSetting` | :ref:`cast_shadow` | ``1`` | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`int` | :ref:`layer_mask` | ``1`` | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`ImporterMesh` | :ref:`mesh` | | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`NodePath` | :ref:`skeleton_path` | ``NodePath("")`` | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`Skin` | :ref:`skin` | | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`float` | :ref:`visibility_range_begin` | ``0.0`` | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`float` | :ref:`visibility_range_begin_margin` | ``0.0`` | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`float` | :ref:`visibility_range_end` | ``0.0`` | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`float` | :ref:`visibility_range_end_margin` | ``0.0`` | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ + | :ref:`VisibilityRangeFadeMode` | :ref:`visibility_range_fade_mode` | ``0`` | + +---------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------+------------------+ .. rst-class:: classref-section-separator @@ -38,8 +52,46 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- + +.. _class_ImporterMeshInstance3D_property_cast_shadow: + +.. rst-class:: classref-property + +:ref:`ShadowCastingSetting` **cast_shadow** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_cast_shadows_setting** **(** :ref:`ShadowCastingSetting` value **)** +- :ref:`ShadowCastingSetting` **get_cast_shadows_setting** **(** **)** + +.. container:: contribute + + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ImporterMeshInstance3D_property_layer_mask: + +.. rst-class:: classref-property + +:ref:`int` **layer_mask** = ``1`` + +.. rst-class:: classref-property-setget + +- void **set_layer_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_layer_mask** **(** **)** + +.. container:: contribute + + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-item-separator + +---- .. _class_ImporterMeshInstance3D_property_mesh: @@ -54,7 +106,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -73,7 +125,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -92,12 +144,107 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. rst-class:: classref-item-separator + +---- + +.. _class_ImporterMeshInstance3D_property_visibility_range_begin: + +.. rst-class:: classref-property + +:ref:`float` **visibility_range_begin** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_visibility_range_begin** **(** :ref:`float` value **)** +- :ref:`float` **get_visibility_range_begin** **(** **)** + +.. container:: contribute + + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ImporterMeshInstance3D_property_visibility_range_begin_margin: + +.. rst-class:: classref-property + +:ref:`float` **visibility_range_begin_margin** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_visibility_range_begin_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_visibility_range_begin_margin** **(** **)** + +.. container:: contribute + + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ImporterMeshInstance3D_property_visibility_range_end: + +.. rst-class:: classref-property + +:ref:`float` **visibility_range_end** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_visibility_range_end** **(** :ref:`float` value **)** +- :ref:`float` **get_visibility_range_end** **(** **)** + +.. container:: contribute + + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ImporterMeshInstance3D_property_visibility_range_end_margin: + +.. rst-class:: classref-property + +:ref:`float` **visibility_range_end_margin** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_visibility_range_end_margin** **(** :ref:`float` value **)** +- :ref:`float` **get_visibility_range_end_margin** **(** **)** + +.. container:: contribute + + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ImporterMeshInstance3D_property_visibility_range_fade_mode: + +.. rst-class:: classref-property + +:ref:`VisibilityRangeFadeMode` **visibility_range_fade_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_visibility_range_fade_mode** **(** :ref:`VisibilityRangeFadeMode` value **)** +- :ref:`VisibilityRangeFadeMode` **get_visibility_range_fade_mode** **(** **)** + +.. container:: contribute + + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_input.rst b/classes/zh_CN/class_input.rst index ee9f807873..b0b029e191 100644 --- a/classes/zh_CN/class_input.rst +++ b/classes/zh_CN/class_input.rst @@ -10,14 +10,14 @@ Input ===== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 用于处理输入的单例。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **Input** 是处理键盘按键、鼠标按钮及移动、游戏手柄、输入动作等的单例。动作以及对应的事件可以在\ **项目 > 项目设置**\ 的\ **输入映射**\ 选项卡中设置,也可以使用 :ref:`InputMap` 类设置。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`输入文档索引 <../tutorials/inputs/index>` @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -154,8 +154,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Input_signal_joy_connection_changed: @@ -171,8 +171,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Input_MouseMode: @@ -376,8 +376,8 @@ I 形光标。通常用于指示点击鼠标后文本光标的位置。 .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Input_property_mouse_mode: @@ -419,8 +419,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Input_method_action_press: @@ -432,7 +432,7 @@ void **action_press** **(** :ref:`StringName` action, :ref:`fl 强度可以用于非布尔运算的动作,它的范围在 0 到 1 之间,代表给定动作的力度。 -\ **注意:**\ 这个方法不会引起任何 :ref:`Node._input` 调用。它旨在与 :ref:`is_action_pressed` 和 :ref:`is_action_just_pressed` 一起使用。如果你想模拟 ``_input``\ ,请使用 :ref:`parse_input_event` 代替。 +\ **注意:**\ 这个方法不会引起任何 :ref:`Node._input` 调用。它旨在与 :ref:`is_action_pressed` 和 :ref:`is_action_just_pressed` 一起使用。如果你想模拟 ``_input``\ ,请使用 :ref:`parse_input_event` 代替。 .. rst-class:: classref-item-separator @@ -482,11 +482,11 @@ void **flush_buffered_events** **(** **)** :ref:`Vector3` **get_accelerometer** **(** **)** |const| -Returns the acceleration in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns :ref:`Vector3.ZERO`. +如果设备有加速度计传感器,则返回该设备加速度计传感器的加速度,单位为 m/s²。否则,该方法返回 :ref:`Vector3.ZERO`\ 。\ -Note this method returns an empty :ref:`Vector3` when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer. +请注意,即使你的设备具有一个加速度计,在从编辑器运行时,该方法也会返回一个空的 :ref:`Vector3`\ 。必须将项目导出到一个支持的设备上,才能从加速度计读取值。 -\ **Note:** This method only works on Android and iOS. On other platforms, it always returns :ref:`Vector3.ZERO`. +\ **注意:**\ 该方法仅适用于 Android 和 iOS。在其他平台上,它总是返回 :ref:`Vector3.ZERO`\ 。 .. rst-class:: classref-item-separator @@ -616,21 +616,21 @@ Note this method returns an empty :ref:`Vector3` when running fro :ref:`Dictionary` **get_joy_info** **(** :ref:`int` device **)** |const| -Returns a dictionary with extra platform-specific information about the device, e.g. the raw gamepad name from the OS or the Steam Input index. +返回关于设备的额外平台相关信息字典,例如操作系统的原始游戏手柄名称,或者 Steam Input 索引。 -On Windows the dictionary contains the following fields: +在 Windows 上,该字典包含如下字段: -\ ``xinput_index``: The index of the controller in the XInput system. +\ ``xinput_index``\ :控制器在 XInput 系统中的索引。 -On Linux: +在 Linux 上: -\ ``raw_name``: The name of the controller as it came from the OS, before getting renamed by the godot controller database. +\ ``raw_name``\ :从操作系统获取的控制器名称,未经 Godot 控制器数据库重命名。 -\ ``vendor_id``: The USB vendor ID of the device. +\ ``vendor_id``\ :设备的 USB 供应商 ID。 -\ ``product_id``: The USB product ID of the device. +\ ``product_id``\ :设备的 USB 产品 ID。 -\ ``steam_input_index``: The Steam Input gamepad index, if the device is not a Steam Input device this key won't be present. +\ ``steam_input_index``\ :Steam Input 游戏手柄索引,如果该设备不是 Steam Input 设备则该字段不存在。 .. rst-class:: classref-item-separator @@ -690,9 +690,9 @@ On Linux: :ref:`Vector3` **get_magnetometer** **(** **)** |const| -Returns the magnetic field strength in micro-Tesla for all axes of the device's magnetometer sensor, if the device has one. Otherwise, the method returns :ref:`Vector3.ZERO`. +如果设备有磁力传感器,则返回设备所有轴的磁场强度,单位为微特斯拉。否则,该方法返回 :ref:`Vector3.ZERO`\ 。 -\ **Note:** This method only works on Android and iOS. On other platforms, it always returns :ref:`Vector3.ZERO`. +\ **注意:**\ 该方法仅适用于 Android 和 iOS。在其他平台上,它总是返回 :ref:`Vector3.ZERO`\ 。 .. rst-class:: classref-item-separator @@ -742,6 +742,8 @@ Returns the magnetic field strength in micro-Tesla for all axes of the device's \ **注意:**\ 由于键盘重影,即便该动作的某个键处于按下状态,\ :ref:`is_action_just_pressed` 仍可能会返回 ``false``\ 。详情见文档中的\ `《输入示例》 <../tutorials/inputs/input_examples.html#keyboard-events>`__\ 。 +\ **注意:**\ 在输入处理期间(例如 :ref:`Node._input`\ ),请使用 :ref:`InputEvent.is_action_pressed` 来查询当前事件的动作状态。 + .. rst-class:: classref-item-separator ---- @@ -758,6 +760,8 @@ Returns the magnetic field strength in micro-Tesla for all axes of the device's 如果 ``exact_match`` 为 ``false``\ ,则会忽略 :ref:`InputEventKey` 和 :ref:`InputEventMouseButton` 事件的额外输入修饰键,以及 :ref:`InputEventJoypadMotion` 事件的方向。 +\ **注意:**\ 在输入处理期间(例如 :ref:`Node._input`\ ),请使用 :ref:`InputEvent.is_action_released` 来查询当前事件的动作状态。 + .. rst-class:: classref-item-separator ---- @@ -768,11 +772,11 @@ Returns the magnetic field strength in micro-Tesla for all axes of the device's :ref:`bool` **is_action_pressed** **(** :ref:`StringName` action, :ref:`bool` exact_match=false **)** |const| -Returns ``true`` if you are pressing the action event. +如果正在按下操作事件,则返回 ``true``\ 。 -If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref:`InputEventKey` and :ref:`InputEventMouseButton` events, and the direction for :ref:`InputEventJoypadMotion` events. +如果 ``exact_match`` 为 ``false``\ ,则它会忽略 :ref:`InputEventKey` 和 :ref:`InputEventMouseButton` 事件的额外输入修饰键,以及 :ref:`InputEventJoypadMotion` 事件的方向。 -\ **Note:** Due to keyboard ghosting, :ref:`is_action_pressed` may return ``false`` even if one of the action's keys is pressed. See `Input examples <../tutorials/inputs/input_examples.html#keyboard-events>`__ in the documentation for more information. +\ **注意:**\ 由于键盘重影,\ :ref:`is_action_pressed` 可能会返回 ``false``\ ,即使动作的某个键被按下时也是如此。有关详细信息,请参阅文档中的 `《输入示例》 <../tutorials/inputs/input_examples.html#keyboard-events>`__\ 。 .. rst-class:: classref-item-separator @@ -876,7 +880,7 @@ If ``exact_match`` is ``false``, it ignores additional input modifiers for :ref: void **parse_input_event** **(** :ref:`InputEvent` event **)** -向游戏提供一个 :ref:`InputEvent`\ 。可用于从代码中人为地触发输入事件。也会产生 :ref:`Node._input` 调用。 +向游戏提供一个 :ref:`InputEvent`\ 。可用于从代码中人为地触发输入事件。也会产生 :ref:`Node._input` 调用。 \ **示例:**\ @@ -1015,9 +1019,9 @@ void **set_magnetometer** **(** :ref:`Vector3` value **)** :ref:`bool` **should_ignore_device** **(** :ref:`int` vendor_id, :ref:`int` product_id **)** |const| -Queries whether an input device should be ignored or not. Devices can be ignored by setting the environment variable ``SDL_GAMECONTROLLER_IGNORE_DEVICES``. Read the `SDL documentation `__ for more information. +查询输入设备是否应被忽略。可以通过设置环境变量 ``SDL_GAMECONTROLLER_IGNORE_DEVICES`` 来忽略设备。请阅读 `SDL 文档 `__\ 了解更多信息。 -\ **Note:** Some 3rd party tools can contribute to the list of ignored devices. For example, *SteamInput* creates virtual devices from physical devices for remapping purposes. To avoid handling the same input device twice, the original device is added to the ignore list. +\ **注意:**\ 某些第三方工具可以添加忽略设备列表。例如,\ *SteamInput* 从物理设备创建虚拟设备以进行重新映射。为了避免两次处理相同的输入设备,原始设备被添加到忽略列表中。 .. rst-class:: classref-item-separator @@ -1081,10 +1085,10 @@ void **warp_mouse** **(** :ref:`Vector2` position **)** \ **注意:**\ :ref:`warp_mouse` 仅支持 Windows、macOS 和 Linux。它对 Android、iOS 和 Web 没有影响。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputevent.rst b/classes/zh_CN/class_inputevent.rst index 6b78ea975a..44ce81a474 100644 --- a/classes/zh_CN/class_inputevent.rst +++ b/classes/zh_CN/class_inputevent.rst @@ -10,23 +10,23 @@ InputEvent ========== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`InputEventAction`, :ref:`InputEventFromWindow`, :ref:`InputEventJoypadButton`, :ref:`InputEventJoypadMotion`, :ref:`InputEventMIDI`, :ref:`InputEventShortcut` +**派生:** :ref:`InputEventAction`, :ref:`InputEventFromWindow`, :ref:`InputEventJoypadButton`, :ref:`InputEventJoypadMotion`, :ref:`InputEventMIDI`, :ref:`InputEventShortcut` 输入事件的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -各种输入事件的抽象基类。见 :ref:`Node._input`\ 。 +各种输入事件的抽象基类。见 :ref:`Node._input`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 InputEvent <../tutorials/inputs/inputevent>` @@ -38,8 +38,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -90,8 +90,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEvent_property_device: @@ -114,8 +114,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_InputEvent_method_accumulate: @@ -285,10 +285,10 @@ Method Descriptions 返回给定输入事件的副本,该副本已被 ``local_ofs`` 偏移并被 ``xform`` 变换。与 :ref:`InputEventMouseButton`\ 、\ :ref:`InputEventMouseMotion`\ 、\ :ref:`InputEventScreenTouch`\ 、\ :ref:`InputEventScreenDrag`\ 、\ :ref:`InputEventMagnifyGesture`\ 、和 :ref:`InputEventPanGesture` 类型的事件相关。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputeventaction.rst b/classes/zh_CN/class_inputeventaction.rst index 418af78c85..17820c4861 100644 --- a/classes/zh_CN/class_inputeventaction.rst +++ b/classes/zh_CN/class_inputeventaction.rst @@ -10,23 +10,23 @@ InputEventAction ================ -**Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 动作的输入事件类型。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 包含一个通用动作,该动作可以被多种类型的输入作为目标。动作及其事件可以在\ **项目 > 项目设置**\ 的\ **输入映射**\ 选项卡中设置,也可以使用 :ref:`InputMap` 类设置。 -\ **注意:**\ 与映射到唯一物理事件的其他 :ref:`InputEvent` 子类不同,这个虚拟事件不是由引擎发出的。这个类可以用来使用 :ref:`Input.parse_input_event` 手动发出动作,这样就能够在 :ref:`Node._input` 中接收到这些动作。要检查物理事件是否与“输入映射”中的动作相匹配,请使用 :ref:`InputEvent.is_action` 和 :ref:`InputEvent.is_action_pressed`\ 。 +\ **注意:**\ 与映射到唯一物理事件的其他 :ref:`InputEvent` 子类不同,这个虚拟事件不是由引擎发出的。这个类可以用来使用 :ref:`Input.parse_input_event` 手动发出动作,这样就能够在 :ref:`Node._input` 中接收到这些动作。要检查物理事件是否与“输入映射”中的动作相匹配,请使用 :ref:`InputEvent.is_action` 和 :ref:`InputEvent.is_action_pressed`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `使用 InputEvent:动作 <../tutorials/inputs/inputevent.html#actions>`__ @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEventAction_property_action: @@ -106,10 +106,10 @@ Property Descriptions 动作的强度,介于 0 和 1 之间。当 pressed 为 ``false`` 时,该值被视为等于 0。通过将事件强度设置为手柄轴的弯曲或按压强度,可以仿造模拟手柄的移动事件。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputeventfromwindow.rst b/classes/zh_CN/class_inputeventfromwindow.rst index 5dbedeb5f0..569e41b67e 100644 --- a/classes/zh_CN/class_inputeventfromwindow.rst +++ b/classes/zh_CN/class_inputeventfromwindow.rst @@ -10,23 +10,23 @@ InputEventFromWindow ==================== -**Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`InputEventScreenDrag`, :ref:`InputEventScreenTouch`, :ref:`InputEventWithModifiers` +**派生:** :ref:`InputEventScreenDrag`, :ref:`InputEventScreenTouch`, :ref:`InputEventWithModifiers` 基于 :ref:`Viewport` 的输入事件的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- InputEventFromWindow 代表明确由窗口接收的事件。包括鼠标事件、聚焦窗口中的键盘事件或触屏动作。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEventFromWindow_property_window_id: @@ -57,10 +57,10 @@ Property Descriptions 接收这个事件的 :ref:`Window` 的 ID。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputeventgesture.rst b/classes/zh_CN/class_inputeventgesture.rst index f8dd762b60..e0e7a70b96 100644 --- a/classes/zh_CN/class_inputeventgesture.rst +++ b/classes/zh_CN/class_inputeventgesture.rst @@ -10,30 +10,30 @@ InputEventGesture ================= -**Inherits:** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`InputEventMagnifyGesture`, :ref:`InputEventPanGesture` +**派生:** :ref:`InputEventMagnifyGesture`, :ref:`InputEventPanGesture` 触摸手势的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用户在触摸屏上执行支持的手势时会发送 InputEventGesture。无法用鼠标模拟手势,因为手势一般都要求多点触控。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEventGesture_property_position: @@ -62,12 +62,12 @@ Property Descriptions - void **set_position** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_position** **(** **)** -相对于\ :ref:`Viewport`\ 的本地手势位置。如果在\ :ref:`Control._gui_input`\ 中使用,位置是相对于当前接收该手势的控件\ :ref:`Control`\ 而言的。 +相对于\ :ref:`Viewport`\ 的本地手势位置。如果在\ :ref:`Control._gui_input`\ 中使用,位置是相对于当前接收该手势的控件\ :ref:`Control`\ 而言的。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputeventjoypadbutton.rst b/classes/zh_CN/class_inputeventjoypadbutton.rst index 619def992e..9ce70cba74 100644 --- a/classes/zh_CN/class_inputeventjoypadbutton.rst +++ b/classes/zh_CN/class_inputeventjoypadbutton.rst @@ -10,28 +10,28 @@ InputEventJoypadButton ====================== -**Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表按下或松开的游戏手柄按钮。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 游戏手柄按钮的输入事件类型。对于游戏手柄模拟摇杆和操纵杆,请参阅 :ref:`InputEventJoypadMotion`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEventJoypadButton_property_button_index: @@ -100,10 +100,10 @@ Property Descriptions 如果控制器支持,则表示用户用手指在按钮上施加的压力。范围从 ``0`` 到 ``1``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputeventjoypadmotion.rst b/classes/zh_CN/class_inputeventjoypadmotion.rst index 6e6091e4f1..6df3a5add9 100644 --- a/classes/zh_CN/class_inputeventjoypadmotion.rst +++ b/classes/zh_CN/class_inputeventjoypadmotion.rst @@ -10,28 +10,28 @@ InputEventJoypadMotion ====================== -**Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表游戏手柄的轴运动(例如摇杆和模拟扳机)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 存储关于摇杆运动的信息。一个 **InputEventJoypadMotion** 一次代表一个轴。游戏手柄按钮见 :ref:`InputEventJoypadButton`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEventJoypadMotion_property_axis: @@ -81,10 +81,10 @@ Property Descriptions 操纵杆在给定轴上的当前位置。该值范围从 ``-1.0`` 到 ``1.0``\ 。值为 ``0`` 意味着轴处于静止位置。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputeventkey.rst b/classes/zh_CN/class_inputeventkey.rst index 753b21c875..1a5ff2510b 100644 --- a/classes/zh_CN/class_inputeventkey.rst +++ b/classes/zh_CN/class_inputeventkey.rst @@ -10,16 +10,16 @@ InputEventKey ============= -**Inherits:** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表键盘上的某个按键被按下或松开。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -键盘上的按键操作对应的输入事件。支持按键按下、释放和 :ref:`echo` 事件。还可以在 :ref:`Node._unhandled_key_input` 收到。 +键盘上的按键操作对应的输入事件。支持按键按下、释放和 :ref:`echo` 事件。还可以在 :ref:`Node._unhandled_key_input` 收到。 \ **注意:**\ 从键盘上接收的事件通常设置了所有属性。事件映射应该只设置 :ref:`keycode`\ 、\ :ref:`physical_keycode`\ 、\ :ref:`unicode` 的其中之一。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -82,8 +82,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEventKey_property_echo: @@ -167,9 +167,32 @@ Property Descriptions - void **set_physical_keycode** **(** :ref:`Key` value **)** - :ref:`Key` **get_physical_keycode** **(** **)** -表示 101/102 键美式 QWERTY 键盘上某个键的物理位置,它对应于 :ref:`Key` 常量之一。 +代表按键在 101/102 键的美式键盘上的物理位置,对应一个 :ref:`Key` 常量。 + +要获取 **InputEventKey** 的人类可读表示,请搭配使用 :ref:`OS.get_keycode_string` 和 :ref:`DisplayServer.keyboard_get_keycode_from_physical`\ : + + +.. tabs:: + + .. code-tab:: gdscript + + func _input(event): + if event is InputEventKey: + var keycode = DisplayServer.keyboard_get_keycode_from_physical(event.physical_keycode) + print(OS.get_keycode_string(keycode)) + + .. code-tab:: csharp + + public override void _Input(InputEvent @event) + { + if (@event is InputEventKey inputEventKey) + { + var keycode = DisplayServer.KeyboardGetKeycodeFromPhysical(inputEventKey.PhysicalKeycode); + GD.Print(OS.GetKeycodeString(keycode)); + } + } + -要获得 **InputEventKey** 的人类可读表示,请使用 ``OS.get_keycode_string(event.keycode)``\ ,其中 ``event`` 是 **InputEventKey**\ 。 .. rst-class:: classref-item-separator @@ -211,8 +234,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_InputEventKey_method_as_text_key_label: @@ -288,10 +311,10 @@ Method Descriptions 要获得带有修饰符的 **InputEventKey** 的人类可读表示,请使用 ``OS.get_keycode_string(event.get_physical_keycode_with_modifiers())``\ ,其中 ``event`` 是 **InputEventKey**\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputeventmagnifygesture.rst b/classes/zh_CN/class_inputeventmagnifygesture.rst index ed2fc5e056..a8f19fd8f9 100644 --- a/classes/zh_CN/class_inputeventmagnifygesture.rst +++ b/classes/zh_CN/class_inputeventmagnifygesture.rst @@ -10,28 +10,30 @@ InputEventMagnifyGesture ======================== -**Inherits:** :ref:`InputEventGesture` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`InputEventGesture` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表放大触摸手势。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 存储放大触摸手势的系数。通常用户在触摸屏上将双指捏合,就执行了放大手势,可用于缩放。 +\ **注意:**\ 在 Android 上,这需要启用 :ref:`ProjectSettings.input_devices/pointing/android/enable_pan_and_scale_gestures` 项目设置。 + .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +48,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEventMagnifyGesture_property_factor: @@ -62,10 +64,10 @@ Property Descriptions 事件的量(或增量)。这个值越接近 ``1.0``\ ,手势执行地越快。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputeventmidi.rst b/classes/zh_CN/class_inputeventmidi.rst index 06845202db..c68531a645 100644 --- a/classes/zh_CN/class_inputeventmidi.rst +++ b/classes/zh_CN/class_inputeventmidi.rst @@ -10,14 +10,14 @@ InputEventMIDI ============== -**Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表来自 MIDI 设备的输入事件,例如钢琴。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- InputEventMIDI 允许从钢琴等 MIDI(Musical Instrument Digital Interface)设备接收输入事件。 @@ -84,8 +84,8 @@ MIDI 信号可以通过 5 针 MIDI 连接器或 USB 发送,如果你的设备 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `MIDI 消息状态字节列表 `__ @@ -95,8 +95,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -125,8 +125,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEventMIDI_property_channel: @@ -270,10 +270,10 @@ MIDI 信号的速度。这个值在 0 到 127 之间。对于钢琴,这对应 \ **注意:**\ 部分 MIDI 设备可能会发送速度为零的 :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON` 并期望进行和 :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_OFF` 一样的处理,但因设备实现而异,所以 Godot 会原样汇报事件数据。根据硬件和游戏/应用的需求的不同,可以用几行脚本来可靠地处理这种 MIDI 特质(检查 :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON` 的速度是否为零)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputeventmouse.rst b/classes/zh_CN/class_inputeventmouse.rst index 8aa3451cf8..f7fa4db98f 100644 --- a/classes/zh_CN/class_inputeventmouse.rst +++ b/classes/zh_CN/class_inputeventmouse.rst @@ -10,30 +10,30 @@ InputEventMouse =============== -**Inherits:** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`InputEventMouseButton`, :ref:`InputEventMouseMotion` +**派生:** :ref:`InputEventMouseButton`, :ref:`InputEventMouseMotion` 鼠标事件的基本输入事件类型。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 存储与鼠标事件相关的通用信息。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEventMouse_property_button_mask: @@ -83,9 +83,9 @@ Property Descriptions - void **set_global_position** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_global_position** **(** **)** -在 :ref:`Node._input` 或 :ref:`Node._unhandled_input` 中获取时,返回根 :ref:`Viewport` 中鼠标的位置,使用根 :ref:`Viewport` 的坐标系。 +在 :ref:`Node._input` 或 :ref:`Node._unhandled_input` 中获取时,返回根 :ref:`Viewport` 中鼠标的位置,使用根 :ref:`Viewport` 的坐标系。 -在 :ref:`Control._gui_input` 中获取时,返回该 :ref:`Control` 所在的 :ref:`CanvasLayer` 中鼠标的位置,使用该 :ref:`CanvasLayer` 的坐标系。 +在 :ref:`Control._gui_input` 中获取时,返回该 :ref:`Control` 所在的 :ref:`CanvasLayer` 中鼠标的位置,使用该 :ref:`CanvasLayer` 的坐标系。 .. rst-class:: classref-item-separator @@ -102,14 +102,14 @@ Property Descriptions - void **set_position** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_position** **(** **)** -在 :ref:`Node._input` 或 :ref:`Node._unhandled_input` 中获取时,返回该 :ref:`Node` 所在 :ref:`Viewport` 中鼠标的位置,使用该 :ref:`Viewport` 的坐标系。 +在 :ref:`Node._input` 或 :ref:`Node._unhandled_input` 中获取时,返回该 :ref:`Node` 所在 :ref:`Viewport` 中鼠标的位置,使用该 :ref:`Viewport` 的坐标系。 -在 :ref:`Control._gui_input` 中获取时,返回该 :ref:`Control` 中鼠标的位置,使用该 :ref:`Control` 的坐标系。 +在 :ref:`Control._gui_input` 中获取时,返回该 :ref:`Control` 中鼠标的位置,使用该 :ref:`Control` 的坐标系。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputeventmousebutton.rst b/classes/zh_CN/class_inputeventmousebutton.rst index 7201aecdcf..58d1f98842 100644 --- a/classes/zh_CN/class_inputeventmousebutton.rst +++ b/classes/zh_CN/class_inputeventmousebutton.rst @@ -10,21 +10,21 @@ InputEventMouseButton ===================== -**Inherits:** :ref:`InputEventMouse` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`InputEventMouse` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表某个鼠标按键被按下或松开。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -存储与鼠标点击事件相关的信息。见 :ref:`Node._input`\ 。 +存储与鼠标点击事件相关的信息。见 :ref:`Node._input`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 InputEvent <../tutorials/inputs/inputevent>` @@ -32,8 +32,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEventMouseButton_property_button_index: @@ -140,10 +140,10 @@ Property Descriptions 如果为 ``true``\ ,鼠标按键的状态为按下。如果为 ``false``\ ,鼠标按钮的状态被释放。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputeventmousemotion.rst b/classes/zh_CN/class_inputeventmousemotion.rst index 232caad861..689a0c0f16 100644 --- a/classes/zh_CN/class_inputeventmousemotion.rst +++ b/classes/zh_CN/class_inputeventmousemotion.rst @@ -10,23 +10,23 @@ InputEventMouseMotion ===================== -**Inherits:** :ref:`InputEventMouse` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`InputEventMouse` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表鼠标或笔的移动。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -存储鼠标或笔的运动信息。支持相对位置、绝对位置和速度。见 :ref:`Node._input`\ 。 +存储鼠标或笔的运动信息。支持相对位置、绝对位置和速度。见 :ref:`Node._input`\ 。 \ **注意:**\ 默认情况下,该事件每个渲染帧最多只会发出一个。如果你需要更精确的输入汇报,请将 :ref:`Input.use_accumulated_input` 设置为 ``false``\ ,尽可能频繁地发出事件。如果你使用 InputEventMouseMotion 来画线,请考虑同时实现\ `布雷森汉姆直线算法 `__\ ,以避免在用户快速移动鼠标时出现可见的线条空隙。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 InputEvent <../tutorials/inputs/inputevent>` @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -60,8 +60,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEventMouseMotion_property_pen_inverted: @@ -148,10 +148,10 @@ Property Descriptions 鼠标速度,以像素每秒为单位。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputeventpangesture.rst b/classes/zh_CN/class_inputeventpangesture.rst index aec5512611..660495f69e 100644 --- a/classes/zh_CN/class_inputeventpangesture.rst +++ b/classes/zh_CN/class_inputeventpangesture.rst @@ -10,28 +10,30 @@ InputEventPanGesture ==================== -**Inherits:** :ref:`InputEventGesture` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`InputEventGesture` **<** :ref:`InputEventWithModifiers` **<** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表平移触摸手势。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 存储与平移手势相关的信息。用户在触摸屏上滑动双指,就执行了平移手势。一般用于平移/滚动。 +\ **注意:**\ 在 Android 上,这需要启用 :ref:`ProjectSettings.input_devices/pointing/android/enable_pan_and_scale_gestures` 项目设置。 + .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +48,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEventPanGesture_property_delta: @@ -62,10 +64,10 @@ Property Descriptions 上一次平移事件以来的平移量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputeventscreendrag.rst b/classes/zh_CN/class_inputeventscreendrag.rst index 640de4ac18..16ae8a0e8a 100644 --- a/classes/zh_CN/class_inputeventscreendrag.rst +++ b/classes/zh_CN/class_inputeventscreendrag.rst @@ -10,28 +10,28 @@ InputEventScreenDrag ==================== -**Inherits:** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表屏幕拖拽事件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -存放与屏幕拖拽事件相关的信息。见 :ref:`Node._input`\ 。 +存放与屏幕拖拽事件相关的信息。见 :ref:`Node._input`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEventScreenDrag_property_index: @@ -176,10 +176,10 @@ Property Descriptions 拖拽的速度。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputeventscreentouch.rst b/classes/zh_CN/class_inputeventscreentouch.rst index 0a30f80013..2c4b96f79d 100644 --- a/classes/zh_CN/class_inputeventscreentouch.rst +++ b/classes/zh_CN/class_inputeventscreentouch.rst @@ -10,28 +10,28 @@ InputEventScreenTouch ===================== -**Inherits:** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表屏幕触摸事件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 存储多点触摸的按压/释放信息。支持触摸按压、触摸释放以及用于多点触摸计数和定序的 :ref:`index`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEventScreenTouch_property_canceled: @@ -138,10 +138,10 @@ Property Descriptions 如果为 ``true``\ ,触摸的状态为按下。如果为 ``false``\ ,触摸的状态被释放。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputeventshortcut.rst b/classes/zh_CN/class_inputeventshortcut.rst index 3bbc532631..0477c72ac5 100644 --- a/classes/zh_CN/class_inputeventshortcut.rst +++ b/classes/zh_CN/class_inputeventshortcut.rst @@ -10,21 +10,21 @@ InputEventShortcut ================== -**Inherits:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表触发的键盘快捷键 :ref:`Shortcut`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -InputEventShortcut 是一种可以在 :ref:`Node._unhandled_key_input` 中收到的特殊事件。通常由编辑器的“命令面板”发送,用于触发动作,但也可以使用 :ref:`Viewport.push_input` 手动发送。 +InputEventShortcut 是一种可以在 :ref:`Node._unhandled_key_input` 中收到的特殊事件。通常由编辑器的“命令面板”发送,用于触发动作,但也可以使用 :ref:`Viewport.push_input` 手动发送。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEventShortcut_property_shortcut: @@ -55,10 +55,10 @@ Property Descriptions 这个事件代表的 :ref:`Shortcut`\ 。它的 :ref:`Shortcut.matches_event` 方法对这个事件始终返回 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputeventwithmodifiers.rst b/classes/zh_CN/class_inputeventwithmodifiers.rst index 1484b349b5..26888b34f6 100644 --- a/classes/zh_CN/class_inputeventwithmodifiers.rst +++ b/classes/zh_CN/class_inputeventwithmodifiers.rst @@ -10,30 +10,30 @@ InputEventWithModifiers ======================= -**Inherits:** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`InputEventFromWindow` **<** :ref:`InputEvent` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`InputEventGesture`, :ref:`InputEventKey`, :ref:`InputEventMouse` +**派生:** :ref:`InputEventGesture`, :ref:`InputEventKey`, :ref:`InputEventMouse` 受 :kbd:`Shift` 和 :kbd:`Alt` 等修饰键影响的输入事件的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -存储鼠标、键盘、触摸手势等输入事件的相关信息。包括按下了哪些修饰键等信息,修饰键包括 :kbd:`Shift`\ 、\ :kbd:`Alt` 等。见 :ref:`Node._input`\ 。 +存储鼠标、键盘、触摸手势等输入事件的相关信息。包括按下了哪些修饰键等信息,修饰键包括 :kbd:`Shift`\ 、\ :kbd:`Alt` 等。见 :ref:`Node._input`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 InputEvent <../tutorials/inputs/inputevent>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -70,8 +70,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_InputEventWithModifiers_property_alt_pressed: @@ -101,7 +101,7 @@ Property Descriptions - void **set_command_or_control_autoremap** **(** :ref:`bool` value **)** - :ref:`bool` **is_command_or_control_autoremap** **(** **)** -Automatically use :kbd:`Meta` (:kbd:`Cmd`) on macOS and :kbd:`Ctrl` on other platforms. If ``true``, :ref:`ctrl_pressed` and :ref:`meta_pressed` cannot be set. +自动在 macOS 上使用 :kbd:`Meta`\ (\ :kbd:`Cmd`\ ),在其他平台上使用 :kbd:`Ctrl`\ 。如果为 ``true``\ ,则无法设置 :ref:`ctrl_pressed` 和 :ref:`meta_pressed`\ 。 .. rst-class:: classref-item-separator @@ -160,8 +160,8 @@ Automatically use :kbd:`Meta` (:kbd:`Cmd`) on macOS and :kbd:`Ctrl` on other pla .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_InputEventWithModifiers_method_get_modifiers_mask: @@ -181,14 +181,14 @@ Method Descriptions :ref:`bool` **is_command_or_control_pressed** **(** **)** |const| -On macOS, returns ``true`` if :kbd:`Meta` (:kbd:`Cmd`) is pressed. +在 macOS 上,如果 :kbd:`Meta`\ (\ :kbd:`Cmd`\ )是按下状态,则返回 ``true`` 。 -On other platforms, returns ``true`` if :kbd:`Ctrl` is pressed. +在其他平台上,如果 :kbd:`Ctrl` 是按下状态,则返回 ``true`` 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_inputmap.rst b/classes/zh_CN/class_inputmap.rst index 597dad19db..a3460d3624 100644 --- a/classes/zh_CN/class_inputmap.rst +++ b/classes/zh_CN/class_inputmap.rst @@ -10,28 +10,28 @@ InputMap ======== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 管理所有 :ref:`InputEventAction` 的单例。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -管理所有的 :ref:`InputEventAction`\ ,可以通过项目设置菜单\ **项目 > 项目设置 > 输入映射**\ 或在代码中用 :ref:`add_action` 和 :ref:`action_add_event` 创建/修改。请参阅 :ref:`Node._input`\ 。 +管理所有的 :ref:`InputEventAction`\ ,可以通过项目设置菜单\ **项目 > 项目设置 > 输入映射**\ 或在代码中用 :ref:`add_action` 和 :ref:`action_add_event` 创建/修改。请参阅 :ref:`Node._input`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `使用 InputEvent:InputMap <../tutorials/inputs/inputevent.html#inputmap>`__ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -70,8 +70,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_InputMap_method_action_add_event: @@ -231,10 +231,10 @@ void **load_from_project_settings** **(** **)** 清除 **InputMap** 中的所有 :ref:`InputEventAction`\ ,并从 :ref:`ProjectSettings` 项目设置中重新加载它。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_instanceplaceholder.rst b/classes/zh_CN/class_instanceplaceholder.rst index 46a4395c96..102fa2911d 100644 --- a/classes/zh_CN/class_instanceplaceholder.rst +++ b/classes/zh_CN/class_instanceplaceholder.rst @@ -10,14 +10,14 @@ InstancePlaceholder =================== -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` :ref:`PackedScene` 根 :ref:`Node` 的占位符。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 在编辑器中为实例化的场景打开\ **加载为占位符**\ 选项会导致在运行游戏时将其替换为 **InstancePlaceholder**\ 。这样就可以将场景的实际加载推迟到调用 :ref:`create_instance` 时。这对于通过选择性加载部分场景来避免一次性加载大场景很有用。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_InstancePlaceholder_method_create_instance: @@ -84,10 +84,10 @@ Method Descriptions 如果 ``with_order`` 为 ``true``\ ,会在字典中加入 ``.order`` 字段(注意有个前缀的点)。这个 ``.order`` 字段是属性名称 :ref:`String` 的 :ref:`Array`\ ,指定属性的应用顺序(索引为 0 的是第一个)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_int.rst b/classes/zh_CN/class_int.rst index 3f74354bf6..4bf719fccf 100644 --- a/classes/zh_CN/class_int.rst +++ b/classes/zh_CN/class_int.rst @@ -14,64 +14,64 @@ int .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Signed 64-bit integer type. This means that it can take values from ``-2^63`` to ``2^63 - 1``, i.e. from ``-9223372036854775808`` to ``9223372036854775807``. When it exceeds these bounds, it will wrap around. +带符号 64 位整数类型。这意味着它能够接受从 ``-2^63`` 到 ``2^63 - 1`` 的值,即从 ``-9223372036854775808`` 到 ``9223372036854775807``\ 。超出这个范围后,值会绕回到另一端。 -\ **int**\ s can be automatically converted to :ref:`float`\ s when necessary, for example when passing them as arguments in functions. The :ref:`float` will be as close to the original integer as possible. +\ **int** 可以在需要时自动转换为 :ref:`float`\ ,例如在作为函数的参数传递的时候。\ :ref:`float` 会尽可能与原始整数接近。 -Likewise, :ref:`float`\ s can be automatically converted into **int**\ s. This will truncate the :ref:`float`, discarding anything after the floating point. +类似地,\ :ref:`float` 可以自动转换为 **int**\ 。这样会截断该 :ref:`float`\ ,丢弃小数点之后的部分。 -\ **Note:** In a boolean context, an **int** will evaluate to ``false`` if it equals ``0``, and to ``true`` otherwise. +\ **注意:**\ 布尔环境中会将等于 ``0`` 的 **int** 评估为 ``false``\ ,其他值则为 ``true``\ 。 .. tabs:: .. code-tab:: gdscript - var x: int = 1 # x is 1 - x = 4.2 # x is 4, because 4.2 gets truncated - var max_int = 9223372036854775807 # Biggest value an int can store - max_int += 1 # max_int is -9223372036854775808, because it wrapped around + var x: int = 1 # x 为 1 + x = 4.2 # x 为 4,因为 4.2 发生了截断 + var max_int = 9223372036854775807 # int 所能存储的最大值 + max_int += 1 # max_int 现在是 -9223372036854775808,因为它绕到了另一端 .. code-tab:: csharp - int x = 1; // x is 1 - x = (int)4.2; // x is 4, because 4.2 gets truncated - // We use long below, because GDScript's int is 64-bit while C#'s int is 32-bit. - long maxLong = 9223372036854775807; // Biggest value a long can store - maxLong++; // maxLong is now -9223372036854775808, because it wrapped around. + int x = 1; // x 为 1 + x = (int)4.2; // x 为 4,因为 4.2 发生了截断 + // 下面使用 long,因为 GDScript 的 int 为 64 位,而 C# 的 int 为 32 位。 + long maxLong = 9223372036854775807; // long 所能存储的最大值 + maxLong++; // maxLong 现在是 -9223372036854775808,因为它绕到了另一端。 - // Alternatively with C#'s 32-bit int type, which has a smaller maximum value. - int maxInt = 2147483647; // Biggest value an int can store - maxInt++; // maxInt is now -2147483648, because it wrapped around + // 也可以使用 C# 的 32 位 int 类型,最大值较小。 + int maxInt = 2147483647; // int 所能存储的最大值 + maxInt++; // maxInt 现在是 -2147483648,因为它绕到了另一端。 -You can use the ``0b`` literal for binary representation, the ``0x`` literal for hexadecimal representation, and the ``_`` symbol to separate long numbers and improve readability. +你可以使用 ``0b`` 字面量书写二进制值,使用 ``0x`` 字面量书写十六进制值,使用 ``_`` 符号分隔较长的数字,提升可读性。 .. tabs:: .. code-tab:: gdscript - var x = 0b1001 # x is 9 - var y = 0xF5 # y is 245 - var z = 10_000_000 # z is 10000000 + var x = 0b1001 # x 为 9 + var y = 0xF5 # y 为 245 + var z = 10_000_000 # z 为 10000000 .. code-tab:: csharp - int x = 0b1001; // x is 9 - int y = 0xF5; // y is 245 - int z = 10_000_000; // z is 10000000 + int x = 0b1001; // x 为 9 + int y = 0xF5; // y 为 245 + int z = 10_000_000; // z 为 10000000 .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -90,8 +90,8 @@ Constructors .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -182,8 +182,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_int_constructor_int: @@ -239,8 +239,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_int_operator_neq_float: @@ -769,17 +769,17 @@ Operator Descriptions :ref:`int` **operator ~** **(** **)** -Performs the bitwise ``NOT`` operation on the **int**. Due to `2's complement `__, it's effectively equal to ``-(int + 1)``. +对该 **int** 执行按位 ``NOT``\ (反)运算。由于\ `补码 `__\ ,效果上与 ``-(int + 1)`` 相同。 :: - print(~4) # Prints -5 - print(~(-7)) # Prints 6 + print(~4) # 输出 -5 + print(~(-7)) # 输出 6 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_intervaltweener.rst b/classes/zh_CN/class_intervaltweener.rst index faf1b4fa81..ccf3e0c5fd 100644 --- a/classes/zh_CN/class_intervaltweener.rst +++ b/classes/zh_CN/class_intervaltweener.rst @@ -10,23 +10,23 @@ IntervalTweener =============== -**Inherits:** :ref:`Tweener` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Tweener` **<** :ref:`RefCounted` **<** :ref:`Object` 在 :ref:`Tween` 动画中创建空闲间隔。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **IntervalTweener** 可用于在补间序列中制作延迟。更多用法信息请参阅 :ref:`Tween.tween_interval`\ 。 \ **注意:**\ 创建 **IntervalTweener** 的唯一正确方法是 :ref:`Tween.tween_interval`\ 。任何手动创建的 **IntervalTweener** 都无法正常工作。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_ip.rst b/classes/zh_CN/class_ip.rst index 6b37660b69..744be87457 100644 --- a/classes/zh_CN/class_ip.rst +++ b/classes/zh_CN/class_ip.rst @@ -10,21 +10,21 @@ IP == -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 网际协议(IP)支持函数,如 DNS 解析。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- IP 包含网际协议(IP)的支持函数。TCP/IP 的支持在其他类中(请参阅 :ref:`StreamPeerTCP` 和 :ref:`TCPServer`\ )。IP 提供 DNS 主机名解析支持,包括阻塞式和线程式。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -57,8 +57,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_IP_ResolverStatus: @@ -146,8 +146,8 @@ enum **Type**: .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_IP_constant_RESOLVER_MAX_QUERIES: @@ -171,8 +171,8 @@ Constants .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_IP_method_clear_cache: @@ -301,10 +301,10 @@ void **erase_resolve_item** **(** :ref:`int` id **)** 创建一个队列项目,根据 :ref:`Type` 常量 ``ip_type``\ ,将主机名解析为 IPv4 或 IPv6 地址。如果成功,则返回队列 ID,否则返回 :ref:`RESOLVER_INVALID_ID`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_itemlist.rst b/classes/zh_CN/class_itemlist.rst index d0b42ebb21..f8217b3709 100644 --- a/classes/zh_CN/class_itemlist.rst +++ b/classes/zh_CN/class_itemlist.rst @@ -10,14 +10,14 @@ ItemList ======== -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 可选项目的垂直列表,可以有一列或多列。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该控件提供了可选项目的垂直列表,这些项目可能位于单列或多列中,每个项目都有文本和图标选项。支持工具提示,并且列表中的每个项目可能会有所不同。 @@ -31,8 +31,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -73,8 +73,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -173,8 +173,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -225,8 +225,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_ItemList_signal_empty_clicked: @@ -294,8 +294,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_ItemList_IconMode: @@ -351,8 +351,8 @@ enum **SelectMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ItemList_property_allow_reselect: @@ -606,8 +606,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ItemList_method_add_icon_item: @@ -691,7 +691,7 @@ void **ensure_current_is_visible** **(** **)** void **force_update_list_size** **(** **)** -Forces an update to the list size based on its items. This happens automatically whenever size of the items, or other relevant settings like :ref:`auto_height`, change. The method can be used to trigger the update ahead of next drawing pass. +根据列表项强制更新该列表大小。每当项目的大小或其他相关设置(例如 :ref:`auto_height`\ )发生变化时,这种情况就会自动发生。该方法可被用于在下一次绘制阶段之前触发更新。 .. rst-class:: classref-item-separator @@ -1167,8 +1167,8 @@ void **sort_items_by_text** **(** **)** .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_ItemList_theme_color_font_color: @@ -1396,10 +1396,10 @@ Theme Property Descriptions 所选项的样式盒 :ref:`StyleBox`\ ,当该 **ItemList** 获得焦点时使用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_javaclass.rst b/classes/zh_CN/class_javaclass.rst index 7ab5101cc5..354e26d02e 100644 --- a/classes/zh_CN/class_javaclass.rst +++ b/classes/zh_CN/class_javaclass.rst @@ -10,16 +10,16 @@ JavaClass ========= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_javaclasswrapper.rst b/classes/zh_CN/class_javaclasswrapper.rst index d36918c968..0cd57f05e0 100644 --- a/classes/zh_CN/class_javaclasswrapper.rst +++ b/classes/zh_CN/class_javaclasswrapper.rst @@ -10,16 +10,16 @@ JavaClassWrapper ================ -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -34,8 +34,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_JavaClassWrapper_method_wrap: @@ -45,12 +45,12 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_javascriptbridge.rst b/classes/zh_CN/class_javascriptbridge.rst index bee2771681..fc6e5b296d 100644 --- a/classes/zh_CN/class_javascriptbridge.rst +++ b/classes/zh_CN/class_javascriptbridge.rst @@ -10,14 +10,14 @@ JavaScriptBridge ================ -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 单例,在 Web 导出中将引擎与浏览器的 JavaScript 上下文连接。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- JavaScriptBridge 单例仅在 Web 导出中实现。它用于访问浏览器的 JavaScript 上下文。这允许与嵌入页面或调用第三方 JavaScript API 进行交互。 @@ -25,15 +25,15 @@ JavaScriptBridge 单例仅在 Web 导出中实现。它用于访问浏览器的 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `为 Web 导出:从脚本调用 JavaScript <../tutorials/export/exporting_for_web.html#calling-javascript-from-script>`__ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -62,8 +62,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_JavaScriptBridge_signal_pwa_update_available: @@ -79,8 +79,8 @@ Signals .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_JavaScriptBridge_method_create_callback: @@ -190,10 +190,10 @@ void **force_fs_sync** **(** **)** \ **注意:**\ 只在导出为渐进式网络应用程序(Progressive Web App)且 :ref:`pwa_needs_update` 返回 ``true`` 时相关。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_javascriptobject.rst b/classes/zh_CN/class_javascriptobject.rst index 4cd417ba47..5d88b6bb8f 100644 --- a/classes/zh_CN/class_javascriptobject.rst +++ b/classes/zh_CN/class_javascriptobject.rst @@ -10,14 +10,14 @@ JavaScriptObject ================ -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` Web 原生 JavaScript 对象的封装类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- JavaScriptObject 用于与通过 :ref:`JavaScriptBridge.get_interface`\ 、\ :ref:`JavaScriptBridge.create_object` 或 :ref:`JavaScriptBridge.create_callback` 检索或创建的 JavaScript 对象进行交互。 @@ -51,10 +51,10 @@ JavaScriptObject 用于与通过 :ref:`JavaScriptBridge.get_interface` +**继承:** :ref:`Object` 将引擎与 Android 插件连接起来以与原生 Android 代码交互的单例。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- JNISingleton 仅在 Android 导出中实现。它用于从用 Java 或 Kotlin 编写的 Android 插件调用方法、连接信号。方法和信号可以被调用并连接到 JNISingleton,就好像它是一个 Node 一样。有关更多信息,请参阅 `Java 本地接口 - 维基百科 `__\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `创建 Android 插件 <../tutorials/platform/android/android_plugin.html#doc-android-plugin>`__ -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_joint2d.rst b/classes/zh_CN/class_joint2d.rst index 60750de1ba..a53bcc03a7 100644 --- a/classes/zh_CN/class_joint2d.rst +++ b/classes/zh_CN/class_joint2d.rst @@ -10,23 +10,23 @@ Joint2D ======= -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`DampedSpringJoint2D`, :ref:`GrooveJoint2D`, :ref:`PinJoint2D` +**派生:** :ref:`DampedSpringJoint2D`, :ref:`GrooveJoint2D`, :ref:`PinJoint2D` 所有 2D 物理关节的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 2D 物理中所有关节的抽象基类。2D 关节能够将两个物理体绑定在一起并施加约束。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -59,8 +59,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Joint2D_property_bias: @@ -73,7 +73,7 @@ Property Descriptions - void **set_bias** **(** :ref:`float` value **)** - :ref:`float` **get_bias** **(** **)** -当 :ref:`node_a` 和 :ref:`node_b` 向不同方向移动时,\ ``bias`` 控制关节将它们拉回到原始位置的速度。\ ``bias`` 越低,两个实体对该关节的拉力就越大。 +当 :ref:`node_a` 和 :ref:`node_b` 向不同方向移动时,\ :ref:`bias` 控制关节将它们拉回到原始位置的速度。\ :ref:`bias` 越低,两个实体对该关节的拉力就越大。 当被设置为 ``0`` 时,使用来自 :ref:`ProjectSettings.physics/2d/solver/default_constraint_bias` 的默认值。 @@ -134,8 +134,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Joint2D_method_get_rid: @@ -143,12 +143,12 @@ Method Descriptions :ref:`RID` **get_rid** **(** **)** |const| -Returns the joint's :ref:`RID`. +返回关节的 :ref:`RID`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_joint3d.rst b/classes/zh_CN/class_joint3d.rst index 721600ea7f..ec6b74aa39 100644 --- a/classes/zh_CN/class_joint3d.rst +++ b/classes/zh_CN/class_joint3d.rst @@ -10,30 +10,30 @@ Joint3D ======= -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`ConeTwistJoint3D`, :ref:`Generic6DOFJoint3D`, :ref:`HingeJoint3D`, :ref:`PinJoint3D`, :ref:`SliderJoint3D` +**派生:** :ref:`ConeTwistJoint3D`, :ref:`Generic6DOFJoint3D`, :ref:`HingeJoint3D`, :ref:`PinJoint3D`, :ref:`SliderJoint3D` 所有 3D 物理关节的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 3D 物理中所有关节的抽象基类。3D 关节能够将两个物理体绑定在一起并施加约束。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 货车镇演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -66,8 +66,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Joint3D_property_exclude_nodes_from_collision: @@ -139,8 +139,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Joint3D_method_get_rid: @@ -148,12 +148,12 @@ Method Descriptions :ref:`RID` **get_rid** **(** **)** |const| -Returns the joint's :ref:`RID`. +返回关节的 :ref:`RID`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_json.rst b/classes/zh_CN/class_json.rst index 272c53fc9f..76d85abdb0 100644 --- a/classes/zh_CN/class_json.rst +++ b/classes/zh_CN/class_json.rst @@ -10,14 +10,14 @@ JSON ==== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于创建和解析 JSON 数据的辅助类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **JSON** 允许所有数据类型与 JSON 字符串相互转换。 这对于序列化数据以保存到文件或通过网络发送很有用。 @@ -63,8 +63,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -75,8 +75,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -101,8 +101,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_JSON_property_data: @@ -123,8 +123,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_JSON_method_get_error_line: @@ -245,10 +245,10 @@ Method Descriptions ...] } -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_jsonrpc.rst b/classes/zh_CN/class_jsonrpc.rst index 6ef896eef9..629c4ac381 100644 --- a/classes/zh_CN/class_jsonrpc.rst +++ b/classes/zh_CN/class_jsonrpc.rst @@ -10,21 +10,21 @@ JSONRPC ======= -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 用于处理看起来像 JSONRPC 文档的字典的辅助类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- `JSON-RPC `__ 是一项标准,它将方法调用包装在一个 :ref:`JSON` 对象中。该对象有一个特定的结构,并标识出哪个方法被调用,该函数的参数,并携带一个 ID 来跟踪响应。这个类在 :ref:`Dictionary` 之上实现了该标准;你必须用其他函数在 :ref:`Dictionary` 和 :ref:`JSON` 之间进行转换。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -51,8 +51,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_JSONRPC_ErrorCode: @@ -106,8 +106,8 @@ enum **ErrorCode**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_JSONRPC_method_make_notification: @@ -201,7 +201,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -215,12 +215,12 @@ void **set_scope** **(** :ref:`String` scope, :ref:`Object`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_kinematiccollision2d.rst b/classes/zh_CN/class_kinematiccollision2d.rst index edc3e7f1a9..a5d47af481 100644 --- a/classes/zh_CN/class_kinematiccollision2d.rst +++ b/classes/zh_CN/class_kinematiccollision2d.rst @@ -10,14 +10,14 @@ KinematicCollision2D ==================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 存放移动 :ref:`PhysicsBody2D` 所产生的碰撞数据。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 存放移动 :ref:`PhysicsBody2D` 所产生的碰撞数据,通常是由 :ref:`PhysicsBody2D.move_and_collide` 产生的。移动 :ref:`PhysicsBody2D` 时,它会在检测到与另一个实体发生碰撞时停止。检测到碰撞时就会返回 **KinematicCollision2D** 对象。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -65,8 +65,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_KinematicCollision2D_method_get_angle: @@ -220,10 +220,10 @@ Method Descriptions 返回移动对象的在碰撞前的运动。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_kinematiccollision3d.rst b/classes/zh_CN/class_kinematiccollision3d.rst index 51ee42b9ab..cf9c247349 100644 --- a/classes/zh_CN/class_kinematiccollision3d.rst +++ b/classes/zh_CN/class_kinematiccollision3d.rst @@ -10,14 +10,14 @@ KinematicCollision3D ==================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 存放移动 :ref:`PhysicsBody3D` 所产生的碰撞数据。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 存放移动 :ref:`PhysicsBody3D` 所产生的碰撞数据,通常是由 :ref:`PhysicsBody3D.move_and_collide` 产生的。移动 :ref:`PhysicsBody3D` 时,它会在检测到与另一个实体发生碰撞时停止。检测到碰撞时就会返回 **KinematicCollision3D** 对象。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -67,8 +67,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_KinematicCollision3D_method_get_angle: @@ -234,10 +234,10 @@ Method Descriptions 返回移动对象的在碰撞前的运动。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_label.rst b/classes/zh_CN/class_label.rst index 2b1967f2a1..57d88fec98 100644 --- a/classes/zh_CN/class_label.rst +++ b/classes/zh_CN/class_label.rst @@ -10,28 +10,28 @@ Label ===== -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 用于显示纯文本的控件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于显示纯文本的控件。可以控制水平和垂直对齐方式以及文本在节点包围框内的换行方式。不支持粗体、斜体等富文本格式。这种需求请改用 :ref:`RichTextLabel`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `2D Dodge The Creeps 演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -82,8 +82,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -100,8 +100,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -136,8 +136,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Label_property_autowrap_mode: @@ -252,7 +252,7 @@ Property Descriptions - void **set_lines_skipped** **(** :ref:`int` value **)** - :ref:`int` **get_lines_skipped** **(** **)** -该节点在开始显示文本之前会忽略前 ``lines_skipped`` 行。 +从 :ref:`text` 值的开头开始忽略且不显示的行数。 .. rst-class:: classref-item-separator @@ -468,8 +468,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Label_method_get_line_count: @@ -525,8 +525,8 @@ Method Descriptions .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_Label_theme_color_font_color: @@ -658,10 +658,10 @@ Theme Property Descriptions 为 **Label** 设置背景样式盒 :ref:`StyleBox`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_label3d.rst b/classes/zh_CN/class_label3d.rst index 35bf335e2a..34e16bfca4 100644 --- a/classes/zh_CN/class_label3d.rst +++ b/classes/zh_CN/class_label3d.rst @@ -10,28 +10,28 @@ Label3D ======= -**Inherits:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 用于在 3D 空间显示纯文本的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于在 3D 空间显示纯文本的节点。通过调整该节点的各种属性,可以配置文本外观、是否面朝相机等特性。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`3D text <../tutorials/3d/3d_text>` +- :doc:`3D 文本 <../tutorials/3d/3d_text>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -108,8 +108,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -128,8 +128,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Label3D_DrawFlags: @@ -231,8 +231,8 @@ enum **AlphaCutMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Label3D_property_alpha_antialiasing_edge: @@ -790,8 +790,8 @@ Alpha 裁剪丢弃数值的阈值。 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Label3D_method_generate_triangle_mesh: @@ -825,10 +825,10 @@ void **set_draw_flag** **(** :ref:`DrawFlags` flag, :ref 如果为 ``true``\ ,会启用指定的标志。标志列表请参阅 :ref:`DrawFlags`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_labelsettings.rst b/classes/zh_CN/class_labelsettings.rst index d20920927b..6b829f54d4 100644 --- a/classes/zh_CN/class_labelsettings.rst +++ b/classes/zh_CN/class_labelsettings.rst @@ -10,21 +10,21 @@ LabelSettings ============= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 提供能够在 :ref:`Label` 中自定义文本的常见设置。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **LabelSettings** 是一种提供在 :ref:`Label` 中自定义文本的常见设置的资源。优先于 :ref:`Control.theme` 中定义的属性。该资源可以在多个标签之间共享,可以随时替换,因此可以方便、灵活地设置文本样式。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_LabelSettings_property_font: @@ -207,10 +207,10 @@ Property Descriptions 阴影效果的大小。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_light2d.rst b/classes/zh_CN/class_light2d.rst index 6b0fb257f0..49cf84b02f 100644 --- a/classes/zh_CN/class_light2d.rst +++ b/classes/zh_CN/class_light2d.rst @@ -10,30 +10,30 @@ Light2D ======= -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`DirectionalLight2D`, :ref:`PointLight2D` +**派生:** :ref:`DirectionalLight2D`, :ref:`PointLight2D` 在 2D 环境中投射光线。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 在 2D 环境中投射光线。光线由颜色、能量值、模式(见常量)以及其他各种参数(与范围和阴影有关)来定义。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`2D 灯光和阴影 <../tutorials/2d/2d_lights_and_shadows>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -72,8 +72,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -90,8 +90,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Light2D_ShadowFilter: @@ -163,8 +163,8 @@ enum **BlendMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Light2D_property_blend_mode: @@ -425,8 +425,8 @@ Light2D 的能量值。该值越大,光线就越强。 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Light2D_method_get_height: @@ -448,10 +448,10 @@ void **set_height** **(** :ref:`float` height **)** 设置该灯光的高度,用于 2D 法线映射。见 :ref:`PointLight2D.height` 和 :ref:`DirectionalLight2D.height`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_light3d.rst b/classes/zh_CN/class_light3d.rst index 5872ada61b..e8d0ccb202 100644 --- a/classes/zh_CN/class_light3d.rst +++ b/classes/zh_CN/class_light3d.rst @@ -10,34 +10,34 @@ Light3D ======= -**Inherits:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`DirectionalLight3D`, :ref:`OmniLight3D`, :ref:`SpotLight3D` +**派生:** :ref:`DirectionalLight3D`, :ref:`OmniLight3D`, :ref:`SpotLight3D` 为不同类型的光节点提供基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- Light3D 是灯光节点的\ *抽象*\ 基类。由于无法实例化,所以不应直接使用。其他类型的灯光节点继承自它。Light3D 包含用于照明的常见变量和参数。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`3D 灯光与阴影 <../tutorials/3d/lights_and_shadows>` -- :doc:`Faking global illumination <../tutorials/3d/global_illumination/faking_global_illumination>` +- :doc:`伪造全局光照 <../tutorials/3d/global_illumination/faking_global_illumination>` - `第三人称射击演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -98,8 +98,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -118,8 +118,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Light3D_Param: @@ -331,6 +331,8 @@ enum **BakeMode**: 在静态烘焙(\ :ref:`VoxelGI`\ 、\ :ref:`LightmapGI`\ 、SDFGI(\ :ref:`Environment.sdfgi_enabled`\ ))时,考虑了灯光。灯光可以四处移动或修改,但其全局照明不会实时更新。这适用于细微的变化(例如闪烁的手电筒),但通常不适用于大的变化,例如打开和关闭灯光。 +\ **注意:**\ 如果 :ref:`editor_only` 为 ``true``\ ,则灯光不会在 :ref:`LightmapGI` 中烘焙。 + .. _class_Light3D_constant_BAKE_DYNAMIC: .. rst-class:: classref-enumeration-constant @@ -345,8 +347,8 @@ enum **BakeMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Light3D_property_distance_fade_begin: @@ -435,7 +437,7 @@ Property Descriptions - void **set_editor_only** **(** :ref:`bool` value **)** - :ref:`bool` **is_editor_only** **(** **)** -如果为 ``true``\ ,灯光只在编辑器中出现,在运行时将不可见。 +如果为 ``true``\ ,灯光只在编辑器中出现,在运行时将不可见。如果为 ``true``\ ,则无论其 :ref:`light_bake_mode` 如何,灯光都不会在 :ref:`LightmapGI` 中进行烘焙。 .. rst-class:: classref-item-separator @@ -820,7 +822,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-section-separator @@ -828,8 +830,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Light3D_method_get_correlated_color: @@ -863,10 +865,10 @@ void **set_param** **(** :ref:`Param` param, :ref:`float` 参数的值。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_lightmapgi.rst b/classes/zh_CN/class_lightmapgi.rst index e5aca45084..2fc9fcf016 100644 --- a/classes/zh_CN/class_lightmapgi.rst +++ b/classes/zh_CN/class_lightmapgi.rst @@ -10,14 +10,14 @@ LightmapGI ========== -**Inherits:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 计算并存储烘焙光照贴图,以实现快速全局照明。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **LightmapGI** 节点用于计算和存储烘焙的光照贴图。光照贴图用于提供高质量的间接照明,并且漏光很少。如果启用 :ref:`directional`\ ,\ **LightmapGI** 还可以使用球谐函数,以提供粗略的反射。由于\ *光照探针*\ ,动态物体可以接收间接光照,可以通过将 :ref:`generate_probes_subdiv` 设置为 :ref:`GENERATE_PROBES_DISABLED` 以外的值,来自动放置光照探针。也可以通过创建 :ref:`LightmapProbe` 节点,来添加额外的光照贴图探针。缺点是光照贴图是完全静态的,不能在导出的项目中烘焙。与 :ref:`VoxelGI` 相比,烘焙 **LightmapGI** 节点也更慢。 @@ -33,15 +33,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Using Lightmap global illumination <../tutorials/3d/global_illumination/using_lightmap_gi>` +- :doc:`使用光照贴图全局光照 <../tutorials/3d/global_illumination/using_lightmap_gi>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,10 +49,14 @@ Properties +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ | :ref:`float` | :ref:`bias` | ``0.0005`` | +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`bounce_indirect_energy` | ``1.0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ | :ref:`int` | :ref:`bounces` | ``3`` | +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ | :ref:`CameraAttributes` | :ref:`camera_attributes` | | +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`float` | :ref:`denoiser_strength` | ``0.1`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ | :ref:`bool` | :ref:`directional` | ``false`` | +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ | :ref:`Color` | :ref:`environment_custom_color` | | @@ -75,6 +79,8 @@ Properties +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ | :ref:`bool` | :ref:`use_denoiser` | ``true`` | +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ + | :ref:`bool` | :ref:`use_texture_for_bounces` | ``true`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------+------------+ .. rst-class:: classref-section-separator @@ -82,8 +88,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_LightmapGI_BakeQuality: @@ -261,7 +267,7 @@ enum **BakeError**: :ref:`BakeError` **BAKE_ERROR_TEXTURE_SIZE_TOO_SMALL** = ``9`` -Lightmap baking failed as the maximum texture size is too small to fit some of the meshes marked for baking. +光照贴图烘焙失败,因为最大纹理尺寸太小,无法容纳某些被标记为烘焙的网格。 .. rst-class:: classref-item-separator @@ -313,8 +319,8 @@ enum **EnvironmentMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_LightmapGI_property_bias: @@ -333,6 +339,25 @@ Property Descriptions ---- +.. _class_LightmapGI_property_bounce_indirect_energy: + +.. rst-class:: classref-property + +:ref:`float` **bounce_indirect_energy** = ``1.0`` + +.. rst-class:: classref-property-setget + +- void **set_bounce_indirect_energy** **(** :ref:`float` value **)** +- :ref:`float` **get_bounce_indirect_energy** **(** **)** + +每次反弹的能量乘数。较高的值将使间接照明更亮。值 ``1.0`` 代表物理上准确的行为,但较高的值可用于在使用少量反弹时使间接照明传播更明显。这可以通过减少 :ref:`bounces` 数量,然后增加 :ref:`bounce_indirect_energy` 来加速烘焙时间。 + +\ **注意:**\ :ref:`bounce_indirect_energy` 仅在 :ref:`bounces` 被设置为大于或等于 ``1`` 的值时才有效。 + +.. rst-class:: classref-item-separator + +---- + .. _class_LightmapGI_property_bounces: .. rst-class:: classref-property @@ -367,6 +392,23 @@ Property Descriptions ---- +.. _class_LightmapGI_property_denoiser_strength: + +.. rst-class:: classref-property + +:ref:`float` **denoiser_strength** = ``0.1`` + +.. rst-class:: classref-property-setget + +- void **set_denoiser_strength** **(** :ref:`float` value **)** +- :ref:`float` **get_denoiser_strength** **(** **)** + +应用于生成的光照贴图的去噪步骤的强度。仅当 :ref:`use_denoiser` 为 ``true`` 且 :ref:`ProjectSettings.rendering/lightmapping/denoising/denoiser` 被设置为 JNLM 时有效。 + +.. rst-class:: classref-item-separator + +---- + .. _class_LightmapGI_property_directional: .. rst-class:: classref-property @@ -378,7 +420,7 @@ Property Descriptions - void **set_directional** **(** :ref:`bool` value **)** - :ref:`bool` **is_directional** **(** **)** -如果为 ``true``\ ,烘焙光照贴图以包含作为球谐函数的方向信息。这会产生更逼真的光照外观,尤其是使用法线贴图材质和烘焙了直射光的灯光(\ :ref:`Light3D.light_bake_mode` 设置为 :ref:`Light3D.BAKE_STATIC`\ )。方向信息还用于为静态和动态对象提供粗略的反射。这有一个小的运行时性能成本,因为着色器必须执行更多的工作,来解释来自光照贴图的方向信息。定向光照贴图也需要更长的时间来烘焙并产生更大的文件大小。 +如果为 ``true``\ ,烘焙光照贴图以包含作为球谐函数的方向信息。这会产生更逼真的光照外观,尤其是使用法线贴图材质和烘焙了直射光的灯光(\ :ref:`Light3D.light_bake_mode` 设置为 :ref:`Light3D.BAKE_STATIC` 并将 :ref:`Light3D.editor_only` 设置为 ``false``\ )。方向信息还用于为静态和动态对象提供粗略的反射。这有一个小的运行时性能成本,因为着色器必须执行更多的工作,来解释来自光照贴图的方向信息。定向光照贴图也需要更长的时间来烘焙并产生更大的文件大小。 \ **注意:**\ 属性的名称与 :ref:`DirectionalLight3D` 没有关系。\ :ref:`directional` 适用于所有灯光类型。 @@ -556,14 +598,31 @@ Property Descriptions - void **set_use_denoiser** **(** :ref:`bool` value **)** - :ref:`bool` **is_using_denoiser** **(** **)** -如果为 ``true``\ ,则在生成的光照贴图上,使用基于 CPU 的降噪算法。这以更长的烘焙时间为代价,消除了生成的光照贴图中的大部分噪点。尽管无损压缩在压缩降噪图像方面可能做得更好,但使用降噪器通常不会显著影响文件大小。 +如果为 ``true``\ ,则在生成的光照贴图上,使用基于 GPU 的降噪算法。这以更长的烘焙时间为代价,消除了生成的光照贴图中的大部分噪点。尽管无损压缩在压缩降噪图像方面可能做得更好,但使用降噪器通常不会显著影响文件大小。 -\ **注意:**\ 在大场景中对光照贴图进行降噪时,内置降噪器(OpenImageDenoise)可能会崩溃。如果在光照贴图烘焙结束时遇到崩溃,请尝试禁用 :ref:`use_denoiser`\ 。 +.. rst-class:: classref-item-separator -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +---- + +.. _class_LightmapGI_property_use_texture_for_bounces: + +.. rst-class:: classref-property + +:ref:`bool` **use_texture_for_bounces** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_use_texture_for_bounces** **(** :ref:`bool` value **)** +- :ref:`bool` **is_using_texture_for_bounces** **(** **)** + +如果为 ``true``\ ,将生成带有照明信息的纹理,以加快间接照明的生成速度,但会牺牲一定的精度。当使用低分辨率光照贴图或在表面上显著拉伸光照贴图的 UV 时,几何体可能会出现额外的漏光伪影。如果不确定,请将 :ref:`use_texture_for_bounces` 保留为其默认值 ``true``\ 。 + +\ **注意:**\ :ref:`use_texture_for_bounces` 仅在 :ref:`bounces` 被设置为大于或等于 ``1`` 的值时才有效。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_lightmapgidata.rst b/classes/zh_CN/class_lightmapgidata.rst index 624d03349b..41ca1b97f6 100644 --- a/classes/zh_CN/class_lightmapgidata.rst +++ b/classes/zh_CN/class_lightmapgidata.rst @@ -10,33 +10,35 @@ LightmapGIData ============== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 包含用于 :ref:`LightmapGI` 的烘焙光照贴图和动态对象探测数据。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **LightmapGIData** 包含用于 :ref:`LightmapGI` 的烘焙光照贴图和动态对象探测数据。在 :ref:`LightmapGI` 中每当光照贴图被烘焙时都会替换它。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto - +---------------------------------------------+-------------------------------------------------------------------+ - | :ref:`TextureLayered` | :ref:`light_texture` | - +---------------------------------------------+-------------------------------------------------------------------+ + +-----------------------------------------------+---------------------------------------------------------------------------+--------+ + | :ref:`TextureLayered` | :ref:`light_texture` | | + +-----------------------------------------------+---------------------------------------------------------------------------+--------+ + | :ref:`TextureLayered[]` | :ref:`lightmap_textures` | ``[]`` | + +-----------------------------------------------+---------------------------------------------------------------------------+--------+ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -61,8 +63,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_LightmapGIData_property_light_texture: @@ -77,14 +79,33 @@ Property Descriptions 由光照贴图器生成的光照贴图图集纹理。 +\ *已弃用。*\ 光照贴图图集现在可以有多个纹理。请参阅 :ref:`lightmap_textures`\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_LightmapGIData_property_lightmap_textures: + +.. rst-class:: classref-property + +:ref:`TextureLayered[]` **lightmap_textures** = ``[]`` + +.. rst-class:: classref-property-setget + +- void **set_lightmap_textures** **(** :ref:`TextureLayered[]` value **)** +- :ref:`TextureLayered[]` **get_lightmap_textures** **(** **)** + +由光照贴图器生成的光照贴图图集纹理。 + .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_LightmapGIData_method_add_user: @@ -156,10 +177,10 @@ void **set_uses_spherical_harmonics** **(** :ref:`bool` uses_spheric \ **注意:**\ 在已烘焙的光照贴图上更改此值不会导致再次烘焙它们。这意味着在再次烘焙光照贴图之前,材质外观将看起来不正确,在这种情况下,此处设置的值将被丢弃,因为整个 **LightmapGIData** 资源被光照贴图器替换。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_lightmapper.rst b/classes/zh_CN/class_lightmapper.rst index 1bf6f142f1..4c493306bc 100644 --- a/classes/zh_CN/class_lightmapper.rst +++ b/classes/zh_CN/class_lightmapper.rst @@ -10,25 +10,25 @@ Lightmapper =========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`LightmapperRD` +**派生:** :ref:`LightmapperRD` 由光照贴图器扩展的抽象类,用于 :ref:`LightmapGI`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 此类应由自定义光照贴图器类扩展。然后可以将光照贴图器与 :ref:`LightmapGI` 一起使用,以提供快速烘焙的 3D 全局光照。 Godot 包含一个基于 GPU 的内置光照贴图器 :ref:`LightmapperRD`\ ,它使用计算着色器,但自定义光照贴图器可以由 C++ 模块实现。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_lightmapperrd.rst b/classes/zh_CN/class_lightmapperrd.rst index fa4d440e7b..908d19e4df 100644 --- a/classes/zh_CN/class_lightmapperrd.rst +++ b/classes/zh_CN/class_lightmapperrd.rst @@ -10,23 +10,23 @@ LightmapperRD ============= -**Inherits:** :ref:`Lightmapper` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Lightmapper` **<** :ref:`RefCounted` **<** :ref:`Object` 内置的基于 GPU 的光照贴图器,与 :ref:`LightmapGI` 一起使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- LightmapperRD(“RD”代表 :ref:`RenderingDevice`\ )是基于 GPU 的内置光照贴图器,可与 :ref:`LightmapGI` 一起使用。在大多数专用 GPU 上,它可以比大多数基于 CPU 的光照贴图更快地烘焙光照贴图。LightmapperRD 使用计算着色器来烘焙光照贴图,因此它不需要安装 CUDA 或 OpenCL 库即可使用。 \ **注意:**\ 仅在使用 Vulkan 后端(Forward+ 或移动),而不是 OpenGL 时可用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_lightmapprobe.rst b/classes/zh_CN/class_lightmapprobe.rst index d04979a648..2739b2a94d 100644 --- a/classes/zh_CN/class_lightmapprobe.rst +++ b/classes/zh_CN/class_lightmapprobe.rst @@ -10,23 +10,23 @@ LightmapProbe ============= -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 表示使用 :ref:`LightmapGI` 进行动态物体照明的单个手动放置的探针。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **LightmapProbe** 表示单个手动放置探针的位置,用于使用 :ref:`LightmapGI` 进行动态物体照明。 通常,通过将 :ref:`LightmapGI.generate_probes_subdiv` 设置为 :ref:`LightmapGI.GENERATE_PROBES_DISABLED` 以外的值,来自动放置 :ref:`LightmapGI` 探针。通过在烘焙光照贴图之前创建 **LightmapProbe** 节点,你可以在特定区域,添加更多探针以获得更多细节,或者禁用自动生成、并仅依赖手动放置的探针。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_lightoccluder2d.rst b/classes/zh_CN/class_lightoccluder2d.rst index 575b3b46a9..59f14d0b86 100644 --- a/classes/zh_CN/class_lightoccluder2d.rst +++ b/classes/zh_CN/class_lightoccluder2d.rst @@ -10,28 +10,28 @@ LightOccluder2D =============== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 遮挡由 Light2D 投射的光线,投射阴影。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 遮挡 Light2D 投射的灯光,投射阴影。为了计算阴影,必须为 LightOccluder2D 提供 :ref:`OccluderPolygon2D`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`2D 灯光和阴影 <../tutorials/2d/2d_lights_and_shadows>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_LightOccluder2D_property_occluder: @@ -98,14 +98,12 @@ LightOccluder2D 的遮挡器光照掩码。LightOccluder2D 将仅从具有相同 - void **set_as_sdf_collision** **(** :ref:`bool` value **)** - :ref:`bool` **is_set_as_sdf_collision** **(** **)** -.. container:: contribute +如果启用,该遮挡器将成为实时生成的带符号距离场的一部分,可被用于自定义着色器中。 - There is currently no description for this property. Please help us by :ref:`contributing one `! - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_line2d.rst b/classes/zh_CN/class_line2d.rst index d1cc6104bc..9e6b9f529b 100644 --- a/classes/zh_CN/class_line2d.rst +++ b/classes/zh_CN/class_line2d.rst @@ -10,25 +10,25 @@ Line2D ====== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -A 2D polyline that can optionally be textured. +可以选择设置纹理的 2D 折线。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This node draws a 2D polyline, i.e. a shape consisting of several points connected by segments. **Line2D** is not a mathematical polyline, i.e. the segments are not infinitely thin. It is intended for rendering and it can be colored and optionally textured. +该节点绘制一条 2D 折线,即由多个线段连接的点组成的形状。\ **Line2D** 不是数学折线,即线段不是无限细的。它用于渲染,且可以被着色,也可以选择纹理。 -\ **Warning:** Certain configurations may be impossible to draw nicely, such as very sharp angles. In these situations, the node uses fallback drawing logic to look decent. +\ **警告:**\ 某些配置可能无法很好地绘制,例如非常锐利的角度。在这些情况下,节点使用后备绘制逻辑来看起来不错。 -\ **Note:** **Line2D** is drawn using a 2D mesh. +\ **注意:**\ **Line2D** 使用 2D 网格进行绘制。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `矩阵变换演示 `__ @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -74,8 +74,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -100,8 +100,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Line2D_LineJointMode: @@ -115,7 +115,7 @@ enum **LineJointMode**: :ref:`LineJointMode` **LINE_JOINT_SHARP** = ``0`` -Makes the polyline's joints pointy, connecting the sides of the two segments by extending them until they intersect. If the rotation of a joint is too big (based on :ref:`sharp_limit`), the joint falls back to :ref:`LINE_JOINT_BEVEL` to prevent very long miters. +使该折线的接头变尖,通过延伸两条线段直至它们相交来连接它们的侧面。如果关节的旋转太大(基于 :ref:`sharp_limit`\ ),关节将回落到 :ref:`LINE_JOINT_BEVEL` 以防止出现过长的斜角。 .. _class_Line2D_constant_LINE_JOINT_BEVEL: @@ -123,7 +123,7 @@ Makes the polyline's joints pointy, connecting the sides of the two segments by :ref:`LineJointMode` **LINE_JOINT_BEVEL** = ``1`` -Makes the polyline's joints bevelled/chamfered, connecting the sides of the two segments with a simple line. +使折线的接头倾斜/倒角,用一条简单的线连接两个线段的侧面。 .. _class_Line2D_constant_LINE_JOINT_ROUND: @@ -131,7 +131,7 @@ Makes the polyline's joints bevelled/chamfered, connecting the sides of the two :ref:`LineJointMode` **LINE_JOINT_ROUND** = ``2`` -Makes the polyline's joints rounded, connecting the sides of the two segments with an arc. The detail of this arc depends on :ref:`round_precision`. +使该折线的接头变圆,用圆弧连接两条线段的侧面。该弧的细节取决于 :ref:`round_precision`\ 。 .. rst-class:: classref-item-separator @@ -149,7 +149,7 @@ enum **LineCapMode**: :ref:`LineCapMode` **LINE_CAP_NONE** = ``0`` -Draws no line cap. +不绘制线条端点。 .. _class_Line2D_constant_LINE_CAP_BOX: @@ -157,7 +157,7 @@ Draws no line cap. :ref:`LineCapMode` **LINE_CAP_BOX** = ``1`` -Draws the line cap as a box, slightly extending the first/last segment. +将线帽绘制为方框,稍微延伸第一段/最后一段。 .. _class_Line2D_constant_LINE_CAP_ROUND: @@ -165,7 +165,7 @@ Draws the line cap as a box, slightly extending the first/last segment. :ref:`LineCapMode` **LINE_CAP_ROUND** = ``2`` -Draws the line cap as a semicircle attached to the first/last segment. +将线帽绘制为连接到第一条/最后一条线段的半圆。 .. rst-class:: classref-item-separator @@ -183,7 +183,7 @@ enum **LineTextureMode**: :ref:`LineTextureMode` **LINE_TEXTURE_NONE** = ``0`` -Takes the left pixels of the texture and renders them over the whole polyline. +获取纹理的左侧像素并将它们渲染在整条折线上。 .. _class_Line2D_constant_LINE_TEXTURE_TILE: @@ -191,7 +191,7 @@ Takes the left pixels of the texture and renders them over the whole polyline. :ref:`LineTextureMode` **LINE_TEXTURE_TILE** = ``1`` -Tiles the texture over the polyline. :ref:`CanvasItem.texture_repeat` of the **Line2D** node must be :ref:`CanvasItem.TEXTURE_REPEAT_ENABLED` or :ref:`CanvasItem.TEXTURE_REPEAT_MIRROR` for it to work properly. +将纹理平铺在该折线上。该 **Line2D** 节点的 :ref:`CanvasItem.texture_repeat` 必须为 :ref:`CanvasItem.TEXTURE_REPEAT_ENABLED` 或 :ref:`CanvasItem.TEXTURE_REPEAT_MIRROR`\ ,才能正常工作。 .. _class_Line2D_constant_LINE_TEXTURE_STRETCH: @@ -199,7 +199,7 @@ Tiles the texture over the polyline. :ref:`CanvasItem.texture_repeat` **LINE_TEXTURE_STRETCH** = ``2`` -Stretches the texture across the polyline. :ref:`CanvasItem.texture_repeat` of the **Line2D** node must be :ref:`CanvasItem.TEXTURE_REPEAT_DISABLED` for best results. +沿该折线拉伸纹理。为了获得最佳效果,\ **Line2D** 节点的 :ref:`CanvasItem.texture_repeat` 必须为 :ref:`CanvasItem.TEXTURE_REPEAT_DISABLED`\ 。 .. rst-class:: classref-section-separator @@ -207,8 +207,8 @@ Stretches the texture across the polyline. :ref:`CanvasItem.texture_repeat` value **)** - :ref:`bool` **get_antialiased** **(** **)** -If ``true``, the polyline's border will be anti-aliased. +如果为 ``true``\ ,则折线的边界将使用抗锯齿。 -\ **Note:** **Line2D** is not accelerated by batching when being anti-aliased. +\ **注意:**\ **Line2D** 在使用抗锯齿时,不会通过批处理来加速。 .. rst-class:: classref-item-separator @@ -240,7 +240,7 @@ If ``true``, the polyline's border will be anti-aliased. - void **set_begin_cap_mode** **(** :ref:`LineCapMode` value **)** - :ref:`LineCapMode` **get_begin_cap_mode** **(** **)** -The style of the beginning of the polyline, if :ref:`closed` is ``false``. Use :ref:`LineCapMode` constants. +:ref:`closed` 为 ``false`` 时的折线开头样式。使用 :ref:`LineCapMode` 常量。 .. rst-class:: classref-item-separator @@ -257,11 +257,11 @@ The style of the beginning of the polyline, if :ref:`closed` value **)** - :ref:`bool` **is_closed** **(** **)** -If ``true`` and the polyline has more than 2 points, the last point and the first one will be connected by a segment. +如果为 ``true`` 并且折线有超过2个点,则最后一个点和第一个点将通过线段连接。 -\ **Note:** The shape of the closing segment is not guaranteed to be seamless if a :ref:`width_curve` is provided. +\ **注意:**\ 如果提供了 :ref:`width_curve`\ ,则不保证闭合线段的形状是无缝的。 -\ **Note:** The joint between the closing segment and the first segment is drawn first and it samples the :ref:`gradient` and the :ref:`width_curve` at the beginning. This is an implementation detail that might change in a future version. +\ **注意:**\ 首先绘制结束线段和第一条线段之间的连接点,并在开始时对 :ref:`gradient` 和 :ref:`width_curve` 进行采样。这是在未来版本中可能会更改的实现细节。 .. rst-class:: classref-item-separator @@ -278,7 +278,7 @@ If ``true`` and the polyline has more than 2 points, the last point and the firs - void **set_default_color** **(** :ref:`Color` value **)** - :ref:`Color` **get_default_color** **(** **)** -The color of the polyline. Will not be used if a gradient is set. +折线的颜色。如果设置了渐变,则不会被使用。 .. rst-class:: classref-item-separator @@ -295,7 +295,7 @@ The color of the polyline. Will not be used if a gradient is set. - void **set_end_cap_mode** **(** :ref:`LineCapMode` value **)** - :ref:`LineCapMode` **get_end_cap_mode** **(** **)** -The style of the end of the polyline, if :ref:`closed` is ``false``. Use :ref:`LineCapMode` constants. +:ref:`closed` 为 ``false`` 时的折线末端样式。使用 :ref:`LineCapMode` 常量。 .. rst-class:: classref-item-separator @@ -312,7 +312,7 @@ The style of the end of the polyline, if :ref:`closed` value **)** - :ref:`Gradient` **get_gradient** **(** **)** -The gradient is drawn through the whole line from start to finish. The :ref:`default_color` will not be used if this property is set. +渐变是从头到尾贯穿整条线绘制的。如果该属性被设置,则 :ref:`default_color` 不会被使用。 .. rst-class:: classref-item-separator @@ -329,7 +329,7 @@ The gradient is drawn through the whole line from start to finish. The :ref:`def - void **set_joint_mode** **(** :ref:`LineJointMode` value **)** - :ref:`LineJointMode` **get_joint_mode** **(** **)** -The style of the connections between segments of the polyline. Use :ref:`LineJointMode` constants. +折线段之间的连接样式。使用 :ref:`LineJointMode` 常量。 .. rst-class:: classref-item-separator @@ -346,7 +346,7 @@ The style of the connections between segments of the polyline. Use :ref:`LineJoi - void **set_points** **(** :ref:`PackedVector2Array` value **)** - :ref:`PackedVector2Array` **get_points** **(** **)** -The points of the polyline, interpreted in local 2D coordinates. Segments are drawn between the adjacent points in this array. +折线的点,以局部 2D 坐标解释。在该数组中的相邻点之间绘制线段。 .. rst-class:: classref-item-separator @@ -363,7 +363,7 @@ The points of the polyline, interpreted in local 2D coordinates. Segments are dr - void **set_round_precision** **(** :ref:`int` value **)** - :ref:`int` **get_round_precision** **(** **)** -The smoothness used for rounded joints and caps. Higher values result in smoother corners, but are more demanding to render and update. +用于圆形接头和端盖的光滑度。值越高,边角越平滑,但对渲染和更新的要求更高。 .. rst-class:: classref-item-separator @@ -380,7 +380,7 @@ The smoothness used for rounded joints and caps. Higher values result in smoothe - void **set_sharp_limit** **(** :ref:`float` value **)** - :ref:`float` **get_sharp_limit** **(** **)** -Determines the miter limit of the polyline. Normally, when :ref:`joint_mode` is set to :ref:`LINE_JOINT_SHARP`, sharp angles fall back to using the logic of :ref:`LINE_JOINT_BEVEL` joints to prevent very long miters. Higher values of this property mean that the fallback to a bevel joint will happen at sharper angles. +确定该折线的斜接限制。通常,当 :ref:`joint_mode` 被设置为 :ref:`LINE_JOINT_SHARP` 时,锐角会回退到使用 :ref:`LINE_JOINT_BEVEL` 关节的逻辑来防止过长的斜接。该属性的值越高意味着倒角接头的回退将以更锐利的角度发生。 .. rst-class:: classref-item-separator @@ -397,7 +397,7 @@ Determines the miter limit of the polyline. Normally, when :ref:`joint_mode` value **)** - :ref:`Texture2D` **get_texture** **(** **)** -The texture used for the polyline. Uses ``texture_mode`` for drawing style. +用于折线的纹理。使用 :ref:`texture_mode` 作为绘图样式。 .. rst-class:: classref-item-separator @@ -414,7 +414,7 @@ The texture used for the polyline. Uses ``texture_mode`` for drawing style. - void **set_texture_mode** **(** :ref:`LineTextureMode` value **)** - :ref:`LineTextureMode` **get_texture_mode** **(** **)** -The style to render the :ref:`texture` of the polyline. Use :ref:`LineTextureMode` constants. +渲染该折线的 :ref:`texture` 的样式。使用 :ref:`LineTextureMode` 常量。 .. rst-class:: classref-item-separator @@ -431,7 +431,7 @@ The style to render the :ref:`texture` of the pol - void **set_width** **(** :ref:`float` value **)** - :ref:`float` **get_width** **(** **)** -The polyline's width. +多边形的宽度。 .. rst-class:: classref-item-separator @@ -448,7 +448,7 @@ The polyline's width. - void **set_curve** **(** :ref:`Curve` value **)** - :ref:`Curve` **get_curve** **(** **)** -The polyline's width curve. The width of the polyline over its length will be equivalent to the value of the width curve over its domain. +该折线的宽度曲线。该折线在其长度上的宽度将等于宽度曲线在其域上的值。 .. rst-class:: classref-section-separator @@ -456,8 +456,8 @@ The polyline's width curve. The width of the polyline over its length will be eq .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Line2D_method_add_point: @@ -465,9 +465,9 @@ Method Descriptions void **add_point** **(** :ref:`Vector2` position, :ref:`int` index=-1 **)** -Adds a point with the specified ``position`` relative to the polyline's own position. If no ``index`` is provided, the new point will be added to the end of the points array. +在指定的位置 ``position`` 添加一个点,该位置相对于该线段自身的位置。如果未提供 ``index``\ ,则新的点将被添加到点数组的末尾。 -If ``index`` is given, the new point is inserted before the existing point identified by index ``index``. The indices of the points after the new point get increased by 1. The provided ``index`` must not exceed the number of existing points in the polyline. See :ref:`get_point_count`. +如果给出 ``index``\ ,则将新点插入到由索引 ``index`` 标识的已有点之前。该新点之后的点的索引增加 1。提供的 ``index`` 不得超过折线中已有点的数量。请参阅 :ref:`get_point_count`\ 。 .. rst-class:: classref-item-separator @@ -479,7 +479,7 @@ If ``index`` is given, the new point is inserted before the existing point ident void **clear_points** **(** **)** -Removes all points from the polyline, making it empty. +从折线中移除所有点,使其为空。 .. rst-class:: classref-item-separator @@ -491,7 +491,7 @@ Removes all points from the polyline, making it empty. :ref:`int` **get_point_count** **(** **)** |const| -Returns the number of points in the polyline. +返回该折线中的点的数量。 .. rst-class:: classref-item-separator @@ -515,7 +515,7 @@ Returns the number of points in the polyline. void **remove_point** **(** :ref:`int` index **)** -Removes the point at index ``index`` from the polyline. +移除该折线中索引为 ``index`` 的点。 .. rst-class:: classref-item-separator @@ -527,12 +527,12 @@ Removes the point at index ``index`` from the polyline. void **set_point_position** **(** :ref:`int` index, :ref:`Vector2` position **)** -Overwrites the position of the point at the given ``index`` with the supplied ``position``. +用提供的 ``position`` 覆盖给定索引 ``index`` 处的点的位置。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_lineedit.rst b/classes/zh_CN/class_lineedit.rst index 1b15e95a28..cac9ce62ab 100644 --- a/classes/zh_CN/class_lineedit.rst +++ b/classes/zh_CN/class_lineedit.rst @@ -10,14 +10,14 @@ LineEdit ======== -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 单行文本的输入字段。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **LineEdit** 提供了一个单行文本的输入字段,提供了许多始终可用的内置快捷键(此处的 :kbd:`Ctrl` 在 macOS 上会映射到 :kbd:`Cmd`\ ): @@ -65,8 +65,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -139,8 +139,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -179,8 +179,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -229,8 +229,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_LineEdit_signal_text_change_rejected: @@ -270,8 +270,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_LineEdit_MenuItems: @@ -611,8 +611,8 @@ enum **VirtualKeyboardType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_LineEdit_property_alignment: @@ -848,7 +848,7 @@ Property Descriptions - void **set_flat** **(** :ref:`bool` value **)** - :ref:`bool` **is_flat** **(** **)** -If ``true``, the **LineEdit** doesn't display decoration. +如果为 ``true``\ ,则 **LineEdit** 不显示装饰。 .. rst-class:: classref-item-separator @@ -865,7 +865,7 @@ If ``true``, the **LineEdit** doesn't display decoration. - void **set_language** **(** :ref:`String` value **)** - :ref:`String` **get_language** **(** **)** -Language code used for line-breaking and text shaping algorithms. If left empty, current locale is used instead. +语言代码,用于断行和文本塑形算法。如果留空则使用当前区域设置。 .. rst-class:: classref-item-separator @@ -998,7 +998,7 @@ Language code used for line-breaking and text shaping algorithms. If left empty, - void **set_secret_character** **(** :ref:`String` value **)** - :ref:`String` **get_secret_character** **(** **)** -用于掩盖秘密输入的字符(默认为“•”)。只能用一个字符作为秘密字符。 +用于掩盖秘密输入的字符。只能用单个字符作为秘密字符。如果长度超过一个字符,则仅使用第一个字符。如果为空,则使用空格代替。 .. rst-class:: classref-item-separator @@ -1161,8 +1161,8 @@ Language code used for line-breaking and text shaping algorithms. If left empty, .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_LineEdit_method_clear: @@ -1412,8 +1412,8 @@ void **select_all** **(** **)** .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_LineEdit_theme_color_caret_color: @@ -1629,10 +1629,10 @@ Theme Property Descriptions 该 **LineEdit** 处于只读模式时使用的背景(\ :ref:`editable` 为 ``false``\ )。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_linkbutton.rst b/classes/zh_CN/class_linkbutton.rst index d1a731f6cb..6f75cd1cfe 100644 --- a/classes/zh_CN/class_linkbutton.rst +++ b/classes/zh_CN/class_linkbutton.rst @@ -10,14 +10,14 @@ LinkButton ========== -**Inherits:** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 代表链接的按钮。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 代表链接的按钮。这种按钮主要用于与按钮的交互引起上下文变化时(如链接到网页)。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -53,33 +53,37 @@ Properties .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`font_focus_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`font_hover_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`outline_size` | ``0`` | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`underline_spacing` | ``2`` | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Font` | :ref:`font` | | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`font_size` | | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`focus` | | - +---------------------------------+-----------------------------------------------------------------------------+-----------------------------------+ + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0, 0, 0, 1)`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_focus_color` | ``Color(0.95, 0.95, 0.95, 1)`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_hover_color` | ``Color(0.95, 0.95, 0.95, 1)`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_hover_pressed_color` | ``Color(0, 0, 0, 1)`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`outline_size` | ``0`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`underline_spacing` | ``2`` | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Font` | :ref:`font` | | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`font_size` | | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`StyleBox` | :ref:`focus` | | + +---------------------------------+----------------------------------------------------------------------------------------+-----------------------------------+ .. rst-class:: classref-section-separator @@ -87,8 +91,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_LinkButton_UnderlineMode: @@ -126,8 +130,8 @@ LinkButton 永远不会在其文本底部显示下划线。 .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_LinkButton_property_language: @@ -269,8 +273,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_LinkButton_theme_color_font_color: @@ -284,6 +288,18 @@ Theme Property Descriptions ---- +.. _class_LinkButton_theme_color_font_disabled_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **font_disabled_color** = ``Color(0, 0, 0, 1)`` + +该 **LinkButton** 处于禁用状态时,使用的文本 :ref:`Color`\ 。 + +.. rst-class:: classref-item-separator + +---- + .. _class_LinkButton_theme_color_font_focus_color: .. rst-class:: classref-themeproperty @@ -308,6 +324,18 @@ Theme Property Descriptions ---- +.. _class_LinkButton_theme_color_font_hover_pressed_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **font_hover_pressed_color** = ``Color(0, 0, 0, 1)`` + +该 **LinkButton** 处于悬停并按下状态时,使用的文本 :ref:`Color`\ 。 + +.. rst-class:: classref-item-separator + +---- + .. _class_LinkButton_theme_color_font_outline_color: .. rst-class:: classref-themeproperty @@ -388,12 +416,12 @@ Theme Property Descriptions :ref:`StyleBox` **focus** -该 **LinkButton** 处于聚焦状态时使用的 :ref:`StyleBox`\ 。\ ``focus`` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,所以应该使用部分透明的 :ref:`StyleBox`\ ,确保基础 :ref:`StyleBox` 仍然可见。代表轮廓或下划线的 :ref:`StyleBox` 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 :ref:`StyleBoxEmpty` 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的可用性,所以出于可访问性的原因,不建议这样做。 +该 **LinkButton** 处于聚焦状态时使用的 :ref:`StyleBox`\ 。\ :ref:`focus` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,所以应该使用部分透明的 :ref:`StyleBox`\ ,确保基础 :ref:`StyleBox` 仍然可见。代表轮廓或下划线的 :ref:`StyleBox` 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 :ref:`StyleBoxEmpty` 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的可用性,所以出于可访问性的原因,不建议这样做。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_mainloop.rst b/classes/zh_CN/class_mainloop.rst index 3a6ba60ae8..2664052579 100644 --- a/classes/zh_CN/class_mainloop.rst +++ b/classes/zh_CN/class_mainloop.rst @@ -10,16 +10,16 @@ MainLoop ======== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` -**Inherited By:** :ref:`SceneTree` +**派生:** :ref:`SceneTree` 游戏主循环的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **MainLoop** 是 Godot 项目中游戏循环的抽象基类。它被 :ref:`SceneTree` 继承,\ :ref:`SceneTree` 是 Godot 项目中使用的默认游戏循环的实现,不过也可以编写和使用自己的 **MainLoop** 子类,来代替场景树。 @@ -82,21 +82,21 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_finalize` **(** **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_initialize` **(** **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_physics_process` **(** :ref:`float` delta **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_process` **(** :ref:`float` delta **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_finalize` **(** **)** |virtual| | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_initialize` **(** **)** |virtual| | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_physics_process` **(** :ref:`float` delta **)** |virtual| | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_process` **(** :ref:`float` delta **)** |virtual| | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -104,8 +104,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_MainLoop_signal_on_request_permissions_result: @@ -121,8 +121,8 @@ Signals .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_MainLoop_constant_NOTIFICATION_OS_MEMORY_WARNING: @@ -226,10 +226,10 @@ Constants .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_MainLoop_method__finalize: +.. _class_MainLoop_private_method__finalize: .. rst-class:: classref-method @@ -241,7 +241,7 @@ void **_finalize** **(** **)** |virtual| ---- -.. _class_MainLoop_method__initialize: +.. _class_MainLoop_private_method__initialize: .. rst-class:: classref-method @@ -253,13 +253,13 @@ void **_initialize** **(** **)** |virtual| ---- -.. _class_MainLoop_method__physics_process: +.. _class_MainLoop_private_method__physics_process: .. rst-class:: classref-method :ref:`bool` **_physics_process** **(** :ref:`float` delta **)** |virtual| -在每个物理帧中调用,并将自上一个物理帧以来的时间作为参数(\ ``delta``\ ,以秒为单位)。相当于\ :ref:`Node._physics_process`\ 。 +在每个物理帧中调用,并将自上一个物理帧以来的时间作为参数(\ ``delta``\ ,以秒为单位)。相当于\ :ref:`Node._physics_process`\ 。 如果实现,该方法必须返回一个布尔值。\ ``true`` 会结束主循环,而 ``false`` 会让它继续下一帧。 @@ -267,20 +267,20 @@ void **_initialize** **(** **)** |virtual| ---- -.. _class_MainLoop_method__process: +.. _class_MainLoop_private_method__process: .. rst-class:: classref-method :ref:`bool` **_process** **(** :ref:`float` delta **)** |virtual| -使用自上一个进程帧以来的时间作为参数(单位为秒),在每个进程(空闲)帧上被调用。相当于 :ref:`Node._process`\ 。 +使用自上一个进程帧以来的时间作为参数(单位为秒),在每个进程(空闲)帧上被调用。相当于 :ref:`Node._process`\ 。 如果被实现,该方法必须返回一个布尔值。\ ``true`` 会结束主循环,而 ``false`` 会让它继续到下一帧。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_margincontainer.rst b/classes/zh_CN/class_margincontainer.rst index d3a9fa805a..e341ac6eac 100644 --- a/classes/zh_CN/class_margincontainer.rst +++ b/classes/zh_CN/class_margincontainer.rst @@ -10,14 +10,14 @@ MarginContainer =============== -**Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 在子控件周围保留边距的容器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **MarginContainer** 会为子控件的各条边加上可调整的边距。是在所有子项周围添加边距,而不是在它们各自周围添加边距。要控制 **MarginContainer** 的边距,请使用下列 ``margin_*`` 主题属性。 @@ -48,15 +48,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -77,8 +77,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_MarginContainer_theme_constant_margin_bottom: @@ -86,7 +86,7 @@ Theme Property Descriptions :ref:`int` **margin_bottom** = ``0`` -所有 **MarginContainer** 的直接子节点将有 ``margin_bottom`` 像素的底边距。 +从底部向容器的内部直接子项偏移一定量的像素。 .. rst-class:: classref-item-separator @@ -98,7 +98,7 @@ Theme Property Descriptions :ref:`int` **margin_left** = ``0`` -所有 **MarginContainer** 的直接子节点将有 ``margin_left`` 像素的左边距。 +从左侧向容器的内部直接子项偏移一定量的像素。 .. rst-class:: classref-item-separator @@ -110,7 +110,7 @@ Theme Property Descriptions :ref:`int` **margin_right** = ``0`` -所有 **MarginContainer** 的直接子节点将有 ``margin_right`` 像素的右边距。 +从右侧向容器的内部直接子项偏移一定量的像素。 .. rst-class:: classref-item-separator @@ -122,12 +122,12 @@ Theme Property Descriptions :ref:`int` **margin_top** = ``0`` -所有 **MarginContainer** 的直接子节点将有 ``margin_top`` 像素的顶边距。 +从顶部向容器的内部直接子项偏移一定量的像素。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_marker2d.rst b/classes/zh_CN/class_marker2d.rst index e477005b59..66249496ba 100644 --- a/classes/zh_CN/class_marker2d.rst +++ b/classes/zh_CN/class_marker2d.rst @@ -10,21 +10,21 @@ Marker2D ======== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 通用 2D 位置提示,用于编辑。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于编辑的通用 2D 位置提示。类似于普通的 :ref:`Node2D`\ ,但它始终在 2D 编辑器中显示十字。该节点处于选中状态时,可以使用 2D 编辑器中的小工具来设置十字的视觉大小。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Marker2D_property_gizmo_extents: @@ -55,10 +55,10 @@ Property Descriptions 出现在编辑器中的小工具十字的大小。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_marker3d.rst b/classes/zh_CN/class_marker3d.rst index 6a9c622a0a..3c1e09e435 100644 --- a/classes/zh_CN/class_marker3d.rst +++ b/classes/zh_CN/class_marker3d.rst @@ -10,21 +10,21 @@ Marker3D ======== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 通用 3D 位置提示,用于编辑。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于编辑的通用 3D 位置提示。类似于普通的 :ref:`Node3D`\ ,但它始终在 3D 编辑器中显示十字。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Marker3D_property_gizmo_extents: @@ -55,10 +55,10 @@ Property Descriptions 出现在编辑器中的小工具十字的大小。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_marshalls.rst b/classes/zh_CN/class_marshalls.rst index 3079276df2..6dc21a76f7 100644 --- a/classes/zh_CN/class_marshalls.rst +++ b/classes/zh_CN/class_marshalls.rst @@ -10,21 +10,21 @@ Marshalls ========= -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 数据转换(marshalling)和编码辅助工具。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 提供进行数据转换和编码的实用函数。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Marshalls_method_base64_to_raw: @@ -126,10 +126,10 @@ Method Descriptions 内部实现时,使用的编码机制与 :ref:`@GlobalScope.var_to_bytes` 方法相同。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_material.rst b/classes/zh_CN/class_material.rst index f1a58de6a4..c671d0c881 100644 --- a/classes/zh_CN/class_material.rst +++ b/classes/zh_CN/class_material.rst @@ -10,23 +10,25 @@ Material ======== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`BaseMaterial3D`, :ref:`CanvasItemMaterial`, :ref:`FogMaterial`, :ref:`PanoramaSkyMaterial`, :ref:`ParticleProcessMaterial`, :ref:`PhysicalSkyMaterial`, :ref:`PlaceholderMaterial`, :ref:`ProceduralSkyMaterial`, :ref:`ShaderMaterial` +**派生:** :ref:`BaseMaterial3D`, :ref:`CanvasItemMaterial`, :ref:`FogMaterial`, :ref:`PanoramaSkyMaterial`, :ref:`ParticleProcessMaterial`, :ref:`PhysicalSkyMaterial`, :ref:`PlaceholderMaterial`, :ref:`ProceduralSkyMaterial`, :ref:`ShaderMaterial` -Abstract base class for applying visual properties to an object, such as color and roughness. +用于将如颜色、粗糙度等视觉属性应用于对象的虚拟基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**Material** is a base resource used for coloring and shading geometry. All materials inherit from it and almost all :ref:`VisualInstance3D` derived nodes carry a **Material**. A few flags and parameters are shared between all material types and are configured here. +**Material** 即材质,是一种基础资源,能够为几何体着色。所有的材质都继承自它,几乎所有从 :ref:`VisualInstance3D` 派生的节点都带有 **Material**\ 。有一些标志和参数是在所有材质类型之间共享的,可以在这里进行配置。 + +重要的是,你可以继承 **Material** 以在脚本或 GDExtension 中创建你自己的自定义材质类型。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 材质测试演示 `__ @@ -34,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,25 +50,25 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------+---------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_can_do_next_pass` **(** **)** |virtual| |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_can_use_render_priority` **(** **)** |virtual| |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------+ - | :ref:`Mode` | :ref:`_get_shader_mode` **(** **)** |virtual| |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_get_shader_rid` **(** **)** |virtual| |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource` | :ref:`create_placeholder` **(** **)** |const| | - +---------------------------------+---------------------------------------------------------------------------------------------------------------+ - | void | :ref:`inspect_native_shader_code` **(** **)** | - +---------------------------------+---------------------------------------------------------------------------------------------------------------+ + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_do_next_pass` **(** **)** |virtual| |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_use_render_priority` **(** **)** |virtual| |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`Mode` | :ref:`_get_shader_mode` **(** **)** |virtual| |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_get_shader_rid` **(** **)** |virtual| |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`create_placeholder` **(** **)** |const| | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`inspect_native_shader_code` **(** **)** | + +---------------------------------+-----------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -74,8 +76,8 @@ Methods .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Material_constant_RENDER_PRIORITY_MAX: @@ -99,8 +101,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Material_property_next_pass: @@ -115,6 +117,8 @@ Property Descriptions 设置下一阶段使用的 **Material**\ 。这将使用不同的材质再次渲染对象。 +\ **注意:**\ :ref:`next_pass` 材质不一定是紧接在源 **Material** 之后绘制的。绘制顺序由材质属性、\ :ref:`render_priority` 和到相机的距离决定。 + \ **注意:**\ 仅适用于 :ref:`StandardMaterial3D` 和“Spatial”类型的 :ref:`ShaderMaterial`\ 。 .. rst-class:: classref-item-separator @@ -132,11 +136,11 @@ Property Descriptions - void **set_render_priority** **(** :ref:`int` value **)** - :ref:`int` **get_render_priority** **(** **)** -设置 3D 场景中透明物体的渲染优先级。优先级高的物体将被排序在优先级低的物体前面。 +设置 3D 场景中物体的渲染优先级。优先级高的物体将被排序在优先级低的物体前面。换句话说,所有具有 :ref:`render_priority` ``1`` 的对象,将在所有具有 :ref:`render_priority` ``0`` 的对象之前渲染。 \ **注意:**\ 仅适用于 :ref:`StandardMaterial3D` 和“Spatial”类型的 :ref:`ShaderMaterial`\ 。 -\ **注意:**\ 仅适用于透明物体的排序。这不会影响透明物体相对于不透明物体的排序方式。这是因为不透明对象不被排序,而透明对象则从后往前排序(取决于优先级)。 +\ **注意:**\ 这不会影响透明对象相对于不透明对象的排序方式,或动态网格体相对于其他不透明网格体的排序方式。这是因为所有透明对象都是在所有不透明对象之后绘制的,并且所有动态不透明网格都是在其他不透明网格之前绘制的。 .. rst-class:: classref-section-separator @@ -144,60 +148,52 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_Material_method__can_do_next_pass: +.. _class_Material_private_method__can_do_next_pass: .. rst-class:: classref-method :ref:`bool` **_can_do_next_pass** **(** **)** |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +仅出于覆盖目的而暴露。你不能直接调用该函数。在内部用于确定 :ref:`next_pass` 是否应显示在编辑器中。 .. rst-class:: classref-item-separator ---- -.. _class_Material_method__can_use_render_priority: +.. _class_Material_private_method__can_use_render_priority: .. rst-class:: classref-method :ref:`bool` **_can_use_render_priority** **(** **)** |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +仅出于覆盖目的而暴露。你不能直接调用该函数。在内部用于确定 :ref:`render_priority` 是否应显示在编辑器中。 .. rst-class:: classref-item-separator ---- -.. _class_Material_method__get_shader_mode: +.. _class_Material_private_method__get_shader_mode: .. rst-class:: classref-method :ref:`Mode` **_get_shader_mode** **(** **)** |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +仅出于覆盖目的而暴露。你不能直接调用该函数。由各种编辑器工具内部使用。 .. rst-class:: classref-item-separator ---- -.. _class_Material_method__get_shader_rid: +.. _class_Material_private_method__get_shader_rid: .. rst-class:: classref-method :ref:`RID` **_get_shader_rid** **(** **)** |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +仅出于覆盖目的而暴露。你不能直接调用该函数。由各种编辑器工具内部使用。用于访问 **Material** 的 :ref:`Shader` 的 RID。 .. rst-class:: classref-item-separator @@ -221,14 +217,12 @@ Method Descriptions void **inspect_native_shader_code** **(** **)** -.. container:: contribute +仅在编辑器中运行时可用。打开一个弹出窗口,其中可视化生成的着色器代码,包括所有变体和内部着色器代码。 - There is currently no description for this method. Please help us by :ref:`contributing one `! - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_menubar.rst b/classes/zh_CN/class_menubar.rst index 0d3e42b174..9bfe647a14 100644 --- a/classes/zh_CN/class_menubar.rst +++ b/classes/zh_CN/class_menubar.rst @@ -10,21 +10,21 @@ MenuBar ======= -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 水平菜单栏,会为每个 :ref:`PopupMenu` 子项创建一个 :ref:`MenuButton`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 水平菜单栏,会为每个 :ref:`PopupMenu` 子项创建一个 :ref:`MenuButton`\ 。向这个节点添加 :ref:`PopupMenu` 就会创建新的项目。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -79,8 +79,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -110,14 +110,24 @@ Theme Properties +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`disabled` | | +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`focus` | | + | :ref:`StyleBox` | :ref:`disabled_mirrored` | | +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`hover` | | +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`hover_mirrored` | | + +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`hover_pressed` | | + +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`hover_pressed_mirrored` | | + +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`normal` | | +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`normal_mirrored` | | + +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`pressed` | | +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`pressed_mirrored` | | + +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+ .. rst-class:: classref-section-separator @@ -125,8 +135,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_MenuBar_property_flat: @@ -232,8 +242,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_MenuBar_method_get_menu_count: @@ -381,8 +391,8 @@ void **set_menu_tooltip** **(** :ref:`int` menu, :ref:`String` **focus** +:ref:`StyleBox` **disabled_mirrored** -菜单项处于聚焦状态时使用的 :ref:`StyleBox`\ 。\ ``focus`` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,所以应该使用部分透明的 :ref:`StyleBox`\ ,确保基础 :ref:`StyleBox` 仍然可见。代表轮廓或下划线的 :ref:`StyleBox` 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 :ref:`StyleBoxEmpty` 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的可用性,所以出于可访问性的原因,不建议这样做。 +菜单项处于禁用状态时使用的 :ref:`StyleBox`\ (用于从右至左布局)。 .. rst-class:: classref-item-separator @@ -554,6 +564,42 @@ Theme Property Descriptions ---- +.. _class_MenuBar_theme_style_hover_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **hover_mirrored** + +菜单项处于悬停状态时使用的 :ref:`StyleBox`\ (用于从右至左布局)。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_MenuBar_theme_style_hover_pressed: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **hover_pressed** + +菜单项处于按下并悬停状态时使用的 :ref:`StyleBox`\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_MenuBar_theme_style_hover_pressed_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **hover_pressed_mirrored** + +菜单项处于按下并悬停状态时使用的 :ref:`StyleBox`\ (用于从右至左布局)。 + +.. rst-class:: classref-item-separator + +---- + .. _class_MenuBar_theme_style_normal: .. rst-class:: classref-themeproperty @@ -566,6 +612,18 @@ Theme Property Descriptions ---- +.. _class_MenuBar_theme_style_normal_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **normal_mirrored** + +菜单项的默认 :ref:`StyleBox`\ (用于从右至左布局)。 + +.. rst-class:: classref-item-separator + +---- + .. _class_MenuBar_theme_style_pressed: .. rst-class:: classref-themeproperty @@ -574,10 +632,22 @@ Theme Property Descriptions 菜单项处于按下状态时使用的 :ref:`StyleBox`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. rst-class:: classref-item-separator + +---- + +.. _class_MenuBar_theme_style_pressed_mirrored: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **pressed_mirrored** + +菜单项处于按下状态时使用的 :ref:`StyleBox`\ (用于从右至左布局)。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_menubutton.rst b/classes/zh_CN/class_menubutton.rst index 284c5e203d..fc888b6e62 100644 --- a/classes/zh_CN/class_menubutton.rst +++ b/classes/zh_CN/class_menubutton.rst @@ -10,14 +10,14 @@ MenuButton ========== -**Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 点击后会弹出 :ref:`PopupMenu` 的按钮。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 点击后会弹出 :ref:`PopupMenu` 的按钮。可以使用 ``get_popup().add_item("菜单项名称")`` 在这个 :ref:`PopupMenu` 中创建新的菜单项,也可以直接从 Godot 编辑器的检查器中创建。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -61,54 +61,14 @@ Methods | void | :ref:`show_popup` **(** **)** | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`font_disabled_color` | ``Color(1, 1, 1, 0.3)`` | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`font_focus_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`font_hover_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`h_separation` | ``4`` | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`outline_size` | ``0`` | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Font` | :ref:`font` | | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`font_size` | | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`disabled` | | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`focus` | | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`hover` | | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`normal` | | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`pressed` | | - +---------------------------------+------------------------------------------------------------------------------+-----------------------------------+ - .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_MenuButton_signal_about_to_popup: @@ -124,8 +84,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_MenuButton_property_item_count: @@ -155,7 +115,7 @@ Property Descriptions - void **set_switch_on_hover** **(** :ref:`bool` value **)** - :ref:`bool` **is_switch_on_hover** **(** **)** -如果为 ``true``\ ,当光标悬停在同一父级中也启用了 ``switch_on_hover`` 的另一个 **MenuButton** 上方时,它将关闭当前的 **MenuButton** 并打开另一个。 +如果为 ``true``\ ,当光标悬停在同一父级中也启用了 :ref:`switch_on_hover` 的另一个 **MenuButton** 上方时,它将关闭当前的 **MenuButton** 并打开另一个。 .. rst-class:: classref-section-separator @@ -163,8 +123,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_MenuButton_method_get_popup: @@ -200,197 +160,10 @@ void **show_popup** **(** **)** 调整该 **MenuButton** 的弹出位置和大小,然后显示该 :ref:`PopupMenu`\ 。请优先使用此方法,而不是使用 ``get_popup().popup()``\ 。 -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_MenuButton_theme_color_font_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` - -该 **MenuButton** 的默认文字 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_color_font_disabled_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_disabled_color** = ``Color(1, 1, 1, 0.3)`` - -该 **MenuButton** 处于禁用状态时的字体 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_color_font_focus_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` - -该 **MenuButton** 处于聚焦状态时的字体 :ref:`Color`\ 。只替换按钮的正常文本颜色。禁用、悬停和按下状态优先于这个颜色。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_color_font_hover_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` - -该 **MenuButton** 处于悬停状态时的字体 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_color_font_outline_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` - -该 **MenuButton** 的文本轮廓的色调。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_color_font_pressed_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_pressed_color** = ``Color(1, 1, 1, 1)`` - -当 **MenuButton** 被按下时使用的字体 :ref:`Color` 颜色。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_constant_h_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **h_separation** = ``4`` - -**MenuButton** 的文字和图标之间的水平间隙。使用时会将负值当作 ``0``\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_constant_outline_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **outline_size** = ``0`` - -文字轮廓的大小。 - -\ **注意:**\ 如果使用启用了 :ref:`FontFile.multichannel_signed_distance_field` 的字体,其 :ref:`FontFile.msdf_pixel_range` 必须至少设置为 :ref:`outline_size` 的\ *两倍*\ ,轮廓渲染才能看起来正确。否则,轮廓可能会比预期的更早被切断。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_font_font: - -.. rst-class:: classref-themeproperty - -:ref:`Font` **font** - -**MenuButton** 文本的 :ref:`Font`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_font_size_font_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **font_size** - -该 **MenuButton** 文本的字体大小。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_style_disabled: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **disabled** - -该 **MenuButton** 处于禁用状态时使用的 :ref:`StyleBox`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_style_focus: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **focus** - -该 **MenuButton** 处于聚焦状态时使用的 :ref:`StyleBox`\ 。\ ``focus`` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,所以应该使用部分透明的 :ref:`StyleBox`\ ,确保基础 :ref:`StyleBox` 仍然可见。代表轮廓或下划线的 :ref:`StyleBox` 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 :ref:`StyleBoxEmpty` 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的可用性,所以出于可访问性的原因,不建议这样做。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_style_hover: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **hover** - -该 **MenuButton** 处于悬停状态时使用的 :ref:`StyleBox`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_style_normal: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **normal** - -该 **MenuButton** 的默认 :ref:`StyleBox`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_MenuButton_theme_style_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **pressed** - -该 **MenuButton** 处于按下状态时使用的 :ref:`StyleBox`\ 。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_mesh.rst b/classes/zh_CN/class_mesh.rst index 93d40e0168..ddf1c2c70c 100644 --- a/classes/zh_CN/class_mesh.rst +++ b/classes/zh_CN/class_mesh.rst @@ -10,23 +10,23 @@ Mesh ==== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`ArrayMesh`, :ref:`ImmediateMesh`, :ref:`PlaceholderMesh`, :ref:`PrimitiveMesh` +**派生:** :ref:`ArrayMesh`, :ref:`ImmediateMesh`, :ref:`PlaceholderMesh`, :ref:`PrimitiveMesh` 一种包含基于顶点数组的几何资源。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 网格是一种包含了基于顶点数组的几何资源。网格被分为各种\ *平面*\ ,每一个平面包含了一个完整的、单独的顶点数组和材质用来绘制它。通过明智的设计,一个由多个面组成的网格胜过单个面的,这是因为在3D编辑软件中,一个物体通常包含多种材质。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 材质测试演示 `__ @@ -38,8 +38,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -50,65 +50,65 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`_get_aabb` **(** **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_blend_shape_count` **(** **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`_get_blend_shape_name` **(** :ref:`int` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_surface_count` **(** **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_blend_shape_name` **(** :ref:`int` index, :ref:`StringName` name **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_surface_get_array_index_len` **(** :ref:`int` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_surface_get_array_len` **(** :ref:`int` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`_surface_get_arrays` **(** :ref:`int` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array[]` | :ref:`_surface_get_blend_shape_arrays` **(** :ref:`int` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_surface_get_format` **(** :ref:`int` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_surface_get_lods` **(** :ref:`int` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Material` | :ref:`_surface_get_material` **(** :ref:`int` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_surface_get_primitive_type` **(** :ref:`int` index **)** |virtual| |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_surface_set_material` **(** :ref:`int` index, :ref:`Material` material **)** |virtual| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ConvexPolygonShape3D` | :ref:`create_convex_shape` **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Mesh` | :ref:`create_outline` **(** :ref:`float` margin **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource` | :ref:`create_placeholder` **(** **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ConcavePolygonShape3D` | :ref:`create_trimesh_shape` **(** **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TriangleMesh` | :ref:`generate_triangle_mesh` **(** **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`get_aabb` **(** **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`get_faces` **(** **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_surface_count` **(** **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`surface_get_arrays` **(** :ref:`int` surf_idx **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array[]` | :ref:`surface_get_blend_shape_arrays` **(** :ref:`int` surf_idx **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Material` | :ref:`surface_get_material` **(** :ref:`int` surf_idx **)** |const| | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`surface_set_material` **(** :ref:`int` surf_idx, :ref:`Material` material **)** | - +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`_get_aabb` **(** **)** |virtual| |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_blend_shape_count` **(** **)** |virtual| |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`_get_blend_shape_name` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_surface_count` **(** **)** |virtual| |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_blend_shape_name` **(** :ref:`int` index, :ref:`StringName` name **)** |virtual| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_surface_get_array_index_len` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_surface_get_array_len` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`_surface_get_arrays` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array[]` | :ref:`_surface_get_blend_shape_arrays` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_surface_get_format` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_surface_get_lods` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material` | :ref:`_surface_get_material` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_surface_get_primitive_type` **(** :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_surface_set_material` **(** :ref:`int` index, :ref:`Material` material **)** |virtual| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConvexPolygonShape3D` | :ref:`create_convex_shape` **(** :ref:`bool` clean=true, :ref:`bool` simplify=false **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Mesh` | :ref:`create_outline` **(** :ref:`float` margin **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`create_placeholder` **(** **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConcavePolygonShape3D` | :ref:`create_trimesh_shape` **(** **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TriangleMesh` | :ref:`generate_triangle_mesh` **(** **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`get_aabb` **(** **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`get_faces` **(** **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_surface_count` **(** **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`surface_get_arrays` **(** :ref:`int` surf_idx **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array[]` | :ref:`surface_get_blend_shape_arrays` **(** :ref:`int` surf_idx **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Material` | :ref:`surface_get_material` **(** :ref:`int` surf_idx **)** |const| | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`surface_set_material` **(** :ref:`int` surf_idx, :ref:`Material` material **)** | + +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -116,8 +116,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Mesh_PrimitiveType: @@ -277,9 +277,9 @@ UV 坐标的 :ref:`PackedVector2Array`\ 。 :ref:`ArrayType` **ARRAY_INDEX** = ``12`` -:ref:`PackedInt32Array` of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. +整数的 :ref:`PackedInt32Array`\ ,用作引用顶点、颜色、法线、切线、和纹理的索引。所有这些数组必须具有与顶点数组相同数量的元素。任何索引都不能超过顶点数组的大小。当该索引数组存在时,它会将函数置于“索引模式”,其中索引选择第 *i* 个顶点、法线、切线、颜色、UV 等。这意味着,如果想要沿着一条边有不同的法线或颜色,则必须复制这些顶点。 -For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line. +对于三角形,索引数组被解释为三元组,指代每个三角形的顶点。对于线条,索引数组成对表示每条线的开始和结束。 .. _class_Mesh_constant_ARRAY_MAX: @@ -589,6 +589,14 @@ flags **ArrayFormat**: 用于标记网格有意不包含顶点数组的标志。 +.. _class_Mesh_constant_ARRAY_FLAG_COMPRESS_ATTRIBUTES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FLAG_COMPRESS_ATTRIBUTES** = ``536870912`` + +用于标记网格正在使用的压缩的属性(顶点、法线、切线、UV)的标志。启用这种形式的压缩后,顶点位置将被打包到 RGBA16UNORM 属性中,并在顶点着色器中进行缩放。法线和切线将被打包到表示一个轴的 RG16UNORM 中,并在顶点的 A 通道中存储一个 16 位浮点数。UV 将使用 16 位标准化浮点数而不是完整的 32 位有符号浮点数。使用该压缩模式时,必须使用顶点、法线、和切线或仅使用顶点。你无法使用没有切线的法线。如果可以的话,导入器将自动启用这种压缩。 + .. rst-class:: classref-item-separator ---- @@ -621,8 +629,8 @@ enum **BlendShapeMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Mesh_property_lightmap_size_hint: @@ -643,10 +651,10 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_Mesh_method__get_aabb: +.. _class_Mesh_private_method__get_aabb: .. rst-class:: classref-method @@ -658,7 +666,7 @@ Method Descriptions ---- -.. _class_Mesh_method__get_blend_shape_count: +.. _class_Mesh_private_method__get_blend_shape_count: .. rst-class:: classref-method @@ -670,7 +678,7 @@ Method Descriptions ---- -.. _class_Mesh_method__get_blend_shape_name: +.. _class_Mesh_private_method__get_blend_shape_name: .. rst-class:: classref-method @@ -682,7 +690,7 @@ Method Descriptions ---- -.. _class_Mesh_method__get_surface_count: +.. _class_Mesh_private_method__get_surface_count: .. rst-class:: classref-method @@ -694,7 +702,7 @@ Method Descriptions ---- -.. _class_Mesh_method__set_blend_shape_name: +.. _class_Mesh_private_method__set_blend_shape_name: .. rst-class:: classref-method @@ -706,7 +714,7 @@ void **_set_blend_shape_name** **(** :ref:`int` index, :ref:`StringNa ---- -.. _class_Mesh_method__surface_get_array_index_len: +.. _class_Mesh_private_method__surface_get_array_index_len: .. rst-class:: classref-method @@ -718,7 +726,7 @@ void **_set_blend_shape_name** **(** :ref:`int` index, :ref:`StringNa ---- -.. _class_Mesh_method__surface_get_array_len: +.. _class_Mesh_private_method__surface_get_array_len: .. rst-class:: classref-method @@ -730,7 +738,7 @@ void **_set_blend_shape_name** **(** :ref:`int` index, :ref:`StringNa ---- -.. _class_Mesh_method__surface_get_arrays: +.. _class_Mesh_private_method__surface_get_arrays: .. rst-class:: classref-method @@ -742,7 +750,7 @@ void **_set_blend_shape_name** **(** :ref:`int` index, :ref:`StringNa ---- -.. _class_Mesh_method__surface_get_blend_shape_arrays: +.. _class_Mesh_private_method__surface_get_blend_shape_arrays: .. rst-class:: classref-method @@ -754,7 +762,7 @@ void **_set_blend_shape_name** **(** :ref:`int` index, :ref:`StringNa ---- -.. _class_Mesh_method__surface_get_format: +.. _class_Mesh_private_method__surface_get_format: .. rst-class:: classref-method @@ -766,7 +774,7 @@ void **_set_blend_shape_name** **(** :ref:`int` index, :ref:`StringNa ---- -.. _class_Mesh_method__surface_get_lods: +.. _class_Mesh_private_method__surface_get_lods: .. rst-class:: classref-method @@ -778,7 +786,7 @@ void **_set_blend_shape_name** **(** :ref:`int` index, :ref:`StringNa ---- -.. _class_Mesh_method__surface_get_material: +.. _class_Mesh_private_method__surface_get_material: .. rst-class:: classref-method @@ -790,7 +798,7 @@ void **_set_blend_shape_name** **(** :ref:`int` index, :ref:`StringNa ---- -.. _class_Mesh_method__surface_get_primitive_type: +.. _class_Mesh_private_method__surface_get_primitive_type: .. rst-class:: classref-method @@ -802,7 +810,7 @@ void **_set_blend_shape_name** **(** :ref:`int` index, :ref:`StringNa ---- -.. _class_Mesh_method__surface_set_material: +.. _class_Mesh_private_method__surface_set_material: .. rst-class:: classref-method @@ -912,7 +920,7 @@ void **_surface_set_material** **(** :ref:`int` index, :ref:`Material :ref:`int` **get_surface_count** **(** **)** |const| -返回该 **Mesh** 中存放的表面的个数。 +返回 **Mesh** 中存放的表面的数量。相当于 :ref:`MeshInstance3D.get_surface_override_material_count`\ 。 .. rst-class:: classref-item-separator @@ -948,7 +956,9 @@ void **_surface_set_material** **(** :ref:`int` index, :ref:`Material :ref:`Material` **surface_get_material** **(** :ref:`int` surf_idx **)** |const| -返回给定面的 :ref:`Material` 材质。面将由该材质来渲染。 +返回给定表面中的 :ref:`Material`\ 。表面是使用该材质渲染的。 + +\ **注意:**\ 这将返回 **Mesh** 资源中的材质,而不是与 :ref:`MeshInstance3D` 的表面材质覆盖属性关联的 :ref:`Material`\ 。要获取与 :ref:`MeshInstance3D` 的表面材质覆盖属性关联的 :ref:`Material`\ ,请改用 :ref:`MeshInstance3D.get_surface_override_material`\ 。 .. rst-class:: classref-item-separator @@ -960,12 +970,14 @@ void **_surface_set_material** **(** :ref:`int` index, :ref:`Material void **surface_set_material** **(** :ref:`int` surf_idx, :ref:`Material` material **)** -设置给定面的 :ref:`Material` 材质。该面将会使用此材质渲染。 +为给定表面设置 :ref:`Material`\ 。表面将使用该材质进行渲染。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +\ **注意:**\ 这会分配 **Mesh** 资源中的材质,而不是与 :ref:`MeshInstance3D` 的表面材质覆盖属性关联的 :ref:`Material`\ 。要设置与 :ref:`MeshInstance3D` 的表面材质覆盖属性关联的 :ref:`Material`\ ,请改用 :ref:`MeshInstance3D.set_surface_override_material`\ 。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_meshconvexdecompositionsettings.rst b/classes/zh_CN/class_meshconvexdecompositionsettings.rst index 96290eea77..ea1ff3a2a9 100644 --- a/classes/zh_CN/class_meshconvexdecompositionsettings.rst +++ b/classes/zh_CN/class_meshconvexdecompositionsettings.rst @@ -10,21 +10,21 @@ MeshConvexDecompositionSettings =============================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 用于 :ref:`Mesh` 凸分解操作的参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于 :ref:`Mesh` 凸分解操作的参数。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -63,8 +63,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_MeshConvexDecompositionSettings_Mode: @@ -94,8 +94,8 @@ enum **Mode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_MeshConvexDecompositionSettings_property_convex_hull_approximation: @@ -314,10 +314,10 @@ Property Descriptions 控制对沿对称平面裁剪的偏置。范围从 ``0.0`` 到 ``1.0`` 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_meshdatatool.rst b/classes/zh_CN/class_meshdatatool.rst index fa07ce2013..d396eda0d9 100644 --- a/classes/zh_CN/class_meshdatatool.rst +++ b/classes/zh_CN/class_meshdatatool.rst @@ -10,14 +10,14 @@ MeshDataTool ============ -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 用于访问和编辑 :ref:`Mesh` 数据的辅助工具。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- MeshDataTool 提供对 :ref:`Mesh` 中各个顶点的访问。它允许用户读取和编辑网格的顶点数据。它还创建了一系列面和边。 @@ -74,15 +74,15 @@ MeshDataTool 提供对 :ref:`Mesh` 中各个顶点的访问。它允 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Using the MeshDataTool <../tutorials/3d/procedural_geometry/meshdatatool>` +- :doc:`使用 MeshDataTool <../tutorials/3d/procedural_geometry/meshdatatool>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -90,7 +90,7 @@ Methods +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`clear` **(** **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`commit_to_surface` **(** :ref:`ArrayMesh` mesh **)** | + | :ref:`Error` | :ref:`commit_to_surface` **(** :ref:`ArrayMesh` mesh, :ref:`int` compression_flags=0 **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`create_from_surface` **(** :ref:`ArrayMesh` mesh, :ref:`int` surface **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -171,8 +171,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_MeshDataTool_method_clear: @@ -190,7 +190,7 @@ void **clear** **(** **)** .. rst-class:: classref-method -:ref:`Error` **commit_to_surface** **(** :ref:`ArrayMesh` mesh **)** +:ref:`Error` **commit_to_surface** **(** :ref:`ArrayMesh` mesh, :ref:`int` compression_flags=0 **)** 使用编辑后的数据,向指定的 :ref:`Mesh` 中添加一个新的表面。 @@ -318,24 +318,24 @@ void **clear** **(** **)** :ref:`int` **get_face_vertex** **(** :ref:`int` idx, :ref:`int` vertex **)** |const| -Returns the specified vertex index of the given face. +返回给定面的指定顶点索引。 -Vertex argument must be either 0, 1, or 2 because faces contain three vertices. +顶点参数必须为 0、1 或 2,因为面包含三个顶点。 -\ **Example:**\ +\ **示例:**\ .. tabs:: .. code-tab:: gdscript - var index = mesh_data_tool.get_face_vertex(0, 1) # Gets the index of the second vertex of the first face. + var index = mesh_data_tool.get_face_vertex(0, 1) # 获取第一个面的第二个顶点的索引。 var position = mesh_data_tool.get_vertex(index) var normal = mesh_data_tool.get_vertex_normal(index) .. code-tab:: csharp - int index = meshDataTool.GetFaceVertex(0, 1); // Gets the index of the second vertex of the first face. + int index = meshDataTool.GetFaceVertex(0, 1); // 获取第一个面的第二个顶点的索引。 Vector3 position = meshDataTool.GetVertex(index); Vector3 normal = meshDataTool.GetVertexNormal(index); @@ -377,7 +377,7 @@ Vertex argument must be either 0, 1, or 2 because faces contain three vertices. :ref:`Vector3` **get_vertex** **(** :ref:`int` idx **)** |const| -Returns the position of the given vertex. +返回给定顶点的位置。 .. rst-class:: classref-item-separator @@ -655,10 +655,10 @@ void **set_vertex_weights** **(** :ref:`int` idx, :ref:`PackedFloat32 设置给定顶点的骨骼权重。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_meshinstance2d.rst b/classes/zh_CN/class_meshinstance2d.rst index fe04749b8a..3154c0a182 100644 --- a/classes/zh_CN/class_meshinstance2d.rst +++ b/classes/zh_CN/class_meshinstance2d.rst @@ -10,28 +10,28 @@ MeshInstance2D ============== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 用于在 2D 中显示 :ref:`Mesh` 的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于在 2D 中显示 :ref:`Mesh` 的节点。可以通过编辑器工具栏中的工具,从现有的 :ref:`Sprite2D` 自动创建 **MeshInstance2D**\ 。请选中该 :ref:`Sprite2D` 节点,然后在 2D 编辑器视口的顶部选择 **Sprite2D > 转换为 MeshInstance2D**\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`2D 网格 <../tutorials/2d/2d_meshes>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_MeshInstance2D_signal_texture_changed: @@ -65,8 +65,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_MeshInstance2D_property_mesh: @@ -98,10 +98,10 @@ Property Descriptions 使用默认 :ref:`CanvasItemMaterial` 时,将使用的 :ref:`Texture2D`\ 。可以在 CanvasItem 着色器中作为 ``TEXTURE`` 访问。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_meshinstance3d.rst b/classes/zh_CN/class_meshinstance3d.rst index 4f4c7482c8..6fcc6b6a95 100644 --- a/classes/zh_CN/class_meshinstance3d.rst +++ b/classes/zh_CN/class_meshinstance3d.rst @@ -10,23 +10,23 @@ MeshInstance3D ============== -**Inherits:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`SoftBody3D` +**派生:** :ref:`SoftBody3D` 网格实例与场景相结合的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- MeshInstance3D 节点接受 :ref:`Mesh` 资源,会为该网格创建一个实例,将其添加到当前的场景中。这是渲染 3D 几何体时最常用的类,可以将单个 :ref:`Mesh` 在不同的地方实例化。这样就能够实现几何体的复用,节省资源。如果需要在比较集中的区域内将某个 :ref:`Mesh` 实例化超过几千次,请考虑改为在 :ref:`MultiMeshInstance3D` 中使用 :ref:`MultiMesh`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 材质测试演示 `__ @@ -38,8 +38,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -92,8 +92,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_MeshInstance3D_property_mesh: @@ -148,8 +148,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_MeshInstance3D_method_create_convex_collision: @@ -259,7 +259,9 @@ void **create_trimesh_collision** **(** **)** :ref:`Material` **get_surface_override_material** **(** :ref:`int` surface **)** |const| -返回用于 :ref:`Mesh` 资源的指定表面 ``surface`` 的覆盖 :ref:`Material`\ 。 +返回 :ref:`Mesh` 资源的指定 ``surface`` 的覆盖 :ref:`Material`\ 。另见 :ref:`get_surface_override_material_count`\ 。 + +\ **注意:**\ 这将返回与 **MeshInstance3D** 的表面材质覆盖属性关联的 :ref:`Material`\ ,而不是 :ref:`Mesh` 资源内的材质。要获取 :ref:`Mesh` 资源中的材质,请改用 :ref:`Mesh.surface_get_material`\ 。 .. rst-class:: classref-item-separator @@ -271,7 +273,7 @@ void **create_trimesh_collision** **(** **)** :ref:`int` **get_surface_override_material_count** **(** **)** |const| -返回表面覆盖材质的数量。相当于 :ref:`Mesh.get_surface_count`\ 。 +返回表面覆盖材质的数量。相当于 :ref:`Mesh.get_surface_count`\ 。另见 :ref:`get_surface_override_material`\ 。 .. rst-class:: classref-item-separator @@ -295,12 +297,14 @@ void **set_blend_shape_value** **(** :ref:`int` blend_shape_idx, :ref void **set_surface_override_material** **(** :ref:`int` surface, :ref:`Material` material **)** -为 :ref:`Mesh` 资源的指定表面 ``surface`` 设置覆盖 :ref:`Material`\ 。与该材质关联的是这个 **MeshInstance3D**\ ,不是 :ref:`mesh`\ 。 +设置 :ref:`Mesh` 资源的指定 ``surface`` 的覆盖 ``material``\ 。该材质与该 **MeshInstance3D** 关联,而不是与 :ref:`mesh` 关联。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +\ **注意:**\ 这将分配与 **MeshInstance3D** 的表面材质覆盖属性关联的 :ref:`Material`\ ,而不是 :ref:`Mesh` 资源内的材质。要在 :ref:`Mesh` 资源中设置材质,请改用 :ref:`Mesh.surface_get_material`\ 。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_meshlibrary.rst b/classes/zh_CN/class_meshlibrary.rst index 19751e9f0c..893e959caf 100644 --- a/classes/zh_CN/class_meshlibrary.rst +++ b/classes/zh_CN/class_meshlibrary.rst @@ -10,21 +10,21 @@ MeshLibrary =========== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 网格库。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 网格库包含一个 :ref:`Mesh` 资源列表,每个资源都有一个名称和 ID。每个项目还可以包括碰撞和导航形状。这个资源在 :ref:`GridMap` 中使用。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 动力学角色演示 `__ @@ -32,8 +32,8 @@ Tutorials .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -90,8 +90,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_MeshLibrary_method_clear: @@ -361,10 +361,10 @@ void **set_item_shapes** **(** :ref:`int` id, :ref:`Array` 对象组成,每个对象后跟一个将应用于它的 :ref:`Transform3D`\ 。对于不应具有变换的形状,请使用 :ref:`Transform3D.IDENTITY`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_meshtexture.rst b/classes/zh_CN/class_meshtexture.rst index ed3ce3217e..2725e65e1f 100644 --- a/classes/zh_CN/class_meshtexture.rst +++ b/classes/zh_CN/class_meshtexture.rst @@ -10,21 +10,21 @@ MeshTexture =========== -**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 简单的纹理,使用一个网格来绘制自己。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 简单的纹理,使用一个网格来绘制自己。它的应用场景有限,因为 Flag 不能更改,而且不支持区域绘制。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_MeshTexture_property_base_texture: @@ -95,10 +95,10 @@ Property Descriptions 设置用于绘制的网格,该网格必须使用 2D 顶点。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_methodtweener.rst b/classes/zh_CN/class_methodtweener.rst index def21fc468..eda11937d7 100644 --- a/classes/zh_CN/class_methodtweener.rst +++ b/classes/zh_CN/class_methodtweener.rst @@ -10,25 +10,25 @@ MethodTweener ============= -**Inherits:** :ref:`Tweener` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Tweener` **<** :ref:`RefCounted` **<** :ref:`Object` 对抽象值进行插值,并将其提供给一个持续调用的方法。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**MethodTweener** is similar to a combination of :ref:`CallbackTweener` and :ref:`PropertyTweener`. It calls a method providing an interpolated value as a parameter. See :ref:`Tween.tween_method` for more usage information. +**MethodTweener** 类似于 :ref:`CallbackTweener` 和 :ref:`PropertyTweener` 的组合,会将插值后的值作为调用方法时的参数。更多用法信息请参阅 :ref:`Tween.tween_method`\ 。 -The tweener will finish automatically if the callback's target object is freed. +如果回调的目标对象被释放,该补间将自动完成。 -\ **Note:** :ref:`Tween.tween_method` is the only correct way to create **MethodTweener**. Any **MethodTweener** created manually will not function correctly. +\ **注意:**\ 创建 **MethodTweener** 的唯一正确方法是 :ref:`Tween.tween_method`\ 。任何手动创建的 **MethodTweener** 都无法正常工作。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_MethodTweener_method_set_delay: @@ -82,10 +82,10 @@ Method Descriptions 设置所使用的过渡类型 :ref:`TransitionType`\ 。如果没有设置,则使用包含这个 Tweener 的 :ref:`Tween` 的默认过渡类型。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_missingnode.rst b/classes/zh_CN/class_missingnode.rst index 6d623a1531..e978a4dc43 100644 --- a/classes/zh_CN/class_missingnode.rst +++ b/classes/zh_CN/class_missingnode.rst @@ -10,21 +10,21 @@ MissingNode =========== -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` 编辑器内部类,用于保存未知节点的数据。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这是编辑器内部类,用于保存未知类型节点的数据(该类型很有可能是由扩展提供的,而该扩展未加载)。无法手动实例化或放置在场景中。如果你不知道这是什么,请忽略它。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_MissingNode_property_original_class: @@ -74,12 +74,12 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_missingresource.rst b/classes/zh_CN/class_missingresource.rst index 3c83cfee8f..a90151d3ef 100644 --- a/classes/zh_CN/class_missingresource.rst +++ b/classes/zh_CN/class_missingresource.rst @@ -10,21 +10,21 @@ MissingResource =============== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 编辑器内部类,用于保存未知资源的数据。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这是编辑器内部类,用于保存未知类型资源的数据(该类型很有可能是由扩展提供的,而该扩展未加载)。无法手动实例化或放置在场景中。如果你不知道这是什么,请忽略它。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_MissingResource_property_original_class: @@ -74,12 +74,12 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_mobilevrinterface.rst b/classes/zh_CN/class_mobilevrinterface.rst index 8afd2d082c..8fd805e98f 100644 --- a/classes/zh_CN/class_mobilevrinterface.rst +++ b/classes/zh_CN/class_mobilevrinterface.rst @@ -10,14 +10,14 @@ MobileVRInterface ================= -**Inherits:** :ref:`XRInterface` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`XRInterface` **<** :ref:`RefCounted` **<** :ref:`Object` 通用移动 VR 实现。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这是一个通用的移动 VR 实现,你需要提供有关所用手机和 HMD 的详细信息。它不依赖于任何现有框架。这是我们拥有的最基本的接口。为了获得最佳效果,你需要一部带有陀螺仪和加速度计的手机。 @@ -33,8 +33,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -63,8 +63,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_MobileVRInterface_property_display_to_lens: @@ -181,10 +181,10 @@ k2 镜头因子,见 k1。 过采样设置。由于镜头失真,我们必须以比屏幕自然分辨率更高的质量渲染我们的缓冲区。介于 1.5 和 2.0 之间的值通常可以提供良好的结果,但会牺牲性能。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_moviewriter.rst b/classes/zh_CN/class_moviewriter.rst index 5bc4b85c21..664efb3057 100644 --- a/classes/zh_CN/class_moviewriter.rst +++ b/classes/zh_CN/class_moviewriter.rst @@ -10,16 +10,16 @@ MovieWriter =========== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 非实时视频录制编码器的抽象类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Godot 能够使用非实时模拟技术录制视频。与 ``--fixed-fps`` :doc:`命令行参数 <../tutorials/editor/command_line_tutorial>`\ 类似,会强制让 :ref:`Node._process` 等函数每一帧都收到相同的 ``delta``\ ,无论实际渲染花费了多长的时间。这个技术可用于录制高画质的视频,无论你的硬件性能如何,帧率始终都是恒定的。 +Godot 能够使用非实时模拟技术录制视频。与 ``--fixed-fps`` :doc:`命令行参数 <../tutorials/editor/command_line_tutorial>`\ 类似,会强制让 :ref:`Node._process` 等函数每一帧都收到相同的 ``delta``\ ,无论实际渲染花费了多长的时间。这个技术可用于录制高画质的视频,无论你的硬件性能如何,帧率始终都是恒定的。 Godot 内置的 **MovieWriter** 有两个: @@ -29,33 +29,33 @@ Godot 内置的 **MovieWriter** 有两个: 如果你需要编码为其他格式,或者将流导入到第三方软件中,你可以扩展 **MovieWriter** 类,创建自己的影片写入器。出于性能考虑,一般应该使用 GDExtension 实现。 -\ **编辑器使用:**\ 默认影片文件路径可以在 :ref:`ProjectSettings.editor/movie_writer/movie_file` 指定。或者在运行单个场景时,也可以在根节点上添加元数据 ``movie_path``\ ,可以指定录制该场景时所使用的影片文件路径。设置路径后,请点击编辑器右上角的电影胶卷图标,启动 Movie Maker 模式,然后和平常一样运行场景即可。引擎会在启动画面结束后开始录制,只会在引擎退出时停止录制。再次点击电影胶卷图标可以禁用 Movie Maker 模式。请注意,Movie Maker 模式的开关不会影响正在运行的项目实例。 +\ **编辑器使用:**\ 默认影片文件路径可以在 :ref:`ProjectSettings.editor/movie_writer/movie_file` 指定。或者在运行单个场景时,也可以在根节点上添加元数据 ``movie_file``\ ,可以指定录制该场景时所使用的影片文件路径。设置路径后,请点击编辑器右上角的电影胶卷图标,启动 Movie Maker 模式,然后和平常一样运行场景即可。引擎会在启动画面结束后开始录制,只会在引擎退出时停止录制。再次点击电影胶卷图标可以禁用 Movie Maker 模式。请注意,Movie Maker 模式的开关不会影响正在运行的项目实例。 \ **注意:**\ MovieWriter 既可以在编辑器中使用,也可以在导出的项目中使用,但这个功能\ *不应*\ 用来让最终用户录制游戏视频。希望录制游戏视频的玩家应该安装 `OBS Studio `__ 或 `SimpleScreenRecorder `__ 等工具。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_audio_mix_rate` **(** **)** |virtual| |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SpeakerMode` | :ref:`_get_audio_speaker_mode` **(** **)** |virtual| |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_handles_file` **(** :ref:`String` path **)** |virtual| |const| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_write_begin` **(** :ref:`Vector2i` movie_size, :ref:`int` fps, :ref:`String` base_path **)** |virtual| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_write_end` **(** **)** |virtual| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_write_frame` **(** :ref:`Image` frame_image, const void* audio_frame_block **)** |virtual| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_writer` **(** :ref:`MovieWriter` writer **)** |static| | - +--------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_audio_mix_rate` **(** **)** |virtual| |const| | + +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SpeakerMode` | :ref:`_get_audio_speaker_mode` **(** **)** |virtual| |const| | + +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handles_file` **(** :ref:`String` path **)** |virtual| |const| | + +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_write_begin` **(** :ref:`Vector2i` movie_size, :ref:`int` fps, :ref:`String` base_path **)** |virtual| | + +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_write_end` **(** **)** |virtual| | + +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_write_frame` **(** :ref:`Image` frame_image, const void* audio_frame_block **)** |virtual| | + +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_writer` **(** :ref:`MovieWriter` writer **)** |static| | + +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -63,40 +63,40 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_MovieWriter_method__get_audio_mix_rate: +.. _class_MovieWriter_private_method__get_audio_mix_rate: .. rst-class:: classref-method :ref:`int` **_get_audio_mix_rate** **(** **)** |virtual| |const| -当引擎请求用于录制音频的音频采样率时调用。返回的值必须以 Hz 为单位指定。如果 :ref:`_get_audio_mix_rate` 未被重写,则默认为 48000 Hz。 +当引擎请求用于录制音频的音频采样率时调用。返回的值必须以 Hz 为单位指定。如果 :ref:`_get_audio_mix_rate` 未被重写,则默认为 48000 Hz。 .. rst-class:: classref-item-separator ---- -.. _class_MovieWriter_method__get_audio_speaker_mode: +.. _class_MovieWriter_private_method__get_audio_speaker_mode: .. rst-class:: classref-method :ref:`SpeakerMode` **_get_audio_speaker_mode** **(** **)** |virtual| |const| -当引擎请求用于录制音频的音频扬声器模式时调用。这可能会影响生成的音频文件/流中的输出通道数。如果 :ref:`_get_audio_speaker_mode` 未被重写,则默认为 :ref:`AudioServer.SPEAKER_MODE_STEREO`\ 。 +当引擎请求用于录制音频的音频扬声器模式时调用。这可能会影响生成的音频文件/流中的输出通道数。如果 :ref:`_get_audio_speaker_mode` 未被重写,则默认为 :ref:`AudioServer.SPEAKER_MODE_STEREO`\ 。 .. rst-class:: classref-item-separator ---- -.. _class_MovieWriter_method__handles_file: +.. _class_MovieWriter_private_method__handles_file: .. rst-class:: classref-method :ref:`bool` **_handles_file** **(** :ref:`String` path **)** |virtual| |const| -当引擎确定该 **MovieWriter** 是否能够处理位于 ``path`` 的文件时调用。如果该 **MovieWriter** 能够处理给定的文件路径,则必须返回 ``true``\ ,否则返回 ``false``\ 。通常,\ :ref:`_handles_file` 如下被重写,以允许用户使用给定文件扩展名,在任何路径下记录一个文件: +当引擎确定该 **MovieWriter** 是否能够处理位于 ``path`` 的文件时调用。如果该 **MovieWriter** 能够处理给定的文件路径,则必须返回 ``true``\ ,否则返回 ``false``\ 。通常,\ :ref:`_handles_file` 如下被重写,以允许用户使用给定文件扩展名,在任何路径下记录一个文件: :: @@ -109,7 +109,7 @@ Method Descriptions ---- -.. _class_MovieWriter_method__write_begin: +.. _class_MovieWriter_private_method__write_begin: .. rst-class:: classref-method @@ -121,7 +121,7 @@ Method Descriptions ---- -.. _class_MovieWriter_method__write_end: +.. _class_MovieWriter_private_method__write_end: .. rst-class:: classref-method @@ -129,13 +129,13 @@ void **_write_end** **(** **)** |virtual| 当引擎完成写入时调用。当引擎通过按下窗口管理器的关闭按钮退出时,或调用 :ref:`SceneTree.quit` 时,会发生这种情况。 -\ **注意:**\ 在运行编辑器/项目的终端上,按 :kbd:`Ctrl + C`\ ,\ *不会*\ 导致 :ref:`_write_end` 被调用。 +\ **注意:**\ 在运行编辑器/项目的终端上,按 :kbd:`Ctrl + C`\ ,\ *不会*\ 导致 :ref:`_write_end` 被调用。 .. rst-class:: classref-item-separator ---- -.. _class_MovieWriter_method__write_frame: +.. _class_MovieWriter_private_method__write_frame: .. rst-class:: classref-method @@ -153,14 +153,14 @@ void **_write_end** **(** **)** |virtual| void **add_writer** **(** :ref:`MovieWriter` writer **)** |static| -添加一个可供引擎使用的编写器。可以通过重写 :ref:`_handles_file`\ ,来设置支持的文件扩展名。 +添加一个可供引擎使用的编写器。可以通过重写 :ref:`_handles_file`\ ,来设置支持的文件扩展名。 \ **注意:**\ :ref:`add_writer` 必须在引擎初始化期间尽早调用才能工作,因为电影编写被设计为与引擎的其余部分同时启动。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_multimesh.rst b/classes/zh_CN/class_multimesh.rst index c73557cfe1..733c7eb45c 100644 --- a/classes/zh_CN/class_multimesh.rst +++ b/classes/zh_CN/class_multimesh.rst @@ -10,14 +10,14 @@ MultiMesh ========= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 使用 GPU 实例提供单一网格的高性能多次绘制。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- MultiMesh 提供了低级别的网格实例化功能。绘制数以千计的 :ref:`MeshInstance3D` 节点可能会很慢,因为每个对象都要提交给 GPU 然后单独绘制。 @@ -33,8 +33,8 @@ MultiMesh 要快得多,因为它可以通过一次绘制调用来绘制成千 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 MultiMeshInstance <../tutorials/3d/using_multi_mesh_instance>` @@ -44,8 +44,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -76,8 +76,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -108,8 +108,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_MultiMesh_TransformFormat: @@ -139,8 +139,8 @@ enum **TransformFormat**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_MultiMesh_property_buffer: @@ -155,7 +155,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -317,8 +317,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_MultiMesh_method_get_aabb: @@ -430,10 +430,10 @@ void **set_instance_transform_2d** **(** :ref:`int` instance, :ref:`T 为指定实例设置 :ref:`Transform2D`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_multimeshinstance2d.rst b/classes/zh_CN/class_multimeshinstance2d.rst index 61d6a4b750..e7281def7a 100644 --- a/classes/zh_CN/class_multimeshinstance2d.rst +++ b/classes/zh_CN/class_multimeshinstance2d.rst @@ -10,14 +10,14 @@ MultiMeshInstance2D =================== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 在 2D 中实例化 :ref:`MultiMesh` 的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **MultiMeshInstance2D** 是专用于在 2D 中实例化 :ref:`MultiMesh` 资源的节点。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_MultiMeshInstance2D_signal_texture_changed: @@ -60,8 +60,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_MultiMeshInstance2D_property_multimesh: @@ -93,10 +93,10 @@ Property Descriptions 使用默认 :ref:`CanvasItemMaterial` 时,将使用的 :ref:`Texture2D`\ 。可以在 CanvasItem 着色器中作为 ``TEXTURE`` 访问。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_multimeshinstance3d.rst b/classes/zh_CN/class_multimeshinstance3d.rst index 503e72e713..b793299d74 100644 --- a/classes/zh_CN/class_multimeshinstance3d.rst +++ b/classes/zh_CN/class_multimeshinstance3d.rst @@ -10,14 +10,14 @@ MultiMeshInstance3D =================== -**Inherits:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 实例化 :ref:`MultiMesh` 的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`MultiMeshInstance2D` 是专用于实例化基于 :ref:`MultiMesh` 资源的 :ref:`GeometryInstance3D` 的节点。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 MultiMeshInstance <../tutorials/3d/using_multi_mesh_instance>` @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_MultiMeshInstance3D_property_multimesh: @@ -68,10 +68,10 @@ Property Descriptions 将在 **MultiMeshInstance3D** 的所有实例之间,使用和共享的 :ref:`MultiMesh` 资源。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_multiplayerapi.rst b/classes/zh_CN/class_multiplayerapi.rst index f82eac5863..320fbe507d 100644 --- a/classes/zh_CN/class_multiplayerapi.rst +++ b/classes/zh_CN/class_multiplayerapi.rst @@ -10,16 +10,16 @@ MultiplayerAPI ============== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`MultiplayerAPIExtension`, :ref:`SceneMultiplayer` +**派生:** :ref:`MultiplayerAPIExtension`, :ref:`SceneMultiplayer` 高阶多人游戏 API 接口。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于高级多人游戏 API 实现的基类。另请参阅 :ref:`MultiplayerPeer`\ 。 @@ -31,8 +31,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -81,8 +81,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_MultiplayerAPI_signal_connected_to_server: @@ -146,8 +146,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_MultiplayerAPI_RPCMode: @@ -185,8 +185,8 @@ enum **RPCMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_MultiplayerAPI_property_multiplayer_peer: @@ -207,8 +207,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_MultiplayerAPI_method_create_default_interface: @@ -360,10 +360,10 @@ void **set_default_interface** **(** :ref:`StringName` interfa 设置默认的 MultiplayerAPI 实现类。模块和扩展可以使用这个方法来配置引擎启动时 :ref:`SceneTree` 将使用哪个实现。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_multiplayerapiextension.rst b/classes/zh_CN/class_multiplayerapiextension.rst index ad85a4cbf9..f3d57bd40f 100644 --- a/classes/zh_CN/class_multiplayerapiextension.rst +++ b/classes/zh_CN/class_multiplayerapiextension.rst @@ -10,14 +10,14 @@ MultiplayerAPIExtension ======================= -**Inherits:** :ref:`MultiplayerAPI` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`MultiplayerAPI` **<** :ref:`RefCounted` **<** :ref:`Object` 用于扩展 :ref:`MultiplayerAPI` 的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该类可用于通过脚本或扩展来增强或替换默认的 :ref:`MultiplayerAPI` 实现。 @@ -45,13 +45,16 @@ Description base_multiplayer.peer_connected.connect(func(id): pc.emit(id)) base_multiplayer.peer_disconnected.connect(func(id): pd.emit(id)) + func _poll(): + return base_multiplayer.poll() + # 记录正在进行的 RPC 并将其转发到默认的多人游戏。 - func _rpc(peer: int, object: Object, method: StringName, args: Array) -> int: # 错误代码 + func _rpc(peer: int, object: Object, method: StringName, args: Array) -> Error: print("获取用于 %d 的 RPC:%s::%s(%s)" % [peer, object, method, args]) return base_multiplayer.rpc(peer, object, method, args) # 记录配置添加。例如,根路径(nullptr、NodePath),复制(Node、Spawner|Synchronizer),自定义。 - func _object_configuration_add(object, config: Variant) -> int: # 错误代码 + func _object_configuration_add(object, config: Variant) -> Error: if config is MultiplayerSynchronizer: print("添加用于 %s 的同步配置。同步器:%s" % [object, config]) elif config is MultiplayerSpawner: @@ -59,7 +62,7 @@ Description return base_multiplayer.object_configuration_add(object, config) # 记录配置移除。例如,根路径(nullptr、NodePath),复制(Node、Spawner|Synchronizer),自定义。 - func _object_configuration_remove(object, config: Variant) -> int: # 错误代码 + func _object_configuration_remove(object, config: Variant) -> Error: if config is MultiplayerSynchronizer: print("移除用于 %s 的同步配置。同步器:%s" % [object, config]) elif config is MultiplayerSpawner: @@ -99,31 +102,31 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`MultiplayerPeer` | :ref:`_get_multiplayer_peer` **(** **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`_get_peer_ids` **(** **)** |virtual| |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_remote_sender_id` **(** **)** |virtual| |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_unique_id` **(** **)** |virtual| |const| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_object_configuration_add` **(** :ref:`Object` object, :ref:`Variant` configuration **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_object_configuration_remove` **(** :ref:`Object` object, :ref:`Variant` configuration **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_poll` **(** **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_rpc` **(** :ref:`int` peer, :ref:`Object` object, :ref:`StringName` method, :ref:`Array` args **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_multiplayer_peer` **(** :ref:`MultiplayerPeer` multiplayer_peer **)** |virtual| | - +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MultiplayerPeer` | :ref:`_get_multiplayer_peer` **(** **)** |virtual| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_get_peer_ids` **(** **)** |virtual| |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_remote_sender_id` **(** **)** |virtual| |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_unique_id` **(** **)** |virtual| |const| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_object_configuration_add` **(** :ref:`Object` object, :ref:`Variant` configuration **)** |virtual| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_object_configuration_remove` **(** :ref:`Object` object, :ref:`Variant` configuration **)** |virtual| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_poll` **(** **)** |virtual| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_rpc` **(** :ref:`int` peer, :ref:`Object` object, :ref:`StringName` method, :ref:`Array` args **)** |virtual| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_multiplayer_peer` **(** :ref:`MultiplayerPeer` multiplayer_peer **)** |virtual| | + +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -131,10 +134,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_MultiplayerAPIExtension_method__get_multiplayer_peer: +.. _class_MultiplayerAPIExtension_private_method__get_multiplayer_peer: .. rst-class:: classref-method @@ -146,7 +149,7 @@ Method Descriptions ---- -.. _class_MultiplayerAPIExtension_method__get_peer_ids: +.. _class_MultiplayerAPIExtension_private_method__get_peer_ids: .. rst-class:: classref-method @@ -158,7 +161,7 @@ Method Descriptions ---- -.. _class_MultiplayerAPIExtension_method__get_remote_sender_id: +.. _class_MultiplayerAPIExtension_private_method__get_remote_sender_id: .. rst-class:: classref-method @@ -170,7 +173,7 @@ Method Descriptions ---- -.. _class_MultiplayerAPIExtension_method__get_unique_id: +.. _class_MultiplayerAPIExtension_private_method__get_unique_id: .. rst-class:: classref-method @@ -182,7 +185,7 @@ Method Descriptions ---- -.. _class_MultiplayerAPIExtension_method__object_configuration_add: +.. _class_MultiplayerAPIExtension_private_method__object_configuration_add: .. rst-class:: classref-method @@ -194,7 +197,7 @@ Method Descriptions ---- -.. _class_MultiplayerAPIExtension_method__object_configuration_remove: +.. _class_MultiplayerAPIExtension_private_method__object_configuration_remove: .. rst-class:: classref-method @@ -206,7 +209,7 @@ Method Descriptions ---- -.. _class_MultiplayerAPIExtension_method__poll: +.. _class_MultiplayerAPIExtension_private_method__poll: .. rst-class:: classref-method @@ -218,7 +221,7 @@ Method Descriptions ---- -.. _class_MultiplayerAPIExtension_method__rpc: +.. _class_MultiplayerAPIExtension_private_method__rpc: .. rst-class:: classref-method @@ -230,7 +233,7 @@ Method Descriptions ---- -.. _class_MultiplayerAPIExtension_method__set_multiplayer_peer: +.. _class_MultiplayerAPIExtension_private_method__set_multiplayer_peer: .. rst-class:: classref-method @@ -238,10 +241,10 @@ void **_set_multiplayer_peer** **(** :ref:`MultiplayerPeer` 时调用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_multiplayerpeer.rst b/classes/zh_CN/class_multiplayerpeer.rst index 5fa7b88475..d69b437559 100644 --- a/classes/zh_CN/class_multiplayerpeer.rst +++ b/classes/zh_CN/class_multiplayerpeer.rst @@ -10,16 +10,16 @@ MultiplayerPeer =============== -**Inherits:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`ENetMultiplayerPeer`, :ref:`MultiplayerPeerExtension`, :ref:`OfflineMultiplayerPeer`, :ref:`WebRTCMultiplayerPeer`, :ref:`WebSocketMultiplayerPeer` +**派生:** :ref:`ENetMultiplayerPeer`, :ref:`MultiplayerPeerExtension`, :ref:`OfflineMultiplayerPeer`, :ref:`WebRTCMultiplayerPeer`, :ref:`WebSocketMultiplayerPeer` 特化 :ref:`PacketPeer` 的抽象类,\ :ref:`MultiplayerAPI` 会用到。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 管理与一个或多个作为服务器或客户端的远程对等体的连接,并为每个对等体分配唯一的 ID。另请参阅 :ref:`MultiplayerAPI`\ 。 @@ -29,8 +29,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`高级多人游戏 <../tutorials/networking/high_level_multiplayer>` @@ -38,8 +38,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -90,8 +90,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_MultiplayerPeer_signal_peer_connected: @@ -119,8 +119,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_MultiplayerPeer_ConnectionStatus: @@ -192,8 +192,8 @@ enum **TransferMode**: .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_MultiplayerPeer_constant_TARGET_PEER_BROADCAST: @@ -217,8 +217,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_MultiplayerPeer_property_refuse_new_connections: @@ -275,8 +275,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_MultiplayerPeer_method_close: @@ -408,10 +408,10 @@ void **set_target_peer** **(** :ref:`int` id **)** \ ``id`` 可以是以下之一:\ :ref:`TARGET_PEER_BROADCAST`\ ,以发送到所有连接的对等体;\ :ref:`TARGET_PEER_SERVER`\ ,以发送到充当服务器的对等体;一个有效的对等体 ID ,以发送到那个特定的对等体;一个负的对等体 ID,以发送到除那个对等体以外的所有对等体。默认情况下,目标对等体是 :ref:`TARGET_PEER_BROADCAST`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_multiplayerpeerextension.rst b/classes/zh_CN/class_multiplayerpeerextension.rst index cad5ab4aea..8b0f7652fb 100644 --- a/classes/zh_CN/class_multiplayerpeerextension.rst +++ b/classes/zh_CN/class_multiplayerpeerextension.rst @@ -10,72 +10,72 @@ MultiplayerPeerExtension ======================== -**Inherits:** :ref:`MultiplayerPeer` **<** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`MultiplayerPeer` **<** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` 可以通过 GDExtension 继承,从而实现自定义多人 API 网络层的类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该类旨在被一个 GDExtension 插件继承,以实现多人游戏 API(例如 WebRTC)的自定义网络层。下面的所有方法都\ **必须**\ 被实现,才能实现一个有效的自定义多人游戏实现。另请参阅 :ref:`MultiplayerAPI`\ 。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_close` **(** **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_disconnect_peer` **(** :ref:`int` p_peer, :ref:`bool` p_force **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_available_packet_count` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ConnectionStatus` | :ref:`_get_connection_status` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_max_packet_size` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_get_packet` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_packet_channel` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TransferMode` | :ref:`_get_packet_mode` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_packet_peer` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedByteArray` | :ref:`_get_packet_script` **(** **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_transfer_channel` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TransferMode` | :ref:`_get_transfer_mode` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_unique_id` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_refusing_new_connections` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_server` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_server_relay_supported` **(** **)** |virtual| |const| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_poll` **(** **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_put_packet` **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_put_packet_script` **(** :ref:`PackedByteArray` p_buffer **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_refuse_new_connections` **(** :ref:`bool` p_enable **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_target_peer` **(** :ref:`int` p_peer **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_transfer_channel` **(** :ref:`int` p_channel **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_transfer_mode` **(** :ref:`TransferMode` p_mode **)** |virtual| | - +----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_close` **(** **)** |virtual| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_disconnect_peer` **(** :ref:`int` p_peer, :ref:`bool` p_force **)** |virtual| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_available_packet_count` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConnectionStatus` | :ref:`_get_connection_status` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_max_packet_size` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_get_packet` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_packet_channel` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransferMode` | :ref:`_get_packet_mode` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_packet_peer` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`_get_packet_script` **(** **)** |virtual| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_transfer_channel` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransferMode` | :ref:`_get_transfer_mode` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_unique_id` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_refusing_new_connections` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_server` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_server_relay_supported` **(** **)** |virtual| |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_poll` **(** **)** |virtual| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_put_packet` **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_put_packet_script` **(** :ref:`PackedByteArray` p_buffer **)** |virtual| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_refuse_new_connections` **(** :ref:`bool` p_enable **)** |virtual| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_target_peer` **(** :ref:`int` p_peer **)** |virtual| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_transfer_channel` **(** :ref:`int` p_channel **)** |virtual| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_transfer_mode` **(** :ref:`TransferMode` p_mode **)** |virtual| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -83,10 +83,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_MultiplayerPeerExtension_method__close: +.. _class_MultiplayerPeerExtension_private_method__close: .. rst-class:: classref-method @@ -98,7 +98,7 @@ void **_close** **(** **)** |virtual| ---- -.. _class_MultiplayerPeerExtension_method__disconnect_peer: +.. _class_MultiplayerPeerExtension_private_method__disconnect_peer: .. rst-class:: classref-method @@ -110,7 +110,7 @@ void **_disconnect_peer** **(** :ref:`int` p_peer, :ref:`bool` p_peer, :ref:`bool` p_peer, :ref:`bool` p_peer, :ref:`bool` p_peer, :ref:`bool` p_peer, :ref:`bool` p_peer, :ref:`bool` p_peer, :ref:`bool` **_get_packet_script** **(** **)** |virtual| -如果 :ref:`_get_packet` 未实现,则在有数据包需要被 :ref:`MultiplayerAPI` 接收时调用。使用 GDScript 扩展这个类时请使用。 +如果 :ref:`_get_packet` 未实现,则在有数据包需要被 :ref:`MultiplayerAPI` 接收时调用。使用 GDScript 扩展这个类时请使用。 .. rst-class:: classref-item-separator ---- -.. _class_MultiplayerPeerExtension_method__get_transfer_channel: +.. _class_MultiplayerPeerExtension_private_method__get_transfer_channel: .. rst-class:: classref-method @@ -218,7 +218,7 @@ void **_disconnect_peer** **(** :ref:`int` p_peer, :ref:`bool` p_peer, :ref:`bool` p_peer, :ref:`bool` p_peer, :ref:`bool` p_peer, :ref:`bool` p_peer, :ref:`bool` **_put_packet_script** **(** :ref:`PackedByteArray` p_buffer **)** |virtual| -如果 :ref:`_put_packet` 未实现,则在需要让 :ref:`MultiplayerAPI` 发送数据包时调用。使用 GDScript 扩展这个类时请使用。 +如果 :ref:`_put_packet` 未实现,则在需要让 :ref:`MultiplayerAPI` 发送数据包时调用。使用 GDScript 扩展这个类时请使用。 .. rst-class:: classref-item-separator ---- -.. _class_MultiplayerPeerExtension_method__set_refuse_new_connections: +.. _class_MultiplayerPeerExtension_private_method__set_refuse_new_connections: .. rst-class:: classref-method @@ -326,7 +326,7 @@ void **_set_refuse_new_connections** **(** :ref:`bool` p_enable **)* ---- -.. _class_MultiplayerPeerExtension_method__set_target_peer: +.. _class_MultiplayerPeerExtension_private_method__set_target_peer: .. rst-class:: classref-method @@ -338,7 +338,7 @@ void **_set_target_peer** **(** :ref:`int` p_peer **)** |virtual| ---- -.. _class_MultiplayerPeerExtension_method__set_transfer_channel: +.. _class_MultiplayerPeerExtension_private_method__set_transfer_channel: .. rst-class:: classref-method @@ -350,7 +350,7 @@ void **_set_transfer_channel** **(** :ref:`int` p_channel **)** |virt ---- -.. _class_MultiplayerPeerExtension_method__set_transfer_mode: +.. _class_MultiplayerPeerExtension_private_method__set_transfer_mode: .. rst-class:: classref-method @@ -358,10 +358,10 @@ void **_set_transfer_mode** **(** :ref:`TransferMode` 所使用的传输模式时调用(见 :ref:`MultiplayerPeer.transfer_mode`\ )。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_multiplayerspawner.rst b/classes/zh_CN/class_multiplayerspawner.rst index ef509bf402..fe3362222a 100644 --- a/classes/zh_CN/class_multiplayerspawner.rst +++ b/classes/zh_CN/class_multiplayerspawner.rst @@ -10,14 +10,14 @@ MultiplayerSpawner ================== -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` 自动将可出生节点从授权端复制到其他多人对等体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 可出生的场景可以在编辑器中或通过代码配置(参阅 :ref:`add_spawnable_scene`\ )。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -67,8 +67,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_MultiplayerSpawner_signal_despawned: @@ -96,8 +96,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_MultiplayerSpawner_property_spawn_function: @@ -156,8 +156,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_MultiplayerSpawner_method_add_spawnable_scene: @@ -217,10 +217,10 @@ void **clear_spawnable_scenes** **(** **)** \ **注意:**\ 可出生的场景是自动出生的。\ :ref:`spawn` 仅在自定义出生时需要。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_multiplayersynchronizer.rst b/classes/zh_CN/class_multiplayersynchronizer.rst index 7ebc6ed777..ba3536083f 100644 --- a/classes/zh_CN/class_multiplayersynchronizer.rst +++ b/classes/zh_CN/class_multiplayersynchronizer.rst @@ -10,14 +10,14 @@ MultiplayerSynchronizer ======================= -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` 将属性从多人游戏权威同步到远程对等体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 默认情况下,\ **MultiplayerSynchronizer** 会将配置的属性同步到所有对等体。 @@ -31,8 +31,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -53,8 +53,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -77,8 +77,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_MultiplayerSynchronizer_signal_delta_synchronized: @@ -118,8 +118,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_MultiplayerSynchronizer_VisibilityUpdateMode: @@ -157,8 +157,8 @@ enum **VisibilityUpdateMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_MultiplayerSynchronizer_property_delta_interval: @@ -266,8 +266,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_MultiplayerSynchronizer_method_add_visibility_filter: @@ -327,10 +327,10 @@ void **update_visibility** **(** :ref:`int` for_peer=0 **)** 根据可见性过滤器更新 ``for_peer`` 的可见性。如果 ``for_peer`` 为 ``0``\ (默认值),则更新所有对等体的可见性。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_mutex.rst b/classes/zh_CN/class_mutex.rst index e696cb16ef..7737690474 100644 --- a/classes/zh_CN/class_mutex.rst +++ b/classes/zh_CN/class_mutex.rst @@ -10,14 +10,14 @@ Mutex ===== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 二元 :ref:`Semaphore`\ ,用于在多 :ref:`Thread` 间进行同步。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 同步互斥器(mutex 来源于 mutual exclusion,即互斥)。可用于在多 :ref:`Thread` 间进行同步,等价于二元 :ref:`Semaphore`\ 。能够确保同时只有一个线程能够访问临界区。 @@ -33,8 +33,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用多线程 <../tutorials/performance/using_multiple_threads>` @@ -42,8 +42,8 @@ Tutorials .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -62,8 +62,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Mutex_method_lock: @@ -105,10 +105,10 @@ void **unlock** **(** **)** \ **警告:**\ 在给定的线程中调用 :ref:`unlock` 的次数超过调用 :ref:`lock` 的次数,导致尝试解锁未加锁的互斥器,是错误的行为,可能引起崩溃和死锁。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationagent2d.rst b/classes/zh_CN/class_navigationagent2d.rst index 372e9f2f46..2e3f7bbee4 100644 --- a/classes/zh_CN/class_navigationagent2d.rst +++ b/classes/zh_CN/class_navigationagent2d.rst @@ -10,14 +10,14 @@ NavigationAgent2D ================= -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` 用于寻路至某个位置并且能够躲避障碍物的 2D 代理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于寻路至某个位置并且能够躲避静态和动态障碍物的 2D 代理。父节点能够使用计算结果沿着路径动态前进。需要有导航数据才能正常工作。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 NavigationAgent <../tutorials/navigation/navigation_using_navigationagents>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -92,8 +92,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -144,8 +144,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_NavigationAgent2D_signal_link_reached: @@ -179,7 +179,7 @@ Signals **navigation_finished** **(** **)** -Emitted once per loaded path when the agent internal navigation path index reaches the last index of the loaded path array. The agent internal navigation path index can be received with :ref:`get_current_navigation_path_index`. +当代理内部导航路径索引到达加载路径数组的最后一个索引时,每个加载路径发出一次。可以使用 :ref:`get_current_navigation_path_index` 接收代理内部导航路径索引。 .. rst-class:: classref-item-separator @@ -191,13 +191,13 @@ Emitted once per loaded path when the agent internal navigation path index reach **path_changed** **(** **)** -Emitted when the agent had to update the loaded path: +当该代理必须更新加载的路径时发出: -- because path was previously empty. +- 因为路径以前是空的。 -- because navigation map has changed. +- 因为导航地图已经改变。 -- because agent pushed further away from the current path segment than the :ref:`path_max_distance`. +- 因为代理从当前路径段推得比 :ref:`path_max_distance` 更远。 .. rst-class:: classref-item-separator @@ -209,7 +209,7 @@ Emitted when the agent had to update the loaded path: **target_reached** **(** **)** -Emitted once per loaded path when the agent's global position is the first time within :ref:`target_desired_distance` to the :ref:`target_position`. +当代理的全局位置第一次在 :ref:`target_desired_distance` 内到达 :ref:`target_position` 时,每个加载路径发出一次。 .. rst-class:: classref-item-separator @@ -251,8 +251,8 @@ Emitted once per loaded path when the agent's global position is the first time .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_NavigationAgent2D_property_avoidance_enabled: @@ -666,8 +666,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NavigationAgent2D_method_distance_to_target: @@ -747,7 +747,7 @@ Method Descriptions :ref:`Vector2` **get_final_position** **(** **)** -Returns the reachable final position of the current navigation path in global coordinates. This position can change if the agent needs to update the navigation path which makes the agent emit the :ref:`path_changed` signal. +返回当前导航路径上可到达的最终位置的全局坐标。如果该代理需要更新导航路径,从而使该代理发出 :ref:`path_changed` 信号,则该位置可能会发生变化。 .. rst-class:: classref-item-separator @@ -807,9 +807,9 @@ Returns the reachable final position of the current navigation path in global co :ref:`bool` **is_navigation_finished** **(** **)** -Returns ``true`` if the end of the currently loaded navigation path has been reached. +如果已到达当前加载的导航路径的末尾,则返回 ``true``\ 。 -\ **Note:** While true prefer to stop calling update functions like :ref:`get_next_path_position`. This avoids jittering the standing agent due to calling repeated path updates. +\ **注意:**\ 虽然 true 更喜欢停止调用更新函数,例如 :ref:`get_next_path_position`\ 。这避免了由于调用重复的路径更新而使常设代理抖动。 .. rst-class:: classref-item-separator @@ -821,7 +821,7 @@ Returns ``true`` if the end of the currently loaded navigation path has been rea :ref:`bool` **is_target_reachable** **(** **)** -Returns ``true`` if :ref:`get_final_position` is within :ref:`target_desired_distance` of the :ref:`target_position`. +如果 :ref:`get_final_position` 位于 :ref:`target_position` 的 :ref:`target_desired_distance` 范围内,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -895,10 +895,10 @@ void **set_velocity_forced** **(** :ref:`Vector2` velocity **)** 将防撞仿真的内部速度替换为 ``velocity``\ 。代理传送到新的位置之后,应该在同一帧里使用这个函数。如果频繁调用这个函数,可能会让代理卡住。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationagent3d.rst b/classes/zh_CN/class_navigationagent3d.rst index a797027d04..246576d199 100644 --- a/classes/zh_CN/class_navigationagent3d.rst +++ b/classes/zh_CN/class_navigationagent3d.rst @@ -10,14 +10,14 @@ NavigationAgent3D ================= -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` 用于寻路至某个位置并且能够躲避障碍物的 3D 代理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于寻路至某个位置并且能够躲避静态和动态障碍物的 3D 代理。父节点能够使用计算结果沿着路径动态前进。需要有导航数据才能正常工作。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 NavigationAgent <../tutorials/navigation/navigation_using_navigationagents>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -59,6 +59,8 @@ Properties +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`height` | ``1.0`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`keep_y_velocity` | ``true`` | + +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`int` | :ref:`max_neighbors` | ``10`` | +------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`max_speed` | ``10.0`` | @@ -96,8 +98,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -148,8 +150,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_NavigationAgent3D_signal_link_reached: @@ -157,21 +159,21 @@ Signals **link_reached** **(** :ref:`Dictionary` details **)** -Notifies when a navigation link has been reached. +当到达一个导航链接时通知。 -The details dictionary may contain the following keys depending on the value of :ref:`path_metadata_flags`: +根据 :ref:`path_metadata_flags` 的值,详细信息字典可能包含以下键: -- ``position``: The start position of the link that was reached. +- ``position``\ :到达的链接的起始位置。 -- ``type``: Always :ref:`NavigationPathQueryResult3D.PATH_SEGMENT_TYPE_LINK`. +- ``type``\ :总是 :ref:`NavigationPathQueryResult3D.PATH_SEGMENT_TYPE_LINK`\ 。 -- ``rid``: The :ref:`RID` of the link. +- ``rid``\ :链接的 :ref:`RID`\ 。 -- ``owner``: The object which manages the link (usually :ref:`NavigationLink3D`). +- ``owner``\ :管理该链接的对象(通常是\ :ref:`NavigationLink3D`\ )。 -- ``link_entry_position``: If ``owner`` is available and the owner is a :ref:`NavigationLink3D`, it will contain the global position of the link's point the agent is entering. +- ``link_entry_position``\ :如果 ``owner`` 可用且该所有者是一个 :ref:`NavigationLink3D`\ ,它将包含代理正在进入时的链接点的全局位置。 -- ``link_exit_position``: If ``owner`` is available and the owner is a :ref:`NavigationLink3D`, it will contain the global position of the link's point which the agent is exiting. +- ``link_exit_position``\ :如果 ``owner`` 可用且该所有者是一个 :ref:`NavigationLink3D`\ ,它将包含代理正在退出时的链接点的全局位置。 .. rst-class:: classref-item-separator @@ -183,7 +185,7 @@ The details dictionary may contain the following keys depending on the value of **navigation_finished** **(** **)** -Emitted once per loaded path when the agent internal navigation path index reaches the last index of the loaded path array. The agent internal navigation path index can be received with :ref:`get_current_navigation_path_index`. +当代理内部导航路径索引到达加载路径数组的最后一个索引时,每个加载路径发出一次。可以使用 :ref:`get_current_navigation_path_index` 接收代理内部导航路径索引。 .. rst-class:: classref-item-separator @@ -195,13 +197,13 @@ Emitted once per loaded path when the agent internal navigation path index reach **path_changed** **(** **)** -Emitted when the agent had to update the loaded path: +当该代理必须更新加载的路径时发出: -- because path was previously empty. +- 因为路径以前是空的。 -- because navigation map has changed. +- 因为导航地图已经改变。 -- because agent pushed further away from the current path segment than the :ref:`path_max_distance`. +- 因为代理从当前路径段推得比 :ref:`path_max_distance` 更远。 .. rst-class:: classref-item-separator @@ -213,7 +215,7 @@ Emitted when the agent had to update the loaded path: **target_reached** **(** **)** -Emitted once per loaded path when the agent's global position is the first time within :ref:`target_desired_distance` to the :ref:`target_position`. +当代理的全局位置第一次在 :ref:`target_desired_distance` 内到达 :ref:`target_position` 时,每个加载路径发出一次。 .. rst-class:: classref-item-separator @@ -255,8 +257,8 @@ Emitted once per loaded path when the agent's global position is the first time .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_NavigationAgent3D_property_avoidance_enabled: @@ -411,6 +413,23 @@ Property Descriptions ---- +.. _class_NavigationAgent3D_property_keep_y_velocity: + +.. rst-class:: classref-property + +:ref:`bool` **keep_y_velocity** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_keep_y_velocity** **(** :ref:`bool` value **)** +- :ref:`bool` **get_keep_y_velocity** **(** **)** + +如果为 ``true``\ ,并且代理使用 2D 避障,它将记住设置的 y 轴速度并在避障步进后重新应用它。虽然 2D 避障没有 y 轴并在平坦平面上进行模拟,但该设置可以帮助减轻不均匀 3D 几何体上最明显的裁剪。 + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationAgent3D_property_max_neighbors: .. rst-class:: classref-property @@ -706,8 +725,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NavigationAgent3D_method_distance_to_target: @@ -787,7 +806,7 @@ Method Descriptions :ref:`Vector3` **get_final_position** **(** **)** -Returns the reachable final position of the current navigation path in global coordinates. This position can change if the agent needs to update the navigation path which makes the agent emit the :ref:`path_changed` signal. +返回当前导航路径上可到达的最终位置的全局坐标。如果该代理需要更新导航路径,从而使该代理发出 :ref:`path_changed` 信号,则该位置可能会发生变化。 .. rst-class:: classref-item-separator @@ -847,9 +866,9 @@ Returns the reachable final position of the current navigation path in global co :ref:`bool` **is_navigation_finished** **(** **)** -Returns ``true`` if the end of the currently loaded navigation path has been reached. +如果已到达当前加载的导航路径的末尾,则返回 ``true``\ 。 -\ **Note:** While true prefer to stop calling update functions like :ref:`get_next_path_position`. This avoids jittering the standing agent due to calling repeated path updates. +\ **注意:**\ 虽然 true 更喜欢停止调用更新函数,例如 :ref:`get_next_path_position`\ 。这避免了由于调用重复的路径更新而使常设代理抖动。 .. rst-class:: classref-item-separator @@ -861,7 +880,7 @@ Returns ``true`` if the end of the currently loaded navigation path has been rea :ref:`bool` **is_target_reachable** **(** **)** -Returns ``true`` if :ref:`get_final_position` is within :ref:`target_desired_distance` of the :ref:`target_position`. +如果 :ref:`get_final_position` 位于 :ref:`target_position` 的 :ref:`target_desired_distance` 范围内,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -935,10 +954,10 @@ void **set_velocity_forced** **(** :ref:`Vector3` velocity **)** 将防撞仿真的内部速度替换为 ``velocity``\ 。代理传送到新的位置之后,应该在同一帧里使用这个函数。如果频繁调用这个函数,可能会让代理卡住。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationlink2d.rst b/classes/zh_CN/class_navigationlink2d.rst index 709c9911dc..b7770ea2ef 100644 --- a/classes/zh_CN/class_navigationlink2d.rst +++ b/classes/zh_CN/class_navigationlink2d.rst @@ -10,28 +10,28 @@ NavigationLink2D ================ -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 连接两个位于 :ref:`NavigationRegion2D` 上的位置的链接,导航时能够让代理走这个链接。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 连接两个位于 :ref:`NavigationRegion2D` 上的位置的链接,导航时能够让代理走这个链接。这两个位置可以在同一个 :ref:`NavigationRegion2D` 上,也可以是在两个不同的区块上。链接可以用来表达沿着导航多边形表面行进以外的导航方法,例如滑锁、传送、跳过沟壑等等。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 NavigationLink <../tutorials/navigation/navigation_using_navigationlinks>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -80,8 +80,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_NavigationLink2D_property_bidirectional: @@ -212,8 +212,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NavigationLink2D_method_get_global_end_position: @@ -283,10 +283,10 @@ void **set_navigation_layer_value** **(** :ref:`int` layer_number, :r 根据 ``value``\ ,启用或禁用 :ref:`navigation_layers` 位掩码中指定的层,给定的 ``layer_number`` 应在 1 和 32 之间。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationlink3d.rst b/classes/zh_CN/class_navigationlink3d.rst index ce04723c89..eb2f333459 100644 --- a/classes/zh_CN/class_navigationlink3d.rst +++ b/classes/zh_CN/class_navigationlink3d.rst @@ -10,28 +10,28 @@ NavigationLink3D ================ -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 连接两个位于 :ref:`NavigationRegion3D` 上的位置的链接,导航时能够让代理走这个链接。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 连接两个位于 :ref:`NavigationRegion3D` 上的位置的链接,导航时能够让代理走这个链接。这两个位置可以在同一个 :ref:`NavigationRegion3D` 上,也可以是在两个不同的区块上。链接可以用来表达沿着导航网格表面行进以外的导航方法,例如滑锁、传送、跳过沟壑等等。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 NavigationLink <../tutorials/navigation/navigation_using_navigationlinks>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -80,8 +80,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_NavigationLink3D_property_bidirectional: @@ -212,8 +212,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NavigationLink3D_method_get_global_end_position: @@ -283,10 +283,10 @@ void **set_navigation_layer_value** **(** :ref:`int` layer_number, :r 根据 ``value``\ ,启用或禁用 :ref:`navigation_layers` 位掩码中指定的层,给定的 ``layer_number`` 应在 1 和 32 之间。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationmesh.rst b/classes/zh_CN/class_navigationmesh.rst index f52f4ae2fc..7b1a47d7d7 100644 --- a/classes/zh_CN/class_navigationmesh.rst +++ b/classes/zh_CN/class_navigationmesh.rst @@ -10,21 +10,21 @@ NavigationMesh ============== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于定义可达区域和障碍物的导航网格。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 导航网格是多边形的集合,用于定义环境中的哪些区域是可以穿越的,帮助代理在复杂的空间中寻路。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 NavigationMesh <../tutorials/navigation/navigation_using_navigationmeshes>` @@ -32,8 +32,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -88,8 +88,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -122,8 +122,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_NavigationMesh_SamplePartitionType: @@ -253,8 +253,8 @@ enum **SourceGeometryMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_NavigationMesh_property_agent_height: @@ -426,9 +426,9 @@ Property Descriptions - void **set_edge_max_length** **(** :ref:`float` value **)** - :ref:`float` **get_edge_max_length** **(** **)** -The maximum allowed length for contour edges along the border of the mesh. A value of ``0.0`` disables this feature. +沿网格边界的轮廓的最大允许长度。值为 ``0.0`` 将禁用该功能。 -\ **Note:** While baking, this value will be rounded up to the nearest multiple of :ref:`cell_size`. +\ **注意:**\ 烘焙时,这个值会向上取整到最接近的 :ref:`cell_size` 的倍数。 .. rst-class:: classref-item-separator @@ -665,8 +665,8 @@ The maximum allowed length for contour edges along the border of the mesh. A val .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NavigationMesh_method_add_polygon: @@ -686,7 +686,7 @@ void **add_polygon** **(** :ref:`PackedInt32Array` polyg void **clear** **(** **)** -Clears the internal arrays for vertices and polygon indices. +清除顶点和多边形索引的内部数组。 .. rst-class:: classref-item-separator @@ -786,10 +786,10 @@ void **set_vertices** **(** :ref:`PackedVector3Array` 设置顶点,可以使用 :ref:`add_polygon` 方法对其进行索引,创建多边形。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationmeshgenerator.rst b/classes/zh_CN/class_navigationmeshgenerator.rst index d7da71b76e..dc76b1825c 100644 --- a/classes/zh_CN/class_navigationmeshgenerator.rst +++ b/classes/zh_CN/class_navigationmeshgenerator.rst @@ -10,14 +10,14 @@ NavigationMeshGenerator ======================= -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 对导航网格进行创建和清理的辅助类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该类负责创建和清除用作 :ref:`NavigationRegion3D` 内的 :ref:`NavigationMesh` 资源的 3D 导航网格。\ **NavigationMeshGenerator** 在 2D 中的用途非常有限,因为导航网格烘焙过程需要 3D 节点类型和 3D 源几何体来解析。 @@ -31,15 +31,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 NavigationMesh <../tutorials/navigation/navigation_using_navigationmeshes>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -60,8 +60,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NavigationMeshGenerator_method_bake: @@ -111,10 +111,10 @@ void **parse_source_geometry_data** **(** :ref:`NavigationMesh` 资源读取数据数组虽然很方便,但会对帧率造成负面影响。这些数据需要从 GPU 获取,卡住正在处理的 :ref:`RenderingServer`\ 。出于性能考量,请优先使用碰撞形状或在代码中创建完整的数据数组等方法。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationmeshsourcegeometrydata2d.rst b/classes/zh_CN/class_navigationmeshsourcegeometrydata2d.rst new file mode 100644 index 0000000000..481a019aac --- /dev/null +++ b/classes/zh_CN/class_navigationmeshsourcegeometrydata2d.rst @@ -0,0 +1,157 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/NavigationMeshSourceGeometryData2D.xml. + +.. _class_NavigationMeshSourceGeometryData2D: + +NavigationMeshSourceGeometryData2D +================================== + +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` + +存放解析所得的源几何体数据的容器,用于导航网格的烘焙。 + +.. rst-class:: classref-introduction-group + +描述 +---- + +存放解析所得的源几何体数据的容器,用于导航网格的烘焙。 + +.. rst-class:: classref-reftable-group + +方法 +---- + +.. table:: + :widths: auto + + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_obstruction_outline` **(** :ref:`PackedVector2Array` shape_outline **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_traversable_outline` **(** :ref:`PackedVector2Array` shape_outline **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array[]` | :ref:`get_obstruction_outlines` **(** **)** |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array[]` | :ref:`get_traversable_outlines` **(** **)** |const| | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_data` **(** **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_obstruction_outlines` **(** :ref:`PackedVector2Array[]` obstruction_outlines **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_traversable_outlines` **(** :ref:`PackedVector2Array[]` traversable_outlines **)** | + +-------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +方法说明 +-------- + +.. _class_NavigationMeshSourceGeometryData2D_method_add_obstruction_outline: + +.. rst-class:: classref-method + +void **add_obstruction_outline** **(** :ref:`PackedVector2Array` shape_outline **)** + +添加形状的轮廓点作为遮挡区域。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_add_traversable_outline: + +.. rst-class:: classref-method + +void **add_traversable_outline** **(** :ref:`PackedVector2Array` shape_outline **)** + +添加形状的轮廓点作为可遍历区域。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_clear: + +.. rst-class:: classref-method + +void **clear** **(** **)** + +清除内部数据。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_get_obstruction_outlines: + +.. rst-class:: classref-method + +:ref:`PackedVector2Array[]` **get_obstruction_outlines** **(** **)** |const| + +返回所有遮挡区域轮廓数组。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_get_traversable_outlines: + +.. rst-class:: classref-method + +:ref:`PackedVector2Array[]` **get_traversable_outlines** **(** **)** |const| + +返回所有可遍历区域轮廓数组。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_has_data: + +.. rst-class:: classref-method + +:ref:`bool` **has_data** **(** **)** + +当解析的源几何数据存在时,返回 ``true``\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_set_obstruction_outlines: + +.. rst-class:: classref-method + +void **set_obstruction_outlines** **(** :ref:`PackedVector2Array[]` obstruction_outlines **)** + +设置所有遮挡区域轮廓数组。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationMeshSourceGeometryData2D_method_set_traversable_outlines: + +.. rst-class:: classref-method + +void **set_traversable_outlines** **(** :ref:`PackedVector2Array[]` traversable_outlines **)** + +设置所有可遍历区域轮廓数组。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationmeshsourcegeometrydata3d.rst b/classes/zh_CN/class_navigationmeshsourcegeometrydata3d.rst index a77c20cd8f..aca5c2bb64 100644 --- a/classes/zh_CN/class_navigationmeshsourcegeometrydata3d.rst +++ b/classes/zh_CN/class_navigationmeshsourcegeometrydata3d.rst @@ -10,21 +10,21 @@ NavigationMeshSourceGeometryData3D ================================== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 存放解析所得的源几何体数据的容器,用于导航网格的烘焙。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 存放解析所得的源几何体数据的容器,用于导航网格的烘焙。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NavigationMeshSourceGeometryData3D_method_add_faces: @@ -64,7 +64,7 @@ Method Descriptions void **add_faces** **(** :ref:`PackedVector3Array` faces, :ref:`Transform3D` xform **)** -向用于导航网格烘焙的几何体数据中添加顶点位置数组,形成三角形面。每个面必须在数组中有三个顶点位置,使用顺时针缠绕顺序。因为 :ref:`NavigationMesh` 资源本身没有变换,所有顶点位置都需要使用 ``xform`` 参数使用节点的变换进行偏移。 +向用于导航网格烘焙的几何体数据中添加一组顶点位置,以形成三角形面。对于每个面,数组中必须有三个使用顺时针缠绕顺序的顶点位置。由于 :ref:`NavigationMesh` 资源本身没有变换,因此所有顶点位置都需要使用 ``xform`` 参数使用节点的变换进行偏移。 .. rst-class:: classref-item-separator @@ -136,7 +136,7 @@ void **clear** **(** **)** :ref:`bool` **has_data** **(** **)** -Returns ``true`` when parsed source geometry data exists. +当解析的源几何数据存在时,返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -166,10 +166,10 @@ void **set_vertices** **(** :ref:`PackedFloat32Array` \ **警告:**\ 数据不正确会导致相关第三方库在烘焙过程中崩溃。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationobstacle2d.rst b/classes/zh_CN/class_navigationobstacle2d.rst index 88a3ad6983..b7bac4bf14 100644 --- a/classes/zh_CN/class_navigationobstacle2d.rst +++ b/classes/zh_CN/class_navigationobstacle2d.rst @@ -10,14 +10,14 @@ NavigationObstacle2D ==================== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 用于导航的 2D 障碍物,能够将启用了避障处理的代理约束在某个区域之外或之内。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 导航中使用的 2D 障碍物,能够将由避障控制的代理约束在某个区域之外或之内。障碍物定义导航地图和轮廓顶点后才能正常工作。 @@ -29,15 +29,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 NavigationObstacle <../tutorials/navigation/navigation_using_navigationobstacles>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -80,8 +80,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_NavigationObstacle2D_property_avoidance_enabled: @@ -111,7 +111,7 @@ Property Descriptions - void **set_avoidance_layers** **(** :ref:`int` value **)** - :ref:`int` **get_avoidance_layers** **(** **)** -A bitfield determining the avoidance layers for this obstacle. Agents with a matching bit on the their avoidance mask will avoid this obstacle. +决定该障碍物的避障层的位字段。避障掩码中存在匹配位的代理会躲避该障碍物。 .. rst-class:: classref-item-separator @@ -170,8 +170,8 @@ A bitfield determining the avoidance layers for this obstacle. Agents with a mat .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NavigationObstacle2D_method_get_avoidance_layer_value: @@ -229,10 +229,10 @@ void **set_navigation_map** **(** :ref:`RID` navigation_map **)** 设置该 NavigationObstacle 节点应使用的导航地图的 :ref:`RID`\ ,并会更新 NavigationServer 上的 ``obstacle``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationobstacle3d.rst b/classes/zh_CN/class_navigationobstacle3d.rst index f2729e1716..d30328dddf 100644 --- a/classes/zh_CN/class_navigationobstacle3d.rst +++ b/classes/zh_CN/class_navigationobstacle3d.rst @@ -10,14 +10,14 @@ NavigationObstacle3D ==================== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 用于导航的 3D 障碍物,能够将启用了避障处理的代理约束在某个区域之外或之内。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 导航中使用的 3D 障碍物,能够将由避障控制的代理约束在某个区域之外或之内。障碍物定义导航地图和轮廓顶点后才能正常工作。 @@ -29,15 +29,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 NavigationObstacle <../tutorials/navigation/navigation_using_navigationobstacles>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -60,8 +60,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -84,8 +84,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_NavigationObstacle3D_property_avoidance_enabled: @@ -115,7 +115,7 @@ Property Descriptions - void **set_avoidance_layers** **(** :ref:`int` value **)** - :ref:`int` **get_avoidance_layers** **(** **)** -A bitfield determining the avoidance layers for this obstacle. Agents with a matching bit on the their avoidance mask will avoid this obstacle. +决定该障碍物的避障层的位字段。避障掩码中存在匹配位的代理会躲避该障碍物。 .. rst-class:: classref-item-separator @@ -210,8 +210,8 @@ A bitfield determining the avoidance layers for this obstacle. Agents with a mat .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NavigationObstacle3D_method_get_avoidance_layer_value: @@ -269,10 +269,10 @@ void **set_navigation_map** **(** :ref:`RID` navigation_map **)** 设置该 NavigationObstacle 节点应使用的导航地图的 :ref:`RID`\ ,并会更新 NavigationServer 上的 ``obstacle``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationpathqueryparameters2d.rst b/classes/zh_CN/class_navigationpathqueryparameters2d.rst index a08ceeaddc..657136c127 100644 --- a/classes/zh_CN/class_navigationpathqueryparameters2d.rst +++ b/classes/zh_CN/class_navigationpathqueryparameters2d.rst @@ -10,28 +10,28 @@ NavigationPathQueryParameters2D =============================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 为 2D 导航路径查询提供参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 更改该对象的起始和结束位置等属性可以配置对 :ref:`NavigationServer2D` 的路径查询。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 NavigationPathQueryObject <../tutorials/navigation/navigation_using_navigationpathqueryobjects>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_NavigationPathQueryParameters2D_PathfindingAlgorithm: @@ -157,8 +157,8 @@ flags **PathMetadataFlags**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_NavigationPathQueryParameters2D_property_map: @@ -171,7 +171,7 @@ Property Descriptions - void **set_map** **(** :ref:`RID` value **)** - :ref:`RID` **get_map** **(** **)** -在路径查询中使用的导航地图 ``map`` :ref:`RID`\ 。 +在路径查询中使用的导航地图 :ref:`RID`\ 。 .. rst-class:: classref-item-separator @@ -275,10 +275,10 @@ Property Descriptions 寻路目标点,使用全局坐标。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationpathqueryparameters3d.rst b/classes/zh_CN/class_navigationpathqueryparameters3d.rst index 75aae47b81..0b63d1030e 100644 --- a/classes/zh_CN/class_navigationpathqueryparameters3d.rst +++ b/classes/zh_CN/class_navigationpathqueryparameters3d.rst @@ -10,28 +10,28 @@ NavigationPathQueryParameters3D =============================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 为 3D 导航路径查询提供参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 更改该对象的起始和结束位置等属性可以配置对 :ref:`NavigationServer3D` 的路径查询。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 NavigationPathQueryObject <../tutorials/navigation/navigation_using_navigationpathqueryobjects>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_NavigationPathQueryParameters3D_PathfindingAlgorithm: @@ -157,8 +157,8 @@ flags **PathMetadataFlags**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_NavigationPathQueryParameters3D_property_map: @@ -171,7 +171,7 @@ Property Descriptions - void **set_map** **(** :ref:`RID` value **)** - :ref:`RID` **get_map** **(** **)** -在路径查询中使用的导航地图 ``map`` :ref:`RID`\ 。 +在路径查询中使用的导航地图 :ref:`RID`\ 。 .. rst-class:: classref-item-separator @@ -275,10 +275,10 @@ Property Descriptions 寻路目标点,使用全局坐标。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationpathqueryresult2d.rst b/classes/zh_CN/class_navigationpathqueryresult2d.rst index ba7611e706..799783df77 100644 --- a/classes/zh_CN/class_navigationpathqueryresult2d.rst +++ b/classes/zh_CN/class_navigationpathqueryresult2d.rst @@ -10,28 +10,28 @@ NavigationPathQueryResult2D =========================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 代表 2D 寻路查询的结果。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类存储的是向 :ref:`NavigationServer2D` 进行 2D 导航路径查询的结果。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 NavigationPathQueryObject <../tutorials/navigation/navigation_using_navigationpathqueryobjects>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_NavigationPathQueryResult2D_PathSegmentType: @@ -95,8 +95,8 @@ enum **PathSegmentType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_NavigationPathQueryResult2D_property_path: @@ -168,8 +168,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NavigationPathQueryResult2D_method_reset: @@ -179,10 +179,10 @@ void **reset** **(** **)** 将结果对象重置为其初始状态。这对于在多次查询中重复使用该对象是很有用的。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationpathqueryresult3d.rst b/classes/zh_CN/class_navigationpathqueryresult3d.rst index 4f0706a438..ac2f8ac2df 100644 --- a/classes/zh_CN/class_navigationpathqueryresult3d.rst +++ b/classes/zh_CN/class_navigationpathqueryresult3d.rst @@ -10,28 +10,28 @@ NavigationPathQueryResult3D =========================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 代表 3D 寻路查询的结果。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类存储的是向 :ref:`NavigationServer3D` 进行 3D 导航路径查询的结果。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 NavigationPathQueryObject <../tutorials/navigation/navigation_using_navigationpathqueryobjects>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_NavigationPathQueryResult3D_PathSegmentType: @@ -95,8 +95,8 @@ enum **PathSegmentType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_NavigationPathQueryResult3D_property_path: @@ -168,8 +168,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NavigationPathQueryResult3D_method_reset: @@ -179,10 +179,10 @@ void **reset** **(** **)** 将结果对象重置为其初始状态。这对于在多次查询中重复使用该对象是很有用的。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationpolygon.rst b/classes/zh_CN/class_navigationpolygon.rst index 96d9e9cf40..72aff3e369 100644 --- a/classes/zh_CN/class_navigationpolygon.rst +++ b/classes/zh_CN/class_navigationpolygon.rst @@ -10,69 +10,69 @@ NavigationPolygon ================= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -定义可达区域和障碍物的导航多边形。 +2D 导航网格,描述用于寻路的可穿越表面。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -创建多边形有两种方法。通过使用 :ref:`add_outline` 方法,或使用 :ref:`add_polygon` 方法。 +导航网格可以通过在 :ref:`NavigationServer2D` 的帮助下烘焙它来创建,也可以通过手动添加顶点和凸多边形索引数组来创建。 -使用 :ref:`add_outline` 方法: +要烘焙导航网格,至少需要添加一个轮廓来定义烘焙区域的外部边界。 .. tabs:: .. code-tab:: gdscript - var polygon = NavigationPolygon.new() - var outline = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) - polygon.add_outline(outline) - polygon.make_polygons_from_outlines() - $NavigationRegion2D.navigation_polygon = polygon + var new_navigation_mesh = NavigationPolygon.new() + var bounding_outline = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) + new_navigation_mesh.add_outline(bounding_outline) + NavigationServer2D.bake_from_source_geometry_data(new_navigation_mesh, NavigationMeshSourceGeometryData2D.new()); + $NavigationRegion2D.navigation_polygon = new_navigation_mesh .. code-tab:: csharp - var polygon = new NavigationPolygon(); - var outline = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) }; - polygon.AddOutline(outline); - polygon.MakePolygonsFromOutlines(); - GetNode("NavigationRegion2D").NavigationPolygon = polygon; + var newNavigationMesh = new NavigationPolygon(); + var boundingOutline = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) }; + newNavigationMesh.AddOutline(boundingOutline); + NavigationServer2D.BakeFromSourceGeometryData(newNavigationMesh, new NavigationMeshSourceGeometryData2D()); + GetNode("NavigationRegion2D").NavigationPolygon = newNavigationMesh; -使用 :ref:`add_polygon` 和顶点数组的索引。 +手动添加顶点和多边形索引。 .. tabs:: .. code-tab:: gdscript - var polygon = NavigationPolygon.new() - var vertices = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) - polygon.vertices = vertices - var indices = PackedInt32Array([0, 1, 2, 3]) - polygon.add_polygon(indices) - $NavigationRegion2D.navigation_polygon = polygon + var new_navigation_mesh = NavigationPolygon.new() + var new_vertices = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)]) + new_navigation_mesh.vertices = new_vertices + var new_polygon_indices = PackedInt32Array([0, 1, 2, 3]) + new_navigation_mesh.add_polygon(new_polygon_indices) + $NavigationRegion2D.navigation_polygon = new_navigation_mesh .. code-tab:: csharp - var polygon = new NavigationPolygon(); - var vertices = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) }; - polygon.Vertices = vertices; - var indices = new int[] { 0, 1, 2, 3 }; - polygon.AddPolygon(indices); - GetNode("NavigationRegion2D").NavigationPolygon = polygon; + var newNavigationMesh = new NavigationPolygon(); + var newVertices = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) }; + newNavigationMesh.Vertices = newVertices; + var newPolygonIndices = new int[] { 0, 1, 2, 3 }; + newNavigationMesh.AddPolygon(newPolygonIndices); + GetNode("NavigationRegion2D").NavigationPolygon = newNavigationMesh; .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `2D 导航演示 `__ @@ -80,20 +80,30 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto - +---------------------------+--------------------------------------------------------------+---------+ - | :ref:`float` | :ref:`cell_size` | ``1.0`` | - +---------------------------+--------------------------------------------------------------+---------+ + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`float` | :ref:`agent_radius` | ``10.0`` | + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`float` | :ref:`cell_size` | ``1.0`` | + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`int` | :ref:`parsed_collision_mask` | ``4294967295`` | + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`ParsedGeometryType` | :ref:`parsed_geometry_type` | ``2`` | + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`StringName` | :ref:`source_geometry_group_name` | ``&"navigation_polygon_source_geometry_group"`` | + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ + | :ref:`SourceGeometryMode` | :ref:`source_geometry_mode` | ``0`` | + +----------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------+ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -117,6 +127,8 @@ Methods +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_outline_count` **(** **)** |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_parsed_collision_mask_value` **(** :ref:`int` layer_number **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`get_polygon` **(** :ref:`int` idx **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_polygon_count` **(** **)** |const| | @@ -129,6 +141,8 @@ Methods +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_outline` **(** :ref:`int` idx, :ref:`PackedVector2Array` outline **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_parsed_collision_mask_value` **(** :ref:`int` layer_number, :ref:`bool` value **)** | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_vertices` **(** :ref:`PackedVector2Array` vertices **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -138,8 +152,116 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +枚举 +---- + +.. _enum_NavigationPolygon_ParsedGeometryType: + +.. rst-class:: classref-enumeration + +enum **ParsedGeometryType**: + +.. _class_NavigationPolygon_constant_PARSED_GEOMETRY_MESH_INSTANCES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParsedGeometryType` **PARSED_GEOMETRY_MESH_INSTANCES** = ``0`` + +将网格实例解析为障碍几何体。这包括 :ref:`Polygon2D`\ 、\ :ref:`MeshInstance2D`\ 、\ :ref:`MultiMeshInstance2D` 和 :ref:`TileMap` 节点。 + +仅当网格使用 2D 顶点表面格式时才会对其进行解析。 + +.. _class_NavigationPolygon_constant_PARSED_GEOMETRY_STATIC_COLLIDERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParsedGeometryType` **PARSED_GEOMETRY_STATIC_COLLIDERS** = ``1`` + +将 :ref:`StaticBody2D` 和 :ref:`TileMap` 碰撞器解析为障碍几何体。碰撞器应在由 :ref:`parsed_collision_mask` 指定的层中。 + +.. _class_NavigationPolygon_constant_PARSED_GEOMETRY_BOTH: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParsedGeometryType` **PARSED_GEOMETRY_BOTH** = ``2`` + +:ref:`PARSED_GEOMETRY_MESH_INSTANCES` 和 :ref:`PARSED_GEOMETRY_STATIC_COLLIDERS`. + +.. _class_NavigationPolygon_constant_PARSED_GEOMETRY_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParsedGeometryType` **PARSED_GEOMETRY_MAX** = ``3`` + +代表 :ref:`ParsedGeometryType` 枚举的大小。 + +.. rst-class:: classref-item-separator + +---- + +.. _enum_NavigationPolygon_SourceGeometryMode: + +.. rst-class:: classref-enumeration + +enum **SourceGeometryMode**: + +.. _class_NavigationPolygon_constant_SOURCE_GEOMETRY_ROOT_NODE_CHILDREN: + +.. rst-class:: classref-enumeration-constant + +:ref:`SourceGeometryMode` **SOURCE_GEOMETRY_ROOT_NODE_CHILDREN** = ``0`` + +在根节点的子节点中递归扫描几何体。 + +.. _class_NavigationPolygon_constant_SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN: + +.. rst-class:: classref-enumeration-constant + +:ref:`SourceGeometryMode` **SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN** = ``1`` + +以递归方式扫描组中的节点及其子节点以获取几何图形。该组由 :ref:`source_geometry_group_name` 指定。 + +.. _class_NavigationPolygon_constant_SOURCE_GEOMETRY_GROUPS_EXPLICIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`SourceGeometryMode` **SOURCE_GEOMETRY_GROUPS_EXPLICIT** = ``2`` + +将组中的节点用于几何。该组由 :ref:`source_geometry_group_name` 指定。 + +.. _class_NavigationPolygon_constant_SOURCE_GEOMETRY_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`SourceGeometryMode` **SOURCE_GEOMETRY_MAX** = ``3`` + +代表 :ref:`SourceGeometryMode` 枚举的大小。 + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +属性说明 +-------- + +.. _class_NavigationPolygon_property_agent_radius: + +.. rst-class:: classref-property + +:ref:`float` **agent_radius** = ``10.0`` + +.. rst-class:: classref-property-setget + +- void **set_agent_radius** **(** :ref:`float` value **)** +- :ref:`float` **get_agent_radius** **(** **)** + +烘焙导航网格时侵蚀/收缩可行走表面的距离。 + +.. rst-class:: classref-item-separator + +---- .. _class_NavigationPolygon_property_cell_size: @@ -154,14 +276,86 @@ Property Descriptions 用于将导航网格顶点栅格化的单元格大小。必须与导航地图上的单元格大小相匹配。 +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPolygon_property_parsed_collision_mask: + +.. rst-class:: classref-property + +:ref:`int` **parsed_collision_mask** = ``4294967295`` + +.. rst-class:: classref-property-setget + +- void **set_parsed_collision_mask** **(** :ref:`int` value **)** +- :ref:`int` **get_parsed_collision_mask** **(** **)** + +用于扫描静态碰撞器的物理层。 + +仅在 :ref:`parsed_geometry_type` 是 :ref:`PARSED_GEOMETRY_STATIC_COLLIDERS` 或 :ref:`PARSED_GEOMETRY_BOTH` 时才使用。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPolygon_property_parsed_geometry_type: + +.. rst-class:: classref-property + +:ref:`ParsedGeometryType` **parsed_geometry_type** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_parsed_geometry_type** **(** :ref:`ParsedGeometryType` value **)** +- :ref:`ParsedGeometryType` **get_parsed_geometry_type** **(** **)** + +决定哪种类型的节点可解析为几何图形。可能的取值见 :ref:`ParsedGeometryType`\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPolygon_property_source_geometry_group_name: + +.. rst-class:: classref-property + +:ref:`StringName` **source_geometry_group_name** = ``&"navigation_polygon_source_geometry_group"`` + +.. rst-class:: classref-property-setget + +- void **set_source_geometry_group_name** **(** :ref:`StringName` value **)** +- :ref:`StringName` **get_source_geometry_group_name** **(** **)** + +应被解析以烘焙源几何体的节点的组名称。 + +只有当 :ref:`source_geometry_mode` 是 :ref:`SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN` 或 :ref:`SOURCE_GEOMETRY_GROUPS_EXPLICIT` 时才使用。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationPolygon_property_source_geometry_mode: + +.. rst-class:: classref-property + +:ref:`SourceGeometryMode` **source_geometry_mode** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_source_geometry_mode** **(** :ref:`SourceGeometryMode` value **)** +- :ref:`SourceGeometryMode` **get_source_geometry_mode** **(** **)** + +烘焙时使用的几何体的来源。可能的取值见 :ref:`SourceGeometryMode`\ 。 + .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NavigationPolygon_method_add_outline: @@ -169,7 +363,7 @@ Method Descriptions void **add_outline** **(** :ref:`PackedVector2Array` outline **)** -将包含轮廓顶点的 :ref:`PackedVector2Array`\ ,追加到包含所有轮廓的内部数组。必须调用 :ref:`make_polygons_from_outlines` 才能将该数组转换为引擎将使用的多边形。 +将包含轮廓顶点的 :ref:`PackedVector2Array` 追加到包含所有轮廓的内部数组。 .. rst-class:: classref-item-separator @@ -181,7 +375,7 @@ void **add_outline** **(** :ref:`PackedVector2Array` o void **add_outline_at_index** **(** :ref:`PackedVector2Array` outline, :ref:`int` index **)** -将包含轮廓顶点的 :ref:`PackedVector2Array`\ ,添加到包含位于固定位置处的所有轮廓的内部数组。必须调用 :ref:`make_polygons_from_outlines` 才能将该数组转换为引擎将使用的多边形。 +将一个包含轮廓顶点的 :ref:`PackedVector2Array` 添加到包含固定位置处的所有轮廓的内部数组。 .. rst-class:: classref-item-separator @@ -205,7 +399,7 @@ void **add_polygon** **(** :ref:`PackedInt32Array` polyg void **clear** **(** **)** -Clears the internal arrays for vertices and polygon indices. +清除顶点和多边形索引的内部数组。 .. rst-class:: classref-item-separator @@ -271,6 +465,18 @@ void **clear_polygons** **(** **)** ---- +.. _class_NavigationPolygon_method_get_parsed_collision_mask_value: + +.. rst-class:: classref-method + +:ref:`bool` **get_parsed_collision_mask_value** **(** :ref:`int` layer_number **)** |const| + +返回 :ref:`parsed_collision_mask` 中是否启用了指定的层,给定的 ``layer_number`` 应在 1 和 32 之间。 + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationPolygon_method_get_polygon: .. rst-class:: classref-method @@ -313,7 +519,9 @@ void **clear_polygons** **(** **)** void **make_polygons_from_outlines** **(** **)** -从编辑器或脚本中添加的轮廓创建多边形。 +从编辑器中或通过脚本添加的轮廓创建多边形。 + +\ *已弃用。*\ 该函数已弃用,并且可能会在将来的版本中移除。请改用 :ref:`NavigationServer2D.parse_source_geometry_data` 和 :ref:`NavigationServer2D.bake_from_source_geometry_data`\ 。 .. rst-class:: classref-item-separator @@ -343,6 +551,18 @@ void **set_outline** **(** :ref:`int` idx, :ref:`PackedVector2Array` layer_number, :ref:`bool` value **)** + +根据 ``value``\ ,启用或禁用 :ref:`parsed_collision_mask` 中指定的层,给定的 ``layer_number`` 应在 1 和 32 之间。 + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationPolygon_method_set_vertices: .. rst-class:: classref-method @@ -351,10 +571,10 @@ void **set_vertices** **(** :ref:`PackedVector2Array` 设置顶点,可以使用 :ref:`add_polygon` 方法对其进行索引,创建多边形。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationregion2d.rst b/classes/zh_CN/class_navigationregion2d.rst index a3530ee393..862106860e 100644 --- a/classes/zh_CN/class_navigationregion2d.rst +++ b/classes/zh_CN/class_navigationregion2d.rst @@ -10,14 +10,14 @@ NavigationRegion2D ================== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 可达的 2D 地区,\ :ref:`NavigationAgent2D` 能够将其用于寻路。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 可达的 2D 地区,基于 :ref:`NavigationPolygon`\ ,\ :ref:`NavigationAgent2D` 能够将其用于寻路。 @@ -35,15 +35,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 NavigationRegion <../tutorials/navigation/navigation_using_navigationregions>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -68,12 +68,14 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`bake_navigation_polygon` **(** :ref:`bool` on_thread=true **)** | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_avoidance_layer_value` **(** :ref:`int` layer_number **)** |const| | +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -96,8 +98,37 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +信号 +---- + +.. _class_NavigationRegion2D_signal_bake_finished: + +.. rst-class:: classref-signal + +**bake_finished** **(** **)** + +当导航多边形烘焙操作完成时触发。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationRegion2D_signal_navigation_polygon_changed: + +.. rst-class:: classref-signal + +**navigation_polygon_changed** **(** **)** + +当使用的导航多边形被替换或对当前导航多边形内部的更改被提交时发出。 + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +属性说明 +-------- .. _class_NavigationRegion2D_property_avoidance_layers: @@ -163,7 +194,7 @@ Property Descriptions - void **set_enter_cost** **(** :ref:`float` value **)** - :ref:`float` **get_enter_cost** **(** **)** -当寻路从另一个区块的导航网格进入该区块的导航网格时,\ ``enter_cost`` 值将被加到路径距离,以确定最短路径。 +当寻路从另一个区块的导航网格进入该区块的导航网格时,\ :ref:`enter_cost` 值将被加到路径距离,以确定最短路径。 .. rst-class:: classref-item-separator @@ -214,7 +245,7 @@ Property Descriptions - void **set_travel_cost** **(** :ref:`float` value **)** - :ref:`float` **get_travel_cost** **(** **)** -当寻路在该区块的导航网格内移动时,将行进距离乘以 ``travel_cost`` 以确定最短路径。 +当寻路在该区块的导航网格内移动时,将行进距离乘以 :ref:`travel_cost` 以确定最短路径。 .. rst-class:: classref-item-separator @@ -239,8 +270,20 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- + +.. _class_NavigationRegion2D_method_bake_navigation_polygon: + +.. rst-class:: classref-method + +void **bake_navigation_polygon** **(** :ref:`bool` on_thread=true **)** + +烘焙该 :ref:`NavigationPolygon`\ 。如果 ``on_thread`` 被设置为 ``true``\ (默认),则烘焙将在单独的线程上完成。 + +.. rst-class:: classref-item-separator + +---- .. _class_NavigationRegion2D_method_get_avoidance_layer_value: @@ -272,7 +315,7 @@ Method Descriptions :ref:`RID` **get_navigation_map** **(** **)** |const| -Returns the current navigation map :ref:`RID` used by this region. +返回该区块使用的当前导航地图 :ref:`RID`\ 。 .. rst-class:: classref-item-separator @@ -320,12 +363,12 @@ void **set_navigation_layer_value** **(** :ref:`int` layer_number, :r void **set_navigation_map** **(** :ref:`RID` navigation_map **)** -Sets the :ref:`RID` of the navigation map this region should use. By default the region will automatically join the :ref:`World2D` default navigation map so this function is only required to override the default map. +设置该区块应使用的导航地图的 :ref:`RID`\ 。默认情况下,该区块会自动加入 :ref:`World2D` 默认导航地图,因此该函数只需要覆盖默认地图即可。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationregion3d.rst b/classes/zh_CN/class_navigationregion3d.rst index 92ea58aba5..eb7fa416bd 100644 --- a/classes/zh_CN/class_navigationregion3d.rst +++ b/classes/zh_CN/class_navigationregion3d.rst @@ -10,14 +10,14 @@ NavigationRegion3D ================== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 可达的 3D 地区,\ :ref:`NavigationAgent3D` 能够将其用于寻路。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 可达的 3D 地区,基于 :ref:`NavigationMesh`\ ,\ :ref:`NavigationAgent3D` 能够将其用于寻路。 @@ -35,15 +35,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 NavigationRegion <../tutorials/navigation/navigation_using_navigationregions>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -90,8 +90,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_NavigationRegion3D_signal_bake_finished: @@ -119,8 +119,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_NavigationRegion3D_property_enabled: @@ -150,7 +150,7 @@ Property Descriptions - void **set_enter_cost** **(** :ref:`float` value **)** - :ref:`float` **get_enter_cost** **(** **)** -当寻路从另一个区块的导航网格进入该区块的导航网格时,\ ``enter_cost`` 值将被加到路径距离,以确定最短路径。 +当寻路从另一个区块的导航网格进入该区块的导航网格时,\ :ref:`enter_cost` 值将被加到路径距离,以确定最短路径。 .. rst-class:: classref-item-separator @@ -201,7 +201,7 @@ Property Descriptions - void **set_travel_cost** **(** :ref:`float` value **)** - :ref:`float` **get_travel_cost** **(** **)** -当寻路在该区块的导航网格内移动时,将行进距离乘以 ``travel_cost`` 以确定最短路径。 +当寻路在该区块的导航网格内移动时,将行进距离乘以 :ref:`travel_cost` 以确定最短路径。 .. rst-class:: classref-item-separator @@ -226,8 +226,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NavigationRegion3D_method_bake_navigation_mesh: @@ -259,7 +259,7 @@ void **bake_navigation_mesh** **(** :ref:`bool` on_thread=true **)** :ref:`RID` **get_navigation_map** **(** **)** |const| -Returns the current navigation map :ref:`RID` used by this region. +返回该区块使用的当前导航地图 :ref:`RID`\ 。 .. rst-class:: classref-item-separator @@ -295,12 +295,12 @@ void **set_navigation_layer_value** **(** :ref:`int` layer_number, :r void **set_navigation_map** **(** :ref:`RID` navigation_map **)** -Sets the :ref:`RID` of the navigation map this region should use. By default the region will automatically join the :ref:`World3D` default navigation map so this function is only required to override the default map. +设置该区块应使用的导航地图的 :ref:`RID`\ 。默认情况下,该区块会自动加入 :ref:`World3D` 默认导航地图,因此该函数只需要覆盖默认地图即可。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationserver2d.rst b/classes/zh_CN/class_navigationserver2d.rst index 63e0a1944a..7e2aec66d7 100644 --- a/classes/zh_CN/class_navigationserver2d.rst +++ b/classes/zh_CN/class_navigationserver2d.rst @@ -10,14 +10,14 @@ NavigationServer2D ================== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 用于访问低阶 2D 导航的服务器接口。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- NavigationServer2D 是负责处理导航地图、区块、代理的服务器。不负责处理 :ref:`AStar2D` 和 :ref:`AStarGrid2D` 的 A\* 导航。 @@ -37,8 +37,8 @@ NavigationServer2D 是负责处理导航地图、区块、代理的服务器。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `2D 导航演示 `__ @@ -46,207 +46,213 @@ Tutorials .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`agent_create` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`agent_get_avoidance_enabled` **(** :ref:`RID` agent **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`agent_get_map` **(** :ref:`RID` agent **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`agent_get_paused` **(** :ref:`RID` agent **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`agent_is_map_changed` **(** :ref:`RID` agent **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_avoidance_callback` **(** :ref:`RID` agent, :ref:`Callable` callback **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_avoidance_enabled` **(** :ref:`RID` agent, :ref:`bool` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_avoidance_layers` **(** :ref:`RID` agent, :ref:`int` layers **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_avoidance_mask` **(** :ref:`RID` agent, :ref:`int` mask **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_avoidance_priority` **(** :ref:`RID` agent, :ref:`float` priority **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_map` **(** :ref:`RID` agent, :ref:`RID` map **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_max_neighbors` **(** :ref:`RID` agent, :ref:`int` count **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_max_speed` **(** :ref:`RID` agent, :ref:`float` max_speed **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_neighbor_distance` **(** :ref:`RID` agent, :ref:`float` distance **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_paused` **(** :ref:`RID` agent, :ref:`bool` paused **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_position` **(** :ref:`RID` agent, :ref:`Vector2` position **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_radius` **(** :ref:`RID` agent, :ref:`float` radius **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_time_horizon_agents` **(** :ref:`RID` agent, :ref:`float` time_horizon **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_time_horizon_obstacles` **(** :ref:`RID` agent, :ref:`float` time_horizon **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_velocity` **(** :ref:`RID` agent, :ref:`Vector2` velocity **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`agent_set_velocity_forced` **(** :ref:`RID` agent, :ref:`Vector2` velocity **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`free_rid` **(** :ref:`RID` rid **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_debug_enabled` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]` | :ref:`get_maps` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`link_create` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`link_get_enabled` **(** :ref:`RID` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`link_get_end_position` **(** :ref:`RID` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`link_get_enter_cost` **(** :ref:`RID` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`link_get_map` **(** :ref:`RID` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`link_get_navigation_layers` **(** :ref:`RID` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`link_get_owner_id` **(** :ref:`RID` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`link_get_start_position` **(** :ref:`RID` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`link_get_travel_cost` **(** :ref:`RID` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`link_is_bidirectional` **(** :ref:`RID` link **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_bidirectional` **(** :ref:`RID` link, :ref:`bool` bidirectional **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_enabled` **(** :ref:`RID` link, :ref:`bool` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_end_position` **(** :ref:`RID` link, :ref:`Vector2` position **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_enter_cost` **(** :ref:`RID` link, :ref:`float` enter_cost **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_map` **(** :ref:`RID` link, :ref:`RID` map **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_navigation_layers` **(** :ref:`RID` link, :ref:`int` navigation_layers **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_owner_id` **(** :ref:`RID` link, :ref:`int` owner_id **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_start_position` **(** :ref:`RID` link, :ref:`Vector2` position **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`link_set_travel_cost` **(** :ref:`RID` link, :ref:`float` travel_cost **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`map_create` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_force_update` **(** :ref:`RID` map **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]` | :ref:`map_get_agents` **(** :ref:`RID` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`map_get_cell_size` **(** :ref:`RID` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`map_get_closest_point` **(** :ref:`RID` map, :ref:`Vector2` to_point **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`map_get_closest_point_owner` **(** :ref:`RID` map, :ref:`Vector2` to_point **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`map_get_edge_connection_margin` **(** :ref:`RID` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`map_get_link_connection_radius` **(** :ref:`RID` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]` | :ref:`map_get_links` **(** :ref:`RID` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]` | :ref:`map_get_obstacles` **(** :ref:`RID` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`map_get_path` **(** :ref:`RID` map, :ref:`Vector2` origin, :ref:`Vector2` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`map_get_use_edge_connections` **(** :ref:`RID` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`map_is_active` **(** :ref:`RID` map **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_active` **(** :ref:`RID` map, :ref:`bool` active **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_cell_size` **(** :ref:`RID` map, :ref:`float` cell_size **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_edge_connection_margin` **(** :ref:`RID` map, :ref:`float` margin **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_link_connection_radius` **(** :ref:`RID` map, :ref:`float` radius **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`map_set_use_edge_connections` **(** :ref:`RID` map, :ref:`bool` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`obstacle_create` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`obstacle_get_avoidance_enabled` **(** :ref:`RID` obstacle **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`obstacle_get_map` **(** :ref:`RID` obstacle **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`obstacle_get_paused` **(** :ref:`RID` obstacle **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_avoidance_enabled` **(** :ref:`RID` obstacle, :ref:`bool` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_avoidance_layers` **(** :ref:`RID` obstacle, :ref:`int` layers **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_map` **(** :ref:`RID` obstacle, :ref:`RID` map **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_paused` **(** :ref:`RID` obstacle, :ref:`bool` paused **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_position` **(** :ref:`RID` obstacle, :ref:`Vector2` position **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_radius` **(** :ref:`RID` obstacle, :ref:`float` radius **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_velocity` **(** :ref:`RID` obstacle, :ref:`Vector2` velocity **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`obstacle_set_vertices` **(** :ref:`RID` obstacle, :ref:`PackedVector2Array` vertices **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`query_path` **(** :ref:`NavigationPathQueryParameters2D` parameters, :ref:`NavigationPathQueryResult2D` result **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`region_create` **(** **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`region_get_connection_pathway_end` **(** :ref:`RID` region, :ref:`int` connection **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`region_get_connection_pathway_start` **(** :ref:`RID` region, :ref:`int` connection **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`region_get_connections_count` **(** :ref:`RID` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`region_get_enabled` **(** :ref:`RID` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`region_get_enter_cost` **(** :ref:`RID` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`region_get_map` **(** :ref:`RID` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`region_get_navigation_layers` **(** :ref:`RID` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`region_get_owner_id` **(** :ref:`RID` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`region_get_travel_cost` **(** :ref:`RID` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`region_get_use_edge_connections` **(** :ref:`RID` region **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`region_owns_point` **(** :ref:`RID` region, :ref:`Vector2` point **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_enabled` **(** :ref:`RID` region, :ref:`bool` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_enter_cost` **(** :ref:`RID` region, :ref:`float` enter_cost **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_map` **(** :ref:`RID` region, :ref:`RID` map **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_navigation_layers` **(** :ref:`RID` region, :ref:`int` navigation_layers **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_navigation_polygon` **(** :ref:`RID` region, :ref:`NavigationPolygon` navigation_polygon **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_owner_id` **(** :ref:`RID` region, :ref:`int` owner_id **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_transform` **(** :ref:`RID` region, :ref:`Transform2D` transform **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_travel_cost` **(** :ref:`RID` region, :ref:`float` travel_cost **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`region_set_use_edge_connections` **(** :ref:`RID` region, :ref:`bool` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_debug_enabled` **(** :ref:`bool` enabled **)** | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`agent_create` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`agent_get_avoidance_enabled` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`agent_get_map` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`agent_get_paused` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`agent_is_map_changed` **(** :ref:`RID` agent **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_avoidance_callback` **(** :ref:`RID` agent, :ref:`Callable` callback **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_avoidance_enabled` **(** :ref:`RID` agent, :ref:`bool` enabled **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_avoidance_layers` **(** :ref:`RID` agent, :ref:`int` layers **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_avoidance_mask` **(** :ref:`RID` agent, :ref:`int` mask **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_avoidance_priority` **(** :ref:`RID` agent, :ref:`float` priority **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_map` **(** :ref:`RID` agent, :ref:`RID` map **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_max_neighbors` **(** :ref:`RID` agent, :ref:`int` count **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_max_speed` **(** :ref:`RID` agent, :ref:`float` max_speed **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_neighbor_distance` **(** :ref:`RID` agent, :ref:`float` distance **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_paused` **(** :ref:`RID` agent, :ref:`bool` paused **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_position` **(** :ref:`RID` agent, :ref:`Vector2` position **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_radius` **(** :ref:`RID` agent, :ref:`float` radius **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_time_horizon_agents` **(** :ref:`RID` agent, :ref:`float` time_horizon **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_time_horizon_obstacles` **(** :ref:`RID` agent, :ref:`float` time_horizon **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_velocity` **(** :ref:`RID` agent, :ref:`Vector2` velocity **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`agent_set_velocity_forced` **(** :ref:`RID` agent, :ref:`Vector2` velocity **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`bake_from_source_geometry_data` **(** :ref:`NavigationPolygon` navigation_polygon, :ref:`NavigationMeshSourceGeometryData2D` source_geometry_data, :ref:`Callable` callback=Callable() **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`bake_from_source_geometry_data_async` **(** :ref:`NavigationPolygon` navigation_polygon, :ref:`NavigationMeshSourceGeometryData2D` source_geometry_data, :ref:`Callable` callback=Callable() **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`free_rid` **(** :ref:`RID` rid **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_debug_enabled` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`get_maps` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`link_create` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`link_get_enabled` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`link_get_end_position` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`link_get_enter_cost` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`link_get_map` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`link_get_navigation_layers` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`link_get_owner_id` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`link_get_start_position` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`link_get_travel_cost` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`link_is_bidirectional` **(** :ref:`RID` link **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_bidirectional` **(** :ref:`RID` link, :ref:`bool` bidirectional **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_enabled` **(** :ref:`RID` link, :ref:`bool` enabled **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_end_position` **(** :ref:`RID` link, :ref:`Vector2` position **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_enter_cost` **(** :ref:`RID` link, :ref:`float` enter_cost **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_map` **(** :ref:`RID` link, :ref:`RID` map **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_navigation_layers` **(** :ref:`RID` link, :ref:`int` navigation_layers **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_owner_id` **(** :ref:`RID` link, :ref:`int` owner_id **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_start_position` **(** :ref:`RID` link, :ref:`Vector2` position **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`link_set_travel_cost` **(** :ref:`RID` link, :ref:`float` travel_cost **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`map_create` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_force_update` **(** :ref:`RID` map **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`map_get_agents` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`map_get_cell_size` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`map_get_closest_point` **(** :ref:`RID` map, :ref:`Vector2` to_point **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`map_get_closest_point_owner` **(** :ref:`RID` map, :ref:`Vector2` to_point **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`map_get_edge_connection_margin` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`map_get_link_connection_radius` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`map_get_links` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`map_get_obstacles` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`map_get_path` **(** :ref:`RID` map, :ref:`Vector2` origin, :ref:`Vector2` destination, :ref:`bool` optimize, :ref:`int` navigation_layers=1 **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`map_get_regions` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`map_get_use_edge_connections` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`map_is_active` **(** :ref:`RID` map **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_set_active` **(** :ref:`RID` map, :ref:`bool` active **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_set_cell_size` **(** :ref:`RID` map, :ref:`float` cell_size **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_set_edge_connection_margin` **(** :ref:`RID` map, :ref:`float` margin **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_set_link_connection_radius` **(** :ref:`RID` map, :ref:`float` radius **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`map_set_use_edge_connections` **(** :ref:`RID` map, :ref:`bool` enabled **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`obstacle_create` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`obstacle_get_avoidance_enabled` **(** :ref:`RID` obstacle **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`obstacle_get_map` **(** :ref:`RID` obstacle **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`obstacle_get_paused` **(** :ref:`RID` obstacle **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_avoidance_enabled` **(** :ref:`RID` obstacle, :ref:`bool` enabled **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_avoidance_layers` **(** :ref:`RID` obstacle, :ref:`int` layers **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_map` **(** :ref:`RID` obstacle, :ref:`RID` map **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_paused` **(** :ref:`RID` obstacle, :ref:`bool` paused **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_position` **(** :ref:`RID` obstacle, :ref:`Vector2` position **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_radius` **(** :ref:`RID` obstacle, :ref:`float` radius **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_velocity` **(** :ref:`RID` obstacle, :ref:`Vector2` velocity **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`obstacle_set_vertices` **(** :ref:`RID` obstacle, :ref:`PackedVector2Array` vertices **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`parse_source_geometry_data` **(** :ref:`NavigationPolygon` navigation_polygon, :ref:`NavigationMeshSourceGeometryData2D` source_geometry_data, :ref:`Node` root_node, :ref:`Callable` callback=Callable() **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`query_path` **(** :ref:`NavigationPathQueryParameters2D` parameters, :ref:`NavigationPathQueryResult2D` result **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`region_create` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`region_get_connection_pathway_end` **(** :ref:`RID` region, :ref:`int` connection **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`region_get_connection_pathway_start` **(** :ref:`RID` region, :ref:`int` connection **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`region_get_connections_count` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`region_get_enabled` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`region_get_enter_cost` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`region_get_map` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`region_get_navigation_layers` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`region_get_owner_id` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`region_get_travel_cost` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`region_get_use_edge_connections` **(** :ref:`RID` region **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`region_owns_point` **(** :ref:`RID` region, :ref:`Vector2` point **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_enabled` **(** :ref:`RID` region, :ref:`bool` enabled **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_enter_cost` **(** :ref:`RID` region, :ref:`float` enter_cost **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_map` **(** :ref:`RID` region, :ref:`RID` map **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_navigation_layers` **(** :ref:`RID` region, :ref:`int` navigation_layers **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_navigation_polygon` **(** :ref:`RID` region, :ref:`NavigationPolygon` navigation_polygon **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_owner_id` **(** :ref:`RID` region, :ref:`int` owner_id **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_transform` **(** :ref:`RID` region, :ref:`Transform2D` transform **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_travel_cost` **(** :ref:`RID` region, :ref:`float` travel_cost **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`region_set_use_edge_connections` **(** :ref:`RID` region, :ref:`bool` enabled **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_debug_enabled` **(** :ref:`bool` enabled **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -254,8 +260,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_NavigationServer2D_signal_map_changed: @@ -283,8 +289,8 @@ Signals .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NavigationServer2D_method_agent_create: @@ -366,7 +372,7 @@ void **agent_set_avoidance_callback** **(** :ref:`RID` agent, :ref:`C void **agent_set_avoidance_enabled** **(** :ref:`RID` agent, :ref:`bool` enabled **)** -If ``enabled`` is ``true``, the specified ``agent`` uses avoidance. +如果 ``enabled`` 为 ``true``\ ,则指定的 ``agent`` 使用避障。 .. rst-class:: classref-item-separator @@ -542,6 +548,30 @@ void **agent_set_velocity_forced** **(** :ref:`RID` agent, :ref:`Vect ---- +.. _class_NavigationServer2D_method_bake_from_source_geometry_data: + +.. rst-class:: classref-method + +void **bake_from_source_geometry_data** **(** :ref:`NavigationPolygon` navigation_polygon, :ref:`NavigationMeshSourceGeometryData2D` source_geometry_data, :ref:`Callable` callback=Callable() **)** + +使用提供的 ``source_geometry_data`` 中的数据烘焙提供的 ``navigation_polygon``\ 。该过程完成后,将调用可选的 ``callback``\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_NavigationServer2D_method_bake_from_source_geometry_data_async: + +.. rst-class:: classref-method + +void **bake_from_source_geometry_data_async** **(** :ref:`NavigationPolygon` navigation_polygon, :ref:`NavigationMeshSourceGeometryData2D` source_geometry_data, :ref:`Callable` callback=Callable() **)** + +使用提供的 ``source_geometry_data`` 中的数据烘焙提供的 ``navigation_polygon``\ ,并作为在后台线程上运行的异步任务。该过程完成后,将调用可选的 ``callback``\ 。 + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_free_rid: .. rst-class:: classref-method @@ -596,7 +626,7 @@ void **free_rid** **(** :ref:`RID` rid **)** :ref:`bool` **link_get_enabled** **(** :ref:`RID` link **)** |const| -Returns ``true`` if the specified ``link`` is enabled. +如果指定的 ``link`` 已启用,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -716,7 +746,7 @@ void **link_set_bidirectional** **(** :ref:`RID` link, :ref:`bool` link, :ref:`bool` enabled **)** -If ``enabled`` is ``true``, the specified ``link`` will contribute to its current navigation map. +如果 ``enabled`` 为 ``true``\ ,则指定的 ``link`` 会在它的当前导航地图中生效。 .. rst-class:: classref-item-separator @@ -1034,7 +1064,7 @@ void **map_set_link_connection_radius** **(** :ref:`RID` map, :ref:`f void **map_set_use_edge_connections** **(** :ref:`RID` map, :ref:`bool` enabled **)** -Set the navigation ``map`` edge connection use. If ``enabled`` is ``true``, the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. +设置导航地图 ``map`` 的边缘连接使用情况。如果 ``enabled`` 为 ``true``\ ,则导航地图允许导航区块使用边缘连接与位于导航地图边缘连接边距范围内的其他导航区块相连接。 .. rst-class:: classref-item-separator @@ -1094,7 +1124,7 @@ Set the navigation ``map`` edge connection use. If ``enabled`` is ``true``, the void **obstacle_set_avoidance_enabled** **(** :ref:`RID` obstacle, :ref:`bool` enabled **)** -If ``enabled`` is ``true``, the provided ``obstacle`` affects avoidance using agents. +如果 ``enabled`` 为 ``true``\ ,则提供的障碍物 ``obstacle`` 会影响使用代理的避障。 .. rst-class:: classref-item-separator @@ -1184,6 +1214,22 @@ void **obstacle_set_vertices** **(** :ref:`RID` obstacle, :ref:`Packe ---- +.. _class_NavigationServer2D_method_parse_source_geometry_data: + +.. rst-class:: classref-method + +void **parse_source_geometry_data** **(** :ref:`NavigationPolygon` navigation_polygon, :ref:`NavigationMeshSourceGeometryData2D` source_geometry_data, :ref:`Node` root_node, :ref:`Callable` callback=Callable() **)** + +根据 ``navigation_polygon`` 的属性解析 :ref:`SceneTree` 中的源几何体。会使用解析的结果数据对提供的 ``source_geometry_data`` 资源进行更新。后续可以在使用 :ref:`bake_from_source_geometry_data` 烘焙导航网格时使用该资源。解析过程完成后,会调用可选的 ``callback``\ 。 + +\ **注意:**\ 因为 SceneTree 并不是线程安全的,所以这个函数需要在主线程执行或使用延迟调用。 + +\ **性能:**\ 从 :ref:`Mesh` 资源读取数据数组虽然很方便,但会对帧率造成负面影响。这些数据需要从 GPU 获取,卡住正在处理的 :ref:`RenderingServer`\ 。出于性能考量,请优先使用碰撞形状或在完全在代码中创建数据数组。 + +.. rst-class:: classref-item-separator + +---- + .. _class_NavigationServer2D_method_query_path: .. rst-class:: classref-method @@ -1250,7 +1296,7 @@ void **query_path** **(** :ref:`NavigationPathQueryParameters2D` **region_get_enabled** **(** :ref:`RID` region **)** |const| -Returns ``true`` if the specified ``region`` is enabled. +如果指定的 ``region`` 已启用,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -1350,7 +1396,7 @@ Returns ``true`` if the specified ``region`` is enabled. void **region_set_enabled** **(** :ref:`RID` region, :ref:`bool` enabled **)** -If ``enabled`` is ``true`` the specified ``region`` will contribute to its current navigation map. +如果 ``enabled`` 为 ``true``\ ,则指定的 ``region`` 会在它的当前导航地图中生效。 .. rst-class:: classref-item-separator @@ -1446,7 +1492,7 @@ void **region_set_travel_cost** **(** :ref:`RID` region, :ref:`float< void **region_set_use_edge_connections** **(** :ref:`RID` region, :ref:`bool` enabled **)** -If ``enabled`` is ``true``, the navigation ``region`` will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. +如果 ``enabled`` 为 ``true``\ ,则导航区块 ``region`` 将使用边缘连接来与位于导航地图边缘连接边距范围内的其他导航区块相连接。 .. rst-class:: classref-item-separator @@ -1460,10 +1506,10 @@ void **set_debug_enabled** **(** :ref:`bool` enabled **)** 如果为 ``true``\ ,则该 NavigationServer 启用了调试模式。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_navigationserver3d.rst b/classes/zh_CN/class_navigationserver3d.rst index dfe111518a..d13bd8bda8 100644 --- a/classes/zh_CN/class_navigationserver3d.rst +++ b/classes/zh_CN/class_navigationserver3d.rst @@ -10,35 +10,35 @@ NavigationServer3D ================== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 用于访问低阶 3D 导航的服务器接口。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -NavigationServer3D is the server that handles navigation maps, regions and agents. It does not handle A\* navigation from :ref:`AStar3D`. +NavigationServer3D 是处理导航地图、区块、代理的服务器。它不处理来自 :ref:`AStar3D` 的 A\* 导航。 -Maps are made up of regions, which are made of navigation meshes. Together, they define the navigable areas in the 3D world. +地图由区块组成,区块由导航网格组成。它们共同定义了 3D 空间中的可达区域。 -\ **Note:** Most **NavigationServer3D** changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation-related nodes in the scene tree or made through scripts. +\ **注意:**\ 大多数 **NavigationServer3D** 的更改都是在下一个物理帧进行的,不会立即生效。包括所有对地图、区块、代理的更改,无论是通过场景树中导航相关的节点作出的更改,还是通过脚本作出的更改。 -For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than ``edge_connection_margin`` to the respective other edge's vertex. +两个区块必须共享一条相似的边才能相连。如果一条边的两个顶点与另一条边上相应顶点的距离都小于 ``edge_connection_margin``\ ,那么就会认为这两条边是相连的。 -You may assign navigation layers to regions with :ref:`region_set_navigation_layers`, which then can be checked upon when requesting a path with :ref:`map_get_path`. This can be used to allow or deny certain areas for some objects. +可以使用 :ref:`region_set_navigation_layers` 为区块分配导航层,使用 :ref:`map_get_path` 请求路径时会对导航层进行检查。可用于针对某些对象允许或禁止特定的区域。 -To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity. +使用碰撞躲避系统就需要使用代理。你可以为代理设置目标速度,然后服务器就会发出回调,提供修改后的速度。 -\ **Note:** The collision avoidance system ignores regions. Using the modified velocity directly may move an agent outside of the traversable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine. +\ **注意:**\ 碰撞躲避系统会忽略区块。直接使用修改后的速度可能会将代理移动到可达区域之外。这是碰撞躲避系统的缺陷,更复杂的场合可能需要使用物理引擎。 -This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. +服务器会对所有调用进行跟踪,并在同步阶段执行。这意味着你可以放心地从任何线程请求对地图作出任何修改。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 导航网格演示 `__ @@ -46,8 +46,8 @@ Tutorials .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -290,8 +290,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_NavigationServer3D_signal_avoidance_debug_changed: @@ -331,8 +331,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_NavigationServer3D_ProcessInfo: @@ -418,8 +418,8 @@ enum **ProcessInfo**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NavigationServer3D_method_agent_create: @@ -513,7 +513,7 @@ void **agent_set_avoidance_callback** **(** :ref:`RID` agent, :ref:`C void **agent_set_avoidance_enabled** **(** :ref:`RID` agent, :ref:`bool` enabled **)** -If ``enabled`` is ``true``, the provided ``agent`` calculates avoidance. +如果 ``enabled`` 为 ``true``\ ,则提供的 ``agent`` 会计算避障。 .. rst-class:: classref-item-separator @@ -735,7 +735,7 @@ void **bake_from_source_geometry_data** **(** :ref:`NavigationMesh` navigation_mesh, :ref:`NavigationMeshSourceGeometryData3D` source_geometry_data, :ref:`Callable` callback=Callable() **)** -Bakes the provided ``navigation_mesh`` with the data from the provided ``source_geometry_data`` as an async task running on a background thread. After the process is finished the optional ``callback`` will be called. +使用提供的 ``source_geometry_data`` 中的数据烘焙提供的 ``navigation_mesh``\ ,并作为在后台线程上运行的异步任务。该过程完成后,将调用可选的 ``callback``\ 。 .. rst-class:: classref-item-separator @@ -807,7 +807,7 @@ void **free_rid** **(** :ref:`RID` rid **)** :ref:`bool` **link_get_enabled** **(** :ref:`RID` link **)** |const| -Returns ``true`` if the specified ``link`` is enabled. +如果指定的 ``link`` 已启用,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -927,7 +927,7 @@ void **link_set_bidirectional** **(** :ref:`RID` link, :ref:`bool` link, :ref:`bool` enabled **)** -If ``enabled`` is ``true``, the specified ``link`` will contribute to its current navigation map. +如果 ``enabled`` 为 ``true``\ ,则指定的 ``link`` 会在它的当前导航地图中生效。 .. rst-class:: classref-item-separator @@ -1317,7 +1317,7 @@ void **map_set_up** **(** :ref:`RID` map, :ref:`Vector3` map, :ref:`bool` enabled **)** -Set the navigation ``map`` edge connection use. If ``enabled`` is ``true``, the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. +设置导航地图 ``map`` 的边缘连接使用情况。如果 ``enabled`` 为 ``true``\ ,则导航地图允许导航区块使用边缘连接与位于导航地图边缘连接边距范围内的其他导航区块相连接。 .. rst-class:: classref-item-separator @@ -1389,7 +1389,7 @@ Set the navigation ``map`` edge connection use. If ``enabled`` is ``true``, the void **obstacle_set_avoidance_enabled** **(** :ref:`RID` obstacle, :ref:`bool` enabled **)** -If ``enabled`` is ``true``, the provided ``obstacle`` affects avoidance using agents. +如果 ``enabled`` 为 ``true``\ ,则提供的障碍物 ``obstacle`` 会影响使用代理的避障。 .. rst-class:: classref-item-separator @@ -1537,9 +1537,9 @@ void **query_path** **(** :ref:`NavigationPathQueryParameters3D` navigation_mesh, :ref:`Node` root_node **)** -Bakes the ``navigation_mesh`` with bake source geometry collected starting from the ``root_node``. +使用从 ``root_node`` 开始收集的烘焙源几何体来烘焙 ``navigation_mesh``\ 。 -\ *Deprecated.* This function is deprecated due to core threading changes. To upgrade existing code, first create a :ref:`NavigationMeshSourceGeometryData3D` resource. Use this resource with :ref:`parse_source_geometry_data` to parse the SceneTree for nodes that should contribute to the navigation mesh baking. The SceneTree parsing needs to happen on the main thread. After the parsing is finished use the resource with :ref:`bake_from_source_geometry_data` to bake a navigation mesh. +\ *已弃用。* 由于核心线程更改,该函数已弃用。要更新现有代码,请先创建一个 :ref:`NavigationMeshSourceGeometryData3D` 资源。将该资源与 :ref:`parse_source_geometry_data` 结合使用来解析 SceneTree 以查找有助于导航网格烘焙的节点。SceneTree 解析需要在主线程上进行。解析完成后,请在调用 :ref:`bake_from_source_geometry_data` 时使用该资源对导航网格进行烘焙。 .. rst-class:: classref-item-separator @@ -1599,7 +1599,7 @@ Bakes the ``navigation_mesh`` with bake source geometry collected starting from :ref:`bool` **region_get_enabled** **(** :ref:`RID` region **)** |const| -Returns ``true`` if the specified ``region`` is enabled. +如果指定的 ``region`` 已启用,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -1699,7 +1699,7 @@ Returns ``true`` if the specified ``region`` is enabled. void **region_set_enabled** **(** :ref:`RID` region, :ref:`bool` enabled **)** -If ``enabled`` is ``true``, the specified ``region`` will contribute to its current navigation map. +如果 ``enabled`` 为 ``true``\ ,则指定的 ``region`` 会在它的当前导航地图中生效。 .. rst-class:: classref-item-separator @@ -1795,7 +1795,7 @@ void **region_set_travel_cost** **(** :ref:`RID` region, :ref:`float< void **region_set_use_edge_connections** **(** :ref:`RID` region, :ref:`bool` enabled **)** -If ``enabled`` is ``true``, the navigation ``region`` will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. +如果 ``enabled`` 为 ``true``\ ,则导航区块 ``region`` 将使用边缘连接来与位于导航地图边缘连接边距范围内的其他导航区块相连接。 .. rst-class:: classref-item-separator @@ -1821,10 +1821,10 @@ void **set_debug_enabled** **(** :ref:`bool` enabled **)** 如果为 ``true``\ ,则该 NavigationServer 启用了调试模式。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_ninepatchrect.rst b/classes/zh_CN/class_ninepatchrect.rst index c36024680d..91aafb70ee 100644 --- a/classes/zh_CN/class_ninepatchrect.rst +++ b/classes/zh_CN/class_ninepatchrect.rst @@ -10,21 +10,21 @@ NinePatchRect ============= -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 显示纹理的控件,会保持角落不变,但平铺边缘和中心。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 也叫 9 片式面板,\ **NinePatchRect** 能够根据较小的纹理,生成任何大小的干净面板。为了做到这一点,它将纹理分割成 3×3 的网格。当你缩放节点时,它会在水平或垂直方向上平铺纹理的侧边,在两个轴上平铺中心,但不会缩放或平铺角落。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -53,8 +53,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -71,8 +71,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_NinePatchRect_signal_texture_changed: @@ -88,8 +88,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_NinePatchRect_AxisStretchMode: @@ -127,8 +127,8 @@ enum **AxisStretchMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_NinePatchRect_property_axis_stretch_horizontal: @@ -285,8 +285,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NinePatchRect_method_get_patch_margin: @@ -308,10 +308,10 @@ void **set_patch_margin** **(** :ref:`Side` margin, :ref 将给定 :ref:`Side` 的边距大小设置为 ``value`` 像素。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_node.rst b/classes/zh_CN/class_node.rst index e388ac39bf..1f6c79d324 100644 --- a/classes/zh_CN/class_node.rst +++ b/classes/zh_CN/class_node.rst @@ -10,30 +10,30 @@ Node ==== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` -**Inherited By:** :ref:`AnimationPlayer`, :ref:`AnimationTree`, :ref:`AudioStreamPlayer`, :ref:`CanvasItem`, :ref:`CanvasLayer`, :ref:`EditorFileSystem`, :ref:`EditorPlugin`, :ref:`EditorResourcePreview`, :ref:`HTTPRequest`, :ref:`InstancePlaceholder`, :ref:`MissingNode`, :ref:`MultiplayerSpawner`, :ref:`MultiplayerSynchronizer`, :ref:`NavigationAgent2D`, :ref:`NavigationAgent3D`, :ref:`Node3D`, :ref:`ResourcePreloader`, :ref:`ShaderGlobalsOverride`, :ref:`SkeletonIK3D`, :ref:`Timer`, :ref:`Viewport`, :ref:`WorldEnvironment` +**派生:** :ref:`AnimationMixer`, :ref:`AudioStreamPlayer`, :ref:`CanvasItem`, :ref:`CanvasLayer`, :ref:`EditorFileSystem`, :ref:`EditorPlugin`, :ref:`EditorResourcePreview`, :ref:`HTTPRequest`, :ref:`InstancePlaceholder`, :ref:`MissingNode`, :ref:`MultiplayerSpawner`, :ref:`MultiplayerSynchronizer`, :ref:`NavigationAgent2D`, :ref:`NavigationAgent3D`, :ref:`Node3D`, :ref:`ResourcePreloader`, :ref:`ShaderGlobalsOverride`, :ref:`SkeletonIK3D`, :ref:`Timer`, :ref:`Viewport`, :ref:`WorldEnvironment` 所有场景对象的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 节点是 Godot 的构建模块。它们可以被指定为另一个节点的子节点,从而形成树状排列。一个给定的节点可以包含任意数量的节点作为子节点,要求所有的兄弟节点(即该节点的直接子节点)的名字唯一。 节点树被称为\ *场景*\ 。场景可以被保存到磁盘上,然后被实例化到其他场景中。这使得 Godot 项目的架构和数据模型具有非常高的灵活性。 -\ **场景树:**\ :ref:`SceneTree` 包含活动的节点树。当一个节点被添加到场景树中时,它将收到 :ref:`NOTIFICATION_ENTER_TREE` 通知,并触发其 :ref:`_enter_tree` 回调。子节点总是在其父节点\ *之后*\ 被添加,即父节点的 :ref:`_enter_tree` 回调将在其子节点的之前被触发。 +\ **场景树:**\ :ref:`SceneTree` 包含活动的节点树。当一个节点被添加到场景树中时,它将收到 :ref:`NOTIFICATION_ENTER_TREE` 通知,并触发其 :ref:`_enter_tree` 回调。子节点总是在其父节点\ *之后*\ 被添加,即父节点的 :ref:`_enter_tree` 回调将在其子节点的之前被触发。 -一旦所有的节点被添加到场景树中,它们就会收到 :ref:`NOTIFICATION_READY` 通知,其各自的 :ref:`_ready` 回调被触发。对于一组节点,\ :ref:`_ready` 回调是按相反的顺序调用的,从子节点开始,向上移动到父节点。 +一旦所有的节点被添加到场景树中,它们就会收到 :ref:`NOTIFICATION_READY` 通知,其各自的 :ref:`_ready` 回调被触发。对于一组节点,\ :ref:`_ready` 回调是按相反的顺序调用的,从子节点开始,向上移动到父节点。 -这意味着,当把一个节点添加到场景树中时,将使用下面的顺序进行回调:父节点的 :ref:`_enter_tree`\ 、子节点的 :ref:`_enter_tree`\ 、子节点的 :ref:`_ready`\ ,最后是父节点的 :ref:`_ready`\ (对整个场景树进行递归)。 +这意味着,当把一个节点添加到场景树中时,将使用下面的顺序进行回调:父节点的 :ref:`_enter_tree`\ 、子节点的 :ref:`_enter_tree`\ 、子节点的 :ref:`_ready`\ ,最后是父节点的 :ref:`_ready`\ (对整个场景树进行递归)。 -\ **处理:**\ 节点可以覆盖“处理”状态,以便它们在每一帧上都收到回调,要求它们进行处理(做一些事情)。普通处理(回调 :ref:`_process`\ ,可以使用 :ref:`set_process` 开关)会尽可能快地发生,并且取决于帧率,所以处理时间 *delta*\ (单位为秒)会作为参数传入。物理处理(回调 :ref:`_physics_process`\ ,可以使用 :ref:`set_physics_process` 开关)每秒发生固定次数(默认为 60),对物理引擎相关的代码很有用。 +\ **处理:**\ 节点可以覆盖“处理”状态,以便它们在每一帧上都收到回调,要求它们进行处理(做一些事情)。普通处理(回调 :ref:`_process`\ ,可以使用 :ref:`set_process` 开关)会尽可能快地发生,并且取决于帧率,所以处理时间 *delta*\ (单位为秒)会作为参数传入。物理处理(回调 :ref:`_physics_process`\ ,可以使用 :ref:`set_physics_process` 开关)每秒发生固定次数(默认为 60),对物理引擎相关的代码很有用。 -节点也可以处理输入事件。存在 :ref:`_input` 函数时,程序每收到一次输入都会去调用它。在许多情况下,这么做是大材小用了(除非是用于简单的项目),用 :ref:`_unhandled_input` 函数可能更合适;当输入事件没有被其他节点(通常是 GUI :ref:`Control` 节点)处理时,才会调用这个函数,可以确保节点只接收到它该收到的事件。 +节点也可以处理输入事件。存在 :ref:`_input` 函数时,程序每收到一次输入都会去调用它。在许多情况下,这么做是大材小用了(除非是用于简单的项目),用 :ref:`_unhandled_input` 函数可能更合适;当输入事件没有被其他节点(通常是 GUI :ref:`Control` 节点)处理时,才会调用这个函数,可以确保节点只接收到它该收到的事件。 为了记录场景的层次结构(尤其是在将场景实例化到其他场景时)可以用 :ref:`owner` 属性为节点设置一个“所有者”。它记录的是谁实例化了什么。这在编写编辑器和工具时非常有用。 @@ -47,8 +47,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`节点与场景 <../getting_started/step_by_step/nodes_and_scenes>` @@ -56,8 +56,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -90,32 +90,32 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_enter_tree` **(** **)** |virtual| | + | void | :ref:`_enter_tree` **(** **)** |virtual| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_exit_tree` **(** **)** |virtual| | + | void | :ref:`_exit_tree` **(** **)** |virtual| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_configuration_warnings` **(** **)** |virtual| |const| | + | :ref:`PackedStringArray` | :ref:`_get_configuration_warnings` **(** **)** |virtual| |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_input` **(** :ref:`InputEvent` event **)** |virtual| | + | void | :ref:`_input` **(** :ref:`InputEvent` event **)** |virtual| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_physics_process` **(** :ref:`float` delta **)** |virtual| | + | void | :ref:`_physics_process` **(** :ref:`float` delta **)** |virtual| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_process` **(** :ref:`float` delta **)** |virtual| | + | void | :ref:`_process` **(** :ref:`float` delta **)** |virtual| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_ready` **(** **)** |virtual| | + | void | :ref:`_ready` **(** **)** |virtual| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shortcut_input` **(** :ref:`InputEvent` event **)** |virtual| | + | void | :ref:`_shortcut_input` **(** :ref:`InputEvent` event **)** |virtual| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_unhandled_input` **(** :ref:`InputEvent` event **)** |virtual| | + | void | :ref:`_unhandled_input` **(** :ref:`InputEvent` event **)** |virtual| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_unhandled_key_input` **(** :ref:`InputEvent` event **)** |virtual| | + | void | :ref:`_unhandled_key_input` **(** :ref:`InputEvent` event **)** |virtual| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_child` **(** :ref:`Node` node, :ref:`bool` force_readable_name=false, :ref:`InternalMode` internal=0 **)** | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -173,6 +173,10 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`SceneTree` | :ref:`get_tree` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_tree_string` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_tree_string_pretty` **(** **)** | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Viewport` | :ref:`get_viewport` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Window` | :ref:`get_window` **(** **)** |const| | @@ -284,8 +288,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Node_signal_child_entered_tree: @@ -333,7 +337,7 @@ Signals **ready** **(** **)** -当该节点就绪时发出。在 :ref:`_ready` 回调之后发出,遵循相同的规则。 +当该节点就绪时发出。在 :ref:`_ready` 回调之后发出,遵循相同的规则。 .. rst-class:: classref-item-separator @@ -407,8 +411,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Node_ProcessMode: @@ -608,8 +612,8 @@ enum **InternalMode**: .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Node_constant_NOTIFICATION_ENTER_TREE: @@ -645,7 +649,7 @@ Constants **NOTIFICATION_READY** = ``13`` -当该节点就绪时接收到通知。见 :ref:`_ready`\ 。 +当该节点就绪时接收到通知。见 :ref:`_ready`\ 。 .. _class_Node_constant_NOTIFICATION_PAUSED: @@ -713,7 +717,7 @@ Constants 当拖拽操作开始时收到的通知。所有节点都会收到此通知,而不仅仅是被拖动的节点。 -可以通过拖动提供拖动数据的 :ref:`Control`\ (见 :ref:`Control._get_drag_data`\ ),或使用 :ref:`Control.force_drag` 来触发。 +可以通过拖动提供拖动数据的 :ref:`Control`\ (见 :ref:`Control._get_drag_data`\ ),或使用 :ref:`Control.force_drag` 来触发。 请使用 :ref:`Viewport.gui_get_drag_data` 获取拖动数据。 @@ -783,14 +787,6 @@ Constants 当该节点被禁用后又再次被启用时收到的通知。见 :ref:`PROCESS_MODE_DISABLED`\ 。 -.. _class_Node_constant_NOTIFICATION_NODE_RECACHE_REQUESTED: - -.. rst-class:: classref-constant - -**NOTIFICATION_NODE_RECACHE_REQUESTED** = ``30`` - -当树中的其他节点可能已经被移除 / 替换,节点指针可能需要重新缓存时,会收到通知。 - .. _class_Node_constant_NOTIFICATION_EDITOR_PRE_SAVE: .. rst-class:: classref-constant @@ -813,9 +809,9 @@ Constants **NOTIFICATION_WM_MOUSE_ENTER** = ``1002`` -Notification received when the mouse enters the window. +鼠标进入窗口时收到的通知。 -Implemented for embedded windows and on desktop and web platforms. +为内嵌窗口实现,并在桌面和 Web 平台上实现。 .. _class_Node_constant_NOTIFICATION_WM_MOUSE_EXIT: @@ -823,9 +819,9 @@ Implemented for embedded windows and on desktop and web platforms. **NOTIFICATION_WM_MOUSE_EXIT** = ``1003`` -Notification received when the mouse leaves the window. +鼠标离开窗口时收到的通知。 -Implemented for embedded windows and on desktop and web platforms. +为内嵌窗口实现,并在桌面和 Web 平台上实现。 .. _class_Node_constant_NOTIFICATION_WM_WINDOW_FOCUS_IN: @@ -889,7 +885,7 @@ Implemented for embedded windows and on desktop and web platforms. **NOTIFICATION_VP_MOUSE_ENTER** = ``1010`` -Notification received when the mouse cursor enters the :ref:`Viewport`'s visible area, that is not occluded behind other :ref:`Control`\ s or :ref:`Window`\ s, provided its :ref:`Viewport.gui_disable_input` is ``false`` and regardless if it's currently focused or not. +当鼠标指针进入 :ref:`Viewport` 的可见区域时收到的通知,可见区域指没有被其他 :ref:`Control` 和 :ref:`Window` 遮挡的区域,并且需要 :ref:`Viewport.gui_disable_input` 为 ``false``\ ,与当前是否持有焦点无关。 .. _class_Node_constant_NOTIFICATION_VP_MOUSE_EXIT: @@ -897,7 +893,7 @@ Notification received when the mouse cursor enters the :ref:`Viewport`'s visible area, that is not occluded behind other :ref:`Control`\ s or :ref:`Window`\ s, provided its :ref:`Viewport.gui_disable_input` is ``false`` and regardless if it's currently focused or not. +当鼠标指针离开 :ref:`Viewport` 的可见区域时收到的通知,可见区域指没有被其他 :ref:`Control` 和 :ref:`Window` 遮挡的区域,并且需要 :ref:`Viewport.gui_disable_input` 为 ``false``\ ,与当前是否持有焦点无关。 .. _class_Node_constant_NOTIFICATION_OS_MEMORY_WARNING: @@ -1001,8 +997,8 @@ Notification received when the mouse cursor leaves the :ref:`Viewport` **get_multiplayer** **(** **)** -与此节点关联的 :ref:`MultiplayerAPI` 实例。参见 :ref:`SceneTree.get_multiplayer`\ 。 +与该节点关联的 :ref:`MultiplayerAPI` 实例。见 :ref:`SceneTree.get_multiplayer`\ 。 + +\ **注意:**\ 将节点重命名或者在树中移动都不会将 :ref:`MultiplayerAPI` 移动至新的路径,你需要手动进行更新。 .. rst-class:: classref-item-separator @@ -1103,7 +1101,7 @@ Property Descriptions - void **set_physics_process_priority** **(** :ref:`int` value **)** - :ref:`int` **get_physics_process_priority** **(** **)** -与 :ref:`process_priority` 类似,但是作用于 :ref:`NOTIFICATION_PHYSICS_PROCESS`\ 、\ :ref:`_physics_process` 以及内部版本。 +与 :ref:`process_priority` 类似,但是作用于 :ref:`NOTIFICATION_PHYSICS_PROCESS`\ 、\ :ref:`_physics_process` 以及内部版本。 .. rst-class:: classref-item-separator @@ -1137,7 +1135,7 @@ Property Descriptions - void **set_process_thread_group** **(** :ref:`ProcessThreadGroup` value **)** - :ref:`ProcessThreadGroup` **get_process_thread_group** **(** **)** -设置这个节点的处理线程组(基本上就是在主线程还是子线程中接收 :ref:`NOTIFICATION_PROCESS`\ 、\ :ref:`NOTIFICATION_PHYSICS_PROCESS`\ 、\ :ref:`_process`\ 、\ :ref:`_physics_process` 以及这些回调的内部版本)。 +设置这个节点的处理线程组(基本上就是在主线程还是子线程中接收 :ref:`NOTIFICATION_PROCESS`\ 、\ :ref:`NOTIFICATION_PHYSICS_PROCESS`\ 、\ :ref:`_process`\ 、\ :ref:`_physics_process` 以及这些回调的内部版本)。 默认情况下线程组为 :ref:`PROCESS_THREAD_GROUP_INHERIT`\ ,表示这个节点属于和父节点一样的线程组。同一线程组中的节点会一起处理,独立于其他线程组(由 :ref:`process_thread_group_order` 决定)。如果设为 :ref:`PROCESS_THREAD_GROUP_SUB_THREAD`\ ,则该线程组会在子线程(非主线程)中执行,否则设为 :ref:`PROCESS_THREAD_GROUP_MAIN_THREAD` 就会在主线程中处理。如果父节点和先祖节点都没有设置为非继承,则该节点属于\ *默认线程组*\ 。默认分组在主线程中处理,分组顺序为 0。 @@ -1221,38 +1219,38 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_Node_method__enter_tree: +.. _class_Node_private_method__enter_tree: .. rst-class:: classref-method void **_enter_tree** **(** **)** |virtual| -当节点进入 :ref:`SceneTree` 时调用(例如实例化时,场景改变时,或者在脚本中调用 :ref:`add_child` 后)。如果节点有子节点,则首先调用它的 :ref:`_enter_tree` 回调函数,然后再调用子节点的回调函数。 +当节点进入 :ref:`SceneTree` 时调用(例如实例化时,场景改变时,或者在脚本中调用 :ref:`add_child` 后)。如果节点有子节点,则首先调用它的 :ref:`_enter_tree` 回调函数,然后再调用子节点的回调函数。 -对应于 :ref:`Object._notification` 中的 :ref:`NOTIFICATION_ENTER_TREE` 通知。 +对应于 :ref:`Object._notification` 中的 :ref:`NOTIFICATION_ENTER_TREE` 通知。 .. rst-class:: classref-item-separator ---- -.. _class_Node_method__exit_tree: +.. _class_Node_private_method__exit_tree: .. rst-class:: classref-method void **_exit_tree** **(** **)** |virtual| -当节点即将离开 :ref:`SceneTree` 时被调用(例如,在释放、场景改变或在脚本中调用 :ref:`remove_child` 后)。如果该节点有子节点,它的 :ref:`_exit_tree` 回调将在所有子节点离开树后被最后调用。 +当节点即将离开 :ref:`SceneTree` 时被调用(例如,在释放、场景改变或在脚本中调用 :ref:`remove_child` 后)。如果该节点有子节点,它的 :ref:`_exit_tree` 回调将在所有子节点离开树后被最后调用。 -对应于 :ref:`Object._notification` 中的 :ref:`NOTIFICATION_EXIT_TREE` 通知和 :ref:`tree_exiting` 信号。要在节点已经离开活动树时得到通知,请连接到 :ref:`tree_exited`\ 。 +对应于 :ref:`Object._notification` 中的 :ref:`NOTIFICATION_EXIT_TREE` 通知和 :ref:`tree_exiting` 信号。要在节点已经离开活动树时得到通知,请连接到 :ref:`tree_exited`\ 。 .. rst-class:: classref-item-separator ---- -.. _class_Node_method__get_configuration_warnings: +.. _class_Node_private_method__get_configuration_warnings: .. rst-class:: classref-method @@ -1281,7 +1279,7 @@ void **_exit_tree** **(** **)** |virtual| ---- -.. _class_Node_method__input: +.. _class_Node_private_method__input: .. rst-class:: classref-method @@ -1293,7 +1291,7 @@ void **_input** **(** :ref:`InputEvent` event **)** |virtual| 要消耗输入事件,阻止它进一步传播到其他节点,可以调用 :ref:`Viewport.set_input_as_handled`\ 。 -对于游戏输入,\ :ref:`_unhandled_input` 和 :ref:`_unhandled_key_input` 通常更适合,因为它们允许 GUI 首先拦截事件。 +对于游戏输入,\ :ref:`_unhandled_input` 和 :ref:`_unhandled_key_input` 通常更适合,因为它们允许 GUI 首先拦截事件。 \ **注意:**\ 仅当该节点存在于场景树中时(即不是孤立节点),此方法才会被调用。 @@ -1301,7 +1299,7 @@ void **_input** **(** :ref:`InputEvent` event **)** |virtual| ---- -.. _class_Node_method__physics_process: +.. _class_Node_private_method__physics_process: .. rst-class:: classref-method @@ -1311,7 +1309,7 @@ void **_physics_process** **(** :ref:`float` delta **)** |virtual| 只有当物理处理被启用时才会被调用,如果这个方法被重写,就会自动被调用,并且可以使用 :ref:`set_physics_process` 进行切换。 -对应于 :ref:`Object._notification` 中的 :ref:`NOTIFICATION_PHYSICS_PROCESS` 通知。 +对应于 :ref:`Object._notification` 中的 :ref:`NOTIFICATION_PHYSICS_PROCESS` 通知。 \ **注意:**\ 这个方法只有在当节点存在于场景树中时才会被调用(也就是说,如果它不是“孤儿”)。 @@ -1319,7 +1317,7 @@ void **_physics_process** **(** :ref:`float` delta **)** |virtual| ---- -.. _class_Node_method__process: +.. _class_Node_private_method__process: .. rst-class:: classref-method @@ -1329,7 +1327,7 @@ void **_process** **(** :ref:`float` delta **)** |virtual| 只有在启用处理的情况下才会被调用,如果这个方法被重写,会自动进行处理,可以用 :ref:`set_process` 来开关。 -对应于 :ref:`Object._notification` 中的 :ref:`NOTIFICATION_PROCESS` 通知。 +对应于 :ref:`Object._notification` 中的 :ref:`NOTIFICATION_PROCESS` 通知。 \ **注意:**\ 这个方法只有在节点存在于场景树中时才会被调用(也就是说,如果它不是“孤儿”)。 @@ -1337,81 +1335,81 @@ void **_process** **(** :ref:`float` delta **)** |virtual| ---- -.. _class_Node_method__ready: +.. _class_Node_private_method__ready: .. rst-class:: classref-method void **_ready** **(** **)** |virtual| -当节点“就绪”时被调用,即当节点及其子节点都已经进入场景树时。如果该节点有子节点,将首先触发子节点的 :ref:`_ready` 回调,稍后父节点将收到就绪通知。 +当节点“就绪”时被调用,即当节点及其子节点都已经进入场景树时。如果该节点有子节点,将首先触发子节点的 :ref:`_ready` 回调,稍后父节点将收到就绪通知。 -对应 :ref:`Object._notification` 中的 :ref:`NOTIFICATION_READY` 通知。另请参阅用于变量的 ``@onready`` 注解。 +对应 :ref:`Object._notification` 中的 :ref:`NOTIFICATION_READY` 通知。另请参阅用于变量的 ``@onready`` 注解。 -通常用于初始化。对于更早的初始化,可以使用 :ref:`Object._init`\ 。另见 :ref:`_enter_tree`\ 。 +通常用于初始化。对于更早的初始化,可以使用 :ref:`Object._init`\ 。另见 :ref:`_enter_tree`\ 。 -\ **注意:**\ 对于每个节点可能仅调用一次 :ref:`_ready`\ 。从场景树中移除一个节点后,并再次添加该节点时,将不会第二次调用 ``_ready``\ 。这时可以通过使用 :ref:`request_ready`\ ,它可以在再次添加节点之前的任何地方被调用。 +\ **注意:**\ 对于每个节点可能仅调用一次 :ref:`_ready`\ 。从场景树中移除一个节点后,并再次添加该节点时,将不会第二次调用 :ref:`_ready`\ 。这时可以通过使用 :ref:`request_ready`\ ,它可以在再次添加节点之前的任何地方被调用。 .. rst-class:: classref-item-separator ---- -.. _class_Node_method__shortcut_input: +.. _class_Node_private_method__shortcut_input: .. rst-class:: classref-method void **_shortcut_input** **(** :ref:`InputEvent` event **)** |virtual| -Called when an :ref:`InputEventKey` or :ref:`InputEventShortcut` hasn't been consumed by :ref:`_input` or any GUI :ref:`Control` item. It is called before :ref:`_unhandled_key_input` and :ref:`_unhandled_input`. The input event propagates up through the node tree until a node consumes it. +当一个 :ref:`InputEventKey` 或 :ref:`InputEventShortcut`\ ,尚未被 :ref:`_input` 或任何 GUI :ref:`Control` 项使用时调用。这是在 :ref:`_unhandled_key_input` 和 :ref:`_unhandled_input` 之前调用的。输入事件通过节点树向上传播,直到一个节点消耗它。 -It is only called if shortcut processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_shortcut_input`. +它仅在启用快捷键处理时调用,如果此方法被覆盖,则会自动调用,并且可以使用 :ref:`set_process_shortcut_input` 进行开关。 -To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled` can be called. +要消耗输入事件,并阻止它进一步传播到其他节点,可以调用 :ref:`Viewport.set_input_as_handled`\ 。 -This method can be used to handle shortcuts. For generic GUI events, use :ref:`_input` instead. Gameplay events should usually be handled with either :ref:`_unhandled_input` or :ref:`_unhandled_key_input`. +此方法可用于处理快捷键。如果是常规的 GUI 事件,请改用 :ref:`_input`\ 。游戏事件通常应该使用 :ref:`_unhandled_input` 或 :ref:`_unhandled_key_input` 处理。 -\ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not orphan). +\ **注意:**\ 仅当该节点存在于场景树中(即它不是一个孤儿节点)时,此方法才会被调用。 .. rst-class:: classref-item-separator ---- -.. _class_Node_method__unhandled_input: +.. _class_Node_private_method__unhandled_input: .. rst-class:: classref-method void **_unhandled_input** **(** :ref:`InputEvent` event **)** |virtual| -Called when an :ref:`InputEvent` hasn't been consumed by :ref:`_input` or any GUI :ref:`Control` item. It is called after :ref:`_shortcut_input` and after :ref:`_unhandled_key_input`. The input event propagates up through the node tree until a node consumes it. +当一个 :ref:`InputEvent` 尚未被 :ref:`_input` 或任何 GUI :ref:`Control` 项消耗时调用。这是在 :ref:`_shortcut_input` 和 :ref:`_unhandled_key_input` 之后调用的。输入事件通过节点树向上传播,直到一个节点消耗它。 -It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_unhandled_input`. +只有在未处理的输入处理被启用时,才会被调用,如果该方法被重写,则会自动被调用,并且可以使用 :ref:`set_process_unhandled_input` 进行切换。 -To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled` can be called. +要消耗输入事件,并阻止它进一步传播到其他节点,可以调用 :ref:`Viewport.set_input_as_handled`\ 。 -For gameplay input, this method is usually a better fit than :ref:`_input`, as GUI events need a higher priority. For keyboard shortcuts, consider using :ref:`_shortcut_input` instead, as it is called before this method. Finally, to handle keyboard events, consider using :ref:`_unhandled_key_input` for performance reasons. +对于游戏输入,这个方法通常比 :ref:`_input` 更合适,因为 GUI 事件需要更高的优先级。对于键盘快捷键,请考虑改用 :ref:`_shortcut_input`\ ,因为是在这个方法之前调用的。最后,如果要处理键盘事件,那么出于性能方面的原因请考虑使用 :ref:`_unhandled_key_input`\ 。 -\ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). +\ **注意:**\ 仅当该节点存在于场景树中(即不是孤儿节点)时,该方法才会被调用。 .. rst-class:: classref-item-separator ---- -.. _class_Node_method__unhandled_key_input: +.. _class_Node_private_method__unhandled_key_input: .. rst-class:: classref-method void **_unhandled_key_input** **(** :ref:`InputEvent` event **)** |virtual| -Called when an :ref:`InputEventKey` hasn't been consumed by :ref:`_input` or any GUI :ref:`Control` item. It is called after :ref:`_shortcut_input` but before :ref:`_unhandled_input`. The input event propagates up through the node tree until a node consumes it. +当 :ref:`InputEventKey` 没有被 :ref:`_input` 或任何 GUI :ref:`Control` 项目消耗时调用。这是在 :ref:`_shortcut_input` 之后、\ :ref:`_unhandled_input` 之前调用的。输入事件通过节点树向上传播,直到某个节点将其消耗。 -It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with :ref:`set_process_unhandled_key_input`. +只有在启用了未处理按键输入处理时才会被调用,如果覆盖了这个方法就会自动启用,并且可以用 :ref:`set_process_unhandled_key_input` 来开关。 -To consume the input event and stop it propagating further to other nodes, :ref:`Viewport.set_input_as_handled` can be called. +要消耗输入事件并阻止它进一步传播到其他节点,可以调用 :ref:`Viewport.set_input_as_handled`\ 。 -This method can be used to handle Unicode character input with :kbd:`Alt`, :kbd:`Alt + Ctrl`, and :kbd:`Alt + Shift` modifiers, after shortcuts were handled. +在处理快捷键后,此方法可用于使用 :kbd:`Alt`\ 、\ :kbd:`Alt + Ctrl` 和 :kbd:`Alt + Shift` 修饰符处理 Unicode 字符输入。 -For gameplay input, this and :ref:`_unhandled_input` are usually a better fit than :ref:`_input`, as GUI events should be handled first. This method also performs better than :ref:`_unhandled_input`, since unrelated events such as :ref:`InputEventMouseMotion` are automatically filtered. For shortcuts, consider using :ref:`_shortcut_input` instead. +对于游戏输入,这和 :ref:`_unhandled_input` 通常比 :ref:`_input` 更适合,因为应该先处理 GUI 事件。该方法的性能也比 :ref:`_unhandled_input` 更好,因为 :ref:`InputEventMouseMotion` 等无关事件会被自动过滤。 -\ **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). +\ **注意:**\ 只有当节点存在于场景树中(即不是孤儿节点)时,该方法才会被调用。 .. rst-class:: classref-item-separator @@ -1500,7 +1498,7 @@ void **add_to_group** **(** :ref:`StringName` group, :ref:`boo :ref:`Variant` **call_deferred_thread_group** **(** :ref:`StringName` method, ... **)** |vararg| -这个函数类似于 :ref:`Object.call_deferred`\ ,但是会在处理节点线程组时进行调用。如果节点线程组在子线程中处理,那么调用就会在该线程中进行,时机为 :ref:`NOTIFICATION_PROCESS` 和 :ref:`NOTIFICATION_PHYSICS_PROCESS`\ 、\ :ref:`_process` 和 :ref:`_physics_process`\ ,或者对应的内部版本之前。 +这个函数类似于 :ref:`Object.call_deferred`\ ,但是会在处理节点线程组时进行调用。如果节点线程组在子线程中处理,那么调用就会在该线程中进行,时机为 :ref:`NOTIFICATION_PROCESS` 和 :ref:`NOTIFICATION_PHYSICS_PROCESS`\ 、\ :ref:`_process` 和 :ref:`_physics_process`\ ,或者对应的内部版本之前。 .. rst-class:: classref-item-separator @@ -1567,7 +1565,7 @@ void **add_to_group** **(** :ref:`StringName` group, :ref:`boo 可以使用 ``flags`` 微调该行为(请参阅 :ref:`DuplicateFlags`\ )。 -\ **注意:**\ 如果节点包含一个带有构造参数的脚本(即需要向 :ref:`Object._init` 方法提供参数),它将无法正常工作。在这种情况下,节点将在没有脚本的情况下被复制。 +\ **注意:**\ 如果节点包含一个带有构造参数的脚本(即需要向 :ref:`Object._init` 方法提供参数),它将无法正常工作。在这种情况下,节点将在没有脚本的情况下被复制。 .. rst-class:: classref-item-separator @@ -1679,7 +1677,7 @@ void **add_to_group** **(** :ref:`StringName` group, :ref:`boo 返回一组对节点子节点的引用。 -如果 ``include_internal`` 为 ``false``\ ,则返回的数组将不包含内部子节点(请参阅 :ref:`add_child` 中的 ``internal`` 参数)。 +如果 ``include_internal`` 为 ``false``\ ,则返回的数组将不包含内部子节点(见 :ref:`add_child` 中的 ``internal`` 参数)。 .. rst-class:: classref-item-separator @@ -1732,7 +1730,7 @@ void **add_to_group** **(** :ref:`StringName` group, :ref:`boo 返回节点在场景树分支中的顺序。例如,如果在第一个子节点上调用,则位置为 ``0``\ 。 -如果 ``include_internal`` 为 ``false``\ ,则索引将不会考虑内部子节点,即第一个非内部子节点的索引将为 0(请参阅 :ref:`add_child` 中的 ``internal`` 参数)。 +如果 ``include_internal`` 为 ``false``\ ,则索引将不会考虑内部子节点,即第一个非内部子节点的索引将为 0(见 :ref:`add_child` 中的 ``internal`` 参数)。 .. rst-class:: classref-item-separator @@ -1873,7 +1871,7 @@ void **add_to_group** **(** :ref:`StringName` group, :ref:`boo :ref:`NodePath` **get_path** **(** **)** |const| -返回当前节点的绝对路径。这只在当前节点在场景树中起作用(请参阅 :ref:`is_inside_tree`\ )。 +返回当前节点的绝对路径。这只在当前节点在场景树中起作用(见 :ref:`is_inside_tree`\ )。 .. rst-class:: classref-item-separator @@ -1901,7 +1899,7 @@ void **add_to_group** **(** :ref:`StringName` group, :ref:`boo :ref:`float` **get_physics_process_delta_time** **(** **)** |const| -返回自上一个物理绑定帧以来经过的时间(单位为秒)(参见 :ref:`_physics_process`\ )。除非通过 :ref:`Engine.physics_ticks_per_second` 更改每秒帧数,否则这在物理处理中始终是一个恒定值。 +返回自上一个物理绑定帧以来经过的时间(单位为秒)(见 :ref:`_physics_process`\ )。除非通过 :ref:`Engine.physics_ticks_per_second` 更改每秒帧数,否则这在物理处理中始终是一个恒定值。 .. rst-class:: classref-item-separator @@ -1937,7 +1935,53 @@ void **add_to_group** **(** :ref:`StringName` group, :ref:`boo :ref:`SceneTree` **get_tree** **(** **)** |const| -返回包含该节点的 :ref:`SceneTree`\ 。 +返回包含该节点的 :ref:`SceneTree`\ 。如果该节点不在场景树内,则返回 ``null`` 并打印错误。另见 :ref:`is_inside_tree`\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_Node_method_get_tree_string: + +.. rst-class:: classref-method + +:ref:`String` **get_tree_string** **(** **)** + +将树以 :ref:`String` 的形式返回。主要用于调试。这个版本显示相对于当前节点的路径,适合复制/粘贴到 :ref:`get_node` 函数中。也可以用于游戏中的 UI/UX。 + +\ **示例输出:**\ + +:: + + TheGame + TheGame/Menu + TheGame/Menu/Label + TheGame/Menu/Camera2D + TheGame/SplashScreen + TheGame/SplashScreen/Camera2D + +.. rst-class:: classref-item-separator + +---- + +.. _class_Node_method_get_tree_string_pretty: + +.. rst-class:: classref-method + +:ref:`String` **get_tree_string_pretty** **(** **)** + +类似于 :ref:`get_tree_string`\ ,会将树以 :ref:`String` 的形式返回。这个版本使用的是一种更加图形化的呈现方式,类似于在“场景”面板中显示的内容。非常适合检查较大的树。 + +\ **输出示例:**\ + +:: + + ┖╴TheGame + ┠╴Menu + ┃ ┠╴Label + ┃ ┖╴Camera2D + ┖╴SplashScreen + ┖╴Camera2D .. rst-class:: classref-item-separator @@ -2387,7 +2431,7 @@ void **replace_by** **(** :ref:`Node` node, :ref:`bool` void **request_ready** **(** **)** -请求再次调用 ``_ready``\ 。注意,该方法不会被立即调用,而是被安排在该节点再次被添加到场景树时(见 :ref:`_ready`\ )。\ ``_ready`` 只为请求它的节点调用,这意味着如果你想让每个子节点也调用 ``_ready``\ ,你需要为它们请求 ready(在这种情况下,\ ``_ready`` 的调用顺序与正常情况下相同)。 +请求再次调用 :ref:`_ready`\ 。注意,该方法不会被立即调用,而是被安排在该节点再次被添加到场景树时。只会为进行了请求的节点调用 :ref:`_ready`\ ,也就是说,如果你想让每个子节点都调用 :ref:`_ready`\ ,就需要为它们分别进行就绪请求(在这种情况下,\ :ref:`_ready` 的调用顺序与正常情况下相同)。 .. rst-class:: classref-item-separator @@ -2484,9 +2528,9 @@ void **set_editable_instance** **(** :ref:`Node` node, :ref:`bool` id, :ref:`bool` recursive=true **)** -Sets the node's multiplayer authority to the peer with the given peer ID. The multiplayer authority is the peer that has authority over the node on the network. Useful in conjunction with :ref:`rpc_config` and the :ref:`MultiplayerAPI`. Defaults to peer ID 1 (the server). If ``recursive``, the given peer is recursively set as the authority for all children of this node. +将该节点的多人游戏控制方设置为具有给定对等体 ID 的对等体。多人游戏控制方是对网络上的节点具有控制权限的对等体。可以与 :ref:`rpc_config` 和 :ref:`MultiplayerAPI` 结合使用。默认为对等体 ID 1(服务器)。如果 ``recursive``\ ,则给定的对等体会被递归设置为该节点所有子节点的控制方。 -\ **Warning:** This does **not** automatically replicate the new authority to other peers. It is developer's responsibility to do so. You can propagate the information about the new authority using :ref:`MultiplayerSpawner.spawn_function`, an RPC, or using a :ref:`MultiplayerSynchronizer`. Also, the parent's authority does **not** propagate to newly added children. +\ **警告:**\ 这样做\ **不会**\ 自动将新的控制方复制给其他对等体。开发者需要自己负责。你可以使用 :ref:`MultiplayerSpawner.spawn_function`\ 、RPC、\ :ref:`MultiplayerSynchronizer` 等方法将这个信息传播出去。另外,父节点的控制方\ **不会**\ 传播给新添加的子节点。 .. rst-class:: classref-item-separator @@ -2498,7 +2542,7 @@ Sets the node's multiplayer authority to the peer with the given peer ID. The mu void **set_physics_process** **(** :ref:`bool` enable **)** -启用或禁用物理(即固定帧率)处理。当一个节点正在被处理时,它会在一个固定的(通常是 60 FPS,参见 :ref:`Engine.physics_ticks_per_second` 以更改)时间间隔,接收一个 :ref:`NOTIFICATION_PHYSICS_PROCESS` (如果存在 :ref:`_physics_process` 回调,该回调将被调用)。如果 :ref:`_physics_process` 被重写,则自动被启用。在 :ref:`_ready` 之前对该函数的任何调用,都将被忽略。 +启用或禁用物理(即固定帧率)处理。当一个节点正在被处理时,它会在一个固定的(通常是 60 FPS,参见 :ref:`Engine.physics_ticks_per_second` 以更改)时间间隔,接收一个 :ref:`NOTIFICATION_PHYSICS_PROCESS` (如果存在 :ref:`_physics_process` 回调,该回调将被调用)。如果 :ref:`_physics_process` 被重写,则自动被启用。在 :ref:`_ready` 之前对该函数的任何调用,都将被忽略。 .. rst-class:: classref-item-separator @@ -2510,7 +2554,7 @@ void **set_physics_process** **(** :ref:`bool` enable **)** void **set_physics_process_internal** **(** :ref:`bool` enable **)** -启用或禁用该节点的内部物理。内部物理处理与正常的 :ref:`_physics_process` 调用隔离进行,并且由某些节点内部使用,以确保正常工作,即使节点暂停或物理处理因脚本而禁用(\ :ref:`set_physics_process`\ )。仅适用于用于操纵内置节点行为的高级用途。 +启用或禁用该节点的内部物理。内部物理处理与正常的 :ref:`_physics_process` 调用隔离进行,并且由某些节点内部使用,以确保正常工作,即使节点暂停或物理处理因脚本而禁用(\ :ref:`set_physics_process`\ )。仅适用于用于操纵内置节点行为的高级用途。 \ **警告:**\ 内置节点依靠内部处理来实现自己的逻辑,所以从你的代码中改变这个值可能会导致意外的行为。为特定的高级用途提供了对此内部逻辑的脚本访问,但不安全且不支持。 @@ -2524,7 +2568,7 @@ void **set_physics_process_internal** **(** :ref:`bool` enable **)** void **set_process** **(** :ref:`bool` enable **)** -启用或禁用帧处理。当一个节点被处理时,它将在每个绘制的帧上收到一个\ :ref:`NOTIFICATION_PROCESS`\ (如果存在,\ :ref:`_process`\ 回调将被调用)。如果\ :ref:`_process`\ 被重写,则自动启用。在 :ref:`_ready` 之前对它的任何调用都将被忽略。 +启用或禁用帧处理。当一个节点被处理时,它将在每个绘制的帧上收到一个\ :ref:`NOTIFICATION_PROCESS`\ (如果存在,\ :ref:`_process`\ 回调将被调用)。如果\ :ref:`_process`\ 被重写,则自动启用。在 :ref:`_ready` 之前对它的任何调用都将被忽略。 .. rst-class:: classref-item-separator @@ -2536,7 +2580,7 @@ void **set_process** **(** :ref:`bool` enable **)** void **set_process_input** **(** :ref:`bool` enable **)** -启用或禁用输入处理。对于 GUI 控件来说不是必需的。如果 :ref:`_input` 被覆盖,则自动启用。任何在 :ref:`_ready` 之前对它的调用都将被忽略。 +启用或禁用输入处理。对于 GUI 控件来说不是必需的。如果 :ref:`_input` 被覆盖,则自动启用。任何在 :ref:`_ready` 之前对它的调用都将被忽略。 .. rst-class:: classref-item-separator @@ -2548,7 +2592,7 @@ void **set_process_input** **(** :ref:`bool` enable **)** void **set_process_internal** **(** :ref:`bool` enable **)** -启用或禁用此节点的内部处理。内部处理与正常的 :ref:`_process` 调用隔离进行,并且由某些节点内部使用,以确保正常工作,即使节点已暂停或处理因脚本而禁用(\ :ref:`set_process`\ )。仅适用于操纵内置节点行为的高级用途。 +启用或禁用此节点的内部处理。内部处理与正常的 :ref:`_process` 调用隔离进行,并且由某些节点内部使用,以确保正常工作,即使节点已暂停或处理因脚本而禁用(\ :ref:`set_process`\ )。仅适用于操纵内置节点行为的高级用途。 \ **警告:**\ 内置节点依赖于内部处理来实现自己的逻辑,因此更改代码中的这个值可能会导致意外行为。为特定的高级用途提供了对此内部逻辑的脚本访问,但不安全且不支持。 @@ -2562,7 +2606,7 @@ void **set_process_internal** **(** :ref:`bool` enable **)** void **set_process_shortcut_input** **(** :ref:`bool` enable **)** -启用快捷键处理。如果 :ref:`_shortcut_input` 被覆盖,则自动启用。在 :ref:`_ready` 之前对此的任何调用都将被忽略。 +启用快捷键处理。如果 :ref:`_shortcut_input` 被覆盖,则自动启用。在 :ref:`_ready` 之前对此的任何调用都将被忽略。 .. rst-class:: classref-item-separator @@ -2574,7 +2618,7 @@ void **set_process_shortcut_input** **(** :ref:`bool` enable **)** void **set_process_unhandled_input** **(** :ref:`bool` enable **)** -启用未处理的输入处理。这对 GUI 控件来说是不需要的!它使节点能够接收所有以前没有处理的输入(通常是由 :ref:`Control` 处理的)。如果 :ref:`_unhandled_input` 被覆盖,则自动启用。在 :ref:`_ready` 之前对它的任何调用都将被忽略。 +启用未处理的输入处理。这对 GUI 控件来说是不需要的!它使节点能够接收所有以前没有处理的输入(通常是由 :ref:`Control` 处理的)。如果 :ref:`_unhandled_input` 被覆盖,则自动启用。在 :ref:`_ready` 之前对它的任何调用都将被忽略。 .. rst-class:: classref-item-separator @@ -2586,7 +2630,7 @@ void **set_process_unhandled_input** **(** :ref:`bool` enable **)** void **set_process_unhandled_key_input** **(** :ref:`bool` enable **)** -启用未处理的按键输入处理。如果 :ref:`_unhandled_key_input` 被重写,则自动启用。任何在 :ref:`_ready` 之前对它的调用都将被忽略。 +启用未处理的按键输入处理。如果 :ref:`_unhandled_key_input` 被重写,则自动启用。任何在 :ref:`_ready` 之前对它的调用都将被忽略。 .. rst-class:: classref-item-separator @@ -2624,12 +2668,12 @@ void **update_configuration_warnings** **(** **)** 更新在场景面板中为该节点显示的警告。 -使用 :ref:`_get_configuration_warnings` 配置要显示的警告消息。 +使用 :ref:`_get_configuration_warnings` 配置要显示的警告消息。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_node2d.rst b/classes/zh_CN/class_node2d.rst index c77ff30d15..d7c9920f07 100644 --- a/classes/zh_CN/class_node2d.rst +++ b/classes/zh_CN/class_node2d.rst @@ -10,23 +10,23 @@ Node2D ====== -**Inherits:** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AnimatedSprite2D`, :ref:`AudioListener2D`, :ref:`AudioStreamPlayer2D`, :ref:`BackBufferCopy`, :ref:`Bone2D`, :ref:`Camera2D`, :ref:`CanvasGroup`, :ref:`CanvasModulate`, :ref:`CollisionObject2D`, :ref:`CollisionPolygon2D`, :ref:`CollisionShape2D`, :ref:`CPUParticles2D`, :ref:`GPUParticles2D`, :ref:`Joint2D`, :ref:`Light2D`, :ref:`LightOccluder2D`, :ref:`Line2D`, :ref:`Marker2D`, :ref:`MeshInstance2D`, :ref:`MultiMeshInstance2D`, :ref:`NavigationLink2D`, :ref:`NavigationObstacle2D`, :ref:`NavigationRegion2D`, :ref:`ParallaxLayer`, :ref:`Path2D`, :ref:`PathFollow2D`, :ref:`Polygon2D`, :ref:`RayCast2D`, :ref:`RemoteTransform2D`, :ref:`ShapeCast2D`, :ref:`Skeleton2D`, :ref:`Sprite2D`, :ref:`TileMap`, :ref:`TouchScreenButton`, :ref:`VisibleOnScreenNotifier2D` +**派生:** :ref:`AnimatedSprite2D`, :ref:`AudioListener2D`, :ref:`AudioStreamPlayer2D`, :ref:`BackBufferCopy`, :ref:`Bone2D`, :ref:`Camera2D`, :ref:`CanvasGroup`, :ref:`CanvasModulate`, :ref:`CollisionObject2D`, :ref:`CollisionPolygon2D`, :ref:`CollisionShape2D`, :ref:`CPUParticles2D`, :ref:`GPUParticles2D`, :ref:`Joint2D`, :ref:`Light2D`, :ref:`LightOccluder2D`, :ref:`Line2D`, :ref:`Marker2D`, :ref:`MeshInstance2D`, :ref:`MultiMeshInstance2D`, :ref:`NavigationLink2D`, :ref:`NavigationObstacle2D`, :ref:`NavigationRegion2D`, :ref:`ParallaxLayer`, :ref:`Path2D`, :ref:`PathFollow2D`, :ref:`Polygon2D`, :ref:`RayCast2D`, :ref:`RemoteTransform2D`, :ref:`ShapeCast2D`, :ref:`Skeleton2D`, :ref:`Sprite2D`, :ref:`TileMap`, :ref:`TouchScreenButton`, :ref:`VisibleOnScreenNotifier2D` 2D 游戏对象,被所有 2D 相关的节点继承。具有位置、旋转、缩放和 Z 索引。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 2D 游戏对象,具有变换(位置、旋转、缩放)。所有的 2D 节点,包括物理对象和精灵,都继承自 Node2D。使用 Node2D 作为父节点来移动、缩放和旋转 2D 项目中的子节点。还可以控制节点的渲染顺序。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`2D 中的自定义绘图 <../tutorials/2d/custom_drawing_in_2d>` @@ -34,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -68,8 +68,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -104,8 +104,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Node2D_property_global_position: @@ -237,7 +237,7 @@ Property Descriptions - void **set_rotation** **(** :ref:`float` value **)** - :ref:`float` **get_rotation** **(** **)** -以弧度为单位的旋转,相对于该节点的父节点。 +旋转,单位为弧度,相对于该节点的父节点。 \ **注意:**\ 这个属性在检查器中是以度数编辑的。如果你想在脚本中使用度数,请使用 :ref:`rotation_degrees`\ 。 @@ -319,8 +319,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Node2D_method_apply_scale: @@ -340,9 +340,9 @@ void **apply_scale** **(** :ref:`Vector2` ratio **)** :ref:`float` **get_angle_to** **(** :ref:`Vector2` point **)** |const| -Returns the angle between the node and the ``point`` in radians. +返回该节点和 ``point`` 之间的夹角,单位为弧度。 -\ `Illustration of the returned angle. `__ +\ `返回夹角的示意图。 `__ .. rst-class:: classref-item-separator @@ -390,7 +390,7 @@ void **look_at** **(** :ref:`Vector2` point **)** void **move_local_x** **(** :ref:`float` delta, :ref:`bool` scaled=false **)** -基于 :ref:`Node._process` 的 ``delta``\ ,在节点的 X 轴上应用局部平移。如果 ``scaled`` 为 ``false``\ ,则对移动进行归一化。 +基于 :ref:`Node._process` 的 ``delta``\ ,在节点的 X 轴上应用局部平移。如果 ``scaled`` 为 ``false``\ ,则对移动进行归一化。 .. rst-class:: classref-item-separator @@ -402,7 +402,7 @@ void **move_local_x** **(** :ref:`float` delta, :ref:`bool` delta, :ref:`bool` scaled=false **)** -基于 :ref:`Node._process` 的 ``delta``\ ,在节点的 Y 轴上应用局部平移。如果 ``scaled`` 为 ``false``\ ,则对移动进行归一化。 +基于 :ref:`Node._process` 的 ``delta``\ ,在节点的 Y 轴上应用局部平移。如果 ``scaled`` 为 ``false``\ ,则对移动进行归一化。 .. rst-class:: classref-item-separator @@ -452,10 +452,10 @@ void **translate** **(** :ref:`Vector2` offset **)** 在局部坐标系中,将该节点按给定的偏移量 ``offset`` 进行平移。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_node3d.rst b/classes/zh_CN/class_node3d.rst index 9fdf5de29f..653ed50895 100644 --- a/classes/zh_CN/class_node3d.rst +++ b/classes/zh_CN/class_node3d.rst @@ -10,29 +10,29 @@ Node3D ====== -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AudioListener3D`, :ref:`AudioStreamPlayer3D`, :ref:`BoneAttachment3D`, :ref:`Camera3D`, :ref:`CollisionObject3D`, :ref:`CollisionPolygon3D`, :ref:`CollisionShape3D`, :ref:`GridMap`, :ref:`ImporterMeshInstance3D`, :ref:`Joint3D`, :ref:`LightmapProbe`, :ref:`Marker3D`, :ref:`NavigationLink3D`, :ref:`NavigationObstacle3D`, :ref:`NavigationRegion3D`, :ref:`OccluderInstance3D`, :ref:`OpenXRHand`, :ref:`Path3D`, :ref:`PathFollow3D`, :ref:`RayCast3D`, :ref:`RemoteTransform3D`, :ref:`ShapeCast3D`, :ref:`Skeleton3D`, :ref:`SpringArm3D`, :ref:`VehicleWheel3D`, :ref:`VisualInstance3D`, :ref:`XRNode3D`, :ref:`XROrigin3D` +**派生:** :ref:`AudioListener3D`, :ref:`AudioStreamPlayer3D`, :ref:`BoneAttachment3D`, :ref:`Camera3D`, :ref:`CollisionObject3D`, :ref:`CollisionPolygon3D`, :ref:`CollisionShape3D`, :ref:`GridMap`, :ref:`ImporterMeshInstance3D`, :ref:`Joint3D`, :ref:`LightmapProbe`, :ref:`Marker3D`, :ref:`NavigationLink3D`, :ref:`NavigationObstacle3D`, :ref:`NavigationRegion3D`, :ref:`OccluderInstance3D`, :ref:`OpenXRHand`, :ref:`Path3D`, :ref:`PathFollow3D`, :ref:`RayCast3D`, :ref:`RemoteTransform3D`, :ref:`ShapeCast3D`, :ref:`Skeleton3D`, :ref:`SpringArm3D`, :ref:`VehicleWheel3D`, :ref:`VisualInstance3D`, :ref:`XRNode3D`, :ref:`XROrigin3D` 最基本的 3D 游戏对象,所有 3D 相关节点的父类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -最基本的 3D 游戏对象,具有 :ref:`Transform3D` 和可见性设置。所有其他的 3D 游戏对象都继承自 Node3D。在 3D 项目中,请使用 **Node3D** 作为父节点对子节点进行移动、缩放、旋转和显示/隐藏。 +最基本的 3D 游戏对象,具有 :ref:`Transform3D` 和可见性设置。所有其他的 3D 游戏对象都继承自 **Node3D**\ 。在 3D 项目中,请使用 **Node3D** 作为父节点对子节点进行移动、缩放、旋转和显示/隐藏。 除非该 **Node3D** 对象被设置为顶层,否则仿射操作(旋转、缩放、平移)会在父节点的本地坐标系中进行。在这个坐标系中的仿射操作对应于对 **Node3D** 变换的直接仿射运算。下文中的本地一词指的就是这个坐标系。附加到 **Node3D** 对象本身的坐标系被称为对象本地坐标系。 \ **注意:**\ 除非另有规定,所有有角度参数的方法必须将角度指定为\ *弧度*\ 。请使用 :ref:`@GlobalScope.deg_to_rad` 将度数转换为弧度。 -\ **注意:**\ “Spatial”节点从 Godot 4 开始被称为“Node3D”。Godot 3.x 中指的“Spatial”节点在 Godot 4 中指的是“Node3D”。 +\ **注意:**\ 请注意,从 Godot 4 开始,“Spatial”节点现在被称为“Node3D”。Godot 3.x 中指的“Spatial”节点,均指的是 Godot 4 中的“Node3D”。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`3D 简介 <../tutorials/3d/introduction_to_3d>` @@ -40,8 +40,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -84,8 +84,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -170,8 +170,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Node3D_signal_visibility_changed: @@ -187,8 +187,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Node3D_RotationEditMode: @@ -226,8 +226,8 @@ enum **RotationEditMode**: .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Node3D_constant_NOTIFICATION_TRANSFORM_CHANGED: @@ -235,7 +235,7 @@ Constants **NOTIFICATION_TRANSFORM_CHANGED** = ``2000`` -Node3D 节点在自己的全局变换发生改变时,会收到这个通知。这意味着当前节点或者某个父节点的变换发生了改变。 +**Node3D** 节点在自己的全局变换发生改变时,会收到这个通知。这意味着当前节点或者某个父节点的变换发生了改变。 用户需要使用 :ref:`set_notify_transform` 手动申请才能够收到 :ref:`NOTIFICATION_TRANSFORM_CHANGED`\ 。如果该节点在编辑器环境中,并且拥有至少一个有效的小工具,则也会发送这个通知。 @@ -245,7 +245,7 @@ Node3D 节点在自己的全局变换发生改变时,会收到这个通知。 **NOTIFICATION_ENTER_WORLD** = ``41`` -Node3D 节点在注册到新的 :ref:`World3D` 资源时,会收到这个通知。 +**Node3D** 节点在注册到新的 :ref:`World3D` 资源时,会收到这个通知。 .. _class_Node3D_constant_NOTIFICATION_EXIT_WORLD: @@ -253,7 +253,7 @@ Node3D 节点在注册到新的 :ref:`World3D` 资源时,会收 **NOTIFICATION_EXIT_WORLD** = ``42`` -Node3D 节点从当前的 :ref:`World3D` 资源中取消注册时,会收到这个通知。 +**Node3D** 节点从当前的 :ref:`World3D` 资源中取消注册时,会收到这个通知。 .. _class_Node3D_constant_NOTIFICATION_VISIBILITY_CHANGED: @@ -261,7 +261,7 @@ Node3D 节点从当前的 :ref:`World3D` 资源中取消注册时 **NOTIFICATION_VISIBILITY_CHANGED** = ``43`` -Node3D 节点在自己的可见性发生变化时,会收到这个通知。 +**Node3D** 节点在其可见性发生变化时,会收到该通知。 .. _class_Node3D_constant_NOTIFICATION_LOCAL_TRANSFORM_CHANGED: @@ -269,9 +269,9 @@ Node3D 节点在自己的可见性发生变化时,会收到这个通知。 **NOTIFICATION_LOCAL_TRANSFORM_CHANGED** = ``44`` -Node3D 节点在自己的局部变换发生改变时,会收到这个通知。父节点的变换发生改变时不会收到这个通知。 +**Node3D** 节点在其局部变换发生改变时,会收到这个通知。父节点的变换发生改变时不会收到这个通知。 -用户需要使用 :ref:`set_notify_local_transform` 手动申请才能够收到 :ref:`NOTIFICATION_LOCAL_TRANSFORM_CHANGED`\ 。 +为了使 :ref:`NOTIFICATION_LOCAL_TRANSFORM_CHANGED` 起作用,用户首先需要使用 :ref:`set_notify_local_transform` 请求它。 .. rst-class:: classref-section-separator @@ -279,8 +279,8 @@ Node3D 节点在自己的局部变换发生改变时,会收到这个通知。 .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Node3D_property_basis: @@ -293,7 +293,7 @@ Property Descriptions - void **set_basis** **(** :ref:`Basis` value **)** - :ref:`Basis` **get_basis** **(** **)** -Direct access to the 3x3 basis of the :ref:`transform` property. +直接访问 :ref:`transform` 属性的 3x3 基。 .. rst-class:: classref-item-separator @@ -310,7 +310,7 @@ Direct access to the 3x3 basis of the :ref:`transform` value **)** - :ref:`Basis` **get_global_basis** **(** **)** -Global basis of this node. This is equivalent to ``global_transform.basis``. +这个节点的全局基。与 ``global_transform.basis`` 等价。 .. rst-class:: classref-item-separator @@ -431,11 +431,11 @@ Global basis of this node. This is equivalent to ``global_transform.basis``. - void **set_rotation** **(** :ref:`Vector3` value **)** - :ref:`Vector3` **get_rotation** **(** **)** -Rotation part of the local transformation in radians, specified in terms of Euler angles. The angles construct a rotation in the order specified by the :ref:`rotation_order` property. +以弧度为单位的,局部变换的旋转部分,根据欧拉角指定。角度按照 :ref:`rotation_order` 属性指定的顺序,构造一个旋转。 -\ **Note:** In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a :ref:`Vector3` data structure not because the rotation is a vector, but only because :ref:`Vector3` exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. +\ **注意:**\ 在数学意义上,旋转是一个矩阵,而不是一个向量。三个欧拉角,即旋转矩阵的欧拉角参数化的三个独立参数,存储在一个 :ref:`Vector3` 数据结构中,并不是因为旋转是一个向量,而是因为 :ref:`Vector3` 是一个方便存储 3 个浮点数的数据结构。因此,对旋转“向量”,应用仿射操作是没有意义的。 -\ **Note:** This property is edited in the inspector in degrees. If you want to use degrees in a script, use :ref:`rotation_degrees`. +\ **注意:**\ 该属性在检查器中以度为单位进行编辑。如果要在脚本中使用度数,请使用 :ref:`rotation_degrees`\ 。 .. rst-class:: classref-item-separator @@ -583,8 +583,8 @@ Rotation part of the local transformation in radians, specified in terms of Eule .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Node3D_method_add_gizmo: @@ -592,7 +592,9 @@ Method Descriptions void **add_gizmo** **(** :ref:`Node3DGizmo` gizmo **)** -将小工具附加到该 ``Node3D`` 上。 +将编辑器小工具附加到该 **Node3D**\ 。 + +\ **注意:**\ 小工具对象通常是 :ref:`EditorNode3DGizmo` 的一个实例,但参数类型保持通用以避免在 **Node3D** 中创建对编辑器类的依赖。 .. rst-class:: classref-item-separator @@ -604,7 +606,7 @@ void **add_gizmo** **(** :ref:`Node3DGizmo` gizmo **)** void **clear_gizmos** **(** **)** -清除附加于该 ``Node3D`` 的所有小工具。 +清除附加于该 **Node3D** 的所有小工具。 .. rst-class:: classref-item-separator @@ -640,7 +642,7 @@ void **force_update_transform** **(** **)** :ref:`Node3DGizmo[]` **get_gizmos** **(** **)** |const| -返回附加到该 ``Node3D`` 的所有小工具。 +返回附加到该 **Node3D** 的所有小工具。 .. rst-class:: classref-item-separator @@ -948,7 +950,9 @@ void **set_notify_transform** **(** :ref:`bool` enable **)** void **set_subgizmo_selection** **(** :ref:`Node3DGizmo` gizmo, :ref:`int` id, :ref:`Transform3D` transform **)** -在编辑器中为该节点设置子小工具选择。 +在编辑器中为该节点设置子小工具选区。 + +\ **注意:**\ 小工具对象通常是 :ref:`EditorNode3DGizmo` 的一个实例,但参数类型保持通用以避免在 **Node3D** 中创建对编辑器类的依赖。 .. rst-class:: classref-item-separator @@ -1022,12 +1026,12 @@ void **translate_object_local** **(** :ref:`Vector3` offset **)** void **update_gizmos** **(** **)** -更新附加于该节点的所有 :ref:`Node3DGizmo`\ 。 +更新附加于该节点的所有 **Node3D** 小工具。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_node3dgizmo.rst b/classes/zh_CN/class_node3dgizmo.rst index da8169470f..3a7a7fe180 100644 --- a/classes/zh_CN/class_node3dgizmo.rst +++ b/classes/zh_CN/class_node3dgizmo.rst @@ -10,18 +10,25 @@ Node3DGizmo =========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`EditorNode3DGizmo` +**派生:** :ref:`EditorNode3DGizmo` -.. container:: contribute +用于公开 :ref:`Node3D` 编辑器小工具的抽象类。 - There is currently no description for this class. Please help us by :ref:`contributing one `! +.. rst-class:: classref-introduction-group -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +描述 +---- + +该抽象类有助于将 :ref:`Node3D` 场景与特定于编辑器的 :ref:`EditorNode3DGizmo` 类连接起来。 + +\ **Node3DGizmo** 本身没有公开的 API,请参考 :ref:`Node3D.add_gizmo` 并向其传递一个 :ref:`EditorNode3DGizmo` 实例。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_nodepath.rst b/classes/zh_CN/class_nodepath.rst index b6c542b667..ffd5a13f51 100644 --- a/classes/zh_CN/class_nodepath.rst +++ b/classes/zh_CN/class_nodepath.rst @@ -14,52 +14,52 @@ NodePath .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A pre-parsed relative or absolute path in a scene tree, for use with :ref:`Node.get_node` and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For example, ``"Path2D/PathFollow2D/Sprite2D:texture:size"`` would refer to the ``size`` property of the ``texture`` resource on the node named ``"Sprite2D"``, which is a child of the other named nodes in the path. +场景树中预先解析的相对或绝对路径,用于 :ref:`Node.get_node` 和类似函数。它可以引用节点、节点内的资源、或节点或资源的属性。例如,\ ``"Path2D/PathFollow2D/Sprite2D:texture:size"`` 将引用名为 ``"Sprite2D"`` 节点上的 ``texture`` 资源的 ``size`` 属性,该节点是路径中其他命名节点的一个子节点。 -You will usually just pass a string to :ref:`Node.get_node` and it will be automatically converted, but you may occasionally want to parse a path ahead of time with **NodePath** or the literal syntax ``^"path"``. Exporting a **NodePath** variable will give you a node selection widget in the properties panel of the editor, which can often be useful. +通常只需将一个字符串传递给 :ref:`Node.get_node`\ ,它将会被自动转换,但可能偶尔想要使用 **NodePath** 或文字语法 ``^"path"`` 提前解析路径。导出 **NodePath** 变量会在编辑器的属性面板中,为你提供一个节点选择小部件,这通常很有用。 -A **NodePath** is composed of a list of slash-separated node names (like a filesystem path) and an optional colon-separated list of "subnames" which can be resources or properties. +\ **NodePath** 由斜线分隔的节点名称列表(如文件系统路径)和可选的冒号分隔的“子名称”列表组成,这些“子名称”可以是资源或属性。 -Some examples of NodePaths include the following: +NodePath 的一些示例包括: :: - # No leading slash means it is relative to the current node. - ^"A" # Immediate child A - ^"A/B" # A's child B - ^"." # The current node. - ^".." # The parent node. - ^"../C" # A sibling node C. - ^"../.." # The grandparent node. - # A leading slash means it is absolute from the SceneTree. - ^"/root" # Equivalent to get_tree().get_root(). - ^"/root/Main" # If your main scene's root node were named "Main". - ^"/root/MyAutoload" # If you have an autoloaded node or scene. + # 没有前导斜杠意味着它是相对于当前节点的。 + ^"A" # 直接子节点 A + ^"A/B" # A 的子节点 B + ^"." # 当前节点。 + ^".." # 父节点。 + ^"../C" # 兄弟节点 C。 + ^"../.." # 祖父节点。 + # 前导斜杠意味着它是来自 SceneTree 的绝对路径。 + ^"/root" # 等同于 get_tree().get_root()。 + ^"/root/Main" # 如果你的主场景的根节点被命名为“Main”。 + ^"/root/MyAutoload" # 如果你有一个自动加载的节点或场景。 -See also :ref:`StringName`, which is a similar concept for general-purpose string interning. +另见 :ref:`StringName`\ ,它是通用字符串的类似概念。 -\ **Note:** In the editor, **NodePath** properties are automatically updated when moving, renaming or deleting a node in the scene tree, but they are never updated at runtime. +\ **注意:**\ 在编辑器中,\ **NodePath** 属性在场景树中移动、重命名或删除节点时会自动更新,但它们不会在运行时更新。 -\ **Note:** In a boolean context, a **NodePath** will evaluate to ``false`` if it is empty (``NodePath("")``). Otherwise, a **NodePath** will always evaluate to ``true``. +\ **注意:**\ 在布尔上下文中,如果 **NodePath** 为空(\ ``NodePath("")``\ ),则它将评估为 ``false``\ 。否则,\ **NodePath** 将始终评估为 ``true``\ 。 .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `2D 角色扮演游戏演示 `__ .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -74,8 +74,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -104,8 +104,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -122,8 +122,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_NodePath_constructor_NodePath: @@ -178,8 +178,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_NodePath_method_get_as_property_path: @@ -232,7 +232,7 @@ Method Descriptions :ref:`StringName` **get_concatenated_subnames** **(** **)** |const| -Returns all subnames concatenated with a colon character (``:``) as separator, i.e. the right side of the first colon in a node path. +返回所有以冒号字符(\ ``:``\ )作为分隔符连接的子名称,即节点路径中第一个冒号的右侧。 .. tabs:: @@ -379,8 +379,8 @@ Returns all subnames concatenated with a colon character (``:``) as separator, i .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_NodePath_operator_neq_NodePath: @@ -402,10 +402,10 @@ Operator Descriptions 如果两个节点路径相等,即路径中的所有节点名称都相同且顺序一致,则返回 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_noise.rst b/classes/zh_CN/class_noise.rst index 54f4099409..6b18559938 100644 --- a/classes/zh_CN/class_noise.rst +++ b/classes/zh_CN/class_noise.rst @@ -10,27 +10,27 @@ Noise ===== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`FastNoiseLite` +**派生:** :ref:`FastNoiseLite` 噪声生成器的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This class defines the interface for noise generation libraries to inherit from. +该类定义了噪声生成库要继承的接口。 -A default :ref:`get_seamless_image` implementation is provided for libraries that do not provide seamless noise. This function requests a larger image from the :ref:`get_image` method, reverses the quadrants of the image, then uses the strips of extra width to blend over the seams. +为不提供无缝噪声的库提供一个默认的 :ref:`get_seamless_image` 实现。该函数从 :ref:`get_image` 请求更大的图像,反转该图像的象限,然后使用额外宽度的条带在接缝处混合。 -Inheriting noise classes can optionally override this function to provide a more optimal algorithm. +继承的噪声类可以选择性地覆盖该函数,以提供更优化的算法。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -61,8 +61,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Noise_method_get_image: @@ -176,10 +176,10 @@ Method Descriptions \ **注意:**\ ``normalize`` 为 ``false`` 时,默认实现要求噪声生成器返回 ``-1.0`` 到 ``1.0`` 之间的值。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_noisetexture2d.rst b/classes/zh_CN/class_noisetexture2d.rst index af4a0d9745..65dc4c7790 100644 --- a/classes/zh_CN/class_noisetexture2d.rst +++ b/classes/zh_CN/class_noisetexture2d.rst @@ -10,18 +10,18 @@ NoiseTexture2D ============== -**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A 2D texture filled with noise generated by a :ref:`Noise` object. +由 :ref:`Noise` 对象生成的噪声所填充的 2D 纹理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Uses the :ref:`FastNoiseLite` library or other noise generators to fill the texture data of your desired size. **NoiseTexture2D** can also generate normal map textures. +使用 :ref:`FastNoiseLite` 库或其他噪声生成器来填充所需大小的纹理数据。\ **NoiseTexture2D** 还能生成法线贴图纹理。 -The class uses :ref:`Thread`\ s to generate the texture data internally, so :ref:`Texture2D.get_image` may return ``null`` if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the image and the generated byte data: +该类在内部使用 :ref:`Thread` 生成纹理数据,因此如果生成过程尚未完成,\ :ref:`Texture2D.get_image` 可能会返回 ``null``\ 。在这种情况下,需要等待纹理生成后再访问图像和生成的字节数据: :: @@ -33,8 +33,8 @@ The class uses :ref:`Thread`\ s to generate the texture data inter .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -73,8 +73,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_NoiseTexture2D_property_as_normal_map: @@ -286,10 +286,10 @@ Property Descriptions 生成的纹理的宽度(单位为像素)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_noisetexture3d.rst b/classes/zh_CN/class_noisetexture3d.rst index 1f06a30844..c24ac23783 100644 --- a/classes/zh_CN/class_noisetexture3d.rst +++ b/classes/zh_CN/class_noisetexture3d.rst @@ -10,18 +10,18 @@ NoiseTexture3D ============== -**Inherits:** :ref:`Texture3D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture3D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A 3D texture filled with noise generated by a :ref:`Noise` object. +由 :ref:`Noise` 对象生成的噪声所填充的 3D 纹理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Uses the :ref:`FastNoiseLite` library or other noise generators to fill the texture data of your desired size. +使用 :ref:`FastNoiseLite` 库或其他噪声生成器来填充所需大小的纹理数据。 -The class uses :ref:`Thread`\ s to generate the texture data internally, so :ref:`Texture3D.get_data` may return ``null`` if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the image: +该类在内部使用 :ref:`Thread` 生成纹理数据,因此如果生成过程尚未完成,\ :ref:`Texture3D.get_data` 可能会返回 ``null``\ 。在这种情况下,需要等待纹理生成后再访问图像: :: @@ -32,8 +32,8 @@ The class uses :ref:`Thread`\ s to generate the texture data inter .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_NoiseTexture3D_property_color_ramp: @@ -224,10 +224,10 @@ Property Descriptions 生成的纹理的宽度(单位为像素)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_object.rst b/classes/zh_CN/class_object.rst index c2a320e3bf..c611040e49 100644 --- a/classes/zh_CN/class_object.rst +++ b/classes/zh_CN/class_object.rst @@ -10,24 +10,24 @@ Object ====== -**Inherited By:** :ref:`AudioServer`, :ref:`CameraServer`, :ref:`ClassDB`, :ref:`DisplayServer`, :ref:`EditorFileSystemDirectory`, :ref:`EditorInterface`, :ref:`EditorPaths`, :ref:`EditorSelection`, :ref:`EditorUndoRedoManager`, :ref:`EditorVCSInterface`, :ref:`Engine`, :ref:`EngineDebugger`, :ref:`GDExtensionManager`, :ref:`Geometry2D`, :ref:`Geometry3D`, :ref:`GodotSharp`, :ref:`Input`, :ref:`InputMap`, :ref:`IP`, :ref:`JavaClassWrapper`, :ref:`JavaScriptBridge`, :ref:`JNISingleton`, :ref:`JSONRPC`, :ref:`MainLoop`, :ref:`Marshalls`, :ref:`MovieWriter`, :ref:`NavigationMeshGenerator`, :ref:`NavigationServer2D`, :ref:`NavigationServer3D`, :ref:`Node`, :ref:`OpenXRExtensionWrapperExtension`, :ref:`OpenXRInteractionProfileMetadata`, :ref:`OS`, :ref:`Performance`, :ref:`PhysicsDirectBodyState2D`, :ref:`PhysicsDirectBodyState3D`, :ref:`PhysicsDirectSpaceState2D`, :ref:`PhysicsDirectSpaceState3D`, :ref:`PhysicsServer2D`, :ref:`PhysicsServer2DManager`, :ref:`PhysicsServer3D`, :ref:`PhysicsServer3DManager`, :ref:`PhysicsServer3DRenderingServerHandler`, :ref:`ProjectSettings`, :ref:`RefCounted`, :ref:`RenderingDevice`, :ref:`RenderingServer`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`ResourceUID`, :ref:`ScriptLanguage`, :ref:`TextServerManager`, :ref:`ThemeDB`, :ref:`TileData`, :ref:`Time`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`WorkerThreadPool`, :ref:`XRServer` +**派生:** :ref:`AudioServer`, :ref:`CameraServer`, :ref:`ClassDB`, :ref:`DisplayServer`, :ref:`EditorFileSystemDirectory`, :ref:`EditorInterface`, :ref:`EditorPaths`, :ref:`EditorSelection`, :ref:`EditorUndoRedoManager`, :ref:`EditorVCSInterface`, :ref:`Engine`, :ref:`EngineDebugger`, :ref:`GDExtensionManager`, :ref:`Geometry2D`, :ref:`Geometry3D`, :ref:`GodotSharp`, :ref:`Input`, :ref:`InputMap`, :ref:`IP`, :ref:`JavaClassWrapper`, :ref:`JavaScriptBridge`, :ref:`JNISingleton`, :ref:`JSONRPC`, :ref:`MainLoop`, :ref:`Marshalls`, :ref:`MovieWriter`, :ref:`NavigationMeshGenerator`, :ref:`NavigationServer2D`, :ref:`NavigationServer3D`, :ref:`Node`, :ref:`OpenXRExtensionWrapperExtension`, :ref:`OpenXRInteractionProfileMetadata`, :ref:`OS`, :ref:`Performance`, :ref:`PhysicsDirectBodyState2D`, :ref:`PhysicsDirectBodyState3D`, :ref:`PhysicsDirectSpaceState2D`, :ref:`PhysicsDirectSpaceState3D`, :ref:`PhysicsServer2D`, :ref:`PhysicsServer2DManager`, :ref:`PhysicsServer3D`, :ref:`PhysicsServer3DManager`, :ref:`PhysicsServer3DRenderingServerHandler`, :ref:`ProjectSettings`, :ref:`RefCounted`, :ref:`RenderingDevice`, :ref:`RenderingServer`, :ref:`ResourceLoader`, :ref:`ResourceSaver`, :ref:`ResourceUID`, :ref:`ScriptLanguage`, :ref:`TextServerManager`, :ref:`ThemeDB`, :ref:`TileData`, :ref:`Time`, :ref:`TranslationServer`, :ref:`TreeItem`, :ref:`UndoRedo`, :ref:`WorkerThreadPool`, :ref:`XRServer` 引擎中所有其他类的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 一种高级的 :ref:`Variant` 类型。引擎中的所有类都继承自 Object。每个类都可以定义新的属性、方法或信号,并且这些对所有继承的类都可用。例如,一个 :ref:`Sprite2D` 实例能够调用 :ref:`Node.add_child` 因为它继承自 :ref:`Node`\ 。 -可以使用 GDScript 中的 ``Object.new()`` 或 C# 中的 ``new Object`` 来创建新实例。 +可以使用 GDScript 中的 ``Object.new()`` 或 C# 中的 ``new GodotObject`` 来创建新实例。 要删除一个 Object 实例,请调用 :ref:`free`\ 。这对于大多数继承 Object 的类来说是必须的,因为它们本身并不管理内存,如果不调用该方法的话,在不再使用时会造成内存泄漏。有几个类会执行内存管理。例如,\ :ref:`RefCounted`\ (以及扩展的 :ref:`Resource`\ )在不再被引用时删除自身,而 :ref:`Node` 在释放时会删除其子节点。 对象可以附加一个 :ref:`Script`\ 。一旦该 :ref:`Script` 被实例化,它就有效地充当了基类的扩展,允许它定义和继承新的属性、方法和信号。 -在 :ref:`Script` 中,\ :ref:`_get_property_list` 可以被可以重写,以通过多种方式自定义属性。这允许它们对编辑器可用,显示为选项列表,细分为组,保存在磁盘上,等等。脚本语言提供更简单的方式来自定义属性,例如使用 :ref:`@GDScript.@export` 注解。 +在 :ref:`Script` 中,\ :ref:`_get_property_list` 可以被可以重写,以通过多种方式自定义属性。这允许它们对编辑器可用,显示为选项列表,细分为组,保存在磁盘上,等等。脚本语言提供更简单的方式来自定义属性,例如使用 :ref:`@GDScript.@export` 注解。 Godot 是非常动态的。一个对象的脚本,以及它的属性、方法和信号,都可以在运行时改变。正因为如此,可能会出现这样的情况,例如,一个方法所需的属性可能不存在。为了防止运行时出错,可以参考 :ref:`set`\ 、\ :ref:`get`\ 、\ :ref:`call`\ 、\ :ref:`has_method`\ 、\ :ref:`has_signal` 等方法。请注意,这些方法比直接引用慢\ **得多**\ 。 @@ -41,7 +41,7 @@ Godot 是非常动态的。一个对象的脚本,以及它的属性、方法 print("tree_entered" in node) # 输出 true print("unknown" in node) # 输出 false -通知是 :ref:`int` 常量,通常由对象发送和接收。例如,在每个渲染帧上,\ :ref:`SceneTree` 使用 :ref:`Node.NOTIFICATION_PROCESS` 通知树内的节点。节点收到它后,可以调用 :ref:`Node._process` 进行更新。要使用通知,请参阅 :ref:`notification` 和 :ref:`_notification`\ 。 +通知是 :ref:`int` 常量,通常由对象发送和接收。例如,在每个渲染帧上,\ :ref:`SceneTree` 使用 :ref:`Node.NOTIFICATION_PROCESS` 通知树内的节点。节点收到它后,可以调用 :ref:`Node._process` 进行更新。要使用通知,请参阅 :ref:`notification` 和 :ref:`_notification`\ 。 最后,每个对象还可以包含元数据(关于数据的数据)。\ :ref:`set_meta` 可用于存储对象本身不依赖的信息。为了保持代码整洁,不鼓励过度使用元数据。 @@ -51,8 +51,8 @@ Godot 是非常动态的。一个对象的脚本,以及它的属性、方法 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`Object 类介绍 <../contributing/development/core_and_modules/object_class>` @@ -62,30 +62,30 @@ Tutorials .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get` **(** :ref:`StringName` property **)** |virtual| | + | :ref:`Variant` | :ref:`_get` **(** :ref:`StringName` property **)** |virtual| | +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_property_list` **(** **)** |virtual| | + | :ref:`Dictionary[]` | :ref:`_get_property_list` **(** **)** |virtual| | +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_init` **(** **)** |virtual| | + | void | :ref:`_init` **(** **)** |virtual| | +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_notification` **(** :ref:`int` what **)** |virtual| | + | void | :ref:`_notification` **(** :ref:`int` what **)** |virtual| | +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_property_can_revert` **(** :ref:`StringName` property **)** |virtual| | + | :ref:`bool` | :ref:`_property_can_revert` **(** :ref:`StringName` property **)** |virtual| | +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_property_get_revert` **(** :ref:`StringName` property **)** |virtual| | + | :ref:`Variant` | :ref:`_property_get_revert` **(** :ref:`StringName` property **)** |virtual| | +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_set` **(** :ref:`StringName` property, :ref:`Variant` value **)** |virtual| | + | :ref:`bool` | :ref:`_set` **(** :ref:`StringName` property, :ref:`Variant` value **)** |virtual| | +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_to_string` **(** **)** |virtual| | + | :ref:`String` | :ref:`_to_string` **(** **)** |virtual| | +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_validate_property` **(** :ref:`Dictionary` property **)** |virtual| | + | void | :ref:`_validate_property` **(** :ref:`Dictionary` property **)** |virtual| | +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_user_signal` **(** :ref:`String` signal, :ref:`Array` arguments=[] **)** | +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -184,8 +184,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Object_signal_property_list_changed: @@ -215,8 +215,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Object_ConnectFlags: @@ -262,8 +262,8 @@ enum **ConnectFlags**: .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Object_constant_NOTIFICATION_POSTINITIALIZE: @@ -287,18 +287,18 @@ Constants .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_Object_method__get: +.. _class_Object_private_method__get: .. rst-class:: classref-method :ref:`Variant` **_get** **(** :ref:`StringName` property **)** |virtual| -Override this method to customize the behavior of :ref:`get`. Should return the given ``property``'s value, or ``null`` if the ``property`` should be handled normally. +覆盖该方法以自定义 :ref:`get` 的行为。应该返回给定的 ``property`` 的值,或者 ``property`` 应该被正常处理时返回 ``null``\ 。 -Combined with :ref:`_set` and :ref:`_get_property_list`, this method allows defining custom properties, which is particularly useful for editor plugins. Note that a property must be present in :ref:`get_property_list`, otherwise this method will not be called. +结合 :ref:`_set` 和 :ref:`_get_property_list`\ ,该方法允许定义自定义属性,这对编辑器插件特别有用。请注意,属性必须存在于 :ref:`get_property_list` 中,否则该方法不会被调用。 .. tabs:: @@ -307,7 +307,7 @@ Combined with :ref:`_set` and :ref:`_get_property_list func _get(property): if property == "fake_property": - print("Getting my property!") + print("正在获取我的属性!") return 4 func _get_property_list(): @@ -321,7 +321,7 @@ Combined with :ref:`_set` and :ref:`_get_property_list { if (property == "FakeProperty") { - GD.Print("Getting my property!"); + GD.Print("正在获取我的属性!"); return 4; } return default; @@ -345,7 +345,7 @@ Combined with :ref:`_set` and :ref:`_get_property_list ---- -.. _class_Object_method__get_property_list: +.. _class_Object_private_method__get_property_list: .. rst-class:: classref-method @@ -443,21 +443,21 @@ Combined with :ref:`_set` and :ref:`_get_property_list ---- -.. _class_Object_method__init: +.. _class_Object_private_method__init: .. rst-class:: classref-method void **_init** **(** **)** |virtual| -会在对象的脚本被实例化时调用,通常是在对象在内存中初始化之后(通过 GDScript 中的 ``Object.new()``\ ,或 C# 中的 ``new Object``\ )。它也可以被定义为接受参数的形式。该方法类似于大多数编程语言中的构造函数。 +实例化对象的脚本时调用,通常是在对象在内存中初始化之后(通过 GDScript 中的 ``Object.new()`` 或 C# 中的 ``new GodotObject``\ )。也可以将其定义为接受参数的形式。该方法类似于大多数编程语言中的构造函数。 -\ **注意:**\ 如果 :ref:`_init` 被定义了\ *必需的*\ 参数,则带脚本的 Object 只能被直接创建。如果使用任何其他方式(例如 :ref:`PackedScene.instantiate` 或 :ref:`Node.duplicate`\ )创建,则该脚本的初始化将失败。 +\ **注意:**\ 如果为 :ref:`_init` 定义了\ *必填的*\ 参数,则带脚本的 Object 只能直接创建。使用任何其他方式(例如 :ref:`PackedScene.instantiate` 或 :ref:`Node.duplicate`\ )创建时,该脚本的初始化都将失败。 .. rst-class:: classref-item-separator ---- -.. _class_Object_method__notification: +.. _class_Object_private_method__notification: .. rst-class:: classref-method @@ -492,13 +492,13 @@ void **_notification** **(** :ref:`int` what **)** |virtual| ---- -.. _class_Object_method__property_can_revert: +.. _class_Object_private_method__property_can_revert: .. rst-class:: classref-method :ref:`bool` **_property_can_revert** **(** :ref:`StringName` property **)** |virtual| -覆盖该方法以自定义给定 ``property`` 的还原行为。如果 ``property`` 可以在检查器停靠面板中恢复,则应该返回 ``true``\ 。使用 :ref:`_property_get_revert` 来指定 ``property`` 的默认值。 +覆盖该方法以自定义给定 ``property`` 的还原行为。如果 ``property`` 可以在检查器停靠面板中恢复,则应该返回 ``true``\ 。使用 :ref:`_property_get_revert` 来指定 ``property`` 的默认值。 \ **注意:**\ 无论 ``property`` 的当前值如何,该方法都必须始终如一地返回。 @@ -506,7 +506,7 @@ void **_notification** **(** :ref:`int` what **)** |virtual| ---- -.. _class_Object_method__property_get_revert: +.. _class_Object_private_method__property_get_revert: .. rst-class:: classref-method @@ -514,21 +514,21 @@ void **_notification** **(** :ref:`int` what **)** |virtual| 覆盖该方法以自定义给定 ``property`` 的还原行为。应返回 ``property`` 的默认值。如果默认值与 ``property`` 的当前值不同,则检查器停靠面板中会显示一个还原图标。 -\ **注意:**\ :ref:`_property_can_revert` 也必须被覆盖,该方法才能被调用。 +\ **注意:**\ :ref:`_property_can_revert` 也必须被覆盖,该方法才能被调用。 .. rst-class:: classref-item-separator ---- -.. _class_Object_method__set: +.. _class_Object_private_method__set: .. rst-class:: classref-method :ref:`bool` **_set** **(** :ref:`StringName` property, :ref:`Variant` value **)** |virtual| -Override this method to customize the behavior of :ref:`set`. Should set the ``property`` to ``value`` and return ``true``, or ``false`` if the ``property`` should be handled normally. The *exact* way to set the ``property`` is up to this method's implementation. +覆盖该方法以自定义 :ref:`set` 的行为。应将 ``property`` 设置为 ``value`` 并返回 ``true``\ ,如果 ``property`` 正常处理则返回 ``false``\ 。设置 ``property`` 的\ *确切*\ 方式取决于该方法的实现。 -Combined with :ref:`_get` and :ref:`_get_property_list`, this method allows defining custom properties, which is particularly useful for editor plugins. Note that a property *must* be present in :ref:`get_property_list`, otherwise this method will not be called. +结合 :ref:`_get` 和 :ref:`_get_property_list`\ ,该方法允许定义自定义属性,这对编辑器插件特别有用。注意属性\ *必须*\ 在 :ref:`get_property_list` 中存在,否则该方法将不会被调用。 .. tabs:: @@ -539,9 +539,10 @@ Combined with :ref:`_get` and :ref:`_get_property_list func _set(property, value): if property == "fake_property": - # Storing the value in the fake property. + # 在冒牌属性中存值。 internal_data["fake_property"] = value return true + return false func _get_property_list(): return [ @@ -552,11 +553,11 @@ Combined with :ref:`_get` and :ref:`_get_property_list private Godot.Collections.Dictionary _internalData = new Godot.Collections.Dictionary(); - public override void _Set(StringName property, Variant value) + public override bool _Set(StringName property, Variant value) { if (property == "FakeProperty") { - // Storing the value in the fake property. + // 在冒牌属性中存值。 _internalData["FakeProperty"] = value; return true; } @@ -582,7 +583,7 @@ Combined with :ref:`_get` and :ref:`_get_property_list ---- -.. _class_Object_method__to_string: +.. _class_Object_private_method__to_string: .. rst-class:: classref-method @@ -603,13 +604,13 @@ Combined with :ref:`_get` and :ref:`_get_property_list ---- -.. _class_Object_method__validate_property: +.. _class_Object_private_method__validate_property: .. rst-class:: classref-method void **_validate_property** **(** :ref:`Dictionary` property **)** |virtual| -Override this method to customize existing properties. Every property info goes through this method. The dictionary contents is the same as in :ref:`_get_property_list`. +覆盖该方法以自定义已有属性。每个属性信息都经过该方法。字典内容与 :ref:`_get_property_list` 中的相同。 .. tabs:: @@ -1169,11 +1170,11 @@ void **free** **(** **)** :ref:`Variant` **get_meta** **(** :ref:`StringName` name, :ref:`Variant` default=null **)** |const| -Returns the object's metadata value for the given entry ``name``. If the entry does not exist, returns ``default``. If ``default`` is ``null``, an error is also generated. +返回该对象的元数据中名称为 ``name`` 的条目。如果不存在该条目,则返回 ``default``\ 。如果 ``default`` 为 ``null``\ ,则还会生成错误。 -\ **Note:** A metadata's name must be a valid identifier as per :ref:`StringName.is_valid_identifier` method. +\ **注意:**\ 元数据的名称必须是符合 :ref:`StringName.is_valid_identifier` 的有效标识符。 -\ **Note:** Metadata that has a name starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. +\ **注意:**\ 名称以下划线(\ ``_``\ )开头的元数据仅供编辑器使用。仅供编辑器使用的元数据不会在“检查器”中显示,虽然仍然能够被这个方法找到,但是不应该进行编辑。 .. rst-class:: classref-item-separator @@ -1223,21 +1224,21 @@ Returns the object's metadata value for the given entry ``name``. If the entry d :ref:`Dictionary[]` **get_property_list** **(** **)** |const| -Returns the object's property list as an :ref:`Array` of dictionaries. Each :ref:`Dictionary` contains the following entries: +以字典 :ref:`Array` 的形式返回该对象的属性列表。每个 :ref:`Dictionary` 中都包含如下条目: -- ``name`` is the property's name, as a :ref:`String`; +- ``name`` 是该属性的名称,类型为 :ref:`String`\ ; -- ``class_name`` is an empty :ref:`StringName`, unless the property is :ref:`@GlobalScope.TYPE_OBJECT` and it inherits from a class; +- ``class_name`` 为空 :ref:`StringName`\ ,除非该属性为 :ref:`@GlobalScope.TYPE_OBJECT` 并继承自某个类; -- ``type`` is the property's type, as an :ref:`int` (see :ref:`Variant.Type`); +- ``type`` 是该属性的类型,类型为 :ref:`int`\ (见 :ref:`Variant.Type`\ ); -- ``hint`` is *how* the property is meant to be edited (see :ref:`PropertyHint`); +- ``hint`` 是应当\ *如何*\ 编辑该属性(见 :ref:`PropertyHint`\ ); -- ``hint_string`` depends on the hint (see :ref:`PropertyHint`); +- ``hint_string`` 取决于 hint(见 :ref:`PropertyHint`\ ); -- ``usage`` is a combination of :ref:`PropertyUsageFlags`. +- ``usage`` 是 :ref:`PropertyUsageFlags` 的组合。 -\ **Note:** In GDScript, all class members are treated as properties. In C# and GDExtension, it may be necessary to explicitly mark class members as Godot properties using decorators or attributes. +\ **注意:**\ 在 GDScript 中,类的所有成员都被视为属性。在 C# 和 GDExtension 中,则需要使用装饰器或特性将类的成员显式标记为 Godot 属性。 .. rst-class:: classref-item-separator @@ -1293,11 +1294,11 @@ Returns the object's property list as an :ref:`Array` of dictionari :ref:`bool` **has_meta** **(** :ref:`StringName` name **)** |const| -Returns ``true`` if a metadata entry is found with the given ``name``. See also :ref:`get_meta`, :ref:`set_meta` and :ref:`remove_meta`. +如果找到名称为 ``name`` 的元数据条目,则返回 ``true``\ 。另请参阅 :ref:`get_meta`\ 、\ :ref:`set_meta` 和 :ref:`remove_meta`\ 。 -\ **Note:** A metadata's name must be a valid identifier as per :ref:`StringName.is_valid_identifier` method. +\ **注意:**\ 元数据的名称必须是符合 :ref:`StringName.is_valid_identifier` 的有效标识符。 -\ **Note:** Metadata that has a name starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. +\ **注意:**\ 名称以下划线(\ ``_``\ )开头的元数据仅供编辑器使用。仅供编辑器使用的元数据不会在“检查器”中显示,虽然仍然能够被这个方法找到,但是不应该进行编辑。 .. rst-class:: classref-item-separator @@ -1420,7 +1421,7 @@ Returns ``true`` if a metadata entry is found with the given ``name``. See also void **notification** **(** :ref:`int` what, :ref:`bool` reversed=false **)** -将给定的 ``what`` 通知发送给对象继承的所有类,触发对 :ref:`_notification` 的调用,从最高祖先(\ **Object** 类)开始,向下一直到对象的脚本。 +将给定的 ``what`` 通知发送给对象继承的所有类,触发对 :ref:`_notification` 的调用,从最高祖先(\ **Object** 类)开始,向下一直到对象的脚本。 如果 ``reversed`` 为 ``true``\ ,则调用顺序会被颠倒。 @@ -1475,7 +1476,7 @@ void **notify_property_list_changed** **(** **)** 如果给定的属性 ``property`` 有自定义的默认值,则返回 ``true``\ 。请使用 :ref:`property_get_revert` 获取 ``property`` 的默认值。 -\ **注意:**\ “检查器”面板会使用这个方法来显示恢复图标。该对象必须实现 :ref:`_property_can_revert` 来自定义默认值。如果未实现 :ref:`_property_can_revert`\ ,则这个方法返回 ``false``\ 。 +\ **注意:**\ “检查器”面板会使用这个方法来显示恢复图标。该对象必须实现 :ref:`_property_can_revert` 来自定义默认值。如果未实现 :ref:`_property_can_revert`\ ,则这个方法返回 ``false``\ 。 .. rst-class:: classref-item-separator @@ -1489,7 +1490,7 @@ void **notify_property_list_changed** **(** **)** 返回给定的属性 ``property`` 的自定义默认值。请使用 :ref:`property_can_revert` 检查 ``property`` 是否有自定义的默认值。 -\ **注意:**\ “检查器”面板会使用这个方法来显示恢复图标。该对象必须实现 :ref:`_property_get_revert` 来自定义默认值。如果未实现 :ref:`_property_get_revert`\ ,则这个方法返回 ``null``\ 。 +\ **注意:**\ “检查器”面板会使用这个方法来显示恢复图标。该对象必须实现 :ref:`_property_get_revert` 来自定义默认值。如果未实现 :ref:`_property_get_revert`\ ,则这个方法返回 ``null``\ 。 .. rst-class:: classref-item-separator @@ -1501,11 +1502,11 @@ void **notify_property_list_changed** **(** **)** void **remove_meta** **(** :ref:`StringName` name **)** -Removes the given entry ``name`` from the object's metadata. See also :ref:`has_meta`, :ref:`get_meta` and :ref:`set_meta`. +从对象的元数据中移除名称为 ``name`` 的条目。另请参阅 :ref:`has_meta`\ 、\ :ref:`get_meta`\ 、和 :ref:`set_meta`\ 。 -\ **Note:** A metadata's name must be a valid identifier as per :ref:`StringName.is_valid_identifier` method. +\ **注意:**\ 元数据的名称必须是符合 :ref:`StringName.is_valid_identifier` 的有效标识符。 -\ **Note:** Metadata that has a name starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. +\ **注意:**\ 名称以下划线(\ ``_``\ )开头的元数据仅供编辑器使用。仅供编辑器使用的元数据不会在“检查器”中显示,虽然仍然能够被这个方法找到,但是不应该进行编辑。 .. rst-class:: classref-item-separator @@ -1646,13 +1647,13 @@ void **set_message_translation** **(** :ref:`bool` enable **)** void **set_meta** **(** :ref:`StringName` name, :ref:`Variant` value **)** -Adds or changes the entry ``name`` inside the object's metadata. The metadata ``value`` can be any :ref:`Variant`, although some types cannot be serialized correctly. +添加或更改对象元数据中名称为 ``name`` 的条目。元数据值 ``value`` 可以是任何 :ref:`Variant`\ ,尽管某些类型无法正确序列化。 -If ``value`` is ``null``, the entry is removed. This is the equivalent of using :ref:`remove_meta`. See also :ref:`has_meta` and :ref:`get_meta`. +如果 ``value`` 为 ``null``\ ,则该条目被移除。等价于使用 :ref:`remove_meta`\ 。另见 :ref:`has_meta` 和 :ref:`get_meta`\ 。 -\ **Note:** A metadata's name must be a valid identifier as per :ref:`StringName.is_valid_identifier` method. +\ **注意:**\ 元数据的名称必须是符合 :ref:`StringName.is_valid_identifier` 的有效标识符。 -\ **Note:** Metadata that has a name starting with an underscore (``_``) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. +\ **注意:**\ 名称以下划线(\ ``_``\ )开头的元数据仅供编辑器使用。仅供编辑器使用的元数据不会在“检查器”中显示,虽然仍然能够被这个方法找到,但是不应该进行编辑。 .. rst-class:: classref-item-separator @@ -1664,7 +1665,7 @@ If ``value`` is ``null``, the entry is removed. This is the equivalent of using void **set_script** **(** :ref:`Variant` script **)** -将脚本 ``script`` 附加至该对象,并进行实例化。因此会调用该脚本的 :ref:`_init`\ 。\ :ref:`Script` 可用于扩展对象的功能。 +将脚本 ``script`` 附加至该对象,并进行实例化。因此会调用该脚本的 :ref:`_init`\ 。\ :ref:`Script` 可用于扩展对象的功能。 如果已存在脚本,则该脚本的实例会被分离,其属性值和状态会丢失。仍会保留内置属性的值。 @@ -1678,7 +1679,7 @@ void **set_script** **(** :ref:`Variant` script **)** :ref:`String` **to_string** **(** **)** -返回表示对象的 :ref:`String`\ 。默认为 ``""``\ 。覆盖 :ref:`_to_string` 以自定义对象的字符串表示形式。 +返回表示对象的 :ref:`String`\ 。默认为 ``""``\ 。覆盖 :ref:`_to_string` 以自定义对象的字符串表示形式。 .. rst-class:: classref-item-separator @@ -1716,10 +1717,10 @@ void **set_script** **(** :ref:`Variant` script **)** \ **注意:**\ 负数和 :ref:`float` 数字可能不适用于某些可数科目。建议使用 :ref:`tr` 处理这些情况。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_occluder3d.rst b/classes/zh_CN/class_occluder3d.rst index a76e51f6fc..19c439f8ab 100644 --- a/classes/zh_CN/class_occluder3d.rst +++ b/classes/zh_CN/class_occluder3d.rst @@ -10,16 +10,16 @@ Occluder3D ========== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`ArrayOccluder3D`, :ref:`BoxOccluder3D`, :ref:`PolygonOccluder3D`, :ref:`QuadOccluder3D`, :ref:`SphereOccluder3D` +**派生:** :ref:`ArrayOccluder3D`, :ref:`BoxOccluder3D`, :ref:`PolygonOccluder3D`, :ref:`QuadOccluder3D`, :ref:`SphereOccluder3D` 用于与 :ref:`OccluderInstance3D` 中的遮挡剔除一起使用的遮挡物形状资源。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **Occluder3D** 存储一个遮挡器形状,可供引擎的遮挡剔除系统使用。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Occlusion culling <../tutorials/3d/occlusion_culling>` +- :doc:`遮挡剔除 <../tutorials/3d/occlusion_culling>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Occluder3D_method_get_indices: @@ -75,10 +75,10 @@ Method Descriptions 返回该遮挡器形状的顶点位置。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_occluderinstance3d.rst b/classes/zh_CN/class_occluderinstance3d.rst index 4dda3580e7..6ecac67ebd 100644 --- a/classes/zh_CN/class_occluderinstance3d.rst +++ b/classes/zh_CN/class_occluderinstance3d.rst @@ -10,38 +10,38 @@ OccluderInstance3D ================== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 为 3D 节点提供遮挡剔除,可以提高封闭区域的性能。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Occlusion culling can improve rendering performance in closed/semi-open areas by hiding geometry that is occluded by other objects. +遮挡剔除可以通过隐藏被其他对象遮挡的几何体,来提高封闭/半开放区域的渲染性能。 -The occlusion culling system is mostly static. **OccluderInstance3D**\ s can be moved or hidden at run-time, but doing so will trigger a background recomputation that can take several frames. It is recommended to only move **OccluderInstance3D**\ s sporadically (e.g. for procedural generation purposes), rather than doing so every frame. +遮挡剔除系统大多是静态的。\ **OccluderInstance3D** 可以在运行时移动或隐藏,但这样做会触发可能需要几帧的背景重新计算。建议仅偶尔移动 **OccluderInstance3D**\ (例如,出于程序生成目的),而不是每帧都这样做。 -The occlusion culling system works by rendering the occluders on the CPU in parallel using `Embree `__, drawing the result to a low-resolution buffer then using this to cull 3D nodes individually. In the 3D editor, you can preview the occlusion culling buffer by choosing **Perspective > Debug Advanced... > Occlusion Culling Buffer** in the top-left corner of the 3D viewport. The occlusion culling buffer quality can be adjusted in the Project Settings. +遮挡剔除系统的工作原理是,使用 `Embree `__ 在 CPU 上并行渲染遮挡物,将结果绘制到一个低分辨率缓冲区,然后使用它来单独剔除 3D 的节点。在 3D 编辑器中,可以通过选择 3D 视口左上角的\ **透视图 > 高级调试... > 遮挡剔除缓冲区**\ ,来预览遮挡剔除缓冲区。可以在项目设置中调整遮挡剔除缓冲区的质量。 -\ **Baking:** Select an **OccluderInstance3D** node, then use the **Bake Occluders** button at the top of the 3D editor. Only opaque materials will be taken into account; transparent materials (alpha-blended or alpha-tested) will be ignored by the occluder generation. +\ **烘焙:**\ 选择一个 **OccluderInstance3D** 节点,然后使用 3D 编辑器顶部的\ **烘焙遮挡物**\ 按钮。只考虑不透明的材质;遮挡器生成将忽略透明材质(alpha 混合或 alpha 测试)。 -\ **Note:** Occlusion culling is only effective if :ref:`ProjectSettings.rendering/occlusion_culling/use_occlusion_culling` is ``true``. Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it. Large open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges (:ref:`GeometryInstance3D.visibility_range_begin` and :ref:`GeometryInstance3D.visibility_range_end`) compared to occlusion culling. +\ **注意:**\ 遮挡剔除只有在 :ref:`ProjectSettings.rendering/occlusion_culling/use_occlusion_culling` 为 ``true`` 时才有效。启用遮挡剔除会消耗一定的 CPU。仅当确实打算使用遮挡剔除时才启用它。具有很少或没有物体,将阻挡视口的大型开放场景,通常不会从遮挡剔除中受益更多。与遮挡剔除相比,大型开放场景通常从网格 LOD 和可见性范围(\ :ref:`GeometryInstance3D.visibility_range_begin` 和 :ref:`GeometryInstance3D.visibility_range_end`\ )中受益更多。 -\ **Note:** Due to memory constraints, occlusion culling is not supported by default in Web export templates. It can be enabled by compiling custom Web export templates with ``module_raycast_enabled=yes``. +\ **注意:**\ 由于内存限制,Web 导出模板中默认不支持遮挡剔除。编译自定义 Web 导出模板时使用 ``module_raycast_enabled=yes`` 可以启用。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Occlusion culling <../tutorials/3d/occlusion_culling>` +- :doc:`遮挡剔除 <../tutorials/3d/occlusion_culling>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -74,8 +74,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_OccluderInstance3D_property_bake_mask: @@ -142,8 +142,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_OccluderInstance3D_method_get_bake_mask_value: @@ -165,10 +165,10 @@ void **set_bake_mask_value** **(** :ref:`int` layer_number, :ref:`boo 基于 ``value``\ ,启用或禁用 :ref:`bake_mask` 中的指定层,该层由给定的一个介于 1 和 32 之间的 ``layer_number`` 指定。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_occluderpolygon2d.rst b/classes/zh_CN/class_occluderpolygon2d.rst index 6adccf5e28..2f535fc274 100644 --- a/classes/zh_CN/class_occluderpolygon2d.rst +++ b/classes/zh_CN/class_occluderpolygon2d.rst @@ -10,21 +10,21 @@ OccluderPolygon2D ================= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 为 LightOccluder2D 定义一个 2D 多边形。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 编辑工具,帮助你绘制一个 2D 多边形用作资源 :ref:`LightOccluder2D`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_OccluderPolygon2D_CullMode: @@ -82,8 +82,8 @@ enum **CullMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_OccluderPolygon2D_property_closed: @@ -134,10 +134,10 @@ Property Descriptions \ **注意:**\ 返回值是基础数组的副本,而不是引用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_offlinemultiplayerpeer.rst b/classes/zh_CN/class_offlinemultiplayerpeer.rst index 74afd44322..17bfd8b740 100644 --- a/classes/zh_CN/class_offlinemultiplayerpeer.rst +++ b/classes/zh_CN/class_offlinemultiplayerpeer.rst @@ -10,23 +10,23 @@ OfflineMultiplayerPeer ====================== -**Inherits:** :ref:`MultiplayerPeer` **<** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`MultiplayerPeer` **<** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` 始终连接并用作服务器的 :ref:`MultiplayerPeer`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这是 :ref:`Node.multiplayer` 的默认 :ref:`MultiplayerAPI.multiplayer_peer`\ 。会模仿未连接任何对等体的服务器的行为。 这意味着 :ref:`SceneTree` 会默认作为多人游戏控制方。调用 :ref:`MultiplayerAPI.is_server` 会返回 ``true``\ ,调用 :ref:`MultiplayerAPI.get_unique_id` 会返回 :ref:`MultiplayerPeer.TARGET_PEER_SERVER`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_oggpacketsequence.rst b/classes/zh_CN/class_oggpacketsequence.rst index bd22538de1..36182a8b18 100644 --- a/classes/zh_CN/class_oggpacketsequence.rst +++ b/classes/zh_CN/class_oggpacketsequence.rst @@ -10,21 +10,21 @@ OggPacketSequence ================= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` Ogg 数据包序列。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- Ogg 数据包序列。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_OggPacketSequence_property_granule_positions: @@ -111,8 +111,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_OggPacketSequence_method_get_length: @@ -122,10 +122,10 @@ Method Descriptions 该流的长度,以秒为单位。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_oggpacketsequenceplayback.rst b/classes/zh_CN/class_oggpacketsequenceplayback.rst index 2c8b750f53..172924873e 100644 --- a/classes/zh_CN/class_oggpacketsequenceplayback.rst +++ b/classes/zh_CN/class_oggpacketsequenceplayback.rst @@ -10,16 +10,16 @@ OggPacketSequencePlayback ========================= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_omnilight3d.rst b/classes/zh_CN/class_omnilight3d.rst index 6c0a0281a6..4eba11392d 100644 --- a/classes/zh_CN/class_omnilight3d.rst +++ b/classes/zh_CN/class_omnilight3d.rst @@ -10,14 +10,14 @@ OmniLight3D =========== -**Inherits:** :ref:`Light3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Light3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 全向光,如灯泡或蜡烛。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 全向光是 :ref:`Light3D` 的一类,可以向所有方向发射光。光随距离而衰减,该衰减可以通过修改其能量、半径和衰减参数来配置。 @@ -27,17 +27,17 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`3D 灯光与阴影 <../tutorials/3d/lights_and_shadows>` -- :doc:`Faking global illumination <../tutorials/3d/global_illumination/faking_global_illumination>` +- :doc:`伪造全局光照 <../tutorials/3d/global_illumination/faking_global_illumination>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_OmniLight3D_ShadowMode: @@ -89,8 +89,8 @@ enum **ShadowMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_OmniLight3D_property_omni_attenuation: @@ -143,10 +143,10 @@ Property Descriptions 见 :ref:`ShadowMode`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_openxraction.rst b/classes/zh_CN/class_openxraction.rst index 0712643eba..9265909c12 100644 --- a/classes/zh_CN/class_openxraction.rst +++ b/classes/zh_CN/class_openxraction.rst @@ -10,14 +10,14 @@ OpenXRAction ============ -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` OpenXR 动作。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该资源定义了一个 OpenXR 动作。动作可用于输入(按钮/操纵杆/触发器/等)和输出(触觉)。 @@ -29,8 +29,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_OpenXRAction_ActionType: @@ -96,8 +96,8 @@ enum **ActionType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_OpenXRAction_property_action_type: @@ -146,10 +146,10 @@ Property Descriptions 该动作所能绑定到的顶级路径的合集。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_openxractionmap.rst b/classes/zh_CN/class_openxractionmap.rst index f2008375db..19cf97f85c 100644 --- a/classes/zh_CN/class_openxractionmap.rst +++ b/classes/zh_CN/class_openxractionmap.rst @@ -10,14 +10,14 @@ OpenXRActionMap =============== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于 OpenXR 模块的 :ref:`OpenXRActionSet` 和 :ref:`OpenXRInteractionProfile` 资源的合集。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- OpenXR 使用类似于 Godots 输入映射系统的动作系统,将各种类型的 XR 控制器上的输入和输出绑定到命名的动作。OpenXR 规范了比 Godot 支持的更多关于这些输入和输出的细节。 @@ -27,8 +27,8 @@ OpenXR 使用类似于 Godots 输入映射系统的动作系统,将各种类 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -77,8 +77,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_OpenXRActionMap_property_action_sets: @@ -116,8 +116,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_OpenXRActionMap_method_add_action_set: @@ -247,10 +247,10 @@ void **remove_interaction_profile** **(** :ref:`OpenXRInteractionProfile` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`OpenXRAction` 资源的合集,构成动作集。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- OpenXR 中的动作集定义了一组可以统一激活的动作。这允许游戏在需要不同输入或需要重新解释输入的不同状态之间轻松切换。例如,我们可以有一个在菜单打开时处于活动状态的动作集,一个在玩家自由走动时处于活动状态的动作集,以及一个在玩家控制车辆时处于活动状态的动作集。 @@ -25,8 +25,8 @@ OpenXR 中的动作集定义了一组可以统一激活的动作。这允许游 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -61,8 +61,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_OpenXRActionSet_property_actions: @@ -117,8 +117,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_OpenXRActionSet_method_add_action: @@ -152,10 +152,10 @@ void **remove_action** **(** :ref:`OpenXRAction` action **)* 从该动作集中移除某个动作。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_openxrapiextension.rst b/classes/zh_CN/class_openxrapiextension.rst index c64796c967..4032b35fff 100644 --- a/classes/zh_CN/class_openxrapiextension.rst +++ b/classes/zh_CN/class_openxrapiextension.rst @@ -10,42 +10,42 @@ OpenXRAPIExtension ================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -Makes the OpenXR API available for GDExtension. +为 GDExtension 提供 OpenXR API。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**OpenXRAPIExtension** makes OpenXR available for GDExtension. It provides the OpenXR API to GDExtension through the :ref:`get_instance_proc_addr` method, and the OpenXR instance through :ref:`get_instance`. +**OpenXRAPIExtension** 使 OpenXR 可用于 GDExtension。它通过 :ref:`get_instance_proc_addr` 方法向 GDExtension 提供 OpenXR API,并通过 :ref:`get_instance` 提供 OpenXR 实例。 -It also provides methods for querying the status of OpenXR initialization, and helper methods for ease of use of the API with GDExtension. +它还提供了用于查询 OpenXR 初始化状态的方法,以及便于通过 GDExtension 使用 API 的辅助方法。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- `XrResult documentation `__ +- `XrResult 文档 `__ -- `XrInstance documentation `__ +- `XrInstance 文档 `__ -- `XrSpace documentation `__ +- `XrSpace 文档 `__ -- `XrSession documentation `__ +- `XrSession 文档 `__ -- `XrSystemId documentation `__ +- `XrSystemId 文档 `__ -- `xrBeginSession documentation `__ +- `xrBeginSession 文档 `__ -- `XrPosef documentation `__ +- `XrPosef 文档 `__ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -86,8 +86,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_OpenXRAPIExtension_method_can_render: @@ -95,7 +95,7 @@ Method Descriptions :ref:`bool` **can_render** **(** **)** -Returns ``true`` if OpenXR is initialized for rendering with an XR viewport. +如果 OpenXR 已为使用 XR 视口进行渲染而初始化,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -107,7 +107,7 @@ Returns ``true`` if OpenXR is initialized for rendering with an XR viewport. :ref:`String` **get_error_string** **(** :ref:`int` result **)** -Returns an error string for the given `XrResult `__. +返回给定 `XrResult `__ 对应的错误字符串。 .. rst-class:: classref-item-separator @@ -119,7 +119,7 @@ Returns an error string for the given `XrResult ` **get_instance** **(** **)** -Returns the `XrInstance `__ created during the initialization of the OpenXR API. +返回 OpenXR API 初始化过程中创建的 `XrInstance `__\ 。 .. rst-class:: classref-item-separator @@ -131,9 +131,9 @@ Returns the `XrInstance ` **get_instance_proc_addr** **(** :ref:`String` name **)** -Returns the function pointer of the OpenXR function with the specified name, cast to an integer. If the function with the given name does not exist, the method returns ``0``. +返回具有指定名称的 OpenXR 函数的函数指针,转换为整数。如果给定名称的函数不存在,该方法返回 ``0``\ 。 -\ **Note:** ``openxr/util.h`` contains utility macros for acquiring OpenXR functions, e.g. ``GDEXTENSION_INIT_XR_FUNC_V(xrCreateAction)``. +\ **注意:**\ ``openxr/util.h`` 包含用于获取 OpenXR 函数的实用宏,例如, ``GDEXTENSION_INIT_XR_FUNC_V(xrCreateAction)``\ 。 .. rst-class:: classref-item-separator @@ -145,7 +145,7 @@ Returns the function pointer of the OpenXR function with the specified name, cas :ref:`int` **get_next_frame_time** **(** **)** -Returns the timing for the next frame. +返回下一帧的时间。 .. rst-class:: classref-item-separator @@ -157,7 +157,7 @@ Returns the timing for the next frame. :ref:`int` **get_play_space** **(** **)** -Returns the play space, which is an `XrSpace `__ cast to an integer. +返回播放空间,它是一个被转换为整数的 `XrSpace `__\ 。 .. rst-class:: classref-item-separator @@ -169,7 +169,7 @@ Returns the play space, which is an `XrSpace ` **get_session** **(** **)** -Returns the OpenXR session, which is an `XrSession `__ cast to an integer. +返回该 OpenXR 会话,它是一个被转换为整数的 `XrSession `__\ 。 .. rst-class:: classref-item-separator @@ -181,7 +181,7 @@ Returns the OpenXR session, which is an `XrSession ` **get_swapchain_format_name** **(** :ref:`int` swapchain_format **)** -Returns the name of the specified swapchain format. +返回指定交换链格式的名称。 .. rst-class:: classref-item-separator @@ -193,7 +193,7 @@ Returns the name of the specified swapchain format. :ref:`int` **get_system_id** **(** **)** -Returns the id of the system, which is a `XrSystemId `__ cast to an integer. +返回系统的 id,它是一个被转换为整数的 `XrSystemId `__\ 。 .. rst-class:: classref-item-separator @@ -205,7 +205,7 @@ Returns the id of the system, which is a `XrSystemId ` **is_initialized** **(** **)** -Returns ``true`` if OpenXR is initialized. +如果 OpenXR 已初始化,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -217,7 +217,7 @@ Returns ``true`` if OpenXR is initialized. :ref:`bool` **is_running** **(** **)** -Returns ``true`` if OpenXR is running (`xrBeginSession `__ was successfully called and the swapchains were created). +如果 OpenXR 正在运行,则返回 ``true``\ (\ `xrBeginSession `__ 已被成功调用并且交换链已被创建)。 .. rst-class:: classref-item-separator @@ -229,7 +229,7 @@ Returns ``true`` if OpenXR is running (`xrBeginSession ` **openxr_is_enabled** **(** :ref:`bool` check_run_in_editor **)** |static| -Returns ``true`` if OpenXR is enabled. +如果启用 OpenXR,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -241,7 +241,7 @@ Returns ``true`` if OpenXR is enabled. :ref:`Transform3D` **transform_from_pose** **(** const void* pose **)** -Creates a :ref:`Transform3D` from an `XrPosef `__. +从 `XrPosef `__ 创建一个 :ref:`Transform3D` 。 .. rst-class:: classref-item-separator @@ -253,12 +253,12 @@ Creates a :ref:`Transform3D` from an `XrPosef ` **xr_result** **(** :ref:`int` result, :ref:`String` format, :ref:`Array` args **)** -Returns ``true`` if the provided `XrResult `__ (cast to an integer) is successful. Otherwise returns ``false`` and prints the `XrResult `__ converted to a string, with the specified additional information. +如果提供的 `XrResult `__\ (转换为整数)是成功的,则返回 ``true``\ 。否则返回 ``false`` 并打印被转换为字符串的 `XrResult `__ ,以及指定的附加信息。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_openxrextensionwrapperextension.rst b/classes/zh_CN/class_openxrextensionwrapperextension.rst index 0d33b7d303..ffb9b59ff7 100644 --- a/classes/zh_CN/class_openxrextensionwrapperextension.rst +++ b/classes/zh_CN/class_openxrextensionwrapperextension.rst @@ -10,74 +10,74 @@ OpenXRExtensionWrapperExtension =============================== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` -Allows clients to implement OpenXR extensions with GDExtension. +允许客户端使用 GDExtension 实现 OpenXR 扩展。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**OpenXRExtensionWrapperExtension** allows clients to implement OpenXR extensions with GDExtension. The extension should be registered with :ref:`register_extension_wrapper`. +**OpenXRExtensionWrapperExtension** 允许客户端使用 GDExtension 实现 OpenXR 扩展。扩展应该使用 :ref:`register_extension_wrapper` 注册。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_requested_extensions` **(** **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_on_before_instance_created` **(** **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_on_event_polled` **(** const void* event **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_on_instance_created` **(** :ref:`int` instance **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_on_instance_destroyed` **(** **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_on_pre_render` **(** **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_on_process` **(** **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_on_register_metadata` **(** **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_on_session_created` **(** :ref:`int` session **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_on_session_destroyed` **(** **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_on_state_exiting` **(** **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_on_state_focused` **(** **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_on_state_idle` **(** **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_on_state_loss_pending` **(** **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_on_state_ready` **(** **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_on_state_stopping` **(** **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_on_state_synchronized` **(** **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_on_state_visible` **(** **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_set_instance_create_info_and_get_next_pointer` **(** void* next_pointer **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_set_session_create_and_get_next_pointer` **(** void* next_pointer **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_set_swapchain_create_info_and_get_next_pointer` **(** void* next_pointer **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_set_system_properties_and_get_next_pointer` **(** void* next_pointer **)** |virtual| | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`OpenXRAPIExtension` | :ref:`get_openxr_api` **(** **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`register_extension_wrapper` **(** **)** | - +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_requested_extensions` **(** **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_on_before_instance_created` **(** **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_on_event_polled` **(** const void* event **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_on_instance_created` **(** :ref:`int` instance **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_on_instance_destroyed` **(** **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_on_pre_render` **(** **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_on_process` **(** **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_on_register_metadata` **(** **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_on_session_created` **(** :ref:`int` session **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_on_session_destroyed` **(** **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_on_state_exiting` **(** **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_on_state_focused` **(** **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_on_state_idle` **(** **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_on_state_loss_pending` **(** **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_on_state_ready` **(** **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_on_state_stopping` **(** **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_on_state_synchronized` **(** **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_on_state_visible` **(** **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_set_instance_create_info_and_get_next_pointer` **(** void* next_pointer **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_set_session_create_and_get_next_pointer` **(** void* next_pointer **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_set_swapchain_create_info_and_get_next_pointer` **(** void* next_pointer **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_set_system_properties_and_get_next_pointer` **(** void* next_pointer **)** |virtual| | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`OpenXRAPIExtension` | :ref:`get_openxr_api` **(** **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`register_extension_wrapper` **(** **)** | + +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -85,274 +85,274 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_OpenXRExtensionWrapperExtension_method__get_requested_extensions: +.. _class_OpenXRExtensionWrapperExtension_private_method__get_requested_extensions: .. rst-class:: classref-method :ref:`Dictionary` **_get_requested_extensions** **(** **)** |virtual| -Returns a :ref:`Dictionary` of OpenXR extensions related to this extension. The :ref:`Dictionary` should contain the name of the extension, mapped to a ``bool *`` cast to an integer: +返回与该扩展相关的 OpenXR 扩展的 :ref:`Dictionary`\ 。该 :ref:`Dictionary` 应包含扩展名,映射到 ``bool *`` 转换为整数: -- If the ``bool *`` is a ``nullptr`` this extension is mandatory. +- 如果 ``bool *`` 是 ``nullptr``\ ,则该扩展是强制性的。 -- If the ``bool *`` points to a boolean, the boolean will be updated to ``true`` if the extension is enabled. +- 如果 ``bool *`` 指向布尔值,则在启用扩展的情况下,该布尔值将更新为 ``true``\ 。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_before_instance_created: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_before_instance_created: .. rst-class:: classref-method void **_on_before_instance_created** **(** **)** |virtual| -Called before the OpenXR instance is created. +在创建 OpenXR 实例之前调用。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_event_polled: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_event_polled: .. rst-class:: classref-method :ref:`bool` **_on_event_polled** **(** const void* event **)** |virtual| -Called when there is an OpenXR event to process. When implementing, return ``true`` if the event was handled, return ``false`` otherwise. +当有 OpenXR 事件需要处理时调用。实现时,如果事件已被处理,则返回 ``true``\ ,否则返回 ``false``\ 。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_instance_created: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_instance_created: .. rst-class:: classref-method void **_on_instance_created** **(** :ref:`int` instance **)** |virtual| -Called right after the OpenXR instance is created. +在创建 OpenXR 实例后立即调用。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_instance_destroyed: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_instance_destroyed: .. rst-class:: classref-method void **_on_instance_destroyed** **(** **)** |virtual| -Called right before the OpenXR instance is destroyed. +在 OpenXR 实例被销毁之前调用。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_pre_render: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_pre_render: .. rst-class:: classref-method void **_on_pre_render** **(** **)** |virtual| -Called right before the XR viewports begin their rendering step. +在 XR 视口开始其渲染步进之前调用。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_process: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_process: .. rst-class:: classref-method void **_on_process** **(** **)** |virtual| -Called as part of the OpenXR process handling. This happens right before general and physics processing steps of the main loop. During this step controller data is queried and made available to game logic. +作为 OpenXR 进程处理的一部分调用。这发生在主循环的一般和物理处理步进之前。在该步进中,控制器数据被查询并可供游戏逻辑使用。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_register_metadata: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_register_metadata: .. rst-class:: classref-method void **_on_register_metadata** **(** **)** |virtual| -Allows extensions to register additional controller metadata. This function is called even when the OpenXR API is not constructed as the metadata needs to be available to the editor. +允许扩展注册额外的控制器元数据。即使 OpenXR API 未被构造,也会调用该函数,因为元数据需要可供编辑器使用。 -Extensions should also provide metadata regardless of whether they are supported on the host system. The controller data is used to setup action maps for users who may have access to the relevant hardware. +扩展还应该提供元数据,无论主机系统是否支持它们。控制器数据用于为可以访问相关硬件的用户设置动作映射。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_session_created: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_session_created: .. rst-class:: classref-method void **_on_session_created** **(** :ref:`int` session **)** |virtual| -Called right after the OpenXR session is created. +在创建 OpenXR 会话后立即调用。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_session_destroyed: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_session_destroyed: .. rst-class:: classref-method void **_on_session_destroyed** **(** **)** |virtual| -Called right before the OpenXR session is destroyed. +在 OpenXR 会话被销毁之前调用。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_state_exiting: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_state_exiting: .. rst-class:: classref-method void **_on_state_exiting** **(** **)** |virtual| -Called when the OpenXR session state is changed to exiting. +当 OpenXR 会话状态被更改为退出时调用。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_state_focused: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_state_focused: .. rst-class:: classref-method void **_on_state_focused** **(** **)** |virtual| -Called when the OpenXR session state is changed to focused. This state is the active state when the game runs. +当 OpenXR 会话状态被更改为聚焦时调用。该状态是游戏运行时的活动状态。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_state_idle: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_state_idle: .. rst-class:: classref-method void **_on_state_idle** **(** **)** |virtual| -Called when the OpenXR session state is changed to idle. +当 OpenXR 会话状态被更改为空闲时调用。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_state_loss_pending: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_state_loss_pending: .. rst-class:: classref-method void **_on_state_loss_pending** **(** **)** |virtual| -Called when the OpenXR session state is changed to loss pending. +当 OpenXR 会话状态被更改为丢失挂起时调用。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_state_ready: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_state_ready: .. rst-class:: classref-method void **_on_state_ready** **(** **)** |virtual| -Called when the OpenXR session state is changed to ready. This means OpenXR is ready to set up the session. +当 OpenXR 会话状态被更改为就绪时调用。这意味着 OpenXR 已准备好建立会话。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_state_stopping: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_state_stopping: .. rst-class:: classref-method void **_on_state_stopping** **(** **)** |virtual| -Called when the OpenXR session state is changed to stopping. +当 OpenXR 会话状态被更改为停止时调用。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_state_synchronized: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_state_synchronized: .. rst-class:: classref-method void **_on_state_synchronized** **(** **)** |virtual| -Called when the OpenXR session state is changed to synchronized. OpenXR also returns to this state when the application loses focus. +当 OpenXR 会话状态被更改为同步时调用。当应用程序失去焦点时,OpenXR 也会返回到该状态。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__on_state_visible: +.. _class_OpenXRExtensionWrapperExtension_private_method__on_state_visible: .. rst-class:: classref-method void **_on_state_visible** **(** **)** |virtual| -Called when the OpenXR session state is changed to visible. This means OpenXR is now ready to receive frames. +当 OpenXR 会话状态被更改为可见时调用。这意味着 OpenXR 现在已准备好接收帧。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__set_instance_create_info_and_get_next_pointer: +.. _class_OpenXRExtensionWrapperExtension_private_method__set_instance_create_info_and_get_next_pointer: .. rst-class:: classref-method :ref:`int` **_set_instance_create_info_and_get_next_pointer** **(** void* next_pointer **)** |virtual| -Adds additional data structures when the OpenXR instance is created. +创建 OpenXR 实例时添加额外的数据结构。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__set_session_create_and_get_next_pointer: +.. _class_OpenXRExtensionWrapperExtension_private_method__set_session_create_and_get_next_pointer: .. rst-class:: classref-method :ref:`int` **_set_session_create_and_get_next_pointer** **(** void* next_pointer **)** |virtual| -Adds additional data structures when the OpenXR session is created. +创建 OpenXR 会话时添加额外的数据结构。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__set_swapchain_create_info_and_get_next_pointer: +.. _class_OpenXRExtensionWrapperExtension_private_method__set_swapchain_create_info_and_get_next_pointer: .. rst-class:: classref-method :ref:`int` **_set_swapchain_create_info_and_get_next_pointer** **(** void* next_pointer **)** |virtual| -Adds additional data structures when creating OpenXR swapchains. +创建 OpenXR 交换链时添加额外的数据结构。 .. rst-class:: classref-item-separator ---- -.. _class_OpenXRExtensionWrapperExtension_method__set_system_properties_and_get_next_pointer: +.. _class_OpenXRExtensionWrapperExtension_private_method__set_system_properties_and_get_next_pointer: .. rst-class:: classref-method :ref:`int` **_set_system_properties_and_get_next_pointer** **(** void* next_pointer **)** |virtual| -Adds additional data structures when interogating OpenXR system abilities. +在询问 OpenXR 系统功能时添加额外的数据结构。 .. rst-class:: classref-item-separator @@ -364,7 +364,7 @@ Adds additional data structures when interogating OpenXR system abilities. :ref:`OpenXRAPIExtension` **get_openxr_api** **(** **)** -Returns the created :ref:`OpenXRAPIExtension`, which can be used to access the OpenXR API. +返回创建的 :ref:`OpenXRAPIExtension`\ ,可用于访问 OpenXR API。 .. rst-class:: classref-item-separator @@ -376,12 +376,12 @@ Returns the created :ref:`OpenXRAPIExtension`, which c void **register_extension_wrapper** **(** **)** -Registers the extension. This should happen at core module initialization level. +注册扩展程序。这应该发生在核心模块初始化级别。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_openxrhand.rst b/classes/zh_CN/class_openxrhand.rst index a3f3fb3ba0..51a523d9fe 100644 --- a/classes/zh_CN/class_openxrhand.rst +++ b/classes/zh_CN/class_openxrhand.rst @@ -10,21 +10,21 @@ OpenXRHand ========== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 在 OpenXR 中提供手指跟踪的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该节点启用 OpenXR 的手部跟踪功能。该节点应该是 :ref:`XROrigin3D` 节点的一个子节点,跟踪会将其位置更新为玩家的实际手所在的位置。该节点还更新了适当蒙皮的手部模型的骨架。手部网格应该是该节点的一个子节点。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_OpenXRHand_Hands: @@ -116,8 +116,8 @@ enum **MotionRange**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_OpenXRHand_property_hand: @@ -166,10 +166,10 @@ Property Descriptions 设置限制手部运动的运动范围(前提是支持)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_openxrinteractionprofile.rst b/classes/zh_CN/class_openxrinteractionprofile.rst index 0bfdb50513..291b7acc66 100644 --- a/classes/zh_CN/class_openxrinteractionprofile.rst +++ b/classes/zh_CN/class_openxrinteractionprofile.rst @@ -10,23 +10,23 @@ OpenXRInteractionProfile ======================== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于 OpenXR 的建议绑定对象。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This object stores suggested bindings for an interaction profile. Interaction profiles define the metadata for a tracked XR device such as an XR controller. +此对象存储用于一个交互配置的建议绑定。交互配置定义了一个被跟踪的 XR 设备(例如一个 XR 控制器)的元数据。 -For more information see the `interaction profiles info in the OpenXR specification `__. +有关更多信息,请参阅\ `《OpenXR 规范中的交互配置信息》 `__\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -57,8 +57,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_OpenXRInteractionProfile_property_bindings: @@ -96,8 +96,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_OpenXRInteractionProfile_method_get_binding: @@ -119,10 +119,10 @@ Method Descriptions 获取该交互配置中的绑定数量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_openxrinteractionprofilemetadata.rst b/classes/zh_CN/class_openxrinteractionprofilemetadata.rst index 8d8897c54b..886eb43005 100644 --- a/classes/zh_CN/class_openxrinteractionprofilemetadata.rst +++ b/classes/zh_CN/class_openxrinteractionprofilemetadata.rst @@ -10,21 +10,21 @@ OpenXRInteractionProfileMetadata ================================ -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` -Meta class registering supported devices in OpenXR. +在 OpenXR 中注册受支持设备的元类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This class allows OpenXR core and extensions to register metadata relating to supported interaction devices such as controllers, trackers, haptic devices, etc. It is primarily used by the action map editor and to sanitize any action map by removing extension-dependent entries when applicable. +该类允许 OpenXR 核心和扩展注册与受支持的交互设备(例如控制器、跟踪器、触觉设备等)相关的元数据。它主要由动作映射编辑器使用,并在适用时通过移除依赖于扩展的条目来清理任何动作映射。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_OpenXRInteractionProfileMetadata_method_register_interaction_profile: @@ -54,9 +54,9 @@ Method Descriptions void **register_interaction_profile** **(** :ref:`String` display_name, :ref:`String` openxr_path, :ref:`String` openxr_extension_name **)** -Registers an interaction profile using its OpenXR designation (e.g. ``/interaction_profiles/khr/simple_controller`` is the profile for OpenXR's simple controller profile). +使用 OpenXR 名称注册交互配置文件(例如 ``/interaction_profiles/khr/simple_controller`` 是 OpenXR 简单控制器配置文件的配置文件)。 -\ ``display_name`` is the description shown to the user. ``openxr_path`` is the interaction profile path being registered. ``openxr_extension_name`` optionally restricts this profile to the given extension being enabled/available. If the extension is not available, the profile and all related entries used in an action map are filtered out. +\ ``display_name`` 是向用户显示的描述。\ ``openxr_path`` 是正被注册的交互配置文件路径。\ ``openxr_extension_name`` 可以选择将该配置文件限制为对给定扩展启用/可用。如果该扩展不可用,则动作映射中使用的配置文件和所有相关条目都会被过滤掉。 .. rst-class:: classref-item-separator @@ -68,7 +68,7 @@ Registers an interaction profile using its OpenXR designation (e.g. ``/interacti void **register_io_path** **(** :ref:`String` interaction_profile, :ref:`String` display_name, :ref:`String` toplevel_path, :ref:`String` openxr_path, :ref:`String` openxr_extension_name, :ref:`ActionType` action_type **)** -Registers an input/output path for the given ``interaction_profile``. The profile should previously have been registered using :ref:`register_interaction_profile`. ``display_name`` is the description shown to the user. ``toplevel_path`` specifies the bind path this input/output can be bound to (e.g. ``/user/hand/left`` or ``/user/hand/right``). ``openxr_path`` is the action input/output being registered (e.g. ``/user/hand/left/input/aim/pose``). ``openxr_extension_name`` restricts this input/output to an enabled/available extension, this doesn't need to repeat the extension on the profile but relates to overlapping extension (e.g. ``XR_EXT_palm_pose`` that introduces ``…/input/palm_ext/pose`` input paths). ``action_type`` defines the type of input or output provided by OpenXR. +为给定的 ``interaction_profile`` 注册输入/输出路径。该配置文件之前应已使用 :ref:`register_interaction_profile` 注册。\ ``display_name`` 是向用户显示的描述。\ ``toplevel_path`` 指定该输入/输出可以被绑定到的绑定路径(例如 ``/user/hand/left`` 或 ``/user/hand/right``\ )。\ ``openxr_path`` 是正被注册的动作输入/输出(例如 ``/user/hand/left/input/aim/pose``\ )。\ ``openxr_extension_name`` 将该输入/输出限制为启用的/可用的扩展,这不需要在配置文件上重复该扩展,但与重叠扩展相关(例如引入 ``…/input/palm_ext/pose`` 输入路径的 ``XR_EXT_palm_pose``\ )。\ ``action_type`` 定义 OpenXR 提供的输入或输出的类型。 .. rst-class:: classref-item-separator @@ -80,7 +80,7 @@ Registers an input/output path for the given ``interaction_profile``. The profil void **register_profile_rename** **(** :ref:`String` old_name, :ref:`String` new_name **)** -Allows for renaming old interaction profile paths to new paths to maintain backwards compatibility with older action maps. +允许将旧的交互配置文件路径重命名为新路径,以保持与旧动作映射的向后兼容性。 .. rst-class:: classref-item-separator @@ -92,16 +92,16 @@ Allows for renaming old interaction profile paths to new paths to maintain backw void **register_top_level_path** **(** :ref:`String` display_name, :ref:`String` openxr_path, :ref:`String` openxr_extension_name **)** -Registers a top level path to which profiles can be bound. For instance ``/user/hand/left`` refers to the bind point for the player's left hand. Extensions can register additional top level paths, for instance a haptic vest extension might register ``/user/body/vest``. +注册配置文件可以被绑定到的顶级路径。例如 ``/user/hand/left`` 指的是玩家左手的绑定点。扩展可以注册额外的顶级路径,例如触觉背心扩展可以注册 ``/user/body/vest``\ 。 -\ ``display_name`` is the name shown to the user. ``openxr_path`` is the top level path being registered. ``openxr_extension_name`` is optional and ensures the top level path is only used if the specified extension is available/enabled. +\ ``display_name`` 是向用户显示的名称。\ ``openxr_path`` 是正被注册的顶级路径。\ ``openxr_extension_name`` 是可选的,可确保仅在指定的扩展可用/启用时才使用顶级路径。 -When a top level path ends up being bound by OpenXR, a :ref:`XRPositionalTracker` is instantiated to manage the state of the device. +当顶级路径最终被 OpenXR 绑定时,\ :ref:`XRPositionalTracker` 被实例化以管理该设备的状态。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_openxrinterface.rst b/classes/zh_CN/class_openxrinterface.rst index e265d43075..90f356f815 100644 --- a/classes/zh_CN/class_openxrinterface.rst +++ b/classes/zh_CN/class_openxrinterface.rst @@ -10,14 +10,14 @@ OpenXRInterface =============== -**Inherits:** :ref:`XRInterface` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`XRInterface` **<** :ref:`RefCounted` **<** :ref:`Object` OpenXR 接口。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- OpenXR 接口允许 Godot 与 OpenXR 运行时进行交互,并使创建 XR 体验和游戏成为可能。 @@ -25,56 +25,68 @@ OpenXR 接口允许 Godot 与 OpenXR 运行时进行交互,并使创建 XR 体 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`设置 XR <../tutorials/xr/setting_up_xr>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------------------------+---------+ - | :ref:`float` | :ref:`display_refresh_rate` | ``0.0`` | - +---------------------------+----------------------------------------------------------------------------------------------------+---------+ - | :ref:`float` | :ref:`render_target_size_multiplier` | ``1.0`` | - +---------------------------+----------------------------------------------------------------------------------------------------+---------+ + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`display_refresh_rate` | ``0.0`` | + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`foveation_dynamic` | ``false`` | + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`int` | :ref:`foveation_level` | ``0`` | + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`render_target_size_multiplier` | ``1.0`` | + +---------------------------+----------------------------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`get_action_sets` **(** **)** |const| | - +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`get_available_display_refresh_rates` **(** **)** |const| | - +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_hand_joint_angular_velocity` **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| | - +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_hand_joint_linear_velocity` **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| | - +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`get_hand_joint_position` **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| | - +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_hand_joint_radius` **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| | - +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Quaternion` | :ref:`get_hand_joint_rotation` **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| | - +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`HandMotionRange` | :ref:`get_motion_range` **(** :ref:`Hand` hand **)** |const| | - +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_action_set_active` **(** :ref:`String` name **)** |const| | - +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_action_set_active` **(** :ref:`String` name, :ref:`bool` active **)** | - +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_motion_range` **(** :ref:`Hand` hand, :ref:`HandMotionRange` motion_range **)** | - +--------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_action_sets` **(** **)** |const| | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_available_display_refresh_rates` **(** **)** |const| | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_hand_joint_angular_velocity` **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\<:ref:`HandJointFlags`\> | :ref:`get_hand_joint_flags` **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_hand_joint_linear_velocity` **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`get_hand_joint_position` **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_hand_joint_radius` **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Quaternion` | :ref:`get_hand_joint_rotation` **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`HandMotionRange` | :ref:`get_motion_range` **(** :ref:`Hand` hand **)** |const| | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_action_set_active` **(** :ref:`String` name **)** |const| | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_eye_gaze_interaction_supported` **(** **)** | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_foveation_supported` **(** **)** |const| | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_hand_tracking_supported` **(** **)** | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_action_set_active` **(** :ref:`String` name, :ref:`bool` active **)** | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_motion_range` **(** :ref:`Hand` hand, :ref:`HandMotionRange` motion_range **)** | + +--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -82,8 +94,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_OpenXRInterface_signal_pose_recentered: @@ -147,8 +159,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_OpenXRInterface_Hand: @@ -162,7 +174,7 @@ enum **Hand**: :ref:`Hand` **HAND_LEFT** = ``0`` -Left hand. +左手。 .. _class_OpenXRInterface_constant_HAND_RIGHT: @@ -170,7 +182,7 @@ Left hand. :ref:`Hand` **HAND_RIGHT** = ``1`` -Right hand. +右手。 .. _class_OpenXRInterface_constant_HAND_MAX: @@ -178,7 +190,7 @@ Right hand. :ref:`Hand` **HAND_MAX** = ``2`` -Maximum value for the hand enum. +手部枚举的最大值。 .. rst-class:: classref-item-separator @@ -230,7 +242,7 @@ enum **HandJoints**: :ref:`HandJoints` **HAND_JOINT_PALM** = ``0`` -Palm joint. +掌关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_WRIST: @@ -238,7 +250,7 @@ Palm joint. :ref:`HandJoints` **HAND_JOINT_WRIST** = ``1`` -Wrist joint. +腕关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_METACARPAL: @@ -246,7 +258,7 @@ Wrist joint. :ref:`HandJoints` **HAND_JOINT_THUMB_METACARPAL** = ``2`` -Thumb metacarpal joint. +掌骨拇指关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_PROXIMAL: @@ -254,7 +266,7 @@ Thumb metacarpal joint. :ref:`HandJoints` **HAND_JOINT_THUMB_PROXIMAL** = ``3`` -Thumb proximal joint. +拇指近端关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_DISTAL: @@ -262,7 +274,7 @@ Thumb proximal joint. :ref:`HandJoints` **HAND_JOINT_THUMB_DISTAL** = ``4`` -Thumb distal joint. +拇指远端关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_THUMB_TIP: @@ -270,7 +282,7 @@ Thumb distal joint. :ref:`HandJoints` **HAND_JOINT_THUMB_TIP** = ``5`` -Thumb tip joint. +拇指尖端关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_METACARPAL: @@ -278,7 +290,7 @@ Thumb tip joint. :ref:`HandJoints` **HAND_JOINT_INDEX_METACARPAL** = ``6`` -Index metacarpal joint. +掌骨食指关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_PROXIMAL: @@ -286,7 +298,7 @@ Index metacarpal joint. :ref:`HandJoints` **HAND_JOINT_INDEX_PROXIMAL** = ``7`` -Index proximal joint. +食指近端关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_INTERMEDIATE: @@ -294,7 +306,7 @@ Index proximal joint. :ref:`HandJoints` **HAND_JOINT_INDEX_INTERMEDIATE** = ``8`` -Index intermediate joint. +食指中间关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_DISTAL: @@ -302,7 +314,7 @@ Index intermediate joint. :ref:`HandJoints` **HAND_JOINT_INDEX_DISTAL** = ``9`` -Index distal joint. +食指远端关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_INDEX_TIP: @@ -310,7 +322,7 @@ Index distal joint. :ref:`HandJoints` **HAND_JOINT_INDEX_TIP** = ``10`` -Index tip joint. +食指尖端关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_METACARPAL: @@ -318,7 +330,7 @@ Index tip joint. :ref:`HandJoints` **HAND_JOINT_MIDDLE_METACARPAL** = ``11`` -Middle metacarpal joint. +掌骨中指关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_PROXIMAL: @@ -326,7 +338,7 @@ Middle metacarpal joint. :ref:`HandJoints` **HAND_JOINT_MIDDLE_PROXIMAL** = ``12`` -Middle proximal joint. +中指近端关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_INTERMEDIATE: @@ -334,7 +346,7 @@ Middle proximal joint. :ref:`HandJoints` **HAND_JOINT_MIDDLE_INTERMEDIATE** = ``13`` -Middle intermediate joint. +中指中间关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_DISTAL: @@ -342,7 +354,7 @@ Middle intermediate joint. :ref:`HandJoints` **HAND_JOINT_MIDDLE_DISTAL** = ``14`` -Middle distal joint. +中指远端关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_MIDDLE_TIP: @@ -350,7 +362,7 @@ Middle distal joint. :ref:`HandJoints` **HAND_JOINT_MIDDLE_TIP** = ``15`` -Middle tip joint. +中指尖端关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_RING_METACARPAL: @@ -358,7 +370,7 @@ Middle tip joint. :ref:`HandJoints` **HAND_JOINT_RING_METACARPAL** = ``16`` -Ring metacarpal joint. +环指掌骨关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_RING_PROXIMAL: @@ -366,7 +378,7 @@ Ring metacarpal joint. :ref:`HandJoints` **HAND_JOINT_RING_PROXIMAL** = ``17`` -Ring proximal joint. +环指近端关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_RING_INTERMEDIATE: @@ -374,7 +386,7 @@ Ring proximal joint. :ref:`HandJoints` **HAND_JOINT_RING_INTERMEDIATE** = ``18`` -Ring intermediate joint. +环指中间关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_RING_DISTAL: @@ -382,7 +394,7 @@ Ring intermediate joint. :ref:`HandJoints` **HAND_JOINT_RING_DISTAL** = ``19`` -Ring distal joint. +环指远端关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_RING_TIP: @@ -390,7 +402,7 @@ Ring distal joint. :ref:`HandJoints` **HAND_JOINT_RING_TIP** = ``20`` -Ring tip joint. +环指尖端关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_METACARPAL: @@ -398,7 +410,7 @@ Ring tip joint. :ref:`HandJoints` **HAND_JOINT_LITTLE_METACARPAL** = ``21`` -Little metacarpal joint. +掌骨小指关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_PROXIMAL: @@ -406,7 +418,7 @@ Little metacarpal joint. :ref:`HandJoints` **HAND_JOINT_LITTLE_PROXIMAL** = ``22`` -Little proximal joint. +小指近端关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_INTERMEDIATE: @@ -414,7 +426,7 @@ Little proximal joint. :ref:`HandJoints` **HAND_JOINT_LITTLE_INTERMEDIATE** = ``23`` -Little intermediate joint. +小指中间关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_DISTAL: @@ -422,7 +434,7 @@ Little intermediate joint. :ref:`HandJoints` **HAND_JOINT_LITTLE_DISTAL** = ``24`` -Little distal joint. +小指远端关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_LITTLE_TIP: @@ -430,7 +442,7 @@ Little distal joint. :ref:`HandJoints` **HAND_JOINT_LITTLE_TIP** = ``25`` -Little tip joint. +小指尖端关节。 .. _class_OpenXRInterface_constant_HAND_JOINT_MAX: @@ -438,7 +450,73 @@ Little tip joint. :ref:`HandJoints` **HAND_JOINT_MAX** = ``26`` -Maximum value for the hand joint enum. +手关节枚举的最大值。 + +.. rst-class:: classref-item-separator + +---- + +.. _enum_OpenXRInterface_HandJointFlags: + +.. rst-class:: classref-enumeration + +flags **HandJointFlags**: + +.. _class_OpenXRInterface_constant_HAND_JOINT_NONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags` **HAND_JOINT_NONE** = ``0`` + +没有标志被设置。 + +.. _class_OpenXRInterface_constant_HAND_JOINT_ORIENTATION_VALID: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags` **HAND_JOINT_ORIENTATION_VALID** = ``1`` + +如果设置,则方向数据有效;否则,方向数据不可靠,且不应被使用。 + +.. _class_OpenXRInterface_constant_HAND_JOINT_ORIENTATION_TRACKED: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags` **HAND_JOINT_ORIENTATION_TRACKED** = ``2`` + +如果设置,则方向数据来自跟踪数据;否则,该方向数据包含预测数据。 + +.. _class_OpenXRInterface_constant_HAND_JOINT_POSITION_VALID: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags` **HAND_JOINT_POSITION_VALID** = ``4`` + +如果设置,则位置数据有效;否则,该位置数据不可靠,且不应被使用。 + +.. _class_OpenXRInterface_constant_HAND_JOINT_POSITION_TRACKED: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags` **HAND_JOINT_POSITION_TRACKED** = ``8`` + +如果设置,则位置数据来自跟踪数据;否则,该位置数据包含预测数据。 + +.. _class_OpenXRInterface_constant_HAND_JOINT_LINEAR_VELOCITY_VALID: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags` **HAND_JOINT_LINEAR_VELOCITY_VALID** = ``16`` + +如果设置,则线速度数据有效;否则,线速度数据不可靠,且不应被使用。 + +.. _class_OpenXRInterface_constant_HAND_JOINT_ANGULAR_VELOCITY_VALID: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandJointFlags` **HAND_JOINT_ANGULAR_VELOCITY_VALID** = ``32`` + +如果设置,则角速度数据是有效的;否则,角速度数据不可靠,且不应被使用。 .. rst-class:: classref-section-separator @@ -446,8 +524,8 @@ Maximum value for the hand joint enum. .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_OpenXRInterface_property_display_refresh_rate: @@ -466,6 +544,40 @@ Property Descriptions ---- +.. _class_OpenXRInterface_property_foveation_dynamic: + +.. rst-class:: classref-property + +:ref:`bool` **foveation_dynamic** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_foveation_dynamic** **(** :ref:`bool` value **)** +- :ref:`bool` **get_foveation_dynamic** **(** **)** + +启用动态注视点调整,必须先初始化接口才能访问该功能。如果启用,注视点将在低和 :ref:`foveation_level` 之间自动调整。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_property_foveation_level: + +.. rst-class:: classref-property + +:ref:`int` **foveation_level** = ``0`` + +.. rst-class:: classref-property-setget + +- void **set_foveation_level** **(** :ref:`int` value **)** +- :ref:`int` **get_foveation_level** **(** **)** + +将注视点级别设置为从 0(关闭)到 3(高),必须先初始化接口,然后才能访问该接口。 + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRInterface_property_render_target_size_multiplier: .. rst-class:: classref-property @@ -485,8 +597,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_OpenXRInterface_method_get_action_sets: @@ -518,7 +630,19 @@ Method Descriptions :ref:`Vector3` **get_hand_joint_angular_velocity** **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| -If handtracking is enabled, returns the angular velocity of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D`! +如果启用了手部跟踪,则返回 OpenXR 提供的手(\ ``hand``\ )的关节(\ ``joint``\ )的角速度。这是相对于 :ref:`XROrigin3D` 而言的! + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_get_hand_joint_flags: + +.. rst-class:: classref-method + +|bitfield|\<:ref:`HandJointFlags`\> **get_hand_joint_flags** **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| + +如果启用了手动跟踪,则返回通知我们跟踪数据有效性的标志。 .. rst-class:: classref-item-separator @@ -530,7 +654,7 @@ If handtracking is enabled, returns the angular velocity of a joint (``joint``) :ref:`Vector3` **get_hand_joint_linear_velocity** **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| -If handtracking is enabled, returns the linear velocity of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D` without worldscale applied! +如果启用了手部跟踪,则返回 OpenXR 提供的手(\ ``hand``\ )的关节(\ ``joint``\ )的线速度。这是相对于没有应用世界尺度的 :ref:`XROrigin3D` 而言的! .. rst-class:: classref-item-separator @@ -542,7 +666,7 @@ If handtracking is enabled, returns the linear velocity of a joint (``joint``) o :ref:`Vector3` **get_hand_joint_position** **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| -If handtracking is enabled, returns the position of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is relative to :ref:`XROrigin3D` without worldscale applied! +如果启用了手部跟踪,则返回 OpenXR 提供的手(\ ``hand``\ )的关节(\ ``joint``\ )的位置。这是相对于没有应用世界尺度的 :ref:`XROrigin3D` 而言的! .. rst-class:: classref-item-separator @@ -554,7 +678,7 @@ If handtracking is enabled, returns the position of a joint (``joint``) of a han :ref:`float` **get_hand_joint_radius** **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| -If handtracking is enabled, returns the radius of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. This is without worldscale applied! +如果启用了手部跟踪,则返回 OpenXR 提供的手(\ ``hand``\ )的关节(\ ``joint``\ )的半径。这是没有应用世界尺度的情况! .. rst-class:: classref-item-separator @@ -566,7 +690,7 @@ If handtracking is enabled, returns the radius of a joint (``joint``) of a hand :ref:`Quaternion` **get_hand_joint_rotation** **(** :ref:`Hand` hand, :ref:`HandJoints` joint **)** |const| -If handtracking is enabled, returns the rotation of a joint (``joint``) of a hand (``hand``) as provided by OpenXR. +如果启用了手部跟踪,则返回 OpenXR 提供的手(\ ``hand``\ )的关节(\ ``joint``\ )的旋转。 .. rst-class:: classref-item-separator @@ -578,7 +702,7 @@ If handtracking is enabled, returns the rotation of a joint (``joint``) of a han :ref:`HandMotionRange` **get_motion_range** **(** :ref:`Hand` hand **)** |const| -If handtracking is enabled and motion range is supported, gets the currently configured motion range for ``hand``. +如果启用了手部跟踪并且支持运动范围,则获取 ``hand`` 当前配置的运动范围。 .. rst-class:: classref-item-separator @@ -596,6 +720,48 @@ If handtracking is enabled and motion range is supported, gets the currently con ---- +.. _class_OpenXRInterface_method_is_eye_gaze_interaction_supported: + +.. rst-class:: classref-method + +:ref:`bool` **is_eye_gaze_interaction_supported** **(** **)** + +返回眼睛注视交互扩展的功能。 + +\ **注意:**\ 这仅在 OpenXR 被初始化后返回一个有效值。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_is_foveation_supported: + +.. rst-class:: classref-method + +:ref:`bool` **is_foveation_supported** **(** **)** |const| + +如果支持 OpenXR 的注视点扩展,则返回 ``true``\ ,在返回有效值之前必须初始化该接口。 + +\ **注意:**\ 该功能仅在兼容性渲染器上可用,并且目前仅在某些独立头戴设备上可用。对于 Vulkan,在桌面上将 :ref:`Viewport.vrs_mode` 设置为 ``VRS_XR``\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_OpenXRInterface_method_is_hand_tracking_supported: + +.. rst-class:: classref-method + +:ref:`bool` **is_hand_tracking_supported** **(** **)** + +如果支持且已启用 OpenXR 的手部跟踪,则返回 ``true``\ 。 + +\ **注意:**\ 这仅在 OpenXR 已被初始化后返回一个有效值。 + +.. rst-class:: classref-item-separator + +---- + .. _class_OpenXRInterface_method_set_action_set_active: .. rst-class:: classref-method @@ -614,12 +780,12 @@ void **set_action_set_active** **(** :ref:`String` name, :ref:`boo void **set_motion_range** **(** :ref:`Hand` hand, :ref:`HandMotionRange` motion_range **)** -If handtracking is enabled and motion range is supported, sets the currently configured motion range for ``hand`` to ``motion_range``. +如果启用了手部跟踪并且支持运动范围,请将 ``hand`` 当前配置的运动范围设置为 ``motion_range``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_openxripbinding.rst b/classes/zh_CN/class_openxripbinding.rst index abad6eb487..43414ca309 100644 --- a/classes/zh_CN/class_openxripbinding.rst +++ b/classes/zh_CN/class_openxripbinding.rst @@ -10,21 +10,21 @@ OpenXRIPBinding =============== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 定义 :ref:`OpenXRAction` 和 XR 输入或输出之间的绑定。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该绑定资源将一个 :ref:`OpenXRAction` 绑定到输入或输出。由于大多数控制器都有由相同交互配置处理的左手和右手版本,我们可以指定多个绑定。例如,一个动作“开火”可以同时被绑定到“/user/hand/left/input/trigger”和“/user/hand/right/input/trigger”。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -37,8 +37,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -59,8 +59,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_OpenXRIPBinding_property_action: @@ -98,8 +98,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_OpenXRIPBinding_method_add_path: @@ -145,10 +145,10 @@ void **remove_path** **(** :ref:`String` path **)** 从该绑定中移除该输入/输出路径。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_optimizedtranslation.rst b/classes/zh_CN/class_optimizedtranslation.rst index bd056d8b91..8a55b39630 100644 --- a/classes/zh_CN/class_optimizedtranslation.rst +++ b/classes/zh_CN/class_optimizedtranslation.rst @@ -10,21 +10,21 @@ OptimizedTranslation ==================== -**Inherits:** :ref:`Translation` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Translation` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 经过优化的翻译,由 CSV 翻译默认使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 经过优化的翻译,由 CSV 翻译默认使用。使用实时压缩翻译,从而生成非常小的词典。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_OptimizedTranslation_method_generate: @@ -50,10 +50,10 @@ void **generate** **(** :ref:`Translation` from **)** 从给定的 :ref:`Translation` 资源生成并设置优化的翻译。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_optionbutton.rst b/classes/zh_CN/class_optionbutton.rst index f46f70b360..9f998913a1 100644 --- a/classes/zh_CN/class_optionbutton.rst +++ b/classes/zh_CN/class_optionbutton.rst @@ -10,27 +10,27 @@ OptionButton ============ -**Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 按下时弹出下拉菜单的按钮。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**OptionButton** is a type of button that brings up a dropdown with selectable items when pressed. The item selected becomes the "current" item and is displayed as the button text. +**OptionButton** 是一种按下时弹出下拉菜单的按钮。选中的菜单项会成为“当前”菜单项,作为按钮文本显示。 -See also :ref:`BaseButton` which contains common properties and methods associated with this node. +另见 :ref:`BaseButton`\ ,其中包含与此节点相关联的通用属性和方法。 -\ **Note:** The ID values used for items are limited to 32 bits, not full 64 bits of :ref:`int`. This has a range of ``-2^32`` to ``2^32 - 1``, i.e. ``-2147483648`` to ``2147483647``. +\ **注意:**\ 菜单项的 ID 值有 32 位的限制,并不是完整的 64 位 :ref:`int`\ 。取值范围为 ``-2^32`` 到 ``2^32 - 1``\ ,即 ``-2147483648`` 到 ``2147483647``\ 。 -\ **Note:** The :ref:`Button.text` and :ref:`Button.icon` properties are set automatically based on the selected item. They shouldn't be changed manually. +\ **注意:**\ :ref:`Button.text` 和 :ref:`Button.icon` 属性会根据当前所选菜单项自动设置。不应该手动更改。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -53,8 +53,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -117,59 +117,19 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_color` | ``Color(0.875, 0.875, 0.875, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_disabled_color` | ``Color(0.875, 0.875, 0.875, 0.5)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_focus_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_hover_color` | ``Color(0.95, 0.95, 0.95, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_hover_pressed_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Color` | :ref:`font_pressed_color` | ``Color(1, 1, 1, 1)`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`arrow_margin` | ``4`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`h_separation` | ``4`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`modulate_arrow` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`outline_size` | ``0`` | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Font` | :ref:`font` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`int` | :ref:`font_size` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`Texture2D` | :ref:`arrow` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`disabled` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`disabled_mirrored` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`focus` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`hover` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`hover_mirrored` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`normal` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`normal_mirrored` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`pressed` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ - | :ref:`StyleBox` | :ref:`pressed_mirrored` | | - +-----------------------------------+------------------------------------------------------------------------------------------+-------------------------------------+ + +-----------------------------------+-------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`arrow_margin` | ``4`` | + +-----------------------------------+-------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`modulate_arrow` | ``0`` | + +-----------------------------------+-------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`arrow` | | + +-----------------------------------+-------------------------------------------------------------------------+-------+ .. rst-class:: classref-section-separator @@ -177,8 +137,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_OptionButton_signal_item_focused: @@ -208,8 +168,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_OptionButton_property_allow_reselect: @@ -282,8 +242,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_OptionButton_method_add_icon_item: @@ -619,92 +579,8 @@ void **show_popup** **(** **)** .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- - -.. _class_OptionButton_theme_color_font_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` - -该 **OptionButton** 的默认文本 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_color_font_disabled_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` - -该 **OptionButton** 处于禁用状态时使用的文本 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_color_font_focus_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` - -该 **OptionButton** 处于聚焦状态时使用的文本 :ref:`Color`\ 。只替换按钮的正常文本颜色。禁用、悬停和按下状态优先于这个颜色。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_color_font_hover_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` - -该 **OptionButton** 处于悬停状态时使用的文本 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_color_font_hover_pressed_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` - -该 **OptionButton** 处于悬停且按下状态时使用的文本 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_color_font_outline_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_outline_color** = ``Color(1, 1, 1, 1)`` - -该 **OptionButton** 的文本轮廓的色调。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_color_font_pressed_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_pressed_color** = ``Color(1, 1, 1, 1)`` - -当 **OptionButton** 被按下时使用的文本 :ref:`Color`\ 。 - -.. rst-class:: classref-item-separator - ----- +主题属性说明 +------------ .. _class_OptionButton_theme_constant_arrow_margin: @@ -718,18 +594,6 @@ Theme Property Descriptions ---- -.. _class_OptionButton_theme_constant_h_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **h_separation** = ``4`` - -**OptionButton** 图标与文本之间的水平间距。负值会被当作 ``0`` 使用。 - -.. rst-class:: classref-item-separator - ----- - .. _class_OptionButton_theme_constant_modulate_arrow: .. rst-class:: classref-themeproperty @@ -742,44 +606,6 @@ Theme Property Descriptions ---- -.. _class_OptionButton_theme_constant_outline_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **outline_size** = ``0`` - -文字轮廓的大小。 - -\ **注意:**\ 如果使用启用了 :ref:`FontFile.multichannel_signed_distance_field` 的字体,其 :ref:`FontFile.msdf_pixel_range` 必须至少设置为 :ref:`outline_size` 的\ *两倍*\ ,轮廓渲染才能看起来正确。否则,轮廓可能会比预期的更早被切断。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_font_font: - -.. rst-class:: classref-themeproperty - -:ref:`Font` **font** - -该 **OptionButton** 文本的 :ref:`Font`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_font_size_font_size: - -.. rst-class:: classref-themeproperty - -:ref:`int` **font_size** - -该 **OptionButton** 文本的字体大小。 - -.. rst-class:: classref-item-separator - ----- - .. _class_OptionButton_theme_icon_arrow: .. rst-class:: classref-themeproperty @@ -788,118 +614,10 @@ Theme Property Descriptions 要绘制在按钮右侧的箭头图标。 -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_disabled: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **disabled** - -该 **OptionButton** 处于禁用状态时使用的 :ref:`StyleBox`\ (用于从左至右布局)。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_disabled_mirrored: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **disabled_mirrored** - -该 **OptionButton** 处于禁用状态时使用的 :ref:`StyleBox`\ (用于从右至左布局)。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_focus: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **focus** - -该 **OptionButton** 处于聚焦状态时使用的 :ref:`StyleBox`\ 。\ ``focus`` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,所以应该使用部分透明的 :ref:`StyleBox`\ ,确保基础 :ref:`StyleBox` 仍然可见。代表轮廓或下划线的 :ref:`StyleBox` 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 :ref:`StyleBoxEmpty` 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的可用性,所以出于可访问性的原因,不建议这样做。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_hover: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **hover** - -该 **OptionButton** 处于悬停状态时使用的 :ref:`StyleBox`\ (用于从左至右布局)。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_hover_mirrored: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **hover_mirrored** - -该 **OptionButton** 处于悬停状态时使用的 :ref:`StyleBox`\ (用于从右至左布局)。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_normal: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **normal** - -该 **OptionButton** 的默认 :ref:`StyleBox`\ (用于从左至右布局)。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_normal_mirrored: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **normal_mirrored** - -该 **OptionButton** 的默认 :ref:`StyleBox`\ (用于从右至左布局)。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **pressed** - -该 **OptionButton** 处于按下状态时使用的 :ref:`StyleBox`\ (用于从左至右布局)。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_OptionButton_theme_style_pressed_mirrored: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **pressed_mirrored** - -该 **OptionButton** 处于按下状态时使用的 :ref:`StyleBox`\ (用于从右至左布局)。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_ormmaterial3d.rst b/classes/zh_CN/class_ormmaterial3d.rst index 59b6042987..7e7a65b547 100644 --- a/classes/zh_CN/class_ormmaterial3d.rst +++ b/classes/zh_CN/class_ormmaterial3d.rst @@ -10,28 +10,28 @@ ORMMaterial3D ============= -**Inherits:** :ref:`BaseMaterial3D` **<** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`BaseMaterial3D` **<** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A PBR (Physically Based Rendering) material to be used on 3D objects. Uses an ORM texture. +用于 3D 对象的 PBR(基于物理的渲染)材质。使用一个 ORM 纹理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- ORMMaterial3D 的属性继承自 :ref:`BaseMaterial3D`\ 。与 :ref:`StandardMaterial3D` 不同,ORMMaterial3D 对环境光遮蔽、粗糙度和金属度贴图使用单一纹理,称为 ORM 纹理。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`标准 3D 材质与 ORM 3D 材质 <../tutorials/3d/standard_material_3d>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_os.rst b/classes/zh_CN/class_os.rst index b32f7ba0be..1a53f36f92 100644 --- a/classes/zh_CN/class_os.rst +++ b/classes/zh_CN/class_os.rst @@ -10,14 +10,14 @@ OS == -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 提供对常见操作系统功能的访问。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类封装了与主机操作系统通信的最常见功能,例如视频驱动、延时、环境变量、二进制文件的执行、命令行等。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `操作系统测试演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -190,8 +190,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_OS_RenderingDriver: @@ -295,8 +295,8 @@ DCIM(数码相机图像)目录路径。 .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_OS_property_delta_smoothing: @@ -351,8 +351,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_OS_method_alert: @@ -738,9 +738,9 @@ void **delay_usec** **(** :ref:`int` usec **)** |const| :ref:`PackedStringArray` **get_granted_permissions** **(** **)** |const| -On Android devices: With this function, you can get the list of dangerous permissions that have been granted. +在 Android 设备上:通过该功能,你可以获取已被授予的危险权限列表。 -On macOS (sandboxed applications only): This function returns the list of user selected folders accessible to the application. Use native file dialog to request folder access permission. +在 macOS 上(仅限沙盒应用程序):该函数返回应用程序可访问的用户选择的文件夹列表。使用原生文件对话框请求文件夹访问权限。 .. rst-class:: classref-item-separator @@ -850,23 +850,23 @@ On macOS (sandboxed applications only): This function returns the list of user s :ref:`String` **get_name** **(** **)** |const| -Returns the name of the host OS. +返回主机操作系统的名称。 -On Windows, this is ``"Windows"``. +在 Windows 上为 ``"Windows"``\ 。 -On macOS, this is ``"macOS"``. +在 macOS 上为 ``"macOS"``\ 。 -On Linux-based operating systems, this is ``"Linux"``. +在基于 Linux 的操作系统上为 ``"Linux"``\ 。 -On BSD-based operating systems, this is ``"FreeBSD"``, ``"NetBSD"``, ``"OpenBSD"``, or ``"BSD"`` as a fallback. +在基于 BSD 的操作系统上为 ``"FreeBSD"``\ 、\ ``"NetBSD"``\ 、\ ``"OpenBSD"``, 会使用 ``"BSD"`` 作为回退方案。 -On Android, this is ``"Android"``. +在 Android 上为 ``"Android"``\ 。 -On iOS, this is ``"iOS"``. +在 iOS 上为 ``"iOS"``\ 。 -On the web, this is ``"Web"``. +在 Web 上为 ``"Web"``\ 。 -\ **Note:** Custom builds of the engine may support additional platforms, such as consoles, yielding other return values. +\ **注意:**\ 自定义构建的引擎可能支持其他平台,例如游戏主机,可能返回其他值。 .. tabs:: @@ -900,7 +900,7 @@ On the web, this is ``"Web"``. case "Linux": case "FreeBSD": case "NetBSD": - case "OpenBSD" + case "OpenBSD": case "BSD": GD.Print("Linux/BSD"); break; @@ -953,9 +953,9 @@ On the web, this is ``"Web"``. :ref:`String` **get_processor_name** **(** **)** |const| -Returns the name of the CPU model on the host machine (e.g. "Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz"). +返回主机 CPU 型号的名称(例如 "Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz")。 -\ **Note:** This method is only implemented on Windows, macOS, Linux and iOS. On Android and Web, :ref:`get_processor_name` returns an empty string. +\ **注意:**\ 该方法仅在 Windows、macOS、Linux 和 iOS 上实现。在 Android 和 Web 上,\ :ref:`get_processor_name` 返回空字符串。 .. rst-class:: classref-item-separator @@ -1085,11 +1085,11 @@ Returns the name of the CPU model on the host machine (e.g. "Intel(R) Core(TM) i :ref:`String` **get_unique_id** **(** **)** |const| -Returns a string that is unique to the device. +返回特定于该设备的一个字符串。 -\ **Note:** This string may change without notice if the user reinstalls/upgrades their operating system or changes their hardware. This means it should generally not be used to encrypt persistent data as the data saved before an unexpected ID change would become inaccessible. The returned string may also be falsified using external programs, so do not rely on the string returned by :ref:`get_unique_id` for security purposes. +\ **注意:**\ 如果用户重新安装/升级他们的操作系统或更改他们的硬件,该字符串可能会更改,恕不另行通知。这意味着它通常不应用于加密持久数据,因为在意外的 ID 更改会使之前保存的数据将变得不可访问。返回的字符串也可能会被外部程序伪造,因此出于安全目的,不要依赖 :ref:`get_unique_id` 返回的字符串。 -\ **Note:** Returns an empty string on Web, as this method isn't implemented on this platform yet. +\ **注意:**\ 在 Web 上返回一个空字符串,因为该方法尚未在该平台上实现。 .. rst-class:: classref-item-separator @@ -1127,17 +1127,17 @@ Returns a string that is unique to the device. :ref:`String` **get_version** **(** **)** |const| -Returns the exact production and build version of the operating system. This is different from the branded version used in marketing. This helps to distinguish between different releases of operating systems, including minor versions, and insider and custom builds. +返回操作系统的确切生产和构建版本。这与营销中使用的品牌版本不同。这有助于区分操作系统的不同版本,包括次要版本、内部版本和自定义版本。 -For Windows, the major and minor version are returned, as well as the build number. For example, the returned string can look like ``10.0.9926`` for a build of Windows 10, and it can look like ``6.1.7601`` for a build of Windows 7 SP1. +对于 Windows,返回主要和次要版本,以及构建号。例如,对于 Windows 10 版本,返回的字符串可能看起来像 ``10.0.9926``\ ,对于 Windows 7 SP1 版本,它可能看起来像 ``6.1.7601``\ 。 -For rolling distributions, such as Arch Linux, an empty string is returned. +对于滚动发行版,例如 Arch Linux,会返回一个空字符串。 -For macOS and iOS, the major and minor version are returned, as well as the patch number. +对于 macOS 和 iOS,会返回主要和次要版本,以及补丁号。 -For Android, the SDK version and the incremental build number are returned. If it's a custom ROM, it attempts to return its version instead. +对于 Android,会返回 SDK 版本和增量构建号。如果是自定义的 ROM,将会尝试返回其版本。 -\ **Note:** This method is not supported on the web platform. It returns an empty string. +\ **注意:**\ 该方法在 web 平台上不被支持。它将返回一个空字符串。 .. rst-class:: classref-item-separator @@ -1181,12 +1181,14 @@ For Android, the SDK version and the incremental build number are returned. If i :ref:`bool` **has_feature** **(** :ref:`String` tag_name **)** |const| -如果当前运行的实例支持给定功能标签的功能,则返回 ``true``\ ,具体取决于平台、构建等。可用于检查当前是否正在运行调试构建,是否在某个平台或架构上,等等。请参阅\ :doc:`《功能标签》 <../tutorials/export/feature_tags>`\ 文档以了解更多详细信息。 +如果当前运行的实例支持给定功能标签的功能,则返回 ``true``\ ,具体取决于平台、构建等。可用于检查当前是否正在运行调试构建,是否在某个平台或架构上,等等。详情见\ :doc:`《功能标签》 <../tutorials/export/feature_tags>`\ 文档。 \ **注意:**\ 标签名称区分大小写。 \ **注意:**\ 在 Web 平台上,会定义 ``web_android``\ 、\ ``web_ios``\ 、\ ``web_linuxbsd``\ 、\ ``web_macos``\ 、\ ``web_windows`` 的其中之一,表示宿主平台。 +\ **注意:**\ 在 iOS 模拟器中,还会定义 ``simulator`` 标签。 + .. rst-class:: classref-item-separator ---- @@ -1253,9 +1255,9 @@ For Android, the SDK version and the incremental build number are returned. If i :ref:`bool` **is_sandboxed** **(** **)** |const| -Returns ``true`` if application is running in the sandbox. +如果应用程序在沙箱中运行,则返回 ``true``\ 。 -\ **Note:** This method is implemented on macOS and Linux. +\ **注意:**\ 该方法在 macOS 和 Linux 上实现。 .. rst-class:: classref-item-separator @@ -1392,7 +1394,7 @@ void **open_midi_inputs** **(** **)** void **revoke_granted_permissions** **(** **)** -On macOS (sandboxed applications only), this function clears list of user selected folders accessible to the application. +在 macOS(仅限沙盒应用程序)上,该功能会清除应用程序可访问的用户选择的文件夹列表。 .. rst-class:: classref-item-separator @@ -1420,7 +1422,7 @@ void **set_restart_on_exit** **(** :ref:`bool` restart, :ref:`Packed 如果 ``restart`` 为 ``true``\ ,则项目在使用 :ref:`SceneTree.quit` 或 :ref:`Node.NOTIFICATION_WM_CLOSE_REQUEST` 退出时,会自动重新启动。可以提供命令行 ``arguments``\ 。要使用最初用于运行项目的命令行参数重新启动项目,请将 :ref:`get_cmdline_args` 作为 ``arguments`` 的值传递。 -\ :ref:`set_restart_on_exit` 可用于应用需要重新启动的设置更改。另请参见 :ref:`is_restart_on_exit_set` 和 :ref:`get_restart_on_exit_arguments`\ 。 +\ :ref:`set_restart_on_exit` 可用于应用需要重新启动的设置更改。另见 :ref:`is_restart_on_exit_set` 和 :ref:`get_restart_on_exit_arguments`\ 。 \ **注意:**\ 该方法只在桌面平台上有效,并且只在项目不是从编辑器启动时有效。不会影响移动和 Web 平台,或者当项目从编辑器启动时。 @@ -1506,10 +1508,10 @@ void **unset_environment** **(** :ref:`String` variable **)** |con \ **注意:**\ 环境变量名称在除 Windows 以外的所有平台上都区分大小写。\ ``variable`` 名称不能为空或包含 ``=`` 字符。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packedbytearray.rst b/classes/zh_CN/class_packedbytearray.rst index d2332b7bc0..f4dbe9a0e8 100644 --- a/classes/zh_CN/class_packedbytearray.rst +++ b/classes/zh_CN/class_packedbytearray.rst @@ -14,8 +14,8 @@ PackedByteArray .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 专门设计用于存放字节的数组。数据是紧密存放的,因此能够在数组较大时节省内存。 @@ -23,12 +23,12 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -43,8 +43,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -171,8 +171,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -193,8 +193,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_PackedByteArray_constructor_PackedByteArray: @@ -230,8 +230,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PackedByteArray_method_append: @@ -483,7 +483,7 @@ void **clear** **(** **)** 返回新的 **PackedByteArray**\ ,其中的数据已解压。请将压缩模式设置为 :ref:`CompressionMode` 常量。\ **这个方法只接受 brotli、gzip 和 deflate 压缩模式。**\ -这个方法可能比 ``decompress`` 慢,因为在解压时可能需要多次重新分配输出缓冲区,而 ``decompress`` 则在一开始就知道输出缓冲区的大小。 +这个方法可能比 :ref:`decompress` 慢,因为在解压时可能需要多次重新分配输出缓冲区,而 :ref:`decompress` 则在一开始就知道输出缓冲区的大小。 GZIP 的最大压缩率为 1032:1,这意味着较小的压缩后负载很有可能解压出非常巨大的输出。为了防止这种情况,你可以通过 ``max_output_size`` 提供允许这个函数分配的最大字节数。传入 -1 则不限制输出。传入正数且解压超过该字节数时,会返回错误。 @@ -677,7 +677,7 @@ void **fill** **(** :ref:`int` value **)** :ref:`String` **get_string_from_ascii** **(** **)** |const| -将 ASCII/Latin-1 编码的数组转换为 :ref:`String`\ 。如果内容仅为 ASCII/Latin-1,则是比 :ref:`get_string_from_utf8` 更快的选择。与 UTF-8 函数不同,这个函数会将数组中的每个字节都映射到一个字符。多字节序列无法正确解析。要解析用户的输入内容,请始终使用 :ref:`get_string_from_utf8`\ 。 +将 ASCII/Latin-1 编码的数组转换为 :ref:`String`\ 。如果内容仅为 ASCII/Latin-1,则是比 :ref:`get_string_from_utf8` 更快的选择。与 UTF-8 函数不同,这个函数会将数组中的每个字节都映射到一个字符。多字节序列无法正确解析。要解析用户的输入内容,请始终使用 :ref:`get_string_from_utf8`\ 。这是 :ref:`String.to_ascii_buffer` 的逆运算。 .. rst-class:: classref-item-separator @@ -689,7 +689,7 @@ void **fill** **(** :ref:`int` value **)** :ref:`String` **get_string_from_utf8** **(** **)** |const| -将 UTF-8 编码的数组转换为 :ref:`String`\ 。比 :ref:`get_string_from_ascii` 慢,但支持 UTF-8 编码的数据。不确定数据来源时请使用此函数。对于用户的输入内容,应始终首选此函数。如果源数组不是有效的 UTF-8 字符串,则返回空字符串。 +将 UTF-8 编码的数组转换为 :ref:`String`\ 。比 :ref:`get_string_from_ascii` 慢,但支持 UTF-8 编码的数据。不确定数据来源时请使用此函数。对于用户的输入内容,应始终首选此函数。如果源数组不是有效的 UTF-8 字符串,则返回空字符串。这是 :ref:`String.to_utf8_buffer` 的逆运算。 .. rst-class:: classref-item-separator @@ -701,7 +701,7 @@ void **fill** **(** :ref:`int` value **)** :ref:`String` **get_string_from_utf16** **(** **)** |const| -将 UTF-16 编码的数组转换为 :ref:`String`\ 。如果缺少 BOM,则假定为系统字节序。如果源数组不是有效的 UTF-16 字符串,则返回空字符串。 +将 UTF-16 编码的数组转换为 :ref:`String`\ 。如果缺少 BOM,则假定为系统字节序。如果源数组不是有效的 UTF-16 字符串,则返回空字符串。这是 :ref:`String.to_utf16_buffer` 的逆运算。 .. rst-class:: classref-item-separator @@ -713,7 +713,7 @@ void **fill** **(** :ref:`int` value **)** :ref:`String` **get_string_from_utf32** **(** **)** |const| -将 UTF-32 编码的数组转换为 :ref:`String`\ 。假定为系统字节序。如果源数组不是有效的 UTF-32 字符串,则返回空字符串。 +将 UTF-32 编码的数组转换为 :ref:`String`\ 。假定为系统字节序。如果源数组不是有效的 UTF-32 字符串,则返回空字符串。这是 :ref:`String.to_utf32_buffer` 的逆运算。 .. rst-class:: classref-item-separator @@ -725,7 +725,7 @@ void **fill** **(** :ref:`int` value **)** :ref:`String` **get_string_from_wchar** **(** **)** |const| -将宽字符(\ ``wchar_t``\ ,在 Windows 上为 UTF-16,在其他平台上为 UTF-32)编码的数组转换为 :ref:`String`\ 。如果源数组不是有效的宽字符串,则返回空字符串。 +将宽字符(\ ``wchar_t``\ ,在 Windows 上为 UTF-16,在其他平台上为 UTF-32)编码的数组转换为 :ref:`String`\ 。如果源数组不是有效的宽字符串,则返回空字符串。这是 :ref:`String.to_wchar_buffer` 的逆运算。 .. rst-class:: classref-item-separator @@ -749,7 +749,7 @@ void **fill** **(** :ref:`int` value **)** :ref:`bool` **has_encoded_var** **(** :ref:`int` byte_offset, :ref:`bool` allow_objects=false **)** |const| -Returns ``true`` if a valid :ref:`Variant` value can be decoded at the ``byte_offset``. Returns ``false`` otherwise or when the value is :ref:`Object`-derived and ``allow_objects`` is ``false``. +如果可以从字节偏移量 ``byte_offset`` 处解码出有效的 :ref:`Variant`\ ,则返回 ``true``\ 。其他情况,或者当该值派生自 :ref:`Object` 而 ``allow_objects`` 为 ``false`` 时,则返回 ``false``\ 。 .. rst-class:: classref-item-separator @@ -984,8 +984,8 @@ void **sort** **(** **)** .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_PackedByteArray_operator_neq_PackedByteArray: @@ -1033,10 +1033,10 @@ Operator Descriptions 请注意,返回的字节是 64 位 :ref:`int`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packedcolorarray.rst b/classes/zh_CN/class_packedcolorarray.rst index cce1b23d0d..468bbb7903 100644 --- a/classes/zh_CN/class_packedcolorarray.rst +++ b/classes/zh_CN/class_packedcolorarray.rst @@ -14,19 +14,19 @@ PackedColorArray .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 专门设计用于存放 :ref:`Color` 的数组。数据是紧密存放的,因此能够在数组较大时节省内存。 .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -41,8 +41,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -93,8 +93,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -115,8 +115,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_PackedColorArray_constructor_PackedColorArray: @@ -158,8 +158,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PackedColorArray_method_append: @@ -421,8 +421,8 @@ void **sort** **(** **)** .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_PackedColorArray_operator_neq_PackedColorArray: @@ -468,10 +468,10 @@ Operator Descriptions 返回索引 ``index`` 处的\ :ref:`Color`\ 。负数索引可以从末端开始访问元素。使用超出数组范围的索引将导致出错。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packeddatacontainer.rst b/classes/zh_CN/class_packeddatacontainer.rst index 8e3e07dfd2..8169126d4f 100644 --- a/classes/zh_CN/class_packeddatacontainer.rst +++ b/classes/zh_CN/class_packeddatacontainer.rst @@ -10,14 +10,14 @@ PackedDataContainer =================== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 将 :ref:`Array` 或 :ref:`Dictionary` 进行高效打包和序列化。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **PackedDataContainer** 可以高效地保存未指定类型的容器中的数据。数据会以原始字节的形式打包,能够保存到文件中。只有 :ref:`Array` 和 :ref:`Dictionary` 能够这样存储。 @@ -45,8 +45,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -63,8 +63,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PackedDataContainer_method_pack: @@ -88,10 +88,10 @@ Method Descriptions 返回打包后容器的大小(见 :ref:`Array.size` 和 :ref:`Dictionary.size`\ )。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packeddatacontainerref.rst b/classes/zh_CN/class_packeddatacontainerref.rst index 0b62c2abce..ee8ee0fde5 100644 --- a/classes/zh_CN/class_packeddatacontainerref.rst +++ b/classes/zh_CN/class_packeddatacontainerref.rst @@ -10,14 +10,14 @@ PackedDataContainerRef ====================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` :ref:`PackedDataContainer` 使用的内部类,用于打包嵌套的数组和字典。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 使用 :ref:`PackedDataContainer` 打包嵌套容器时,会将其递归打包进 **PackedDataContainerRef**\ (仅适用于 :ref:`Array` 和 :ref:`Dictionary`\ )。获取数据的方法和 :ref:`PackedDataContainer` 相同。 @@ -45,8 +45,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -61,8 +61,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PackedDataContainerRef_method_size: @@ -72,10 +72,10 @@ Method Descriptions 返回打包后容器的大小(见 :ref:`Array.size` 和 :ref:`Dictionary.size`\ )。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packedfloat32array.rst b/classes/zh_CN/class_packedfloat32array.rst index 2f66ffe5e1..3f47db80a4 100644 --- a/classes/zh_CN/class_packedfloat32array.rst +++ b/classes/zh_CN/class_packedfloat32array.rst @@ -14,8 +14,8 @@ PackedFloat32Array .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 专门设计用于存放 32 位浮点值(float)的数组。数据是紧密存放的,因此能够在数组较大时节省内存。 @@ -23,12 +23,12 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -43,8 +43,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -95,8 +95,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -117,8 +117,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_PackedFloat32Array_constructor_PackedFloat32Array: @@ -154,8 +154,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PackedFloat32Array_method_append: @@ -431,8 +431,8 @@ void **sort** **(** **)** .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_PackedFloat32Array_operator_neq_PackedFloat32Array: @@ -480,10 +480,10 @@ Operator Descriptions 请注意,\ :ref:`float` 类型是 64 位的,这与存储在数组中的值不同。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packedfloat64array.rst b/classes/zh_CN/class_packedfloat64array.rst index 5728207f14..74968e9e98 100644 --- a/classes/zh_CN/class_packedfloat64array.rst +++ b/classes/zh_CN/class_packedfloat64array.rst @@ -14,8 +14,8 @@ PackedFloat64Array .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 专门设计用于存放 64 位浮点值(double)的数组。数据是紧密存放的,因此能够在数组较大时节省内存。 @@ -23,12 +23,12 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -43,8 +43,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -95,8 +95,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -117,8 +117,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_PackedFloat64Array_constructor_PackedFloat64Array: @@ -154,8 +154,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PackedFloat64Array_method_append: @@ -431,8 +431,8 @@ void **sort** **(** **)** .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_PackedFloat64Array_operator_neq_PackedFloat64Array: @@ -478,10 +478,10 @@ Operator Descriptions 返回索引 ``index`` 处的 :ref:`float`\ 。负数索引可以从末尾开始访问元素。使用超出数组范围的索引会导致出错。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packedint32array.rst b/classes/zh_CN/class_packedint32array.rst index 7820b63ac8..155be599c1 100644 --- a/classes/zh_CN/class_packedint32array.rst +++ b/classes/zh_CN/class_packedint32array.rst @@ -14,8 +14,8 @@ PackedInt32Array .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 专门设计用于存放 32 位整数值的数组。数据是紧密存放的,因此能够在数组较大时节省内存。 @@ -23,12 +23,12 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -43,8 +43,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -95,8 +95,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -117,8 +117,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_PackedInt32Array_constructor_PackedInt32Array: @@ -154,8 +154,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PackedInt32Array_method_append: @@ -419,8 +419,8 @@ void **sort** **(** **)** .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_PackedInt32Array_operator_neq_PackedInt32Array: @@ -468,10 +468,10 @@ Operator Descriptions 注意,\ :ref:`int` 类型为 64 位,与该数组中所存储的值不同。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packedint64array.rst b/classes/zh_CN/class_packedint64array.rst index d12275ad56..a3f0044e76 100644 --- a/classes/zh_CN/class_packedint64array.rst +++ b/classes/zh_CN/class_packedint64array.rst @@ -14,8 +14,8 @@ PackedInt64Array .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 专门设计用于存放 64 位整数值的数组。数据是紧密存放的,因此能够在数组较大时节省内存。 @@ -23,12 +23,12 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -43,8 +43,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -95,8 +95,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -117,8 +117,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_PackedInt64Array_constructor_PackedInt64Array: @@ -154,8 +154,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PackedInt64Array_method_append: @@ -419,8 +419,8 @@ void **sort** **(** **)** .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_PackedInt64Array_operator_neq_PackedInt64Array: @@ -466,10 +466,10 @@ Operator Descriptions 返回索引 ``index`` 处的 :ref:`int`\ 。负数索引可以用来从末尾开始访问元素。使用越界的数组索引会产生错误。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packedscene.rst b/classes/zh_CN/class_packedscene.rst index 07a0279c00..260b32d9d1 100644 --- a/classes/zh_CN/class_packedscene.rst +++ b/classes/zh_CN/class_packedscene.rst @@ -10,14 +10,14 @@ PackedScene =========== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 对序列化场景的抽象。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 场景文件的简化接口。提供可以对场景资源本身进行的操作和检查。 @@ -46,7 +46,7 @@ Description -\ **保存不同所有者的节点的示例:**\ 下面的粒子会创建 3 个对象:\ :ref:`Node2D`\ (\ ``node``\ )、\ :ref:`RigidBody2D`\ (\ ``body``\ )、\ :ref:`CollisionObject2D`\ (\ ``collision``))。\ ``node`` 的下一级是 ``body``\ ,再下一级是 ``collision``\ 。只有 ``body`` 被 ``node`` 拥有,因此 ``pack`` 只会保存两个节点,不会保存 ``collision``\ 。 +\ **保存不同所有者的节点的示例:**\ 下面的粒子会创建 3 个对象:\ :ref:`Node2D`\ (\ ``node``\ )、\ :ref:`RigidBody2D`\ (\ ``body``\ )、\ :ref:`CollisionObject2D`\ (\ ``collision``))。\ ``node`` 的下一级是 ``body``\ ,再下一级是 ``collision``\ 。只有 ``body`` 被 ``node`` 拥有,因此 :ref:`pack` 只会保存两个节点,不会保存 ``collision``\ 。 .. tabs:: @@ -103,15 +103,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `2D 角色扮演游戏演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -122,8 +122,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -144,8 +144,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_PackedScene_GenEditState: @@ -197,8 +197,8 @@ enum **GenEditState**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PackedScene_property__bundled: @@ -216,8 +216,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PackedScene_method_can_instantiate: @@ -237,7 +237,7 @@ Method Descriptions :ref:`SceneState` **get_state** **(** **)** |const| -返回代表场景文件内容的 ``SceneState``\ 。 +返回代表场景文件内容的 :ref:`SceneState`\ 。 .. rst-class:: classref-item-separator @@ -263,10 +263,10 @@ Method Descriptions 包将忽略不属于给定节点的任何子节点。请参阅 :ref:`Node.owner`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packedstringarray.rst b/classes/zh_CN/class_packedstringarray.rst index f5297e42dd..10afb334f9 100644 --- a/classes/zh_CN/class_packedstringarray.rst +++ b/classes/zh_CN/class_packedstringarray.rst @@ -14,8 +14,8 @@ PackedStringArray .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 专门设计用于存放 :ref:`String` 的数组。数据是紧密存放的,因此能够在数组较大时节省内存。 @@ -29,19 +29,19 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `操作系统测试演示 `__ .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -56,8 +56,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -108,8 +108,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -130,8 +130,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_PackedStringArray_constructor_PackedStringArray: @@ -167,8 +167,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PackedStringArray_method_append: @@ -430,8 +430,8 @@ void **sort** **(** **)** .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_PackedStringArray_operator_neq_PackedStringArray: @@ -477,10 +477,10 @@ Operator Descriptions 返回索引为 ``index`` 的 :ref:`String`\ 。负数索引能从末尾开始访问元素。使用数组范围外的索引会导致出错。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packedvector2array.rst b/classes/zh_CN/class_packedvector2array.rst index 9d5ba103fb..1eae899030 100644 --- a/classes/zh_CN/class_packedvector2array.rst +++ b/classes/zh_CN/class_packedvector2array.rst @@ -14,26 +14,26 @@ PackedVector2Array .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 专门设计用于存放 :ref:`Vector2` 的数组。数据是紧密存放的,因此能够在数组较大时节省内存。 .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `2D 导航 Astar 演示 `__ .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -48,8 +48,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -100,8 +100,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -124,8 +124,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_PackedVector2Array_constructor_PackedVector2Array: @@ -167,8 +167,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PackedVector2Array_method_append: @@ -442,8 +442,8 @@ void **sort** **(** **)** .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_PackedVector2Array_operator_neq_PackedVector2Array: @@ -463,7 +463,11 @@ Operator Descriptions :ref:`PackedVector2Array` **operator *** **(** :ref:`Transform2D` right **)** -使用 :ref:`Transform2D` 矩阵对数组中的所有向量进行变换(相乘)。 +返回一个新的 **PackedVector2Array**\ ,该数组中的所有向量都通过给定的 :ref:`Transform2D` 变换矩阵进行逆变换(乘以),假设该变换的基是正交的(即旋转/反射可以,缩放/倾斜则不然)。 + +\ ``array * transform`` 相当于 ``transform.inverse() * array``\ 。请参阅 :ref:`Transform2D.inverse`\ 。 + +对于通过仿射变换的逆进行变换(例如缩放),可以使用 ``transform.affine_inverse() * array`` 代替。请参阅 :ref:`Transform2D.affine_inverse`\ 。 .. rst-class:: classref-item-separator @@ -501,10 +505,10 @@ Operator Descriptions 返回索引为 ``index`` 的 :ref:`Vector2`\ 。负数索引能从末尾开始访问元素。使用数组范围外的索引会导致出错。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packedvector3array.rst b/classes/zh_CN/class_packedvector3array.rst index 7028afd13c..fe2780f4c2 100644 --- a/classes/zh_CN/class_packedvector3array.rst +++ b/classes/zh_CN/class_packedvector3array.rst @@ -14,19 +14,19 @@ PackedVector3Array .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 专门设计用于存放 :ref:`Vector3` 的数组。数据是紧密存放的,因此能够在数组较大时节省内存。 .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -41,8 +41,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -93,8 +93,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -117,8 +117,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_PackedVector3Array_constructor_PackedVector3Array: @@ -160,8 +160,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PackedVector3Array_method_append: @@ -435,8 +435,8 @@ void **sort** **(** **)** .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_PackedVector3Array_operator_neq_PackedVector3Array: @@ -456,7 +456,11 @@ Operator Descriptions :ref:`PackedVector3Array` **operator *** **(** :ref:`Transform3D` right **)** -使用 :ref:`Transform3D` 矩阵对该数组中的所有向量进行变换(相乘)。 +返回一个新的 **PackedVector3Array**\ ,该数组中的所有向量都通过给定的 :ref:`Transform3D` 变换矩阵进行逆变换(乘以),假设该变换的基是正交的(即旋转/反射可以,缩放/倾斜则不然)。 + +\ ``array * transform`` 相当于 ``transform.inverse() * array``\ 。请参阅 :ref:`Transform3D.inverse`\ 。 + +对于通过仿射变换的逆进行变换(例如缩放),可以使用 ``transform.affine_inverse() * array`` 代替。请参阅 :ref:`Transform3D.affine_inverse`\ 。 .. rst-class:: classref-item-separator @@ -494,10 +498,10 @@ Operator Descriptions 返回索引为 ``index`` 的 :ref:`Vector3`\ 。负数索引能从末尾开始访问元素。使用数组范围外的索引会导致出错。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packetpeer.rst b/classes/zh_CN/class_packetpeer.rst index 8cb4fbdd6e..45edc95bcc 100644 --- a/classes/zh_CN/class_packetpeer.rst +++ b/classes/zh_CN/class_packetpeer.rst @@ -10,16 +10,16 @@ PacketPeer ========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`ENetPacketPeer`, :ref:`MultiplayerPeer`, :ref:`PacketPeerDTLS`, :ref:`PacketPeerExtension`, :ref:`PacketPeerStream`, :ref:`PacketPeerUDP`, :ref:`WebRTCDataChannel`, :ref:`WebSocketPeer` +**派生:** :ref:`ENetPacketPeer`, :ref:`MultiplayerPeer`, :ref:`PacketPeerDTLS`, :ref:`PacketPeerExtension`, :ref:`PacketPeerStream`, :ref:`PacketPeerUDP`, :ref:`WebRTCDataChannel`, :ref:`WebSocketPeer` 基于包的协议的抽象和基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- PacketPeer 是基于数据包的协议(如 UDP)的抽象和基类。它提供了用于发送和接收数据包的 API,可以发送原始数据或变量。这使得在协议之间传输数据变得容易,不必将数据编码为低级字节或担心网络排序问题。 @@ -27,8 +27,8 @@ PacketPeer 是基于数据包的协议(如 UDP)的抽象和基类。它提 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -65,8 +65,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PacketPeer_property_encode_buffer_max_size: @@ -81,7 +81,7 @@ Property Descriptions 编码 :ref:`Variant` 时允许的最大缓冲区大小。提高此值以支持更大的内存分配。 -\ :ref:`put_var` 方法在栈上分配内存,使用的缓冲区将自动增长到最接近的二次方,以匹配 :ref:`Variant` 的大小。如果 :ref:`Variant` 大于 ``encode_buffer_max_size``\ ,则该方法将以 :ref:`@GlobalScope.ERR_OUT_OF_MEMORY` 出错。 +\ :ref:`put_var` 方法在栈上分配内存,使用的缓冲区将自动增长到最接近的二次方,以匹配 :ref:`Variant` 的大小。如果 :ref:`Variant` 大于 :ref:`encode_buffer_max_size`\ ,则该方法将以 :ref:`@GlobalScope.ERR_OUT_OF_MEMORY` 出错。 .. rst-class:: classref-section-separator @@ -89,8 +89,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PacketPeer_method_get_available_packet_count: @@ -166,10 +166,10 @@ Method Descriptions 在内部,这使用与 :ref:`@GlobalScope.var_to_bytes` 方法相同的编码机制。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packetpeerdtls.rst b/classes/zh_CN/class_packetpeerdtls.rst index be84936c97..db7394cf8b 100644 --- a/classes/zh_CN/class_packetpeerdtls.rst +++ b/classes/zh_CN/class_packetpeerdtls.rst @@ -10,14 +10,14 @@ PacketPeerDTLS ============== -**Inherits:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` DTLS 数据包客户端。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类表示 DTLS 对等体连接。它可以用来连接到 DTLS 服务器,由 :ref:`DTLSServer.take_connection` 返回。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_PacketPeerDTLS_Status: @@ -104,8 +104,8 @@ enum **Status**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PacketPeerDTLS_method_connect_to_peer: @@ -151,10 +151,10 @@ void **poll** **(** **)** 轮询连接以检查传入的数据包。经常调用此选项以更新状态并保持连接正常工作。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packetpeerextension.rst b/classes/zh_CN/class_packetpeerextension.rst index 7b576b0caf..49c6b7398c 100644 --- a/classes/zh_CN/class_packetpeerextension.rst +++ b/classes/zh_CN/class_packetpeerextension.rst @@ -10,29 +10,29 @@ PacketPeerExtension =================== -**Inherits:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_available_packet_count` **(** **)** |virtual| |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_max_packet_size` **(** **)** |virtual| |const| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_get_packet` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_put_packet` **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| | - +---------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_available_packet_count` **(** **)** |virtual| |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_max_packet_size` **(** **)** |virtual| |const| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_get_packet` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_put_packet` **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| | + +---------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -40,10 +40,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_PacketPeerExtension_method__get_available_packet_count: +.. _class_PacketPeerExtension_private_method__get_available_packet_count: .. rst-class:: classref-method @@ -51,13 +51,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PacketPeerExtension_method__get_max_packet_size: +.. _class_PacketPeerExtension_private_method__get_max_packet_size: .. rst-class:: classref-method @@ -65,13 +65,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PacketPeerExtension_method__get_packet: +.. _class_PacketPeerExtension_private_method__get_packet: .. rst-class:: classref-method @@ -79,13 +79,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PacketPeerExtension_method__put_packet: +.. _class_PacketPeerExtension_private_method__put_packet: .. rst-class:: classref-method @@ -93,12 +93,12 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packetpeerstream.rst b/classes/zh_CN/class_packetpeerstream.rst index c6819ac3e0..bd583e4a99 100644 --- a/classes/zh_CN/class_packetpeerstream.rst +++ b/classes/zh_CN/class_packetpeerstream.rst @@ -10,14 +10,14 @@ PacketPeerStream ================ -**Inherits:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` 在 StreamPeer 上使用 PacketPeer 的包装器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- PacketStreamPeer 提供了一个在流中使用数据包的包装器。这样就能够在基于数据包的代码中使用 StreamPeer。PacketPeerStream 在 StreamPeer 的基础上实现了自定义协议,因此用户不应该直接读取或写入被包装的 StreamPeer。 @@ -25,8 +25,8 @@ PacketStreamPeer 提供了一个在流中使用数据包的包装器。这样就 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PacketPeerStream_property_input_buffer_max_size: @@ -61,7 +61,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -80,7 +80,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -99,10 +99,10 @@ Property Descriptions 被包装的 :ref:`StreamPeer` 对象。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_packetpeerudp.rst b/classes/zh_CN/class_packetpeerudp.rst index 777d1a27c1..11d1f4f1c9 100644 --- a/classes/zh_CN/class_packetpeerudp.rst +++ b/classes/zh_CN/class_packetpeerudp.rst @@ -10,14 +10,14 @@ PacketPeerUDP ============= -**Inherits:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` UDP 数据包客户端。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- UDP 数据包对等体。可用于发送原始 UDP 数据包,也可以发送 :ref:`Variant`\ 。 @@ -25,8 +25,8 @@ UDP 数据包对等体。可用于发送原始 UDP 数据包,也可以发送 : .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -65,8 +65,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PacketPeerUDP_method_bind: @@ -273,10 +273,10 @@ void **set_broadcast_enabled** **(** :ref:`bool` enabled **)** -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_panel.rst b/classes/zh_CN/class_panel.rst index f27a53e516..d0221faa30 100644 --- a/classes/zh_CN/class_panel.rst +++ b/classes/zh_CN/class_panel.rst @@ -10,21 +10,21 @@ Panel ===== -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 显示 :ref:`StyleBox` 的 GUI 控件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **Panel** 是一种显示 :ref:`StyleBox` 的 GUI 控件。另见 :ref:`PanelContainer`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `2D 角色扮演游戏演示 `__ @@ -34,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -50,8 +50,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_Panel_theme_style_panel: @@ -61,10 +61,10 @@ Theme Property Descriptions 该控件的 :ref:`StyleBox`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_panelcontainer.rst b/classes/zh_CN/class_panelcontainer.rst index 35cb6b8d4e..bb49eca2c0 100644 --- a/classes/zh_CN/class_panelcontainer.rst +++ b/classes/zh_CN/class_panelcontainer.rst @@ -10,23 +10,23 @@ PanelContainer ============== -**Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`ScriptEditor` +**派生:** :ref:`ScriptEditor` 保证子控件在 :ref:`StyleBox` 区域内的容器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 保证子控件在 :ref:`StyleBox` 区域内的容器。可用来为控件提供轮廓。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` @@ -34,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +46,8 @@ Properties .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -62,8 +62,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_PanelContainer_theme_style_panel: @@ -73,10 +73,10 @@ Theme Property Descriptions **PanelContainer** 的背景样式。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_panoramaskymaterial.rst b/classes/zh_CN/class_panoramaskymaterial.rst index 4bba782b46..0e034638b3 100644 --- a/classes/zh_CN/class_panoramaskymaterial.rst +++ b/classes/zh_CN/class_panoramaskymaterial.rst @@ -10,25 +10,25 @@ PanoramaSkyMaterial =================== -**Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A material that provides a special texture to a :ref:`Sky`, usually an HDR panorama. +为 :ref:`Sky` 提供特殊纹理的材质,通常是 HDR 全景图。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A resource referenced in a :ref:`Sky` that is used to draw a background. **PanoramaSkyMaterial** functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a :ref:`Cubemap`. +在 :ref:`Sky` 中引用的用于绘制背景的资源。\ **PanoramaSkyMaterial** 的功能类似于其他引擎的天空盒,区别在于它使用的是等距圆柱投影的天空贴图而不是 :ref:`Cubemap`\ 。 -Using an HDR panorama is strongly recommended for accurate, high-quality reflections. Godot supports the Radiance HDR (``.hdr``) and OpenEXR (``.exr``) image formats for this purpose. +强烈建议使用 HDR 全景图,能够得到准确、高质量的反射。为此,Godot 支持 Radiance HDR(\ ``.hdr``\ )和 OpenEXR(\ ``.exr``\ )图像格式。 -You can use `this tool `__ to convert a cubemap to an equirectangular sky map. +你可以使用\ `这个工具 `__\ 将立方体贴图转换为等距圆柱投影的天空贴图。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PanoramaSkyMaterial_property_filter: @@ -78,10 +78,10 @@ Property Descriptions 应用于该 **PanoramaSkyMaterial** 的 :ref:`Texture2D`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_parallaxbackground.rst b/classes/zh_CN/class_parallaxbackground.rst index e6a15069c8..a44b3a0353 100644 --- a/classes/zh_CN/class_parallaxbackground.rst +++ b/classes/zh_CN/class_parallaxbackground.rst @@ -10,14 +10,14 @@ ParallaxBackground ================== -**Inherits:** :ref:`CanvasLayer` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`CanvasLayer` **<** :ref:`Node` **<** :ref:`Object` 用于创建视差滚动背景的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- ParallaxBackground 使用一个或多个 :ref:`ParallaxLayer` 子节点来创建视差效果。每个 :ref:`ParallaxLayer` 可以使用 :ref:`ParallaxLayer.motion_offset` 以不同的速度移动。这在 2D 游戏中可以创造一种深度错觉。如果没有与 :ref:`Camera2D` 一起使用,你必须手动计算 :ref:`scroll_offset`\ 。 @@ -25,8 +25,8 @@ ParallaxBackground 使用一个或多个 :ref:`ParallaxLayer` value **)** - :ref:`Vector2` **get_scroll_offset** **(** **)** -视差背景的滚动值。使用 :ref:`Camera2D` 时会自动计算,但也可用于手动管理无摄像机时的滚动。 +视差背景的滚动值。使用 :ref:`Camera2D` 时会自动计算,但也可用于手动管理无相机时的滚动。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_parallaxlayer.rst b/classes/zh_CN/class_parallaxlayer.rst index 4bfcfef9cb..2b8b796a3e 100644 --- a/classes/zh_CN/class_parallaxlayer.rst +++ b/classes/zh_CN/class_parallaxlayer.rst @@ -10,14 +10,14 @@ ParallaxLayer ============= -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 使用 :ref:`ParallaxBackground` 的视差滚动层。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- ParallaxLayer 必须是 :ref:`ParallaxBackground` 节点的子节点。每个 ParallaxLayer 都可以设置为相对于相机移动或 :ref:`ParallaxBackground.scroll_offset` 值。 @@ -27,8 +27,8 @@ ParallaxLayer 必须是 :ref:`ParallaxBackground` 节 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ParallaxLayer_property_motion_mirroring: @@ -101,10 +101,10 @@ ParallaxLayer 的 :ref:`Texture2D` 镜像。用于创建无限 复制视差图层的运动。如果一个轴被设置为 ``0``\ ,它将不会滚动。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_particleprocessmaterial.rst b/classes/zh_CN/class_particleprocessmaterial.rst index 50db1f924a..ead729de57 100644 --- a/classes/zh_CN/class_particleprocessmaterial.rst +++ b/classes/zh_CN/class_particleprocessmaterial.rst @@ -10,25 +10,27 @@ ParticleProcessMaterial ======================= -**Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Holds a particle configuration for :ref:`GPUParticles2D` or :ref:`GPUParticles3D` nodes. +保存用于 :ref:`GPUParticles2D` 或 :ref:`GPUParticles3D` 节点的粒子配置。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**ParticleProcessMaterial** defines particle properties and behavior. It is used in the ``process_material`` of the :ref:`GPUParticles2D` and :ref:`GPUParticles3D` nodes. Some of this material's properties are applied to each particle when emitted, while others can have a :ref:`CurveTexture` or a :ref:`GradientTexture1D` applied to vary numerical or color values over the lifetime of the particle. +**ParticleProcessMaterial** 定义了粒子的属性和行为。\ :ref:`GPUParticles3D` 和 :ref:`GPUParticles2D` 节点的 ``process_material`` 会使用这种材质。这种材质的有些属性是在粒子发射时应用的,有些则会应用 :ref:`CurveTexture` 或 :ref:`GradientTexture1D` 让数值或颜色值在粒子的生命周期中不断变化。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`alpha_curve` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Texture2D` | :ref:`angle_curve` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ @@ -78,10 +80,18 @@ Properties +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Vector3` | :ref:`direction` | ``Vector3(1, 0, 0)`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`directional_velocity_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`directional_velocity_max` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`directional_velocity_min` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Vector3` | :ref:`emission_box_extents` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Texture2D` | :ref:`emission_color_texture` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`emission_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Texture2D` | :ref:`emission_normal_texture` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`int` | :ref:`emission_point_count` | | @@ -98,6 +108,10 @@ Properties +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`EmissionShape` | :ref:`emission_shape` | ``0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`emission_shape_offset` | ``Vector3(0, 0, 0)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`emission_shape_scale` | ``Vector3(1, 1, 1)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`emission_sphere_radius` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`flatness` | ``0.0`` | @@ -110,6 +124,8 @@ Properties +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`hue_variation_min` | ``0.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`inherit_velocity_ratio` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`initial_velocity_max` | ``0.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`initial_velocity_min` | ``0.0`` | @@ -124,12 +140,14 @@ Properties +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Texture2D` | :ref:`orbit_velocity_curve` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`orbit_velocity_max` | | + | :ref:`float` | :ref:`orbit_velocity_max` | ``0.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ - | :ref:`float` | :ref:`orbit_velocity_min` | | + | :ref:`float` | :ref:`orbit_velocity_min` | ``0.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`bool` | :ref:`particle_flag_align_y` | ``false`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`particle_flag_damping_as_friction` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`bool` | :ref:`particle_flag_disable_z` | ``false`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`bool` | :ref:`particle_flag_rotate_y` | ``false`` | @@ -140,12 +158,24 @@ Properties +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`radial_accel_min` | ``0.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`radial_velocity_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`radial_velocity_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`radial_velocity_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Texture2D` | :ref:`scale_curve` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`scale_max` | ``1.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`scale_min` | ``1.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`scale_over_velocity_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`scale_over_velocity_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`scale_over_velocity_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`spread` | ``45.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`int` | :ref:`sub_emitter_amount_at_collision` | | @@ -184,11 +214,15 @@ Properties +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`turbulence_noise_strength` | ``1.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`velocity_limit_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`velocity_pivot` | ``Vector3(0, 0, 0)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -217,8 +251,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_ParticleProcessMaterial_Parameter: @@ -322,11 +356,35 @@ enum **Parameter**: 与 :ref:`set_param_min`\ 、\ :ref:`set_param_max` 和 :ref:`set_param_texture` 一起使用,设置动画偏移属性。 +.. _class_ParticleProcessMaterial_constant_PARAM_RADIAL_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_RADIAL_VELOCITY** = ``15`` + +与 :ref:`set_param_min`\ 、\ :ref:`set_param_max` 和 :ref:`set_param_texture` 一起使用来设置径向速度属性。 + +.. _class_ParticleProcessMaterial_constant_PARAM_DIRECTIONAL_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_DIRECTIONAL_VELOCITY** = ``16`` + +与 :ref:`set_param_min`\ 、\ :ref:`set_param_max` 和 :ref:`set_param_texture` 一起使用来设置定向速度属性。 + +.. _class_ParticleProcessMaterial_constant_PARAM_SCALE_OVER_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`Parameter` **PARAM_SCALE_OVER_VELOCITY** = ``17`` + +与 :ref:`set_param_min`\ 、\ :ref:`set_param_max` 和 :ref:`set_param_texture` 一起使用来设置速度属性的缩放。 + .. _class_ParticleProcessMaterial_constant_PARAM_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Parameter` **PARAM_MAX** = ``15`` +:ref:`Parameter` **PARAM_MAX** = ``18`` 代表 :ref:`Parameter` 枚举的大小。 @@ -388,11 +446,19 @@ enum **ParticleFlags**: 与 :ref:`set_particle_flag` 一起使用,设置\ :ref:`particle_flag_disable_z`\ 。 +.. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_DAMPING_AS_FRICTION: + +.. rst-class:: classref-enumeration-constant + +:ref:`ParticleFlags` **PARTICLE_FLAG_DAMPING_AS_FRICTION** = ``3`` + + + .. _class_ParticleProcessMaterial_constant_PARTICLE_FLAG_MAX: .. rst-class:: classref-enumeration-constant -:ref:`ParticleFlags` **PARTICLE_FLAG_MAX** = ``3`` +:ref:`ParticleFlags` **PARTICLE_FLAG_MAX** = ``4`` 代表 :ref:`ParticleFlags` 枚举的大小。 @@ -568,8 +634,25 @@ enum **CollisionMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- + +.. _class_ParticleProcessMaterial_property_alpha_curve: + +.. rst-class:: classref-property + +:ref:`Texture2D` **alpha_curve** + +.. rst-class:: classref-property-setget + +- void **set_alpha_curve** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_alpha_curve** **(** **)** + +每个粒子颜色的 alpha 值将在其生命周期内乘以该 :ref:`CurveTexture`\ 。 + +.. rst-class:: classref-item-separator + +---- .. _class_ParticleProcessMaterial_property_angle_curve: @@ -792,7 +875,7 @@ Property Descriptions - void **set_attractor_interaction_enabled** **(** :ref:`bool` value **)** - :ref:`bool` **is_attractor_interaction_enabled** **(** **)** -如果启用了与粒子吸引器的交互,则为 true。 +如果为 ``true``\ ,则启用与粒子吸引器的交互。在 3D 中,吸引力仅发生在 :ref:`GPUParticles3D` 节点的 :ref:`GPUParticles3D.visibility_aabb` 定义的区域内。 .. rst-class:: classref-item-separator @@ -845,7 +928,7 @@ Property Descriptions 粒子的碰撞模式。 -\ **注意:**\ 3D 粒子只能与 :ref:`GPUParticlesCollision3D` 节点碰撞,无法与 :ref:`PhysicsBody3D` 节点碰撞。要使粒子与不同的物体碰撞,可以将 :ref:`GPUParticlesCollision3D` 节点添加为 :ref:`PhysicsBody3D` 节点的子节点。 +\ **注意:**\ 3D 粒子只能与 :ref:`GPUParticlesCollision3D` 节点碰撞,无法与 :ref:`PhysicsBody3D` 节点碰撞。要使粒子与不同的物体碰撞,可以将 :ref:`GPUParticlesCollision3D` 节点添加为 :ref:`PhysicsBody3D` 节点的子节点。在 3D 中,碰撞仅发生在 :ref:`GPUParticles3D` 节点的 :ref:`GPUParticles3D.visibility_aabb` 定义的区域内。 \ **注意:**\ 2D 粒子只能与 :ref:`LightOccluder2D` 节点碰撞,无法与 :ref:`PhysicsBody2D` 节点碰撞。 @@ -864,7 +947,7 @@ Property Descriptions - void **set_collision_use_scale** **(** :ref:`bool` value **)** - :ref:`bool` **is_collision_using_scale** **(** **)** -碰撞是否应该考虑缩放。 +如果为 ``true``\ ,\ :ref:`GPUParticles3D.collision_base_size` 乘以粒子的有效缩放(请参阅 :ref:`scale_min`\ 、\ :ref:`scale_max`\ 、\ :ref:`scale_curve`\ 、和 :ref:`scale_over_velocity_curve`\ )。 .. rst-class:: classref-item-separator @@ -995,6 +1078,63 @@ Property Descriptions ---- +.. _class_ParticleProcessMaterial_property_directional_velocity_curve: + +.. rst-class:: classref-property + +:ref:`Texture2D` **directional_velocity_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| + +一条曲线,指定粒子系统在其生命周期内沿每个轴的速度。 + +\ **注意:**\ 动画速度不会受到阻尼的影响,请使用 :ref:`velocity_limit_curve` 代替。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_directional_velocity_max: + +.. rst-class:: classref-property + +:ref:`float` **directional_velocity_max** + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| + +最大方向速度值,乘以 :ref:`directional_velocity_curve`\ 。 + +\ **注意:**\ 动画速度不会受到阻尼的影响,请使用 :ref:`velocity_limit_curve` 代替。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_directional_velocity_min: + +.. rst-class:: classref-property + +:ref:`float` **directional_velocity_min** + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| + +最小方向速度值,乘以 :ref:`directional_velocity_curve`\ 。 + +\ **注意:**\ 动画速度不会受到阻尼的影响,请使用 :ref:`velocity_limit_curve` 代替。 + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_emission_box_extents: .. rst-class:: classref-property @@ -1006,7 +1146,7 @@ Property Descriptions - void **set_emission_box_extents** **(** :ref:`Vector3` value **)** - :ref:`Vector3` **get_emission_box_extents** **(** **)** -``emission_shape`` 设置为 :ref:`EMISSION_SHAPE_BOX` 时,该 Box 的范围。 +:ref:`emission_shape` 被设置为 :ref:`EMISSION_SHAPE_BOX` 时,该框的范围。 .. rst-class:: classref-item-separator @@ -1031,6 +1171,25 @@ Property Descriptions ---- +.. _class_ParticleProcessMaterial_property_emission_curve: + +.. rst-class:: classref-property + +:ref:`Texture2D` **emission_curve** + +.. rst-class:: classref-property-setget + +- void **set_emission_curve** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_emission_curve** **(** **)** + +每个粒子的颜色将在其生命周期内乘以该 :ref:`CurveTexture`\ 。 + +\ **注意:**\ 除非渲染材质被标记为无阴影,否则该属性不会产生可见效果。 + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_emission_normal_texture: .. rst-class:: classref-property @@ -1059,7 +1218,7 @@ Property Descriptions - void **set_emission_point_count** **(** :ref:`int` value **)** - :ref:`int` **get_emission_point_count** **(** **)** -``emission_shape`` 设置为 :ref:`EMISSION_SHAPE_POINTS` 或 :ref:`EMISSION_SHAPE_DIRECTED_POINTS` 时,发射点的数量。 +:ref:`emission_shape` 被设置为 :ref:`EMISSION_SHAPE_POINTS` 或 :ref:`EMISSION_SHAPE_DIRECTED_POINTS` 时,发射点的数量。 .. rst-class:: classref-item-separator @@ -1167,6 +1326,40 @@ Property Descriptions ---- +.. _class_ParticleProcessMaterial_property_emission_shape_offset: + +.. rst-class:: classref-property + +:ref:`Vector3` **emission_shape_offset** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_emission_shape_offset** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_emission_shape_offset** **(** **)** + +:ref:`emission_shape` 在局部空间中的偏移量。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_emission_shape_scale: + +.. rst-class:: classref-property + +:ref:`Vector3` **emission_shape_scale** = ``Vector3(1, 1, 1)`` + +.. rst-class:: classref-property-setget + +- void **set_emission_shape_scale** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_emission_shape_scale** **(** **)** + +局部空间中 :ref:`emission_shape` 的缩放。 + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_emission_sphere_radius: .. rst-class:: classref-property @@ -1178,7 +1371,7 @@ Property Descriptions - void **set_emission_sphere_radius** **(** :ref:`float` value **)** - :ref:`float` **get_emission_sphere_radius** **(** **)** -当\ ``emission_shape``\ 设置为\ :ref:`EMISSION_SHAPE_SPHERE`\ 时,球体的半径。 +:ref:`emission_shape` 被设置为 :ref:`EMISSION_SHAPE_SPHERE` 时,该球体的半径。 .. rst-class:: classref-item-separator @@ -1269,6 +1462,23 @@ Property Descriptions ---- +.. _class_ParticleProcessMaterial_property_inherit_velocity_ratio: + +.. rst-class:: classref-property + +:ref:`float` **inherit_velocity_ratio** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_inherit_velocity_ratio** **(** :ref:`float` value **)** +- :ref:`float` **get_inherit_velocity_ratio** **(** **)** + +每个粒子在生成时继承的相应 :ref:`GPUParticles2D` 或 :ref:`GPUParticles3D` 的速度百分比。 + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_initial_velocity_max: .. rst-class:: classref-property @@ -1382,7 +1592,11 @@ Property Descriptions - void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** - :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| -每个粒子的轨道速度将沿着这个 :ref:`CurveTexture` 变化。 +每个粒子的轨道速度将沿着该 :ref:`CurveTexture` 变化。 + +\ **注意:**\ 对于 3D 轨道速度,请使用 :ref:`CurveXYZTexture`\ 。 + +\ **注意:**\ 动画速度不会受到阻尼的影响,请使用 :ref:`velocity_limit_curve` 代替。 .. rst-class:: classref-item-separator @@ -1392,7 +1606,7 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **orbit_velocity_max** +:ref:`float` **orbit_velocity_max** = ``0.0`` .. rst-class:: classref-property-setget @@ -1401,7 +1615,7 @@ Property Descriptions 应用于每个粒子的最大轨道速度。使粒子围绕原点环绕。以每秒围绕原点的完整旋转次数指定。 -仅当 :ref:`particle_flag_disable_z` 为 ``true`` 时可用。 +\ **注意:**\ 动画速度不会受到阻尼的影响,请使用 :ref:`velocity_limit_curve` 代替。 .. rst-class:: classref-item-separator @@ -1411,14 +1625,16 @@ Property Descriptions .. rst-class:: classref-property -:ref:`float` **orbit_velocity_min** +:ref:`float` **orbit_velocity_min** = ``0.0`` .. rst-class:: classref-property-setget - void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** - :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| -:ref:`orbit_velocity_max` 的对应最小值。 +:ref:`orbit_velocity_max` 的最小等效值。 + +\ **注意:**\ 动画速度不会受到阻尼的影响,请使用 :ref:`velocity_limit_curve` 代替。 .. rst-class:: classref-item-separator @@ -1441,6 +1657,23 @@ Property Descriptions ---- +.. _class_ParticleProcessMaterial_property_particle_flag_damping_as_friction: + +.. rst-class:: classref-property + +:ref:`bool` **particle_flag_damping_as_friction** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_particle_flag** **(** :ref:`ParticleFlags` particle_flag, :ref:`bool` enable **)** +- :ref:`bool` **get_particle_flag** **(** :ref:`ParticleFlags` particle_flag **)** |const| + +将阻尼属性的行为从线性减速度更改为基于速度百分比的减速度。 + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_particle_flag_disable_z: .. rst-class:: classref-property @@ -1526,6 +1759,63 @@ Property Descriptions ---- +.. _class_ParticleProcessMaterial_property_radial_velocity_curve: + +.. rst-class:: classref-property + +:ref:`Texture2D` **radial_velocity_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| + +一个 :ref:`CurveTexture`\ ,定义粒子生命周期中远离(或朝向)\ :ref:`velocity_pivot` 的速度。 + +\ **注意:**\ 动画速度不会受到阻尼的影响,请使用 :ref:`velocity_limit_curve` 代替。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_radial_velocity_max: + +.. rst-class:: classref-property + +:ref:`float` **radial_velocity_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| + +应用于每个粒子的最大径向速度。使粒子远离 :ref:`velocity_pivot`\ ,如果为负则朝它移动。 + +\ **注意:**\ 动画速度不会受到阻尼的影响,请使用 :ref:`velocity_limit_curve` 代替。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_radial_velocity_min: + +.. rst-class:: classref-property + +:ref:`float` **radial_velocity_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| + +应用于每个粒子的最小径向速度。使粒子远离 :ref:`velocity_pivot`\ ,如果为负则朝它移动。 + +\ **注意:**\ 动画速度不会受到阻尼的影响,请使用 :ref:`velocity_limit_curve` 代替。 + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_scale_curve: .. rst-class:: classref-property @@ -1577,6 +1867,61 @@ Property Descriptions ---- +.. _class_ParticleProcessMaterial_property_scale_over_velocity_curve: + +.. rst-class:: classref-property + +:ref:`Texture2D` **scale_over_velocity_curve** + +.. rst-class:: classref-property-setget + +- void **set_param_texture** **(** :ref:`Parameter` param, :ref:`Texture2D` texture **)** +- :ref:`Texture2D` **get_param_texture** **(** :ref:`Parameter` param **)** |const| + +根据 :ref:`CurveTexture` 或 :ref:`CurveXYZTexture` 缩放每个粒子的速度。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_scale_over_velocity_max: + +.. rst-class:: classref-property + +:ref:`float` **scale_over_velocity_max** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_max** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_max** **(** :ref:`Parameter` param **)** |const| + +:ref:`scale_over_velocity_curve` 的最大速度参考值。 + +\ :ref:`scale_over_velocity_curve` 将在 :ref:`scale_over_velocity_min` 和 :ref:`scale_over_velocity_max` 之间插值。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_scale_over_velocity_min: + +.. rst-class:: classref-property + +:ref:`float` **scale_over_velocity_min** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_param_min** **(** :ref:`Parameter` param, :ref:`float` value **)** +- :ref:`float` **get_param_min** **(** :ref:`Parameter` param **)** |const| + +:ref:`scale_over_velocity_curve` 的最小速度参考值。 + +\ :ref:`scale_over_velocity_curve` 将在 :ref:`scale_over_velocity_min` 和 :ref:`scale_over_velocity_max` 之间插值。 + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_spread: .. rst-class:: classref-property @@ -1605,9 +1950,9 @@ Property Descriptions - void **set_sub_emitter_amount_at_collision** **(** :ref:`int` value **)** - :ref:`int` **get_sub_emitter_amount_at_collision** **(** **)** -碰撞时子粒子的数量。 +发生碰撞时从子发射器节点生成的粒子数量。当与主要粒子材质上的 :ref:`COLLISION_HIDE_ON_CONTACT` 结合使用时,可以用来实现雨滴撞击地面等效果。 -子粒子发射器中设置的最大数量。 +\ **注意:**\ 该值不应超过\ *子发射器节点*\ (不是主节点)上定义的 :ref:`GPUParticles2D.amount` 或 :ref:`GPUParticles3D.amount`\ ,相对于子发射器的粒子寿命。如果超过粒子数量,则在足够的粒子过期之前,不会从子发射器中产生新的粒子。 .. rst-class:: classref-item-separator @@ -1624,9 +1969,9 @@ Property Descriptions - void **set_sub_emitter_amount_at_end** **(** :ref:`int` value **)** - :ref:`int` **get_sub_emitter_amount_at_end** **(** **)** -.. container:: contribute +粒子过期时从子发射器节点生成的粒子数量。 - There is currently no description for this property. Please help us by :ref:`contributing one `! +\ **注意:**\ 该值不应超过\ *子发射器节点*\ (不是主节点)上定义的 :ref:`GPUParticles2D.amount` 或 :ref:`GPUParticles3D.amount`\ ,相对于子发射器的粒子寿命。如果超过粒子数量,则在足够的粒子过期之前,不会从子发射器中产生新的粒子。 .. rst-class:: classref-item-separator @@ -1643,9 +1988,9 @@ Property Descriptions - void **set_sub_emitter_frequency** **(** :ref:`float` value **)** - :ref:`float` **get_sub_emitter_frequency** **(** **)** -.. container:: contribute +从子发射器节点发射粒子的频率。每 :ref:`sub_emitter_frequency` 秒就会产生一个粒子。 - There is currently no description for this property. Please help us by :ref:`contributing one `! +\ **注意:**\ 该值不应超过\ *子发射器节点*\ (不是主节点)上定义的 :ref:`GPUParticles2D.amount` 或 :ref:`GPUParticles3D.amount`\ ,相对于子发射器的粒子寿命。如果超过粒子数量,则在足够的粒子过期之前,不会从子发射器中产生新的粒子。 .. rst-class:: classref-item-separator @@ -1662,9 +2007,7 @@ Property Descriptions - void **set_sub_emitter_keep_velocity** **(** :ref:`bool` value **)** - :ref:`bool` **get_sub_emitter_keep_velocity** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +如果为 ``true``\ ,则子发射器在其生成时继承父粒子的速度。 .. rst-class:: classref-item-separator @@ -1681,9 +2024,7 @@ Property Descriptions - void **set_sub_emitter_mode** **(** :ref:`SubEmitterMode` value **)** - :ref:`SubEmitterMode` **get_sub_emitter_mode** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +粒子子发射器模式(参见 :ref:`GPUParticles2D.sub_emitter` 和 :ref:`GPUParticles3D.sub_emitter`\ )。 .. rst-class:: classref-item-separator @@ -1922,14 +2263,48 @@ Property Descriptions 湍流噪声强度。增加此值将导致更强烈、对比度更高的噪声图案。 +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_velocity_limit_curve: + +.. rst-class:: classref-property + +:ref:`Texture2D` **velocity_limit_curve** + +.. rst-class:: classref-property-setget + +- void **set_velocity_limit_curve** **(** :ref:`Texture2D` value **)** +- :ref:`Texture2D` **get_velocity_limit_curve** **(** **)** + +定义粒子在其生命周期内的最大速度的 :ref:`CurveTexture`\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_velocity_pivot: + +.. rst-class:: classref-property + +:ref:`Vector3` **velocity_pivot** = ``Vector3(0, 0, 0)`` + +.. rst-class:: classref-property-setget + +- void **set_velocity_pivot** **(** :ref:`Vector3` value **)** +- :ref:`Vector3` **get_velocity_pivot** **(** **)** + +用于计算粒子的径向速度和轨道速度的轴心点。 + .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ParticleProcessMaterial_method_get_param_max: @@ -2023,10 +2398,10 @@ void **set_particle_flag** **(** :ref:`ParticleFlags`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_path2d.rst b/classes/zh_CN/class_path2d.rst index 667df6449b..670f5ee07a 100644 --- a/classes/zh_CN/class_path2d.rst +++ b/classes/zh_CN/class_path2d.rst @@ -10,14 +10,14 @@ Path2D ====== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 包含一个 :ref:`Curve2D` 路径,供 :ref:`PathFollow2D` 节点遵循。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 可以让 :ref:`PathFollow2D` 子节点沿着 :ref:`Curve2D` 移动。有关用法的更多信息,请参阅 :ref:`PathFollow2D`\ 。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Path2D_property_curve: @@ -57,10 +57,10 @@ Property Descriptions 描述路径的 :ref:`Curve2D`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_path3d.rst b/classes/zh_CN/class_path3d.rst index df9cfd2a3b..67f87724ff 100644 --- a/classes/zh_CN/class_path3d.rst +++ b/classes/zh_CN/class_path3d.rst @@ -10,23 +10,23 @@ Path3D ====== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 包含 :ref:`PathFollow3D` 节点要跟随的的一条 :ref:`Curve3D` 路径。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -可以让 :ref:`PathFollow3D` 子节点沿着 :ref:`Curve3D` 移动。有关用法的更多信息,请参见 :ref:`PathFollow3D`\ 。 +可以让 :ref:`PathFollow3D` 子节点沿着 :ref:`Curve3D` 移动。有关用法的更多信息见 :ref:`PathFollow3D`\ 。 注意,该路径被认为是相对于移动的节点(\ :ref:`PathFollow3D` 的子节点)。因此,该曲线通常应以零向量 ``(0, 0, 0)`` 开始。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Path3D_signal_curve_changed: @@ -58,8 +58,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Path3D_property_curve: @@ -74,10 +74,10 @@ Property Descriptions 描述路径的 :ref:`Curve3D`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_pathfollow2d.rst b/classes/zh_CN/class_pathfollow2d.rst index d032b88bba..07bca797b5 100644 --- a/classes/zh_CN/class_pathfollow2d.rst +++ b/classes/zh_CN/class_pathfollow2d.rst @@ -10,14 +10,14 @@ PathFollow2D ============ -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 对 :ref:`Path2D` 的点取样的取样器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个节点接受它的父节点 :ref:`Path2D` 并返回其中一个点的坐标,需要给定到第一个顶点的距离。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -53,8 +53,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PathFollow2D_property_cubic_interp: @@ -175,10 +175,10 @@ Property Descriptions 节点垂直于曲线的偏移量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_pathfollow3d.rst b/classes/zh_CN/class_pathfollow3d.rst index ae57f67600..eb12212315 100644 --- a/classes/zh_CN/class_pathfollow3d.rst +++ b/classes/zh_CN/class_pathfollow3d.rst @@ -10,14 +10,14 @@ PathFollow3D ============ -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` :ref:`Path3D` 的点采样器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个节点接受它的父节点 :ref:`Path3D` 并返回其中一个点的坐标,需要给定到第一个顶点的距离。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -53,8 +53,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -69,8 +69,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_PathFollow3D_RotationMode: @@ -124,8 +124,8 @@ enum **RotationMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PathFollow3D_property_cubic_interp: @@ -286,8 +286,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PathFollow3D_method_correct_posture: @@ -297,10 +297,10 @@ Method Descriptions 校正 ``transform``\ 。\ ``rotation_mode`` 隐式指定如何计算姿势(向前、向上和侧向)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_pckpacker.rst b/classes/zh_CN/class_pckpacker.rst index f2540be3e9..fcfd9b492a 100644 --- a/classes/zh_CN/class_pckpacker.rst +++ b/classes/zh_CN/class_pckpacker.rst @@ -10,14 +10,14 @@ PCKPacker ========= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 创建可以加载到正在运行的项目中的包。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **PCKPacker** 可以创建打包文件,项目运行时可以使用 :ref:`ProjectSettings.load_resource_pack` 来加载打包文件。 @@ -44,8 +44,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PCKPacker_method_add_file: @@ -99,10 +99,10 @@ Method Descriptions 创建一个名为 ``pck_name`` 的新 PCK 文件。不会自动添加 ``.pck`` 文件扩展名,因此它应该是 ``pck_name`` 的一部分(即使它不是必需的)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_performance.rst b/classes/zh_CN/class_performance.rst index 45661a36f4..ff9dc3b162 100644 --- a/classes/zh_CN/class_performance.rst +++ b/classes/zh_CN/class_performance.rst @@ -10,14 +10,14 @@ Performance =========== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 公开与性能相关的数据。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该类提供对许多与性能相关的不同监视器的访问,例如内存使用情况、绘制调用、和 FPS。这些值与编辑器的\ **调试器**\ 面板中的\ **监视**\ 选项卡中显示的值相同。通过使用该类的 :ref:`get_monitor` 方法,你可以从代码中访问该数据。 @@ -31,8 +31,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -59,8 +59,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Performance_Monitor: @@ -258,7 +258,7 @@ enum **Monitor**: :ref:`Monitor` **AUDIO_OUTPUT_LATENCY** = ``23`` -Output latency of the :ref:`AudioServer`. Equivalent to calling :ref:`AudioServer.get_output_latency`, it is not recommended to call this every frame. +:ref:`AudioServer` 的输出延迟。相当于调用 :ref:`AudioServer.get_output_latency`\ ,不建议每帧都调用该方法。 .. _class_Performance_constant_NAVIGATION_ACTIVE_MAPS: @@ -346,8 +346,8 @@ Output latency of the :ref:`AudioServer`. Equivalent to calli .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Performance_method_add_custom_monitor: @@ -500,10 +500,10 @@ void **remove_custom_monitor** **(** :ref:`StringName` id **)* 移除具有给定 ``id`` 的自定义监视器。如果给定的 ``id`` 已经不存在,则打印一个错误。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicalbone2d.rst b/classes/zh_CN/class_physicalbone2d.rst index b20648ed8a..931a6be5bf 100644 --- a/classes/zh_CN/class_physicalbone2d.rst +++ b/classes/zh_CN/class_physicalbone2d.rst @@ -10,14 +10,14 @@ PhysicalBone2D ============== -**Inherits:** :ref:`RigidBody2D` **<** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`RigidBody2D` **<** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 派生自 :ref:`RigidBody2D` 的节点,用于让 :ref:`Skeleton2D` 中的 :ref:`Bone2D` 对物理作出反应。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **PhysicalBone2D** 节点基于 :ref:`RigidBody2D`\ ,可以用来使 :ref:`Skeleton2D` 中的 :ref:`Bone2D` 节点对物理作出反应。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -65,8 +65,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PhysicalBone2D_property_auto_configure_joint: @@ -157,8 +157,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PhysicalBone2D_method_get_joint: @@ -180,10 +180,10 @@ Method Descriptions 返回一个布尔值,表示 **PhysicalBone2D** 节点是否处于运行状态,正在使用 Godot 2D 物理引擎进行仿真。为 ``true`` 时,该 PhysicalBone2D 节点正在使用物理。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicalbone3d.rst b/classes/zh_CN/class_physicalbone3d.rst index 255d1c486b..3efab8dcd7 100644 --- a/classes/zh_CN/class_physicalbone3d.rst +++ b/classes/zh_CN/class_physicalbone3d.rst @@ -10,21 +10,21 @@ PhysicalBone3D ============== -**Inherits:** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 用于让 :ref:`Skeleton3D` 中的骨骼对物理作出反应的物理体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **PhysicalBone3D** 节点是一种能够让 :ref:`Skeleton3D` 中的骨骼对物理作出反应的物理体。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -65,25 +65,25 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_central_impulse` **(** :ref:`Vector3` impulse **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`apply_impulse` **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_bone_id` **(** **)** |const| | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_simulate_physics` **(** **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_simulating_physics` **(** **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_central_impulse` **(** :ref:`Vector3` impulse **)** | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`apply_impulse` **(** :ref:`Vector3` impulse, :ref:`Vector3` position=Vector3(0, 0, 0) **)** | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_bone_id` **(** **)** |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_simulate_physics` **(** **)** | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_simulating_physics` **(** **)** | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -91,8 +91,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_PhysicalBone3D_DampMode: @@ -180,8 +180,8 @@ enum **JointType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PhysicalBone3D_property_angular_damp: @@ -213,7 +213,7 @@ Property Descriptions - void **set_angular_damp_mode** **(** :ref:`DampMode` value **)** - :ref:`DampMode` **get_angular_damp_mode** **(** **)** -定义如何应用 :ref:`angular_damp`\ 。有关可能的值,请参见 :ref:`DampMode`\ 。 +定义如何应用 :ref:`angular_damp`\ 。可能的取值见 :ref:`DampMode`\ 。 .. rst-class:: classref-item-separator @@ -298,7 +298,7 @@ Property Descriptions - void **set_use_custom_integrator** **(** :ref:`bool` value **)** - :ref:`bool` **is_using_custom_integrator** **(** **)** -如果为 ``true``\ ,则该物体的内力积分将被禁用(如重力或空气摩擦)。除了碰撞响应之外,物体将仅根据 :ref:`_integrate_forces` 函数确定的方式移动(如果已定义)。 +如果为 ``true``\ ,则该物体的内力积分将被禁用(如重力或空气摩擦)。除了碰撞响应之外,物体将仅根据 :ref:`_integrate_forces` 函数确定的方式移动(如果已定义)。 .. rst-class:: classref-item-separator @@ -436,7 +436,7 @@ Property Descriptions - void **set_linear_velocity** **(** :ref:`Vector3` value **)** - :ref:`Vector3` **get_linear_velocity** **(** **)** -物体的线速度,单位为单位每秒。可以偶尔使用,但是\ **不要每一帧都设置它**\ ,因为物理可能在另一个线程中运行,并且以不同的间隔。使用 :ref:`_integrate_forces` 作为你的进程循环,以精确控制物体状态。 +物体的线速度,单位为单位每秒。可以偶尔使用,但是\ **不要每一帧都设置它**\ ,因为物理可能在另一个线程中运行,并且以不同的间隔。使用 :ref:`_integrate_forces` 作为你的进程循环,以精确控制物体状态。 .. rst-class:: classref-item-separator @@ -461,10 +461,10 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_PhysicalBone3D_method__integrate_forces: +.. _class_PhysicalBone3D_private_method__integrate_forces: .. rst-class:: classref-method @@ -484,7 +484,7 @@ void **apply_central_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -498,7 +498,7 @@ void **apply_impulse** **(** :ref:`Vector3` impulse, :ref:`Vector .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -512,7 +512,7 @@ void **apply_impulse** **(** :ref:`Vector3` impulse, :ref:`Vector .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -526,7 +526,7 @@ void **apply_impulse** **(** :ref:`Vector3` impulse, :ref:`Vector .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -540,12 +540,12 @@ void **apply_impulse** **(** :ref:`Vector3` impulse, :ref:`Vector .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicalskymaterial.rst b/classes/zh_CN/class_physicalskymaterial.rst index bd810b831c..ebb7b5eb30 100644 --- a/classes/zh_CN/class_physicalskymaterial.rst +++ b/classes/zh_CN/class_physicalskymaterial.rst @@ -10,14 +10,14 @@ PhysicalSkyMaterial =================== -**Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A material that defines a sky for a :ref:`Sky` resource by a set of physical properties. +通过一组物理属性定义 :ref:`Sky` 资源的天空的材质。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该 **PhysicalSkyMaterial** 使用 Preetham 解析日光模型,根据物理属性绘制一个天空。这会产生比 :ref:`ProceduralSkyMaterial` 更加逼真的天空,但速度稍慢且灵活性较差。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -63,8 +63,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PhysicalSkyMaterial_property_energy_multiplier: @@ -249,10 +249,10 @@ Property Descriptions 如果为 ``true``\ ,则启用去色带。去色带会增加少量噪点,这有助于减少天空中颜色的平滑变化而出现的色带。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsbody2d.rst b/classes/zh_CN/class_physicsbody2d.rst index 1ef79c7079..3218e7f857 100644 --- a/classes/zh_CN/class_physicsbody2d.rst +++ b/classes/zh_CN/class_physicsbody2d.rst @@ -10,30 +10,30 @@ PhysicsBody2D ============= -**Inherits:** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`CharacterBody2D`, :ref:`RigidBody2D`, :ref:`StaticBody2D` +**派生:** :ref:`CharacterBody2D`, :ref:`RigidBody2D`, :ref:`StaticBody2D` 受物理影响的 2D 游戏对象的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **PhysicsBody2D** 与受物理影响的 2D 游戏对象的抽象基类。所有 2D 物理体都继承自这个类。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`物理介绍 <../tutorials/physics/physics_introduction>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -44,8 +44,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -68,8 +68,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PhysicsBody2D_method_add_collision_exception_with: @@ -101,7 +101,7 @@ void **add_collision_exception_with** **(** :ref:`Node` body **)** :ref:`KinematicCollision2D` **move_and_collide** **(** :ref:`Vector2` motion, :ref:`bool` test_only=false, :ref:`float` safe_margin=0.08, :ref:`bool` recovery_as_collision=false **)** -沿着运动向量 ``motion`` 移动该物体。为了在 :ref:`Node._physics_process` 和 :ref:`Node._process` 中不依赖帧速率,\ ``motion`` 应该使用 ``delta`` 计算。 +沿着运动向量 ``motion`` 移动该物体。为了在 :ref:`Node._physics_process` 和 :ref:`Node._process` 中不依赖帧速率,\ ``motion`` 应该使用 ``delta`` 计算。 返回 :ref:`KinematicCollision2D`\ ,包含停止时的碰撞信息,或者沿运动向量接触到其他物体时的碰撞信息。 @@ -133,7 +133,7 @@ void **remove_collision_exception_with** **(** :ref:`Node` body **)* :ref:`bool` **test_move** **(** :ref:`Transform2D` from, :ref:`Vector2` motion, :ref:`KinematicCollision2D` collision=null, :ref:`float` safe_margin=0.08, :ref:`bool` recovery_as_collision=false **)** -在不移动实体的情况下检查碰撞。为了在 :ref:`Node._physics_process` 或 :ref:`Node._process` 中独立于帧速率,\ ``motion`` 应该使用 ``delta`` 来计算。 +在不移动实体的情况下检查碰撞。为了在 :ref:`Node._physics_process` 或 :ref:`Node._process` 中独立于帧速率,\ ``motion`` 应该使用 ``delta`` 来计算。 实际上是将节点的位置、缩放和旋转设置为给定 :ref:`Transform2D` 的位置、缩放和旋转,然后尝试沿向量 ``motion`` 移动实体。如果碰撞会阻止实体沿整个路径移动,则返回 ``true``\ 。 @@ -143,10 +143,10 @@ void **remove_collision_exception_with** **(** :ref:`Node` body **)* 如果 ``recovery_as_collision`` 为 ``true``\ ,恢复阶段的任何穿透也将被报告为碰撞;这对于检查该实体是否会\ *接触*\ 其他任意实体很有用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsbody3d.rst b/classes/zh_CN/class_physicsbody3d.rst index d61cf04914..88f2fd3f93 100644 --- a/classes/zh_CN/class_physicsbody3d.rst +++ b/classes/zh_CN/class_physicsbody3d.rst @@ -10,16 +10,16 @@ PhysicsBody3D ============= -**Inherits:** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`CharacterBody3D`, :ref:`PhysicalBone3D`, :ref:`RigidBody3D`, :ref:`StaticBody3D` +**派生:** :ref:`CharacterBody3D`, :ref:`PhysicalBone3D`, :ref:`RigidBody3D`, :ref:`StaticBody3D` 受物理影响的 3D 游戏对象的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **PhysicsBody3D** 与受物理影响的 3D 游戏对象的抽象基类。所有 3D 物理体都继承自这个类。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`物理介绍 <../tutorials/physics/physics_introduction>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -84,8 +84,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PhysicsBody3D_property_axis_lock_angular_x: @@ -191,8 +191,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PhysicsBody3D_method_add_collision_exception_with: @@ -236,7 +236,7 @@ void **add_collision_exception_with** **(** :ref:`Node` body **)** :ref:`KinematicCollision3D` **move_and_collide** **(** :ref:`Vector3` motion, :ref:`bool` test_only=false, :ref:`float` safe_margin=0.001, :ref:`bool` recovery_as_collision=false, :ref:`int` max_collisions=1 **)** -沿着运动向量 ``motion`` 移动该物体。为了在 :ref:`Node._physics_process` 和 :ref:`Node._process` 中不依赖帧速率,\ ``motion`` 应该使用 ``delta`` 计算。 +沿着运动向量 ``motion`` 移动该物体。为了在 :ref:`Node._physics_process` 和 :ref:`Node._process` 中不依赖帧速率,\ ``motion`` 应该使用 ``delta`` 计算。 发生碰撞后该物体就会停止运动。返回 :ref:`KinematicCollision3D`\ ,包含停止时的碰撞信息,或者沿运动向量接触到其他物体时的碰撞信息。 @@ -282,7 +282,7 @@ void **set_axis_lock** **(** :ref:`BodyAxis` axis :ref:`bool` **test_move** **(** :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`KinematicCollision3D` collision=null, :ref:`float` safe_margin=0.001, :ref:`bool` recovery_as_collision=false, :ref:`int` max_collisions=1 **)** -在不移动实体的情况下检查碰撞。为了在 :ref:`Node._physics_process` 或 :ref:`Node._process` 中独立于帧速率,\ ``motion`` 应该使用 ``delta`` 来计算。 +在不移动实体的情况下检查碰撞。为了在 :ref:`Node._physics_process` 或 :ref:`Node._process` 中独立于帧速率,\ ``motion`` 应该使用 ``delta`` 来计算。 实际上是将节点的位置、缩放和旋转设置为给定 :ref:`Transform3D` 的位置、缩放和旋转,然后尝试沿向量 ``motion`` 移动实体。如果碰撞会阻止实体沿整个路径移动,则返回 ``true``\ 。 @@ -294,10 +294,10 @@ void **set_axis_lock** **(** :ref:`BodyAxis` axis \ ``max_collisions`` 允许检索一个以上的碰撞结果。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsdirectbodystate2d.rst b/classes/zh_CN/class_physicsdirectbodystate2d.rst index 9e0f4535d4..3036b14479 100644 --- a/classes/zh_CN/class_physicsdirectbodystate2d.rst +++ b/classes/zh_CN/class_physicsdirectbodystate2d.rst @@ -10,23 +10,23 @@ PhysicsDirectBodyState2D ======================== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` -**Inherited By:** :ref:`PhysicsDirectBodyState2DExtension` +**派生:** :ref:`PhysicsDirectBodyState2DExtension` 提供对 :ref:`PhysicsServer2D` 中物理体的直接访问。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -提供对 :ref:`PhysicsServer2D` 中物理体的直接访问,从而安全地更改物理属性。该对象会在 :ref:`RigidBody2D` 的直接状态回调中传递,目的是为了改变物体的直接状态。见 :ref:`RigidBody2D._integrate_forces`\ 。 +提供对 :ref:`PhysicsServer2D` 中物理体的直接访问,从而安全地更改物理属性。该对象会在 :ref:`RigidBody2D` 的直接状态回调中传递,目的是为了改变物体的直接状态。见 :ref:`RigidBody2D._integrate_forces`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`物理介绍 <../tutorials/physics/physics_introduction>` @@ -34,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -68,8 +68,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -138,8 +138,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PhysicsDirectBodyState2D_property_angular_velocity: @@ -339,8 +339,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PhysicsDirectBodyState2D_method_add_constant_central_force: @@ -706,10 +706,10 @@ void **set_constant_torque** **(** :ref:`float` torque **)** 见 :ref:`add_constant_torque`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsdirectbodystate2dextension.rst b/classes/zh_CN/class_physicsdirectbodystate2dextension.rst index dcfabd554b..736b3e7ba3 100644 --- a/classes/zh_CN/class_physicsdirectbodystate2dextension.rst +++ b/classes/zh_CN/class_physicsdirectbodystate2dextension.rst @@ -10,14 +10,14 @@ PhysicsDirectBodyState2DExtension ================================= -**Inherits:** :ref:`PhysicsDirectBodyState2D` **<** :ref:`Object` +**继承:** :ref:`PhysicsDirectBodyState2D` **<** :ref:`Object` 提供能够覆盖的虚方法,用于创建 :ref:`PhysicsDirectBodyState2D` 的自定义实现。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类扩展自 :ref:`PhysicsDirectBodyState2D`\ ,额外提供了可覆盖的虚方法。调用时会使用这些覆盖后的方法代替物理服务器中的内部方法。 @@ -25,101 +25,101 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_constant_central_force` **(** :ref:`Vector2` force **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_constant_force` **(** :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_constant_torque` **(** :ref:`float` torque **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_central_force` **(** :ref:`Vector2` force **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_central_impulse` **(** :ref:`Vector2` impulse **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_force` **(** :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_impulse` **(** :ref:`Vector2` impulse, :ref:`Vector2` position **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_torque` **(** :ref:`float` torque **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_torque_impulse` **(** :ref:`float` impulse **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_angular_velocity` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_center_of_mass` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_center_of_mass_local` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_constant_force` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_constant_torque` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_get_contact_collider` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_contact_collider_id` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`_get_contact_collider_object` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_contact_collider_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_contact_collider_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_contact_collider_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_contact_count` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_contact_impulse` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_contact_local_normal` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_contact_local_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_contact_local_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_contact_local_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_inverse_inertia` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_inverse_mass` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_linear_velocity` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectSpaceState2D` | :ref:`_get_space_state` **(** **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_step` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_total_angular_damp` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_total_gravity` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_total_linear_damp` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`_get_transform` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_velocity_at_local_position` **(** :ref:`Vector2` local_position **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_integrate_forces` **(** **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_sleeping` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_angular_velocity` **(** :ref:`float` velocity **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_constant_force` **(** :ref:`Vector2` force **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_constant_torque` **(** :ref:`float` torque **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_linear_velocity` **(** :ref:`Vector2` velocity **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_sleep_state` **(** :ref:`bool` enabled **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_transform` **(** :ref:`Transform2D` transform **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_constant_central_force` **(** :ref:`Vector2` force **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_constant_force` **(** :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_constant_torque` **(** :ref:`float` torque **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_central_force` **(** :ref:`Vector2` force **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_central_impulse` **(** :ref:`Vector2` impulse **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_force` **(** :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_impulse` **(** :ref:`Vector2` impulse, :ref:`Vector2` position **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_torque` **(** :ref:`float` torque **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_torque_impulse` **(** :ref:`float` impulse **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_angular_velocity` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_center_of_mass` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_center_of_mass_local` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_constant_force` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_constant_torque` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_get_contact_collider` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_contact_collider_id` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`_get_contact_collider_object` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_contact_collider_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_contact_collider_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_contact_collider_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_contact_count` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_contact_impulse` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_contact_local_normal` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_contact_local_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_contact_local_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_contact_local_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_inverse_inertia` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_inverse_mass` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_linear_velocity` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState2D` | :ref:`_get_space_state` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_step` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_total_angular_damp` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_total_gravity` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_total_linear_damp` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`_get_transform` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_velocity_at_local_position` **(** :ref:`Vector2` local_position **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_integrate_forces` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_sleeping` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_angular_velocity` **(** :ref:`float` velocity **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_constant_force` **(** :ref:`Vector2` force **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_constant_torque` **(** :ref:`float` torque **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_linear_velocity` **(** :ref:`Vector2` velocity **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_sleep_state` **(** :ref:`bool` enabled **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_transform` **(** :ref:`Transform2D` transform **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -127,10 +127,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_PhysicsDirectBodyState2DExtension_method__add_constant_central_force: +.. _class_PhysicsDirectBodyState2DExtension_private_method__add_constant_central_force: .. rst-class:: classref-method @@ -138,13 +138,13 @@ void **_add_constant_central_force** **(** :ref:`Vector2` force * .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__add_constant_force: +.. _class_PhysicsDirectBodyState2DExtension_private_method__add_constant_force: .. rst-class:: classref-method @@ -152,13 +152,13 @@ void **_add_constant_force** **(** :ref:`Vector2` force, :ref:`Ve .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__add_constant_torque: +.. _class_PhysicsDirectBodyState2DExtension_private_method__add_constant_torque: .. rst-class:: classref-method @@ -166,13 +166,13 @@ void **_add_constant_torque** **(** :ref:`float` torque **)** |virt .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__apply_central_force: +.. _class_PhysicsDirectBodyState2DExtension_private_method__apply_central_force: .. rst-class:: classref-method @@ -180,13 +180,13 @@ void **_apply_central_force** **(** :ref:`Vector2` force **)** |v .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__apply_central_impulse: +.. _class_PhysicsDirectBodyState2DExtension_private_method__apply_central_impulse: .. rst-class:: classref-method @@ -194,13 +194,13 @@ void **_apply_central_impulse** **(** :ref:`Vector2` impulse **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__apply_force: +.. _class_PhysicsDirectBodyState2DExtension_private_method__apply_force: .. rst-class:: classref-method @@ -208,13 +208,13 @@ void **_apply_force** **(** :ref:`Vector2` force, :ref:`Vector2`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__apply_impulse: +.. _class_PhysicsDirectBodyState2DExtension_private_method__apply_impulse: .. rst-class:: classref-method @@ -222,13 +222,13 @@ void **_apply_impulse** **(** :ref:`Vector2` impulse, :ref:`Vecto .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__apply_torque: +.. _class_PhysicsDirectBodyState2DExtension_private_method__apply_torque: .. rst-class:: classref-method @@ -236,13 +236,13 @@ void **_apply_torque** **(** :ref:`float` torque **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__apply_torque_impulse: +.. _class_PhysicsDirectBodyState2DExtension_private_method__apply_torque_impulse: .. rst-class:: classref-method @@ -250,13 +250,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_angular_velocity: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_angular_velocity: .. rst-class:: classref-method @@ -264,13 +264,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_center_of_mass: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_center_of_mass: .. rst-class:: classref-method @@ -278,13 +278,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_center_of_mass_local: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_center_of_mass_local: .. rst-class:: classref-method @@ -292,13 +292,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_constant_force: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_constant_force: .. rst-class:: classref-method @@ -306,13 +306,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_constant_torque: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_constant_torque: .. rst-class:: classref-method @@ -320,13 +320,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider: .. rst-class:: classref-method @@ -334,13 +334,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_id: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_id: .. rst-class:: classref-method @@ -348,13 +348,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_object: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_object: .. rst-class:: classref-method @@ -362,13 +362,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_position: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_position: .. rst-class:: classref-method @@ -376,13 +376,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_shape: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_shape: .. rst-class:: classref-method @@ -390,13 +390,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_collider_velocity_at_position: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_collider_velocity_at_position: .. rst-class:: classref-method @@ -404,13 +404,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_count: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_count: .. rst-class:: classref-method @@ -418,13 +418,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_impulse: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_impulse: .. rst-class:: classref-method @@ -432,13 +432,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_local_normal: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_normal: .. rst-class:: classref-method @@ -446,13 +446,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_local_position: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_position: .. rst-class:: classref-method @@ -460,13 +460,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_local_shape: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_shape: .. rst-class:: classref-method @@ -474,13 +474,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_contact_local_velocity_at_position: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_contact_local_velocity_at_position: .. rst-class:: classref-method @@ -488,13 +488,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_inverse_inertia: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_inverse_inertia: .. rst-class:: classref-method @@ -502,13 +502,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_inverse_mass: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_inverse_mass: .. rst-class:: classref-method @@ -516,13 +516,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_linear_velocity: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_linear_velocity: .. rst-class:: classref-method @@ -530,13 +530,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_space_state: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_space_state: .. rst-class:: classref-method @@ -544,13 +544,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_step: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_step: .. rst-class:: classref-method @@ -558,13 +558,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_total_angular_damp: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_total_angular_damp: .. rst-class:: classref-method @@ -572,13 +572,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_total_gravity: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_total_gravity: .. rst-class:: classref-method @@ -586,13 +586,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_total_linear_damp: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_total_linear_damp: .. rst-class:: classref-method @@ -600,13 +600,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_transform: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_transform: .. rst-class:: classref-method @@ -614,13 +614,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__get_velocity_at_local_position: +.. _class_PhysicsDirectBodyState2DExtension_private_method__get_velocity_at_local_position: .. rst-class:: classref-method @@ -628,13 +628,13 @@ void **_apply_torque_impulse** **(** :ref:`float` impulse **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__integrate_forces: +.. _class_PhysicsDirectBodyState2DExtension_private_method__integrate_forces: .. rst-class:: classref-method @@ -642,13 +642,13 @@ void **_integrate_forces** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__is_sleeping: +.. _class_PhysicsDirectBodyState2DExtension_private_method__is_sleeping: .. rst-class:: classref-method @@ -656,13 +656,13 @@ void **_integrate_forces** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__set_angular_velocity: +.. _class_PhysicsDirectBodyState2DExtension_private_method__set_angular_velocity: .. rst-class:: classref-method @@ -670,13 +670,13 @@ void **_set_angular_velocity** **(** :ref:`float` velocity **)** |v .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__set_constant_force: +.. _class_PhysicsDirectBodyState2DExtension_private_method__set_constant_force: .. rst-class:: classref-method @@ -684,13 +684,13 @@ void **_set_constant_force** **(** :ref:`Vector2` force **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__set_constant_torque: +.. _class_PhysicsDirectBodyState2DExtension_private_method__set_constant_torque: .. rst-class:: classref-method @@ -698,13 +698,13 @@ void **_set_constant_torque** **(** :ref:`float` torque **)** |virt .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__set_linear_velocity: +.. _class_PhysicsDirectBodyState2DExtension_private_method__set_linear_velocity: .. rst-class:: classref-method @@ -712,13 +712,13 @@ void **_set_linear_velocity** **(** :ref:`Vector2` velocity **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__set_sleep_state: +.. _class_PhysicsDirectBodyState2DExtension_private_method__set_sleep_state: .. rst-class:: classref-method @@ -726,13 +726,13 @@ void **_set_sleep_state** **(** :ref:`bool` enabled **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState2DExtension_method__set_transform: +.. _class_PhysicsDirectBodyState2DExtension_private_method__set_transform: .. rst-class:: classref-method @@ -740,12 +740,12 @@ void **_set_transform** **(** :ref:`Transform2D` transform ** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsdirectbodystate3d.rst b/classes/zh_CN/class_physicsdirectbodystate3d.rst index fa084205d8..a1f35bab32 100644 --- a/classes/zh_CN/class_physicsdirectbodystate3d.rst +++ b/classes/zh_CN/class_physicsdirectbodystate3d.rst @@ -10,23 +10,23 @@ PhysicsDirectBodyState3D ======================== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` -**Inherited By:** :ref:`PhysicsDirectBodyState3DExtension` +**派生:** :ref:`PhysicsDirectBodyState3DExtension` 提供对 :ref:`PhysicsServer3D` 中物理体的直接访问。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -提供对 :ref:`PhysicsServer3D` 中物理体的直接访问,从而安全地更改物理属性。该对象会在 :ref:`RigidBody3D` 的直接状态回调中传递,目的是为了改变物体的直接状态。见 :ref:`RigidBody3D._integrate_forces`\ 。 +提供对 :ref:`PhysicsServer3D` 中物理体的直接访问,从而安全地更改物理属性。该对象会在 :ref:`RigidBody3D` 的直接状态回调中传递,目的是为了改变物体的直接状态。见 :ref:`RigidBody3D._integrate_forces`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`物理介绍 <../tutorials/physics/physics_introduction>` @@ -34,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -72,8 +72,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -142,8 +142,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PhysicsDirectBodyState3D_property_angular_velocity: @@ -271,7 +271,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -377,8 +377,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PhysicsDirectBodyState3D_method_add_constant_central_force: @@ -744,10 +744,10 @@ void **set_constant_torque** **(** :ref:`Vector3` torque **)** 见 :ref:`add_constant_torque`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsdirectbodystate3dextension.rst b/classes/zh_CN/class_physicsdirectbodystate3dextension.rst index 5c072ed63c..9f41b07bef 100644 --- a/classes/zh_CN/class_physicsdirectbodystate3dextension.rst +++ b/classes/zh_CN/class_physicsdirectbodystate3dextension.rst @@ -10,14 +10,14 @@ PhysicsDirectBodyState3DExtension ================================= -**Inherits:** :ref:`PhysicsDirectBodyState3D` **<** :ref:`Object` +**继承:** :ref:`PhysicsDirectBodyState3D` **<** :ref:`Object` 提供能够覆盖的虚方法,用于创建自定义的 :ref:`PhysicsDirectBodyState3D` 实现。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类扩展自 :ref:`PhysicsDirectBodyState3D`\ ,提供了额外可覆盖的虚方法。覆盖这些方法后,就会代替物理服务器的内部方法进行调用。 @@ -25,105 +25,105 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_constant_central_force` **(** :ref:`Vector3` force **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_constant_force` **(** :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_constant_torque` **(** :ref:`Vector3` torque **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_central_force` **(** :ref:`Vector3` force **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_central_impulse` **(** :ref:`Vector3` impulse **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_force` **(** :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_impulse` **(** :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_torque` **(** :ref:`Vector3` torque **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_apply_torque_impulse` **(** :ref:`Vector3` impulse **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_get_angular_velocity` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_get_center_of_mass` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_get_center_of_mass_local` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_get_constant_force` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_get_constant_torque` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_get_contact_collider` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_contact_collider_id` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`_get_contact_collider_object` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_get_contact_collider_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_contact_collider_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_get_contact_collider_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_contact_count` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_get_contact_impulse` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_get_contact_local_normal` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_get_contact_local_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_contact_local_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_get_contact_local_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_get_inverse_inertia` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`_get_inverse_inertia_tensor` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_inverse_mass` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_get_linear_velocity` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Basis` | :ref:`_get_principal_inertia_axes` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectSpaceState3D` | :ref:`_get_space_state` **(** **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_step` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_total_angular_damp` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_get_total_gravity` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_total_linear_damp` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`_get_transform` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_get_velocity_at_local_position` **(** :ref:`Vector3` local_position **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_integrate_forces` **(** **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_sleeping` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_angular_velocity` **(** :ref:`Vector3` velocity **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_constant_force` **(** :ref:`Vector3` force **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_constant_torque` **(** :ref:`Vector3` torque **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_linear_velocity` **(** :ref:`Vector3` velocity **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_sleep_state` **(** :ref:`bool` enabled **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_transform` **(** :ref:`Transform3D` transform **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_constant_central_force` **(** :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_constant_force` **(** :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_constant_torque` **(** :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_central_force` **(** :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_central_impulse` **(** :ref:`Vector3` impulse **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_force` **(** :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_impulse` **(** :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_torque` **(** :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_apply_torque_impulse` **(** :ref:`Vector3` impulse **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_angular_velocity` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_center_of_mass` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_center_of_mass_local` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_constant_force` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_constant_torque` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_get_contact_collider` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_contact_collider_id` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`_get_contact_collider_object` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_contact_collider_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_contact_collider_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_contact_collider_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_contact_count` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_contact_impulse` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_contact_local_normal` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_contact_local_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_contact_local_shape` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_contact_local_velocity_at_position` **(** :ref:`int` contact_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_inverse_inertia` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`_get_inverse_inertia_tensor` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_inverse_mass` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_linear_velocity` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`_get_principal_inertia_axes` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState3D` | :ref:`_get_space_state` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_step` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_total_angular_damp` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_total_gravity` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_total_linear_damp` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_get_transform` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_velocity_at_local_position` **(** :ref:`Vector3` local_position **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_integrate_forces` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_sleeping` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_angular_velocity` **(** :ref:`Vector3` velocity **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_constant_force` **(** :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_constant_torque` **(** :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_linear_velocity` **(** :ref:`Vector3` velocity **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_sleep_state` **(** :ref:`bool` enabled **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_transform` **(** :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -131,10 +131,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_PhysicsDirectBodyState3DExtension_method__add_constant_central_force: +.. _class_PhysicsDirectBodyState3DExtension_private_method__add_constant_central_force: .. rst-class:: classref-method @@ -142,13 +142,13 @@ void **_add_constant_central_force** **(** :ref:`Vector3` force * .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__add_constant_force: +.. _class_PhysicsDirectBodyState3DExtension_private_method__add_constant_force: .. rst-class:: classref-method @@ -156,13 +156,13 @@ void **_add_constant_force** **(** :ref:`Vector3` force, :ref:`Ve .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__add_constant_torque: +.. _class_PhysicsDirectBodyState3DExtension_private_method__add_constant_torque: .. rst-class:: classref-method @@ -170,13 +170,13 @@ void **_add_constant_torque** **(** :ref:`Vector3` torque **)** | .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__apply_central_force: +.. _class_PhysicsDirectBodyState3DExtension_private_method__apply_central_force: .. rst-class:: classref-method @@ -184,13 +184,13 @@ void **_apply_central_force** **(** :ref:`Vector3` force **)** |v .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__apply_central_impulse: +.. _class_PhysicsDirectBodyState3DExtension_private_method__apply_central_impulse: .. rst-class:: classref-method @@ -198,13 +198,13 @@ void **_apply_central_impulse** **(** :ref:`Vector3` impulse **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__apply_force: +.. _class_PhysicsDirectBodyState3DExtension_private_method__apply_force: .. rst-class:: classref-method @@ -212,13 +212,13 @@ void **_apply_force** **(** :ref:`Vector3` force, :ref:`Vector3`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__apply_impulse: +.. _class_PhysicsDirectBodyState3DExtension_private_method__apply_impulse: .. rst-class:: classref-method @@ -226,13 +226,13 @@ void **_apply_impulse** **(** :ref:`Vector3` impulse, :ref:`Vecto .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__apply_torque: +.. _class_PhysicsDirectBodyState3DExtension_private_method__apply_torque: .. rst-class:: classref-method @@ -240,13 +240,13 @@ void **_apply_torque** **(** :ref:`Vector3` torque **)** |virtual .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__apply_torque_impulse: +.. _class_PhysicsDirectBodyState3DExtension_private_method__apply_torque_impulse: .. rst-class:: classref-method @@ -254,13 +254,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_angular_velocity: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_angular_velocity: .. rst-class:: classref-method @@ -268,13 +268,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_center_of_mass: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_center_of_mass: .. rst-class:: classref-method @@ -282,13 +282,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_center_of_mass_local: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_center_of_mass_local: .. rst-class:: classref-method @@ -296,13 +296,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_constant_force: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_constant_force: .. rst-class:: classref-method @@ -310,13 +310,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_constant_torque: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_constant_torque: .. rst-class:: classref-method @@ -324,13 +324,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider: .. rst-class:: classref-method @@ -338,13 +338,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_id: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_id: .. rst-class:: classref-method @@ -352,13 +352,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_object: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_object: .. rst-class:: classref-method @@ -366,13 +366,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_position: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_position: .. rst-class:: classref-method @@ -380,13 +380,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_shape: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_shape: .. rst-class:: classref-method @@ -394,13 +394,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_collider_velocity_at_position: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_collider_velocity_at_position: .. rst-class:: classref-method @@ -408,13 +408,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_count: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_count: .. rst-class:: classref-method @@ -422,13 +422,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_impulse: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_impulse: .. rst-class:: classref-method @@ -436,13 +436,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_local_normal: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_local_normal: .. rst-class:: classref-method @@ -450,13 +450,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_local_position: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_local_position: .. rst-class:: classref-method @@ -464,13 +464,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_local_shape: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_local_shape: .. rst-class:: classref-method @@ -478,13 +478,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_contact_local_velocity_at_position: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_contact_local_velocity_at_position: .. rst-class:: classref-method @@ -492,13 +492,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_inverse_inertia: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_inverse_inertia: .. rst-class:: classref-method @@ -506,13 +506,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_inverse_inertia_tensor: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_inverse_inertia_tensor: .. rst-class:: classref-method @@ -520,13 +520,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_inverse_mass: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_inverse_mass: .. rst-class:: classref-method @@ -534,13 +534,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_linear_velocity: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_linear_velocity: .. rst-class:: classref-method @@ -548,13 +548,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_principal_inertia_axes: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_principal_inertia_axes: .. rst-class:: classref-method @@ -562,13 +562,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_space_state: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_space_state: .. rst-class:: classref-method @@ -576,13 +576,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_step: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_step: .. rst-class:: classref-method @@ -590,13 +590,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_total_angular_damp: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_total_angular_damp: .. rst-class:: classref-method @@ -604,13 +604,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_total_gravity: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_total_gravity: .. rst-class:: classref-method @@ -618,13 +618,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_total_linear_damp: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_total_linear_damp: .. rst-class:: classref-method @@ -632,13 +632,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_transform: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_transform: .. rst-class:: classref-method @@ -646,13 +646,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__get_velocity_at_local_position: +.. _class_PhysicsDirectBodyState3DExtension_private_method__get_velocity_at_local_position: .. rst-class:: classref-method @@ -660,13 +660,13 @@ void **_apply_torque_impulse** **(** :ref:`Vector3` impulse **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__integrate_forces: +.. _class_PhysicsDirectBodyState3DExtension_private_method__integrate_forces: .. rst-class:: classref-method @@ -674,13 +674,13 @@ void **_integrate_forces** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__is_sleeping: +.. _class_PhysicsDirectBodyState3DExtension_private_method__is_sleeping: .. rst-class:: classref-method @@ -688,13 +688,13 @@ void **_integrate_forces** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__set_angular_velocity: +.. _class_PhysicsDirectBodyState3DExtension_private_method__set_angular_velocity: .. rst-class:: classref-method @@ -702,13 +702,13 @@ void **_set_angular_velocity** **(** :ref:`Vector3` velocity **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__set_constant_force: +.. _class_PhysicsDirectBodyState3DExtension_private_method__set_constant_force: .. rst-class:: classref-method @@ -716,13 +716,13 @@ void **_set_constant_force** **(** :ref:`Vector3` force **)** |vi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__set_constant_torque: +.. _class_PhysicsDirectBodyState3DExtension_private_method__set_constant_torque: .. rst-class:: classref-method @@ -730,13 +730,13 @@ void **_set_constant_torque** **(** :ref:`Vector3` torque **)** | .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__set_linear_velocity: +.. _class_PhysicsDirectBodyState3DExtension_private_method__set_linear_velocity: .. rst-class:: classref-method @@ -744,13 +744,13 @@ void **_set_linear_velocity** **(** :ref:`Vector3` velocity **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__set_sleep_state: +.. _class_PhysicsDirectBodyState3DExtension_private_method__set_sleep_state: .. rst-class:: classref-method @@ -758,13 +758,13 @@ void **_set_sleep_state** **(** :ref:`bool` enabled **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectBodyState3DExtension_method__set_transform: +.. _class_PhysicsDirectBodyState3DExtension_private_method__set_transform: .. rst-class:: classref-method @@ -772,12 +772,12 @@ void **_set_transform** **(** :ref:`Transform3D` transform ** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsdirectspacestate2d.rst b/classes/zh_CN/class_physicsdirectspacestate2d.rst index 0c36dbcb83..3fa25777b0 100644 --- a/classes/zh_CN/class_physicsdirectspacestate2d.rst +++ b/classes/zh_CN/class_physicsdirectspacestate2d.rst @@ -10,23 +10,23 @@ PhysicsDirectSpaceState2D ========================= -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` -**Inherited By:** :ref:`PhysicsDirectSpaceState2DExtension` +**派生:** :ref:`PhysicsDirectSpaceState2DExtension` 提供对 :ref:`PhysicsServer2D` 中物理空间的直接访问。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 提供对 :ref:`PhysicsServer2D` 中物理空间的直接访问。主要用于对驻留在给定空间中的对象和区域进行查询。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`物理介绍 <../tutorials/physics/physics_introduction>` @@ -34,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -60,8 +60,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PhysicsDirectSpaceState2D_method_cast_motion: @@ -187,10 +187,10 @@ Method Descriptions 可以使用 ``max_results`` 参数限制相交的数量,以减少处理时间。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsdirectspacestate2dextension.rst b/classes/zh_CN/class_physicsdirectspacestate2dextension.rst index bd3873d99c..014c834137 100644 --- a/classes/zh_CN/class_physicsdirectspacestate2dextension.rst +++ b/classes/zh_CN/class_physicsdirectspacestate2dextension.rst @@ -10,14 +10,14 @@ PhysicsDirectSpaceState2DExtension ================================== -**Inherits:** :ref:`PhysicsDirectSpaceState2D` **<** :ref:`Object` +**继承:** :ref:`PhysicsDirectSpaceState2D` **<** :ref:`Object` 提供能够覆盖的虚方法,用于创建自定义的 :ref:`PhysicsDirectSpaceState2D` 实现。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类扩展自 :ref:`PhysicsDirectSpaceState2D`\ ,提供了额外可覆盖的虚方法。覆盖这些方法后,就会代替物理服务器的内部方法进行调用。 @@ -25,27 +25,27 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_cast_motion` **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, float* closest_safe, float* closest_unsafe **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_collide_shape` **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, void* results, :ref:`int` max_results, int32_t* result_count **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_intersect_point` **(** :ref:`Vector2` position, :ref:`int` canvas_instance_id, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeResult* results, :ref:`int` max_results **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_intersect_ray` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, PhysicsServer2DExtensionRayResult* result **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_intersect_shape` **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeResult* result, :ref:`int` max_results **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_rest_info` **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeRestInfo* rest_info **)** |virtual| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_body_excluded_from_query` **(** :ref:`RID` body **)** |const| | - +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_cast_motion` **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, float* closest_safe, float* closest_unsafe **)** |virtual| | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_collide_shape` **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, void* results, :ref:`int` max_results, int32_t* result_count **)** |virtual| | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_intersect_point` **(** :ref:`Vector2` position, :ref:`int` canvas_instance_id, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeResult* results, :ref:`int` max_results **)** |virtual| | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_intersect_ray` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, PhysicsServer2DExtensionRayResult* result **)** |virtual| | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_intersect_shape` **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeResult* result, :ref:`int` max_results **)** |virtual| | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_rest_info` **(** :ref:`RID` shape_rid, :ref:`Transform2D` transform, :ref:`Vector2` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer2DExtensionShapeRestInfo* rest_info **)** |virtual| | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_body_excluded_from_query` **(** :ref:`RID` body **)** |const| | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -53,10 +53,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_PhysicsDirectSpaceState2DExtension_method__cast_motion: +.. _class_PhysicsDirectSpaceState2DExtension_private_method__cast_motion: .. rst-class:: classref-method @@ -64,13 +64,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectSpaceState2DExtension_method__collide_shape: +.. _class_PhysicsDirectSpaceState2DExtension_private_method__collide_shape: .. rst-class:: classref-method @@ -78,13 +78,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectSpaceState2DExtension_method__intersect_point: +.. _class_PhysicsDirectSpaceState2DExtension_private_method__intersect_point: .. rst-class:: classref-method @@ -92,13 +92,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectSpaceState2DExtension_method__intersect_ray: +.. _class_PhysicsDirectSpaceState2DExtension_private_method__intersect_ray: .. rst-class:: classref-method @@ -106,13 +106,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectSpaceState2DExtension_method__intersect_shape: +.. _class_PhysicsDirectSpaceState2DExtension_private_method__intersect_shape: .. rst-class:: classref-method @@ -120,13 +120,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectSpaceState2DExtension_method__rest_info: +.. _class_PhysicsDirectSpaceState2DExtension_private_method__rest_info: .. rst-class:: classref-method @@ -134,7 +134,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -148,12 +148,12 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsdirectspacestate3d.rst b/classes/zh_CN/class_physicsdirectspacestate3d.rst index e3dacdf12e..31dbdd63ed 100644 --- a/classes/zh_CN/class_physicsdirectspacestate3d.rst +++ b/classes/zh_CN/class_physicsdirectspacestate3d.rst @@ -10,23 +10,23 @@ PhysicsDirectSpaceState3D ========================= -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` -**Inherited By:** :ref:`PhysicsDirectSpaceState3DExtension` +**派生:** :ref:`PhysicsDirectSpaceState3DExtension` 提供对 :ref:`PhysicsServer3D` 中物理空间的直接访问。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 提供对 :ref:`PhysicsServer3D` 中物理空间的直接访问。主要用于对驻留在给定空间中的对象和区域进行查询。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`物理介绍 <../tutorials/physics/physics_introduction>` @@ -34,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -60,8 +60,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PhysicsDirectSpaceState3D_method_cast_motion: @@ -151,25 +151,25 @@ Method Descriptions :ref:`Dictionary` **intersect_ray** **(** :ref:`PhysicsRayQueryParameters3D` parameters **)** -Intersects a ray in a given space. Ray position and other parameters are defined through :ref:`PhysicsRayQueryParameters3D`. The returned object is a dictionary with the following fields: +在给定空间中检测与射线的相交情况。射线的位置和其他参数由 :ref:`PhysicsRayQueryParameters3D` 定义。返回的对象是包含以下字段的字典: -\ ``collider``: The colliding object. +\ ``collider``\ :碰撞到的对象。 -\ ``collider_id``: The colliding object's ID. +\ ``collider_id``\ :碰撞到的对象的 ID。 -\ ``normal``: The object's surface normal at the intersection point, or ``Vector3(0, 0, 0)`` if the ray starts inside the shape and :ref:`PhysicsRayQueryParameters3D.hit_from_inside` is ``true``. +\ ``normal``\ :该对象表面交点处的法线,如果射线中该形状的内部开始,并且 :ref:`PhysicsRayQueryParameters3D.hit_from_inside` 为 ``true``\ ,则为 ``Vector3(0, 0, 0)``\ 。 -\ ``position``: The intersection point. +\ ``position``\ :交点。 -\ ``face_index``: The face index at the intersection point. +\ ``face_index``\ :交点处的面索引。 -\ **Note:** Returns a valid number only if the intersected shape is a :ref:`ConcavePolygonShape3D`. Otherwise, ``-1`` is returned. +\ **注意:**\ 只有相交形状是 :ref:`ConcavePolygonShape3D` 时才会返回有效值。否则返回 ``-1``\ 。 -\ ``rid``: The intersecting object's :ref:`RID`. +\ ``rid``\ :相交对象的 :ref:`RID`\ 。 -\ ``shape``: The shape index of the colliding shape. +\ ``shape``\ :碰撞形状的形状索引。 -If the ray did not intersect anything, then an empty dictionary is returned instead. +如果射线没有发生相交,则返回的是空字典。 .. rst-class:: classref-item-separator @@ -195,10 +195,10 @@ If the ray did not intersect anything, then an empty dictionary is returned inst \ **注意:**\ 该方法不考虑对象的 ``motion`` 属性。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsdirectspacestate3dextension.rst b/classes/zh_CN/class_physicsdirectspacestate3dextension.rst index 54108b2df4..c7f99a14f6 100644 --- a/classes/zh_CN/class_physicsdirectspacestate3dextension.rst +++ b/classes/zh_CN/class_physicsdirectspacestate3dextension.rst @@ -10,14 +10,14 @@ PhysicsDirectSpaceState3DExtension ================================== -**Inherits:** :ref:`PhysicsDirectSpaceState3D` **<** :ref:`Object` +**继承:** :ref:`PhysicsDirectSpaceState3D` **<** :ref:`Object` 提供能够覆盖的虚方法,用于创建自定义的 :ref:`PhysicsDirectSpaceState3D` 实现。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类扩展自 :ref:`PhysicsDirectSpaceState3D`\ ,额外提供了可覆盖的虚方法。调用时会使用这些覆盖后的方法代替物理服务器中的内部方法。 @@ -25,29 +25,29 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_cast_motion` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, float* closest_safe, float* closest_unsafe, PhysicsServer3DExtensionShapeRestInfo* info **)** |virtual| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_collide_shape` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, void* results, :ref:`int` max_results, int32_t* result_count **)** |virtual| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_get_closest_point_to_object_volume` **(** :ref:`RID` object, :ref:`Vector3` point **)** |virtual| |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_intersect_point` **(** :ref:`Vector3` position, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* results, :ref:`int` max_results **)** |virtual| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_intersect_ray` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, :ref:`bool` hit_back_faces, :ref:`bool` pick_ray, PhysicsServer3DExtensionRayResult* result **)** |virtual| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_intersect_shape` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* result_count, :ref:`int` max_results **)** |virtual| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_rest_info` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeRestInfo* rest_info **)** |virtual| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_body_excluded_from_query` **(** :ref:`RID` body **)** |const| | - +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_cast_motion` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, float* closest_safe, float* closest_unsafe, PhysicsServer3DExtensionShapeRestInfo* info **)** |virtual| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_collide_shape` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, void* results, :ref:`int` max_results, int32_t* result_count **)** |virtual| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_get_closest_point_to_object_volume` **(** :ref:`RID` object, :ref:`Vector3` point **)** |virtual| |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_intersect_point` **(** :ref:`Vector3` position, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* results, :ref:`int` max_results **)** |virtual| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_intersect_ray` **(** :ref:`Vector3` from, :ref:`Vector3` to, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, :ref:`bool` hit_from_inside, :ref:`bool` hit_back_faces, :ref:`bool` pick_ray, PhysicsServer3DExtensionRayResult* result **)** |virtual| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_intersect_shape` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeResult* result_count, :ref:`int` max_results **)** |virtual| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_rest_info` **(** :ref:`RID` shape_rid, :ref:`Transform3D` transform, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` collision_mask, :ref:`bool` collide_with_bodies, :ref:`bool` collide_with_areas, PhysicsServer3DExtensionShapeRestInfo* rest_info **)** |virtual| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_body_excluded_from_query` **(** :ref:`RID` body **)** |const| | + +-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -55,10 +55,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_PhysicsDirectSpaceState3DExtension_method__cast_motion: +.. _class_PhysicsDirectSpaceState3DExtension_private_method__cast_motion: .. rst-class:: classref-method @@ -66,13 +66,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectSpaceState3DExtension_method__collide_shape: +.. _class_PhysicsDirectSpaceState3DExtension_private_method__collide_shape: .. rst-class:: classref-method @@ -80,13 +80,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectSpaceState3DExtension_method__get_closest_point_to_object_volume: +.. _class_PhysicsDirectSpaceState3DExtension_private_method__get_closest_point_to_object_volume: .. rst-class:: classref-method @@ -94,13 +94,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectSpaceState3DExtension_method__intersect_point: +.. _class_PhysicsDirectSpaceState3DExtension_private_method__intersect_point: .. rst-class:: classref-method @@ -108,13 +108,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectSpaceState3DExtension_method__intersect_ray: +.. _class_PhysicsDirectSpaceState3DExtension_private_method__intersect_ray: .. rst-class:: classref-method @@ -122,13 +122,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectSpaceState3DExtension_method__intersect_shape: +.. _class_PhysicsDirectSpaceState3DExtension_private_method__intersect_shape: .. rst-class:: classref-method @@ -136,13 +136,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsDirectSpaceState3DExtension_method__rest_info: +.. _class_PhysicsDirectSpaceState3DExtension_private_method__rest_info: .. rst-class:: classref-method @@ -150,7 +150,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -164,12 +164,12 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsmaterial.rst b/classes/zh_CN/class_physicsmaterial.rst index ad752766b4..73edf3e71b 100644 --- a/classes/zh_CN/class_physicsmaterial.rst +++ b/classes/zh_CN/class_physicsmaterial.rst @@ -10,21 +10,21 @@ PhysicsMaterial =============== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 存放与表面的物理相关的属性,也就是粗糙度和反弹度。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 存放与表面的物理相关的属性,也就是粗糙度和反弹度。这个类用于将这些属性应用至物理体。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PhysicsMaterial_property_absorbent: @@ -112,10 +112,10 @@ Property Descriptions 如果为 ``true``\ ,当两个物体碰撞时,物理引擎将使用标记为“粗糙”的物体的摩擦。如果 ``false``\ ,物理引擎将使用所有碰撞物体的最低摩擦力来代替。如果两个碰撞的对象都为 ``true``\ ,物理引擎将使用最高的摩擦力。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicspointqueryparameters2d.rst b/classes/zh_CN/class_physicspointqueryparameters2d.rst index d97ad72765..77f6d9f037 100644 --- a/classes/zh_CN/class_physicspointqueryparameters2d.rst +++ b/classes/zh_CN/class_physicspointqueryparameters2d.rst @@ -10,21 +10,21 @@ PhysicsPointQueryParameters2D ============================= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 为 :ref:`PhysicsDirectSpaceState2D.intersect_point` 提供参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 通过修改这个对象的点位置等属性,你可以为 :ref:`PhysicsDirectSpaceState2D.intersect_point` 配置参数。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PhysicsPointQueryParameters2D_property_canvas_instance_id: @@ -152,10 +152,10 @@ Property Descriptions 要查询的位置,使用全局坐标。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicspointqueryparameters3d.rst b/classes/zh_CN/class_physicspointqueryparameters3d.rst index 75a95b4b7e..da0e811174 100644 --- a/classes/zh_CN/class_physicspointqueryparameters3d.rst +++ b/classes/zh_CN/class_physicspointqueryparameters3d.rst @@ -10,21 +10,21 @@ PhysicsPointQueryParameters3D ============================= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 为 :ref:`PhysicsDirectSpaceState3D.intersect_point` 提供参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 通过修改这个对象的点位置等属性,你可以为 :ref:`PhysicsDirectSpaceState3D.intersect_point` 配置参数。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PhysicsPointQueryParameters3D_property_collide_with_areas: @@ -131,10 +131,10 @@ Property Descriptions 要查询的位置,使用全局坐标。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsrayqueryparameters2d.rst b/classes/zh_CN/class_physicsrayqueryparameters2d.rst index bd8608f7d2..aa452b56d4 100644 --- a/classes/zh_CN/class_physicsrayqueryparameters2d.rst +++ b/classes/zh_CN/class_physicsrayqueryparameters2d.rst @@ -10,21 +10,21 @@ PhysicsRayQueryParameters2D =========================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 为 :ref:`PhysicsDirectSpaceState2D.intersect_ray` 提供参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 通过修改这个对象的射线位置等属性,你可以为 :ref:`PhysicsDirectSpaceState2D.intersect_ray` 配置参数。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -63,8 +63,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PhysicsRayQueryParameters2D_property_collide_with_areas: @@ -187,8 +187,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PhysicsRayQueryParameters2D_method_create: @@ -203,10 +203,10 @@ Method Descriptions var query = PhysicsRayQueryParameters2D.create(global_position, global_position + Vector2(0, 100)) var collision = get_world_2d().direct_space_state.intersect_ray(query) -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsrayqueryparameters3d.rst b/classes/zh_CN/class_physicsrayqueryparameters3d.rst index 047bd56cd0..e29604a8ce 100644 --- a/classes/zh_CN/class_physicsrayqueryparameters3d.rst +++ b/classes/zh_CN/class_physicsrayqueryparameters3d.rst @@ -10,21 +10,21 @@ PhysicsRayQueryParameters3D =========================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 为 :ref:`PhysicsDirectSpaceState3D.intersect_ray` 提供参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 通过修改这个对象的射线位置等属性,你可以为 :ref:`PhysicsDirectSpaceState3D.intersect_ray` 配置参数。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -65,8 +65,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PhysicsRayQueryParameters3D_property_collide_with_areas: @@ -206,8 +206,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PhysicsRayQueryParameters3D_method_create: @@ -222,10 +222,10 @@ Method Descriptions var query = PhysicsRayQueryParameters3D.create(position, position + Vector3(0, -10, 0)) var collision = get_world_3d().direct_space_state.intersect_ray(query) -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsserver2d.rst b/classes/zh_CN/class_physicsserver2d.rst index 4094e6abe5..6415a54431 100644 --- a/classes/zh_CN/class_physicsserver2d.rst +++ b/classes/zh_CN/class_physicsserver2d.rst @@ -10,22 +10,22 @@ PhysicsServer2D =============== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` -**Inherited By:** :ref:`PhysicsServer2DExtension` +**派生:** :ref:`PhysicsServer2DExtension` 用于访问低阶 2D 物理的服务器接口。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- PhysicsServer2D 是负责所有 2D 物理的服务器。它可以直接创建和操作所有物理对象: - *Space(空间)*\ 是用于物理仿真的自包含世界。它包含实体、区域和关节。可以对其状态进行查询,获取碰撞和相交信息,并且可以修改部分仿真参数。 -- *Shape(形状)*\ 是圆形、矩形、胶囊形、多边形等几何形状。加入到实体/区域中就可以用来进行碰撞检测,还可以带有相对于实体/区域原点的额外变换。实体/区域中可以添加多个(变换后的)形状,同一个形状可以使用不同的局部变换添加到实体/区域中。 +- *Shape(形状)*\ 是圆形、矩形、胶囊形、多边形等几何形状。加入到实体/区域中就可以用来进行碰撞检测,还可以带有相对于实体/区域原点的额外变换。实体/区域中可以添加多个(变换后的)形状,并且可以使用不同的局部变换将单个形状多次添加到实体/区域中。 - *Body(实体)*\ 是物理对象,可以处于静态、运动学或刚性模式。可以对其状态进行查询和更新(例如位置、速度等)。可以设置力的集成回调,自定义实体的物理特性。 @@ -39,8 +39,8 @@ PhysicsServer2D 是负责所有 2D 物理的服务器。它可以直接创建和 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -246,8 +246,12 @@ Methods +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`joint_set_param` **(** :ref:`RID` joint, :ref:`JointParam` param, :ref:`float` value **)** | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`pin_joint_get_flag` **(** :ref:`RID` joint, :ref:`PinJointFlag` flag **)** |const| | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`pin_joint_get_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |const| | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`pin_joint_set_flag` **(** :ref:`RID` joint, :ref:`PinJointFlag` flag, :ref:`bool` enabled **)** | + +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`pin_joint_set_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** | +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`rectangle_shape_create` **(** **)** | @@ -285,8 +289,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_PhysicsServer2D_SpaceParameter: @@ -910,6 +914,56 @@ enum **PinJointParam**: 常量,用于设置/获取销关节的纽带可以弯曲多少。该参数的默认值为 ``0.0``\ 。 +.. _class_PhysicsServer2D_constant_PIN_JOINT_LIMIT_UPPER: + +.. rst-class:: classref-enumeration-constant + +:ref:`PinJointParam` **PIN_JOINT_LIMIT_UPPER** = ``1`` + +绕该销的最大旋转。 + +.. _class_PhysicsServer2D_constant_PIN_JOINT_LIMIT_LOWER: + +.. rst-class:: classref-enumeration-constant + +:ref:`PinJointParam` **PIN_JOINT_LIMIT_LOWER** = ``2`` + +绕该销的最小旋转。 + +.. _class_PhysicsServer2D_constant_PIN_JOINT_MOTOR_TARGET_VELOCITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`PinJointParam` **PIN_JOINT_MOTOR_TARGET_VELOCITY** = ``3`` + +马达的目标速度。单位为弧度每秒。 + +.. rst-class:: classref-item-separator + +---- + +.. _enum_PhysicsServer2D_PinJointFlag: + +.. rst-class:: classref-enumeration + +enum **PinJointFlag**: + +.. _class_PhysicsServer2D_constant_PIN_JOINT_FLAG_ANGULAR_LIMIT_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`PinJointFlag` **PIN_JOINT_FLAG_ANGULAR_LIMIT_ENABLED** = ``0`` + +如果为 ``true``\ ,则销关节具有最大和最小旋转。 + +.. _class_PhysicsServer2D_constant_PIN_JOINT_FLAG_MOTOR_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`PinJointFlag` **PIN_JOINT_FLAG_MOTOR_ENABLED** = ``1`` + +如果为 ``true``\ ,则马达将转动该销。 + .. rst-class:: classref-item-separator ---- @@ -1044,8 +1098,8 @@ enum **ProcessInfo**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PhysicsServer2D_method_area_add_shape: @@ -1209,7 +1263,7 @@ void **area_clear_shapes** **(** :ref:`RID` area **)** :ref:`RID` **area_get_space** **(** :ref:`RID` area **)** |const| -返回分配给该区域的空间 :ref:`RID`\ 。如果没有分配空间,则返回 ``RID()``\ 。 +返回分配给该区域的空间 :ref:`RID`\ 。如果没有分配空间,则返回空 :ref:`RID`\ 。 .. rst-class:: classref-item-separator @@ -1785,7 +1839,7 @@ void **body_clear_shapes** **(** :ref:`RID` body **)** :ref:`RID` **body_get_space** **(** :ref:`RID` body **)** |const| -返回分配给该实体的空间的 :ref:`RID`\ 。如果没有分配空间,则返回 ``RID()``\ 。 +返回分配给该实体的空间的 :ref:`RID`\ 。如果没有分配空间,则返回空 :ref:`RID`\ 。 .. rst-class:: classref-item-separator @@ -2299,7 +2353,7 @@ void **joint_make_groove** **(** :ref:`RID` joint, :ref:`Vector2` joint, :ref:`Vector2` anchor, :ref:`RID` body_a, :ref:`RID` body_b=RID() **)** -使关节成为一个销关节。如果 ``body_b`` 是 ``RID()``\ ,则 ``body_a`` 被固定到点 ``anchor``\ (在全局坐标中给出); 否则,\ ``body_a`` 在 ``anchor`` 点被固定到 ``body_b``\ (在全局坐标中给出)。要设置特定于销关节的参数,请参阅 :ref:`pin_joint_set_param`\ 。 +使关节成为一个销关节。如果 ``body_b`` 是一个空 :ref:`RID`\ ,则 ``body_a`` 被固定到点 ``anchor``\ (在全局坐标中给出); 否则,\ ``body_a`` 在 ``anchor`` 点被固定到 ``body_b``\ (在全局坐标中给出)。要设置特定于销关节的参数,请参阅 :ref:`pin_joint_set_param`\ 。 .. rst-class:: classref-item-separator @@ -2317,6 +2371,18 @@ void **joint_set_param** **(** :ref:`RID` joint, :ref:`JointParam` **pin_joint_get_flag** **(** :ref:`RID` joint, :ref:`PinJointFlag` flag **)** |const| + +获取销关节标志(请参阅 :ref:`PinJointFlag` 常量)。 + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsServer2D_method_pin_joint_get_param: .. rst-class:: classref-method @@ -2329,6 +2395,18 @@ void **joint_set_param** **(** :ref:`RID` joint, :ref:`JointParam` joint, :ref:`PinJointFlag` flag, :ref:`bool` enabled **)** + +设置销关节标志(请参阅 :ref:`PinJointFlag` 常量)。 + +.. rst-class:: classref-item-separator + +---- + .. _class_PhysicsServer2D_method_pin_joint_set_param: .. rst-class:: classref-method @@ -2421,19 +2499,19 @@ void **shape_set_data** **(** :ref:`RID` shape, :ref:`Variant`\ ): -- :ref:`SHAPE_WORLD_BOUNDARY`\ :长度为 2 的数组,包含 :ref:`Vector2` 类型的 ``normal`` 方向和 ``float`` 类型的距离 ``d``\ , +- :ref:`SHAPE_WORLD_BOUNDARY`\ :长度为 2 的数组,包含 :ref:`Vector2` 类型的 ``normal`` 方向和 :ref:`float` 类型的距离 ``d``\ , -- :ref:`SHAPE_SEPARATION_RAY`\ :字典,包含键 ``length`` 和 ``float`` 值、以及键 ``slide_on_slope`` 和 ``bool`` 值, +- :ref:`SHAPE_SEPARATION_RAY`\ :字典,包含键 ``length`` 和 :ref:`float` 值、以及键 ``slide_on_slope`` 和 :ref:`bool` 值, - :ref:`SHAPE_SEGMENT`\ :\ :ref:`Rect2` 类型的 ``rect``\ ,以 ``rect.position`` 表示线段中的第一个点,并以 ``rect.size`` 表示线段中的第二个点, -- :ref:`SHAPE_CIRCLE`\ :\ ``float`` 类型的 ``radius``\ , +- :ref:`SHAPE_CIRCLE`\ :\ :ref:`float` 类型的 ``radius``\ , - :ref:`SHAPE_RECTANGLE`\ :\ :ref:`Vector2` 类型的 ``half_extents``\ , -- :ref:`SHAPE_CAPSULE`\ :长度为 2 的数组(或一个 :ref:`Vector2`\ ),包含一个 ``float`` 类型的 ``height`` 和一个 ``float`` 类型的 ``radius``\ , +- :ref:`SHAPE_CAPSULE`\ :长度为 2 的数组(或一个 :ref:`Vector2`\ ),包含一个 :ref:`float` 类型的 ``height`` 和一个 :ref:`float` 类型的 ``radius``\ , -- :ref:`SHAPE_CONVEX_POLYGON`\ :按逆时针顺序定义凸多边形的点的 :ref:`PackedVector2Array`\ (在内部使用由连续点形成的每个线段的顺时针向外法线计算);或一个长度可被 4 整除的 :ref:`PackedFloat32Array`\ ,以便每个 4 元组的 ``float`` 包含一个点的坐标,后跟一个向量的坐标表示,该向量是当前点和下一个点之间的线段的顺时针向外法向量, +- :ref:`SHAPE_CONVEX_POLYGON`\ :按逆时针顺序定义凸多边形的点的 :ref:`PackedVector2Array`\ (在内部使用由连续点形成的每个线段的顺时针向外法线计算);或一个长度可被 4 整除的 :ref:`PackedFloat32Array`\ ,以便每个 4 元组的 :ref:`float` 包含一个点的坐标,后跟一个向量的坐标表示,该向量是当前点和下一个点之间的线段的顺时针向外法向量, - :ref:`SHAPE_CONCAVE_POLYGON`\ :长度可被 2 整除的 :ref:`PackedVector2Array`\ (每对点形成一个线段)。 @@ -2523,10 +2601,10 @@ void **space_set_param** **(** :ref:`RID` space, :ref:`SpaceParameter 在物理服务中创建一个 2D 世界边界形状,并返回标识它的 :ref:`RID`\ 。可使用 :ref:`shape_set_data` 设置形状的法线方向和距离属性。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsserver2dextension.rst b/classes/zh_CN/class_physicsserver2dextension.rst index f606a3cb18..2d464ae218 100644 --- a/classes/zh_CN/class_physicsserver2dextension.rst +++ b/classes/zh_CN/class_physicsserver2dextension.rst @@ -10,14 +10,14 @@ PhysicsServer2DExtension ======================== -**Inherits:** :ref:`PhysicsServer2D` **<** :ref:`Object` +**继承:** :ref:`PhysicsServer2D` **<** :ref:`Object` 提供覆盖后可以用来创建自定义 :ref:`PhysicsServer2D` 实现的虚方法。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类扩展自 :ref:`PhysicsServer2D`\ ,提供可额外的可覆盖虚方法。覆盖这些方法后,就不会调用物理服务器内部方法,而是调用这些覆盖后的方法。 @@ -25,289 +25,293 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform2D` transform, :ref:`bool` disabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_attach_canvas_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_clear_shapes` **(** :ref:`RID` area **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_area_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_canvas_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_collision_layer` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_collision_mask` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_object_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_shape_count` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`_area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_area_get_space` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`_area_get_transform` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_pickable` **(** :ref:`RID` area, :ref:`bool` pickable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_transform` **(** :ref:`RID` area, :ref:`Transform2D` transform **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_torque` **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform2D` transform, :ref:`bool` disabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector2` impulse **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_force` **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector2` impulse, :ref:`Vector2` position **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_torque` **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`float` impulse **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_attach_canvas_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_clear_shapes` **(** :ref:`RID` body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_body_collide_shape` **(** :ref:`RID` body, :ref:`int` body_shape, :ref:`RID` shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` motion, void* results, :ref:`int` result_max, int32_t* result_count **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_body_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_canvas_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]` | :ref:`_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_body_get_collision_priority` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_body_get_constant_force` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_body_get_constant_torque` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_body_get_contacts_reported_depth_threshold` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CCDMode` | :ref:`_body_get_continuous_collision_detection_mode` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectBodyState2D` | :ref:`_body_get_direct_state` **(** :ref:`RID` body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_max_contacts_reported` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BodyMode` | :ref:`_body_get_mode` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_object_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_shape_count` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`_body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_body_is_omitting_force_integration` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_reset_mass_properties` **(** :ref:`RID` body **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector2` axis_velocity **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_constant_torque` **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_contacts_reported_depth_threshold` **(** :ref:`RID` body, :ref:`float` threshold **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_continuous_collision_detection_mode` **(** :ref:`RID` body, :ref:`CCDMode` mode **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_pickable` **(** :ref:`RID` body, :ref:`bool` pickable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape_as_one_way_collision` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` enable, :ref:`float` margin **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_state_sync_callback` **(** :ref:`RID` body, :ref:`Callable` callable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_body_test_motion` **(** :ref:`RID` body, :ref:`Transform2D` from, :ref:`Vector2` motion, :ref:`float` margin, :ref:`bool` collide_separation_ray, :ref:`bool` recovery_as_collision, PhysicsServer2DExtensionMotionResult* result **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_capsule_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_circle_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_concave_polygon_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_convex_polygon_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_damped_spring_joint_get_param` **(** :ref:`RID` joint, :ref:`DampedSpringParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_damped_spring_joint_set_param` **(** :ref:`RID` joint, :ref:`DampedSpringParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_end_sync` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_finish` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_flush_queries` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_process_info` **(** :ref:`ProcessInfo` process_info **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_init` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_flushing_queries` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_clear` **(** :ref:`RID` joint **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_joint_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_disable_collisions_between_bodies` **(** :ref:`RID` joint, :ref:`bool` disable **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_joint_get_param` **(** :ref:`RID` joint, :ref:`JointParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`JointType` | :ref:`_joint_get_type` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_joint_is_disabled_collisions_between_bodies` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_damped_spring` **(** :ref:`RID` joint, :ref:`Vector2` anchor_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_groove` **(** :ref:`RID` joint, :ref:`Vector2` a_groove1, :ref:`Vector2` a_groove2, :ref:`Vector2` b_anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_pin` **(** :ref:`RID` joint, :ref:`Vector2` anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_set_param` **(** :ref:`RID` joint, :ref:`JointParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_pin_joint_get_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pin_joint_set_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_rectangle_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_segment_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_separation_ray_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_active` **(** :ref:`bool` active **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_shape_collide` **(** :ref:`RID` shape_A, :ref:`Transform2D` xform_A, :ref:`Vector2` motion_A, :ref:`RID` shape_B, :ref:`Transform2D` xform_B, :ref:`Vector2` motion_B, void* results, :ref:`int` result_max, int32_t* result_count **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_shape_get_custom_solver_bias` **(** :ref:`RID` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_shape_get_data` **(** :ref:`RID` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ShapeType` | :ref:`_shape_get_type` **(** :ref:`RID` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shape_set_custom_solver_bias` **(** :ref:`RID` shape, :ref:`float` bias **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_space_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_space_get_contact_count` **(** :ref:`RID` space **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`_space_get_contacts` **(** :ref:`RID` space **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectSpaceState2D` | :ref:`_space_get_direct_state` **(** :ref:`RID` space **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_space_is_active` **(** :ref:`RID` space **)** |virtual| |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_debug_contacts` **(** :ref:`RID` space, :ref:`int` max_contacts **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_step` **(** :ref:`float` step **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_sync` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_world_boundary_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`body_test_motion_is_excluding_body` **(** :ref:`RID` body **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`body_test_motion_is_excluding_object` **(** :ref:`int` object **)** |const| | - +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform2D` transform, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_attach_canvas_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_clear_shapes` **(** :ref:`RID` area **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_canvas_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_collision_layer` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_collision_mask` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_object_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_shape_count` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`_area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_get_space` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`_area_get_transform` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_pickable` **(** :ref:`RID` area, :ref:`bool` pickable **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_transform` **(** :ref:`RID` area, :ref:`Transform2D` transform **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_torque` **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform2D` transform, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector2` impulse **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_force` **(** :ref:`RID` body, :ref:`Vector2` force, :ref:`Vector2` position **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector2` impulse, :ref:`Vector2` position **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_torque` **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`float` impulse **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_attach_canvas_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_clear_shapes` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_collide_shape` **(** :ref:`RID` body, :ref:`int` body_shape, :ref:`RID` shape, :ref:`Transform2D` shape_xform, :ref:`Vector2` motion, void* results, :ref:`int` result_max, int32_t* result_count **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_canvas_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_body_get_collision_priority` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_body_get_constant_force` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_body_get_constant_torque` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_body_get_contacts_reported_depth_threshold` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CCDMode` | :ref:`_body_get_continuous_collision_detection_mode` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectBodyState2D` | :ref:`_body_get_direct_state` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_max_contacts_reported` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BodyMode` | :ref:`_body_get_mode` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_object_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_shape_count` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`_body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_is_omitting_force_integration` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_reset_mass_properties` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector2` axis_velocity **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector2` force **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_constant_torque` **(** :ref:`RID` body, :ref:`float` torque **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_contacts_reported_depth_threshold` **(** :ref:`RID` body, :ref:`float` threshold **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_continuous_collision_detection_mode` **(** :ref:`RID` body, :ref:`CCDMode` mode **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_pickable` **(** :ref:`RID` body, :ref:`bool` pickable **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape_as_one_way_collision` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` enable, :ref:`float` margin **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform2D` transform **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_state_sync_callback` **(** :ref:`RID` body, :ref:`Callable` callable **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_test_motion` **(** :ref:`RID` body, :ref:`Transform2D` from, :ref:`Vector2` motion, :ref:`float` margin, :ref:`bool` collide_separation_ray, :ref:`bool` recovery_as_collision, PhysicsServer2DExtensionMotionResult* result **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_capsule_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_circle_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_concave_polygon_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_convex_polygon_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_damped_spring_joint_get_param` **(** :ref:`RID` joint, :ref:`DampedSpringParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_damped_spring_joint_set_param` **(** :ref:`RID` joint, :ref:`DampedSpringParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_end_sync` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_finish` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_flush_queries` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_process_info` **(** :ref:`ProcessInfo` process_info **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_init` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_flushing_queries` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_clear` **(** :ref:`RID` joint **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_joint_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_disable_collisions_between_bodies` **(** :ref:`RID` joint, :ref:`bool` disable **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_joint_get_param` **(** :ref:`RID` joint, :ref:`JointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JointType` | :ref:`_joint_get_type` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_joint_is_disabled_collisions_between_bodies` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_damped_spring` **(** :ref:`RID` joint, :ref:`Vector2` anchor_a, :ref:`Vector2` anchor_b, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_groove` **(** :ref:`RID` joint, :ref:`Vector2` a_groove1, :ref:`Vector2` a_groove2, :ref:`Vector2` b_anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_pin` **(** :ref:`RID` joint, :ref:`Vector2` anchor, :ref:`RID` body_a, :ref:`RID` body_b **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_set_param` **(** :ref:`RID` joint, :ref:`JointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_pin_joint_get_flag` **(** :ref:`RID` joint, :ref:`PinJointFlag` flag **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_pin_joint_get_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pin_joint_set_flag` **(** :ref:`RID` joint, :ref:`PinJointFlag` flag, :ref:`bool` enabled **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pin_joint_set_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_rectangle_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_segment_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_separation_ray_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_active` **(** :ref:`bool` active **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shape_collide` **(** :ref:`RID` shape_A, :ref:`Transform2D` xform_A, :ref:`Vector2` motion_A, :ref:`RID` shape_B, :ref:`Transform2D` xform_B, :ref:`Vector2` motion_B, void* results, :ref:`int` result_max, int32_t* result_count **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shape_get_custom_solver_bias` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_shape_get_data` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ShapeType` | :ref:`_shape_get_type` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shape_set_custom_solver_bias` **(** :ref:`RID` shape, :ref:`float` bias **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_space_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_space_get_contact_count` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`_space_get_contacts` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState2D` | :ref:`_space_get_direct_state` **(** :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_space_is_active` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_debug_contacts` **(** :ref:`RID` space, :ref:`int` max_contacts **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_step` **(** :ref:`float` step **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_sync` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_world_boundary_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`body_test_motion_is_excluding_body` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`body_test_motion_is_excluding_object` **(** :ref:`int` object **)** |const| | + +-------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -315,10 +319,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_PhysicsServer2DExtension_method__area_add_shape: +.. _class_PhysicsServer2DExtension_private_method__area_add_shape: .. rst-class:: classref-method @@ -326,13 +330,13 @@ void **_area_add_shape** **(** :ref:`RID` area, :ref:`RID` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_attach_canvas_instance_id: +.. _class_PhysicsServer2DExtension_private_method__area_attach_canvas_instance_id: .. rst-class:: classref-method @@ -340,13 +344,13 @@ void **_area_attach_canvas_instance_id** **(** :ref:`RID` area, :ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_attach_object_instance_id: +.. _class_PhysicsServer2DExtension_private_method__area_attach_object_instance_id: .. rst-class:: classref-method @@ -354,13 +358,13 @@ void **_area_attach_object_instance_id** **(** :ref:`RID` area, :ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_clear_shapes: +.. _class_PhysicsServer2DExtension_private_method__area_clear_shapes: .. rst-class:: classref-method @@ -368,13 +372,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_create: +.. _class_PhysicsServer2DExtension_private_method__area_create: .. rst-class:: classref-method @@ -382,13 +386,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_canvas_instance_id: +.. _class_PhysicsServer2DExtension_private_method__area_get_canvas_instance_id: .. rst-class:: classref-method @@ -396,13 +400,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_collision_layer: +.. _class_PhysicsServer2DExtension_private_method__area_get_collision_layer: .. rst-class:: classref-method @@ -410,13 +414,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_collision_mask: +.. _class_PhysicsServer2DExtension_private_method__area_get_collision_mask: .. rst-class:: classref-method @@ -424,13 +428,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_object_instance_id: +.. _class_PhysicsServer2DExtension_private_method__area_get_object_instance_id: .. rst-class:: classref-method @@ -438,13 +442,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_param: +.. _class_PhysicsServer2DExtension_private_method__area_get_param: .. rst-class:: classref-method @@ -452,13 +456,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_shape: +.. _class_PhysicsServer2DExtension_private_method__area_get_shape: .. rst-class:: classref-method @@ -466,13 +470,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_shape_count: +.. _class_PhysicsServer2DExtension_private_method__area_get_shape_count: .. rst-class:: classref-method @@ -480,13 +484,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_shape_transform: +.. _class_PhysicsServer2DExtension_private_method__area_get_shape_transform: .. rst-class:: classref-method @@ -494,13 +498,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_space: +.. _class_PhysicsServer2DExtension_private_method__area_get_space: .. rst-class:: classref-method @@ -508,13 +512,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_get_transform: +.. _class_PhysicsServer2DExtension_private_method__area_get_transform: .. rst-class:: classref-method @@ -522,13 +526,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_remove_shape: +.. _class_PhysicsServer2DExtension_private_method__area_remove_shape: .. rst-class:: classref-method @@ -536,13 +540,13 @@ void **_area_remove_shape** **(** :ref:`RID` area, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_area_monitor_callback: +.. _class_PhysicsServer2DExtension_private_method__area_set_area_monitor_callback: .. rst-class:: classref-method @@ -550,13 +554,13 @@ void **_area_set_area_monitor_callback** **(** :ref:`RID` area, :ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_collision_layer: +.. _class_PhysicsServer2DExtension_private_method__area_set_collision_layer: .. rst-class:: classref-method @@ -564,13 +568,13 @@ void **_area_set_collision_layer** **(** :ref:`RID` area, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_collision_mask: +.. _class_PhysicsServer2DExtension_private_method__area_set_collision_mask: .. rst-class:: classref-method @@ -578,13 +582,13 @@ void **_area_set_collision_mask** **(** :ref:`RID` area, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_monitor_callback: +.. _class_PhysicsServer2DExtension_private_method__area_set_monitor_callback: .. rst-class:: classref-method @@ -592,13 +596,13 @@ void **_area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Call .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_monitorable: +.. _class_PhysicsServer2DExtension_private_method__area_set_monitorable: .. rst-class:: classref-method @@ -606,13 +610,13 @@ void **_area_set_monitorable** **(** :ref:`RID` area, :ref:`bool`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_param: +.. _class_PhysicsServer2DExtension_private_method__area_set_param: .. rst-class:: classref-method @@ -620,13 +624,13 @@ void **_area_set_param** **(** :ref:`RID` area, :ref:`AreaParameter`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_pickable: +.. _class_PhysicsServer2DExtension_private_method__area_set_pickable: .. rst-class:: classref-method @@ -634,13 +638,13 @@ void **_area_set_pickable** **(** :ref:`RID` area, :ref:`bool`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_shape: +.. _class_PhysicsServer2DExtension_private_method__area_set_shape: .. rst-class:: classref-method @@ -648,13 +652,13 @@ void **_area_set_shape** **(** :ref:`RID` area, :ref:`int` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_shape_disabled: +.. _class_PhysicsServer2DExtension_private_method__area_set_shape_disabled: .. rst-class:: classref-method @@ -662,13 +666,13 @@ void **_area_set_shape_disabled** **(** :ref:`RID` area, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_shape_transform: +.. _class_PhysicsServer2DExtension_private_method__area_set_shape_transform: .. rst-class:: classref-method @@ -676,13 +680,13 @@ void **_area_set_shape_transform** **(** :ref:`RID` area, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_space: +.. _class_PhysicsServer2DExtension_private_method__area_set_space: .. rst-class:: classref-method @@ -690,13 +694,13 @@ void **_area_set_space** **(** :ref:`RID` area, :ref:`RID` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__area_set_transform: +.. _class_PhysicsServer2DExtension_private_method__area_set_transform: .. rst-class:: classref-method @@ -704,13 +708,13 @@ void **_area_set_transform** **(** :ref:`RID` area, :ref:`Transform2D .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_add_collision_exception: +.. _class_PhysicsServer2DExtension_private_method__body_add_collision_exception: .. rst-class:: classref-method @@ -718,13 +722,13 @@ void **_body_add_collision_exception** **(** :ref:`RID` body, :ref:`R .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_add_constant_central_force: +.. _class_PhysicsServer2DExtension_private_method__body_add_constant_central_force: .. rst-class:: classref-method @@ -732,13 +736,13 @@ void **_body_add_constant_central_force** **(** :ref:`RID` body, :ref .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_add_constant_force: +.. _class_PhysicsServer2DExtension_private_method__body_add_constant_force: .. rst-class:: classref-method @@ -746,13 +750,13 @@ void **_body_add_constant_force** **(** :ref:`RID` body, :ref:`Vector .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_add_constant_torque: +.. _class_PhysicsServer2DExtension_private_method__body_add_constant_torque: .. rst-class:: classref-method @@ -760,13 +764,13 @@ void **_body_add_constant_torque** **(** :ref:`RID` body, :ref:`float .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_add_shape: +.. _class_PhysicsServer2DExtension_private_method__body_add_shape: .. rst-class:: classref-method @@ -774,13 +778,13 @@ void **_body_add_shape** **(** :ref:`RID` body, :ref:`RID` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_apply_central_force: +.. _class_PhysicsServer2DExtension_private_method__body_apply_central_force: .. rst-class:: classref-method @@ -788,13 +792,13 @@ void **_body_apply_central_force** **(** :ref:`RID` body, :ref:`Vecto .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_apply_central_impulse: +.. _class_PhysicsServer2DExtension_private_method__body_apply_central_impulse: .. rst-class:: classref-method @@ -802,13 +806,13 @@ void **_body_apply_central_impulse** **(** :ref:`RID` body, :ref:`Vec .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_apply_force: +.. _class_PhysicsServer2DExtension_private_method__body_apply_force: .. rst-class:: classref-method @@ -816,13 +820,13 @@ void **_body_apply_force** **(** :ref:`RID` body, :ref:`Vector2`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_apply_impulse: +.. _class_PhysicsServer2DExtension_private_method__body_apply_impulse: .. rst-class:: classref-method @@ -830,13 +834,13 @@ void **_body_apply_impulse** **(** :ref:`RID` body, :ref:`Vector2`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_apply_torque: +.. _class_PhysicsServer2DExtension_private_method__body_apply_torque: .. rst-class:: classref-method @@ -844,13 +848,13 @@ void **_body_apply_torque** **(** :ref:`RID` body, :ref:`float`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_apply_torque_impulse: +.. _class_PhysicsServer2DExtension_private_method__body_apply_torque_impulse: .. rst-class:: classref-method @@ -858,13 +862,13 @@ void **_body_apply_torque_impulse** **(** :ref:`RID` body, :ref:`floa .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_attach_canvas_instance_id: +.. _class_PhysicsServer2DExtension_private_method__body_attach_canvas_instance_id: .. rst-class:: classref-method @@ -872,13 +876,13 @@ void **_body_attach_canvas_instance_id** **(** :ref:`RID` body, :ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_attach_object_instance_id: +.. _class_PhysicsServer2DExtension_private_method__body_attach_object_instance_id: .. rst-class:: classref-method @@ -886,13 +890,13 @@ void **_body_attach_object_instance_id** **(** :ref:`RID` body, :ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_clear_shapes: +.. _class_PhysicsServer2DExtension_private_method__body_clear_shapes: .. rst-class:: classref-method @@ -900,13 +904,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_collide_shape: +.. _class_PhysicsServer2DExtension_private_method__body_collide_shape: .. rst-class:: classref-method @@ -914,13 +918,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_create: +.. _class_PhysicsServer2DExtension_private_method__body_create: .. rst-class:: classref-method @@ -928,13 +932,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_canvas_instance_id: +.. _class_PhysicsServer2DExtension_private_method__body_get_canvas_instance_id: .. rst-class:: classref-method @@ -942,13 +946,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_collision_exceptions: +.. _class_PhysicsServer2DExtension_private_method__body_get_collision_exceptions: .. rst-class:: classref-method @@ -956,13 +960,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_collision_layer: +.. _class_PhysicsServer2DExtension_private_method__body_get_collision_layer: .. rst-class:: classref-method @@ -970,13 +974,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_collision_mask: +.. _class_PhysicsServer2DExtension_private_method__body_get_collision_mask: .. rst-class:: classref-method @@ -984,13 +988,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_collision_priority: +.. _class_PhysicsServer2DExtension_private_method__body_get_collision_priority: .. rst-class:: classref-method @@ -998,13 +1002,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_constant_force: +.. _class_PhysicsServer2DExtension_private_method__body_get_constant_force: .. rst-class:: classref-method @@ -1012,13 +1016,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_constant_torque: +.. _class_PhysicsServer2DExtension_private_method__body_get_constant_torque: .. rst-class:: classref-method @@ -1026,13 +1030,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_contacts_reported_depth_threshold: +.. _class_PhysicsServer2DExtension_private_method__body_get_contacts_reported_depth_threshold: .. rst-class:: classref-method @@ -1040,13 +1044,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_continuous_collision_detection_mode: +.. _class_PhysicsServer2DExtension_private_method__body_get_continuous_collision_detection_mode: .. rst-class:: classref-method @@ -1054,13 +1058,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_direct_state: +.. _class_PhysicsServer2DExtension_private_method__body_get_direct_state: .. rst-class:: classref-method @@ -1068,13 +1072,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_max_contacts_reported: +.. _class_PhysicsServer2DExtension_private_method__body_get_max_contacts_reported: .. rst-class:: classref-method @@ -1082,13 +1086,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_mode: +.. _class_PhysicsServer2DExtension_private_method__body_get_mode: .. rst-class:: classref-method @@ -1096,13 +1100,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_object_instance_id: +.. _class_PhysicsServer2DExtension_private_method__body_get_object_instance_id: .. rst-class:: classref-method @@ -1110,13 +1114,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_param: +.. _class_PhysicsServer2DExtension_private_method__body_get_param: .. rst-class:: classref-method @@ -1124,13 +1128,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_shape: +.. _class_PhysicsServer2DExtension_private_method__body_get_shape: .. rst-class:: classref-method @@ -1138,13 +1142,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_shape_count: +.. _class_PhysicsServer2DExtension_private_method__body_get_shape_count: .. rst-class:: classref-method @@ -1152,13 +1156,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_shape_transform: +.. _class_PhysicsServer2DExtension_private_method__body_get_shape_transform: .. rst-class:: classref-method @@ -1166,13 +1170,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_space: +.. _class_PhysicsServer2DExtension_private_method__body_get_space: .. rst-class:: classref-method @@ -1180,13 +1184,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_get_state: +.. _class_PhysicsServer2DExtension_private_method__body_get_state: .. rst-class:: classref-method @@ -1194,13 +1198,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_is_omitting_force_integration: +.. _class_PhysicsServer2DExtension_private_method__body_is_omitting_force_integration: .. rst-class:: classref-method @@ -1208,13 +1212,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_remove_collision_exception: +.. _class_PhysicsServer2DExtension_private_method__body_remove_collision_exception: .. rst-class:: classref-method @@ -1222,13 +1226,13 @@ void **_body_remove_collision_exception** **(** :ref:`RID` body, :ref .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_remove_shape: +.. _class_PhysicsServer2DExtension_private_method__body_remove_shape: .. rst-class:: classref-method @@ -1236,13 +1240,13 @@ void **_body_remove_shape** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_reset_mass_properties: +.. _class_PhysicsServer2DExtension_private_method__body_reset_mass_properties: .. rst-class:: classref-method @@ -1250,13 +1254,13 @@ void **_body_reset_mass_properties** **(** :ref:`RID` body **)** |vir .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_axis_velocity: +.. _class_PhysicsServer2DExtension_private_method__body_set_axis_velocity: .. rst-class:: classref-method @@ -1264,13 +1268,13 @@ void **_body_set_axis_velocity** **(** :ref:`RID` body, :ref:`Vector2 .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_collision_layer: +.. _class_PhysicsServer2DExtension_private_method__body_set_collision_layer: .. rst-class:: classref-method @@ -1278,13 +1282,13 @@ void **_body_set_collision_layer** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_collision_mask: +.. _class_PhysicsServer2DExtension_private_method__body_set_collision_mask: .. rst-class:: classref-method @@ -1292,13 +1296,13 @@ void **_body_set_collision_mask** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_collision_priority: +.. _class_PhysicsServer2DExtension_private_method__body_set_collision_priority: .. rst-class:: classref-method @@ -1306,13 +1310,13 @@ void **_body_set_collision_priority** **(** :ref:`RID` body, :ref:`fl .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_constant_force: +.. _class_PhysicsServer2DExtension_private_method__body_set_constant_force: .. rst-class:: classref-method @@ -1320,13 +1324,13 @@ void **_body_set_constant_force** **(** :ref:`RID` body, :ref:`Vector .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_constant_torque: +.. _class_PhysicsServer2DExtension_private_method__body_set_constant_torque: .. rst-class:: classref-method @@ -1334,13 +1338,13 @@ void **_body_set_constant_torque** **(** :ref:`RID` body, :ref:`float .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_contacts_reported_depth_threshold: +.. _class_PhysicsServer2DExtension_private_method__body_set_contacts_reported_depth_threshold: .. rst-class:: classref-method @@ -1348,13 +1352,13 @@ void **_body_set_contacts_reported_depth_threshold** **(** :ref:`RID` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_continuous_collision_detection_mode: +.. _class_PhysicsServer2DExtension_private_method__body_set_continuous_collision_detection_mode: .. rst-class:: classref-method @@ -1362,13 +1366,13 @@ void **_body_set_continuous_collision_detection_mode** **(** :ref:`RID`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_force_integration_callback: +.. _class_PhysicsServer2DExtension_private_method__body_set_force_integration_callback: .. rst-class:: classref-method @@ -1376,13 +1380,13 @@ void **_body_set_force_integration_callback** **(** :ref:`RID` body, .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_max_contacts_reported: +.. _class_PhysicsServer2DExtension_private_method__body_set_max_contacts_reported: .. rst-class:: classref-method @@ -1390,13 +1394,13 @@ void **_body_set_max_contacts_reported** **(** :ref:`RID` body, :ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_mode: +.. _class_PhysicsServer2DExtension_private_method__body_set_mode: .. rst-class:: classref-method @@ -1404,13 +1408,13 @@ void **_body_set_mode** **(** :ref:`RID` body, :ref:`BodyMode`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_omit_force_integration: +.. _class_PhysicsServer2DExtension_private_method__body_set_omit_force_integration: .. rst-class:: classref-method @@ -1418,13 +1422,13 @@ void **_body_set_omit_force_integration** **(** :ref:`RID` body, :ref .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_param: +.. _class_PhysicsServer2DExtension_private_method__body_set_param: .. rst-class:: classref-method @@ -1432,13 +1436,13 @@ void **_body_set_param** **(** :ref:`RID` body, :ref:`BodyParameter`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_pickable: +.. _class_PhysicsServer2DExtension_private_method__body_set_pickable: .. rst-class:: classref-method @@ -1446,13 +1450,13 @@ void **_body_set_pickable** **(** :ref:`RID` body, :ref:`bool`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_shape: +.. _class_PhysicsServer2DExtension_private_method__body_set_shape: .. rst-class:: classref-method @@ -1460,13 +1464,13 @@ void **_body_set_shape** **(** :ref:`RID` body, :ref:`int` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_shape_as_one_way_collision: +.. _class_PhysicsServer2DExtension_private_method__body_set_shape_as_one_way_collision: .. rst-class:: classref-method @@ -1474,13 +1478,13 @@ void **_body_set_shape_as_one_way_collision** **(** :ref:`RID` body, .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_shape_disabled: +.. _class_PhysicsServer2DExtension_private_method__body_set_shape_disabled: .. rst-class:: classref-method @@ -1488,13 +1492,13 @@ void **_body_set_shape_disabled** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_shape_transform: +.. _class_PhysicsServer2DExtension_private_method__body_set_shape_transform: .. rst-class:: classref-method @@ -1502,13 +1506,13 @@ void **_body_set_shape_transform** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_space: +.. _class_PhysicsServer2DExtension_private_method__body_set_space: .. rst-class:: classref-method @@ -1516,13 +1520,13 @@ void **_body_set_space** **(** :ref:`RID` body, :ref:`RID` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_state: +.. _class_PhysicsServer2DExtension_private_method__body_set_state: .. rst-class:: classref-method @@ -1530,13 +1534,13 @@ void **_body_set_state** **(** :ref:`RID` body, :ref:`BodyState`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_set_state_sync_callback: +.. _class_PhysicsServer2DExtension_private_method__body_set_state_sync_callback: .. rst-class:: classref-method @@ -1544,13 +1548,13 @@ void **_body_set_state_sync_callback** **(** :ref:`RID` body, :ref:`C .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__body_test_motion: +.. _class_PhysicsServer2DExtension_private_method__body_test_motion: .. rst-class:: classref-method @@ -1558,13 +1562,13 @@ void **_body_set_state_sync_callback** **(** :ref:`RID` body, :ref:`C .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__capsule_shape_create: +.. _class_PhysicsServer2DExtension_private_method__capsule_shape_create: .. rst-class:: classref-method @@ -1572,13 +1576,13 @@ void **_body_set_state_sync_callback** **(** :ref:`RID` body, :ref:`C .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__circle_shape_create: +.. _class_PhysicsServer2DExtension_private_method__circle_shape_create: .. rst-class:: classref-method @@ -1586,13 +1590,13 @@ void **_body_set_state_sync_callback** **(** :ref:`RID` body, :ref:`C .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__concave_polygon_shape_create: +.. _class_PhysicsServer2DExtension_private_method__concave_polygon_shape_create: .. rst-class:: classref-method @@ -1600,13 +1604,13 @@ void **_body_set_state_sync_callback** **(** :ref:`RID` body, :ref:`C .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__convex_polygon_shape_create: +.. _class_PhysicsServer2DExtension_private_method__convex_polygon_shape_create: .. rst-class:: classref-method @@ -1614,13 +1618,13 @@ void **_body_set_state_sync_callback** **(** :ref:`RID` body, :ref:`C .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__damped_spring_joint_get_param: +.. _class_PhysicsServer2DExtension_private_method__damped_spring_joint_get_param: .. rst-class:: classref-method @@ -1628,13 +1632,13 @@ void **_body_set_state_sync_callback** **(** :ref:`RID` body, :ref:`C .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__damped_spring_joint_set_param: +.. _class_PhysicsServer2DExtension_private_method__damped_spring_joint_set_param: .. rst-class:: classref-method @@ -1642,13 +1646,13 @@ void **_damped_spring_joint_set_param** **(** :ref:`RID` joint, :ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__end_sync: +.. _class_PhysicsServer2DExtension_private_method__end_sync: .. rst-class:: classref-method @@ -1656,13 +1660,13 @@ void **_end_sync** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__finish: +.. _class_PhysicsServer2DExtension_private_method__finish: .. rst-class:: classref-method @@ -1670,13 +1674,13 @@ void **_finish** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__flush_queries: +.. _class_PhysicsServer2DExtension_private_method__flush_queries: .. rst-class:: classref-method @@ -1684,13 +1688,13 @@ void **_flush_queries** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__free_rid: +.. _class_PhysicsServer2DExtension_private_method__free_rid: .. rst-class:: classref-method @@ -1698,13 +1702,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__get_process_info: +.. _class_PhysicsServer2DExtension_private_method__get_process_info: .. rst-class:: classref-method @@ -1712,13 +1716,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__init: +.. _class_PhysicsServer2DExtension_private_method__init: .. rst-class:: classref-method @@ -1726,13 +1730,13 @@ void **_init** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__is_flushing_queries: +.. _class_PhysicsServer2DExtension_private_method__is_flushing_queries: .. rst-class:: classref-method @@ -1740,13 +1744,13 @@ void **_init** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_clear: +.. _class_PhysicsServer2DExtension_private_method__joint_clear: .. rst-class:: classref-method @@ -1754,13 +1758,13 @@ void **_joint_clear** **(** :ref:`RID` joint **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_create: +.. _class_PhysicsServer2DExtension_private_method__joint_create: .. rst-class:: classref-method @@ -1768,13 +1772,13 @@ void **_joint_clear** **(** :ref:`RID` joint **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_disable_collisions_between_bodies: +.. _class_PhysicsServer2DExtension_private_method__joint_disable_collisions_between_bodies: .. rst-class:: classref-method @@ -1782,13 +1786,13 @@ void **_joint_disable_collisions_between_bodies** **(** :ref:`RID` jo .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_get_param: +.. _class_PhysicsServer2DExtension_private_method__joint_get_param: .. rst-class:: classref-method @@ -1796,13 +1800,13 @@ void **_joint_disable_collisions_between_bodies** **(** :ref:`RID` jo .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_get_type: +.. _class_PhysicsServer2DExtension_private_method__joint_get_type: .. rst-class:: classref-method @@ -1810,13 +1814,13 @@ void **_joint_disable_collisions_between_bodies** **(** :ref:`RID` jo .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_is_disabled_collisions_between_bodies: +.. _class_PhysicsServer2DExtension_private_method__joint_is_disabled_collisions_between_bodies: .. rst-class:: classref-method @@ -1824,13 +1828,13 @@ void **_joint_disable_collisions_between_bodies** **(** :ref:`RID` jo .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_make_damped_spring: +.. _class_PhysicsServer2DExtension_private_method__joint_make_damped_spring: .. rst-class:: classref-method @@ -1838,13 +1842,13 @@ void **_joint_make_damped_spring** **(** :ref:`RID` joint, :ref:`Vect .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_make_groove: +.. _class_PhysicsServer2DExtension_private_method__joint_make_groove: .. rst-class:: classref-method @@ -1852,13 +1856,13 @@ void **_joint_make_groove** **(** :ref:`RID` joint, :ref:`Vector2`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_make_pin: +.. _class_PhysicsServer2DExtension_private_method__joint_make_pin: .. rst-class:: classref-method @@ -1866,13 +1870,13 @@ void **_joint_make_pin** **(** :ref:`RID` joint, :ref:`Vector2`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__joint_set_param: +.. _class_PhysicsServer2DExtension_private_method__joint_set_param: .. rst-class:: classref-method @@ -1880,13 +1884,27 @@ void **_joint_set_param** **(** :ref:`RID` joint, :ref:`JointParam`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__pin_joint_get_param: +.. _class_PhysicsServer2DExtension_private_method__pin_joint_get_flag: + +.. rst-class:: classref-method + +:ref:`bool` **_pin_joint_get_flag** **(** :ref:`RID` joint, :ref:`PinJointFlag` flag **)** |virtual| |const| + +.. container:: contribute + + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer2DExtension_private_method__pin_joint_get_param: .. rst-class:: classref-method @@ -1894,13 +1912,27 @@ void **_joint_set_param** **(** :ref:`RID` joint, :ref:`JointParam`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__pin_joint_set_param: +.. _class_PhysicsServer2DExtension_private_method__pin_joint_set_flag: + +.. rst-class:: classref-method + +void **_pin_joint_set_flag** **(** :ref:`RID` joint, :ref:`PinJointFlag` flag, :ref:`bool` enabled **)** |virtual| + +.. container:: contribute + + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-item-separator + +---- + +.. _class_PhysicsServer2DExtension_private_method__pin_joint_set_param: .. rst-class:: classref-method @@ -1908,13 +1940,13 @@ void **_pin_joint_set_param** **(** :ref:`RID` joint, :ref:`PinJointP .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__rectangle_shape_create: +.. _class_PhysicsServer2DExtension_private_method__rectangle_shape_create: .. rst-class:: classref-method @@ -1922,13 +1954,13 @@ void **_pin_joint_set_param** **(** :ref:`RID` joint, :ref:`PinJointP .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__segment_shape_create: +.. _class_PhysicsServer2DExtension_private_method__segment_shape_create: .. rst-class:: classref-method @@ -1936,13 +1968,13 @@ void **_pin_joint_set_param** **(** :ref:`RID` joint, :ref:`PinJointP .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__separation_ray_shape_create: +.. _class_PhysicsServer2DExtension_private_method__separation_ray_shape_create: .. rst-class:: classref-method @@ -1950,13 +1982,13 @@ void **_pin_joint_set_param** **(** :ref:`RID` joint, :ref:`PinJointP .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__set_active: +.. _class_PhysicsServer2DExtension_private_method__set_active: .. rst-class:: classref-method @@ -1964,13 +1996,13 @@ void **_set_active** **(** :ref:`bool` active **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__shape_collide: +.. _class_PhysicsServer2DExtension_private_method__shape_collide: .. rst-class:: classref-method @@ -1978,13 +2010,13 @@ void **_set_active** **(** :ref:`bool` active **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__shape_get_custom_solver_bias: +.. _class_PhysicsServer2DExtension_private_method__shape_get_custom_solver_bias: .. rst-class:: classref-method @@ -1992,13 +2024,13 @@ void **_set_active** **(** :ref:`bool` active **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__shape_get_data: +.. _class_PhysicsServer2DExtension_private_method__shape_get_data: .. rst-class:: classref-method @@ -2006,13 +2038,13 @@ void **_set_active** **(** :ref:`bool` active **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__shape_get_type: +.. _class_PhysicsServer2DExtension_private_method__shape_get_type: .. rst-class:: classref-method @@ -2020,13 +2052,13 @@ void **_set_active** **(** :ref:`bool` active **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__shape_set_custom_solver_bias: +.. _class_PhysicsServer2DExtension_private_method__shape_set_custom_solver_bias: .. rst-class:: classref-method @@ -2034,13 +2066,13 @@ void **_shape_set_custom_solver_bias** **(** :ref:`RID` shape, :ref:` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__shape_set_data: +.. _class_PhysicsServer2DExtension_private_method__shape_set_data: .. rst-class:: classref-method @@ -2048,13 +2080,13 @@ void **_shape_set_data** **(** :ref:`RID` shape, :ref:`Variant`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_create: +.. _class_PhysicsServer2DExtension_private_method__space_create: .. rst-class:: classref-method @@ -2062,13 +2094,13 @@ void **_shape_set_data** **(** :ref:`RID` shape, :ref:`Variant`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_get_contact_count: +.. _class_PhysicsServer2DExtension_private_method__space_get_contact_count: .. rst-class:: classref-method @@ -2076,13 +2108,13 @@ void **_shape_set_data** **(** :ref:`RID` shape, :ref:`Variant`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_get_contacts: +.. _class_PhysicsServer2DExtension_private_method__space_get_contacts: .. rst-class:: classref-method @@ -2090,13 +2122,13 @@ void **_shape_set_data** **(** :ref:`RID` shape, :ref:`Variant`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_get_direct_state: +.. _class_PhysicsServer2DExtension_private_method__space_get_direct_state: .. rst-class:: classref-method @@ -2104,13 +2136,13 @@ void **_shape_set_data** **(** :ref:`RID` shape, :ref:`Variant`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_get_param: +.. _class_PhysicsServer2DExtension_private_method__space_get_param: .. rst-class:: classref-method @@ -2118,13 +2150,13 @@ void **_shape_set_data** **(** :ref:`RID` shape, :ref:`Variant`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_is_active: +.. _class_PhysicsServer2DExtension_private_method__space_is_active: .. rst-class:: classref-method @@ -2132,13 +2164,13 @@ void **_shape_set_data** **(** :ref:`RID` shape, :ref:`Variant`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_set_active: +.. _class_PhysicsServer2DExtension_private_method__space_set_active: .. rst-class:: classref-method @@ -2146,13 +2178,13 @@ void **_space_set_active** **(** :ref:`RID` space, :ref:`bool`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_set_debug_contacts: +.. _class_PhysicsServer2DExtension_private_method__space_set_debug_contacts: .. rst-class:: classref-method @@ -2160,13 +2192,13 @@ void **_space_set_debug_contacts** **(** :ref:`RID` space, :ref:`int< .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__space_set_param: +.. _class_PhysicsServer2DExtension_private_method__space_set_param: .. rst-class:: classref-method @@ -2174,13 +2206,13 @@ void **_space_set_param** **(** :ref:`RID` space, :ref:`SpaceParamete .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__step: +.. _class_PhysicsServer2DExtension_private_method__step: .. rst-class:: classref-method @@ -2188,13 +2220,13 @@ void **_step** **(** :ref:`float` step **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__sync: +.. _class_PhysicsServer2DExtension_private_method__sync: .. rst-class:: classref-method @@ -2202,13 +2234,13 @@ void **_sync** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer2DExtension_method__world_boundary_shape_create: +.. _class_PhysicsServer2DExtension_private_method__world_boundary_shape_create: .. rst-class:: classref-method @@ -2216,7 +2248,7 @@ void **_sync** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2230,7 +2262,7 @@ void **_sync** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2244,12 +2276,12 @@ void **_sync** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsserver2dmanager.rst b/classes/zh_CN/class_physicsserver2dmanager.rst index 2e6c58e102..b465f214e4 100644 --- a/classes/zh_CN/class_physicsserver2dmanager.rst +++ b/classes/zh_CN/class_physicsserver2dmanager.rst @@ -10,14 +10,14 @@ PhysicsServer2DManager ====================== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 用于管理 :ref:`PhysicsServer2D` 实现的单例。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **PhysicsServer2DManager** 是用于注册 :ref:`PhysicsServer2D` 实现、设置默认实现的 API。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PhysicsServer2DManager_method_register_server: @@ -66,10 +66,10 @@ void **set_default_server** **(** :ref:`String` name, :ref:`int` 实现设置为默认实现。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsserver3d.rst b/classes/zh_CN/class_physicsserver3d.rst index 986fbe0624..b9f27858cb 100644 --- a/classes/zh_CN/class_physicsserver3d.rst +++ b/classes/zh_CN/class_physicsserver3d.rst @@ -10,37 +10,37 @@ PhysicsServer3D =============== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` -**Inherited By:** :ref:`PhysicsServer3DExtension` +**派生:** :ref:`PhysicsServer3DExtension` 用于访问低阶 3D 物理的服务器接口。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -PhysicsServer3D is the server responsible for all 3D physics. It can directly create and manipulate all physics objects: +PhysicsServer3D 是负责所有 3D 物理的服务器。它可以直接创建和操作所有物理对象: -- A *space* is a self-contained world for a physics simulation. It contains bodies, areas, and joints. Its state can be queried for collision and intersection information, and several parameters of the simulation can be modified. +- *Space(空间)*\ 是用于物理仿真的自包含世界。它包含实体、区域和关节。可以对其状态进行查询,获取碰撞和相交信息,并且可以修改部分仿真参数。 -- A *shape* is a geometric shape such as a sphere, a box, a cylinder, or a polygon. It can be used for collision detection by adding it to a body/area, possibly with an extra transformation relative to the body/area's origin. Bodies/areas can have multiple (transformed) shapes added to them, and a single shape can be added to bodies/areas multiple times with different local transformations. +- *Shape(形状)*\ 是球形、盒形、圆柱形、多边形等几何形状。加入到实体/区域中就可以用来进行碰撞检测,还可以带有相对于实体/区域原点的额外变换。实体/区域中可以添加多个(变换后的)形状,并且可以使用不同的局部变换将单个形状多次添加到实体/区域中。 -- A *body* is a physical object which can be in static, kinematic, or rigid mode. Its state (such as position and velocity) can be queried and updated. A force integration callback can be set to customize the body's physics. +- *Body(实体)*\ 是物理对象,可以处于静态、运动学或刚性模式。可以对其状态进行查询和更新(例如位置、速度等)。可以设置力的集成回调,自定义实体的物理特性。 -- An *area* is a region in space which can be used to detect bodies and areas entering and exiting it. A body monitoring callback can be set to report entering/exiting body shapes, and similarly an area monitoring callback can be set. Gravity and damping can be overridden within the area by setting area parameters. +- *Area(区域)*\ 是空间中的区块,可用于检测进入和离开它的实体和区域。可以设置实体的监视回调,报告进入/离开的实体形状,同样可以设置区域的监视回调。通过设置区域参数,可以在区域内覆盖重力和阻尼。 -- A *joint* is a constraint, either between two bodies or on one body relative to a point. Parameters such as the joint bias and the rest length of a spring joint can be adjusted. +- *Joint(关节)*\ 是两个实体之间或一个实体相对于某个点的约束。可以调整关节偏置和弹簧关节的放松长度等参数。 -Physics objects in **PhysicsServer3D** may be created and manipulated independently; they do not have to be tied to nodes in the scene tree. +\ **PhysicsServer3D** 中的物理对象可以独立创建和操作;不必将它们绑定到场景树中的节点。 -\ **Note:** All the 3D physics nodes use the physics server internally. Adding a physics node to the scene tree will cause a corresponding physics object to be created in the physics server. A rigid body node registers a callback that updates the node's transform with the transform of the respective body object in the physics server (every physics update). An area node registers a callback to inform the area node about overlaps with the respective area object in the physics server. The raycast node queries the direct state of the relevant space in the physics server. +\ **注意:**\ 所有 3D 物理节点都在内部使用这个物理服务器。将物理节点添加到场景树,就会导致在物理服务器中创建相应的物理对象。刚体节点会注册回调,该回调会(在每次物理更新时)使用物理服务器中相应实体对象的变换更新该节点的变换。区域节点会注册回调,用来通知区域节点与物理服务器中相应区域对象的重叠。射线投射节点会查询物理服务器中相关空间的直接状态。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -321,8 +321,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_PhysicsServer3D_JointType: @@ -1636,8 +1636,8 @@ enum **BodyAxis**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PhysicsServer3D_method_area_add_shape: @@ -1887,7 +1887,7 @@ void **area_set_monitorable** **(** :ref:`RID` area, :ref:`bool`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1937,7 +1937,7 @@ void **area_set_shape_disabled** **(** :ref:`RID` area, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2161,7 +2161,7 @@ void **body_clear_shapes** **(** :ref:`RID` body **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2359,7 +2359,7 @@ void **body_clear_shapes** **(** :ref:`RID` body **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2435,7 +2435,7 @@ void **body_set_axis_lock** **(** :ref:`RID` body, :ref:`BodyAxis`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2537,13 +2537,11 @@ void **body_set_enable_continuous_collision_detection** **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata=null **)** -如果对象允许的话,设置用于计算该对象物理的函数(参见 :ref:`body_set_omit_force_integration`\ )。 +如果对象允许的话,设置用于计算该对象物理的函数(见 :ref:`body_set_omit_force_integration`\ )。力的积分函数有 2 个参数: -力的积分函数有 2 个参数: +\ ``state`` — :ref:`PhysicsDirectBodyState3D` 用于检索和修改物体的状态。 -\ ``state:`` :ref:`PhysicsDirectBodyState3D` 用于检索和修改物体的状态。 - -\ ``userdata:`` 可选的用户数据,如果在调用 ``body_set_force_integration_callback`` 时被传递。 +\ ``userdata`` — 可选的用户数据,如果在调用 :ref:`body_set_force_integration_callback` 时被传递。 .. rst-class:: classref-item-separator @@ -2629,7 +2627,7 @@ void **body_set_shape_disabled** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2691,7 +2689,7 @@ void **body_set_state** **(** :ref:`RID` body, :ref:`BodyState`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2705,7 +2703,7 @@ void **body_set_state** **(** :ref:`RID` body, :ref:`BodyState`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2719,7 +2717,7 @@ void **body_set_state** **(** :ref:`RID` body, :ref:`BodyState`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2757,7 +2755,7 @@ void **cone_twist_joint_set_param** **(** :ref:`RID` joint, :ref:`Con .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2771,7 +2769,7 @@ void **cone_twist_joint_set_param** **(** :ref:`RID` joint, :ref:`Con .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2785,7 +2783,7 @@ void **cone_twist_joint_set_param** **(** :ref:`RID` joint, :ref:`Con .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2871,7 +2869,7 @@ void **generic_6dof_joint_set_param** **(** :ref:`RID` joint, Vector3 .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2933,7 +2931,7 @@ void **joint_clear** **(** :ref:`RID` joint **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -2947,7 +2945,7 @@ void **joint_clear** **(** :ref:`RID` joint **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -3009,7 +3007,7 @@ void **joint_make_cone_twist** **(** :ref:`RID` joint, :ref:`RID`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -3023,7 +3021,7 @@ void **joint_make_generic_6dof** **(** :ref:`RID` joint, :ref:`RID`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -3037,7 +3035,7 @@ void **joint_make_hinge** **(** :ref:`RID` joint, :ref:`RID`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -3051,7 +3049,7 @@ void **joint_make_pin** **(** :ref:`RID` joint, :ref:`RID` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -3065,7 +3063,7 @@ void **joint_make_slider** **(** :ref:`RID` joint, :ref:`RID`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -3163,7 +3161,7 @@ void **pin_joint_set_param** **(** :ref:`RID` joint, :ref:`PinJointPa .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -3249,7 +3247,7 @@ void **slider_joint_set_param** **(** :ref:`RID` joint, :ref:`SliderJ .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -3335,7 +3333,7 @@ void **space_set_param** **(** :ref:`RID` space, :ref:`SpaceParameter .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -3349,12 +3347,12 @@ void **space_set_param** **(** :ref:`RID` space, :ref:`SpaceParameter .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsserver3dextension.rst b/classes/zh_CN/class_physicsserver3dextension.rst index efc137a3e6..dd8d849422 100644 --- a/classes/zh_CN/class_physicsserver3dextension.rst +++ b/classes/zh_CN/class_physicsserver3dextension.rst @@ -10,14 +10,14 @@ PhysicsServer3DExtension ======================== -**Inherits:** :ref:`PhysicsServer3D` **<** :ref:`Object` +**继承:** :ref:`PhysicsServer3D` **<** :ref:`Object` 提供覆盖后可以用来创建自定义 :ref:`PhysicsServer3D` 实现的虚方法。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类扩展自 :ref:`PhysicsServer3D`\ ,提供可额外的可覆盖虚方法。覆盖这些方法后,就不会调用物理服务器内部方法,而是调用这些覆盖后的方法。 @@ -25,393 +25,393 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_clear_shapes` **(** :ref:`RID` area **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_area_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_collision_layer` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_collision_mask` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_object_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_area_get_shape_count` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`_area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_area_get_space` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`_area_get_transform` **(** :ref:`RID` area **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_ray_pickable` **(** :ref:`RID` area, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_area_set_transform` **(** :ref:`RID` area, :ref:`Transform3D` transform **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_clear_shapes` **(** :ref:`RID` body **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_body_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]` | :ref:`_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_body_get_collision_priority` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_body_get_constant_force` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_body_get_constant_torque` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_body_get_contacts_reported_depth_threshold` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectBodyState3D` | :ref:`_body_get_direct_state` **(** :ref:`RID` body **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_max_contacts_reported` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`BodyMode` | :ref:`_body_get_mode` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_object_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_shape_count` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`_body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_body_get_user_flags` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_body_is_axis_locked` **(** :ref:`RID` body, :ref:`BodyAxis` axis **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_body_is_continuous_collision_detection_enabled` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_body_is_omitting_force_integration` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_reset_mass_properties` **(** :ref:`RID` body **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_axis_lock` **(** :ref:`RID` body, :ref:`BodyAxis` axis, :ref:`bool` lock **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_contacts_reported_depth_threshold` **(** :ref:`RID` body, :ref:`float` threshold **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_enable_continuous_collision_detection` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_state_sync_callback` **(** :ref:`RID` body, :ref:`Callable` callable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_body_set_user_flags` **(** :ref:`RID` body, :ref:`int` flags **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_body_test_motion` **(** :ref:`RID` body, :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` max_collisions, :ref:`bool` collide_separation_ray, :ref:`bool` recovery_as_collision, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_box_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_capsule_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_concave_polygon_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_cone_twist_joint_get_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_cone_twist_joint_set_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_convex_polygon_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_custom_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_cylinder_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_end_sync` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_finish` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_flush_queries` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_generic_6dof_joint_get_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_generic_6dof_joint_get_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_generic_6dof_joint_set_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_generic_6dof_joint_set_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_process_info` **(** :ref:`ProcessInfo` process_info **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_heightmap_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_hinge_joint_get_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_hinge_joint_get_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_hinge_joint_set_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag, :ref:`bool` enabled **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_hinge_joint_set_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_init` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_flushing_queries` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_clear` **(** :ref:`RID` joint **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_joint_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_disable_collisions_between_bodies` **(** :ref:`RID` joint, :ref:`bool` disable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_joint_get_solver_priority` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`JointType` | :ref:`_joint_get_type` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_joint_is_disabled_collisions_between_bodies` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_cone_twist` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_generic_6dof` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_hinge` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` hinge_A, :ref:`RID` body_B, :ref:`Transform3D` hinge_B **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_hinge_simple` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` pivot_A, :ref:`Vector3` axis_A, :ref:`RID` body_B, :ref:`Vector3` pivot_B, :ref:`Vector3` axis_B **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_pin` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_make_slider` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_joint_set_solver_priority` **(** :ref:`RID` joint, :ref:`int` priority **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_pin_joint_get_local_a` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_pin_joint_get_local_b` **(** :ref:`RID` joint **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_pin_joint_get_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pin_joint_set_local_a` **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pin_joint_set_local_b` **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pin_joint_set_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_separation_ray_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_active` **(** :ref:`bool` active **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_shape_get_custom_solver_bias` **(** :ref:`RID` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_shape_get_data` **(** :ref:`RID` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_shape_get_margin` **(** :ref:`RID` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ShapeType` | :ref:`_shape_get_type` **(** :ref:`RID` shape **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shape_set_custom_solver_bias` **(** :ref:`RID` shape, :ref:`float` bias **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shape_set_margin` **(** :ref:`RID` shape, :ref:`float` margin **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_slider_joint_get_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_slider_joint_set_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_soft_body_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`_soft_body_get_bounds` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]` | :ref:`_soft_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_soft_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_soft_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_soft_body_get_damping_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_soft_body_get_drag_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_soft_body_get_linear_stiffness` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3` | :ref:`_soft_body_get_point_global_position` **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_soft_body_get_pressure_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_soft_body_get_simulation_precision` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_soft_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_soft_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_soft_body_get_total_mass` **(** :ref:`RID` body **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_soft_body_is_point_pinned` **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_move_point` **(** :ref:`RID` body, :ref:`int` point_index, :ref:`Vector3` global_position **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_pin_point` **(** :ref:`RID` body, :ref:`int` point_index, :ref:`bool` pin **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_remove_all_pinned_points` **(** :ref:`RID` body **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_damping_coefficient` **(** :ref:`RID` body, :ref:`float` damping_coefficient **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_drag_coefficient` **(** :ref:`RID` body, :ref:`float` drag_coefficient **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_linear_stiffness` **(** :ref:`RID` body, :ref:`float` linear_stiffness **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_mesh` **(** :ref:`RID` body, :ref:`RID` mesh **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_pressure_coefficient` **(** :ref:`RID` body, :ref:`float` pressure_coefficient **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_simulation_precision` **(** :ref:`RID` body, :ref:`int` simulation_precision **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` variant **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_total_mass` **(** :ref:`RID` body, :ref:`float` total_mass **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_set_transform` **(** :ref:`RID` body, :ref:`Transform3D` transform **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_soft_body_update_rendering_server` **(** :ref:`RID` body, :ref:`PhysicsServer3DRenderingServerHandler` rendering_server_handler **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_space_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_space_get_contact_count` **(** :ref:`RID` space **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`_space_get_contacts` **(** :ref:`RID` space **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PhysicsDirectSpaceState3D` | :ref:`_space_get_direct_state` **(** :ref:`RID` space **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_space_is_active` **(** :ref:`RID` space **)** |virtual| |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_debug_contacts` **(** :ref:`RID` space, :ref:`int` max_contacts **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_sphere_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_step` **(** :ref:`float` step **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_sync` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_world_boundary_shape_create` **(** **)** |virtual| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`body_test_motion_is_excluding_body` **(** :ref:`RID` body **)** |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`body_test_motion_is_excluding_object` **(** :ref:`int` object **)** |const| | - +-------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_add_shape` **(** :ref:`RID` area, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_attach_object_instance_id` **(** :ref:`RID` area, :ref:`int` id **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_clear_shapes` **(** :ref:`RID` area **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_collision_layer` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_collision_mask` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_object_instance_id` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_area_get_param` **(** :ref:`RID` area, :ref:`AreaParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_get_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_area_get_shape_count` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_area_get_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_area_get_space` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_area_get_transform` **(** :ref:`RID` area **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_remove_shape` **(** :ref:`RID` area, :ref:`int` shape_idx **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_area_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_collision_layer` **(** :ref:`RID` area, :ref:`int` layer **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_collision_mask` **(** :ref:`RID` area, :ref:`int` mask **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_monitor_callback` **(** :ref:`RID` area, :ref:`Callable` callback **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_monitorable` **(** :ref:`RID` area, :ref:`bool` monitorable **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_param` **(** :ref:`RID` area, :ref:`AreaParameter` param, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_ray_pickable` **(** :ref:`RID` area, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape_disabled` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_shape_transform` **(** :ref:`RID` area, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_space` **(** :ref:`RID` area, :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_area_set_transform` **(** :ref:`RID` area, :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_add_shape` **(** :ref:`RID` body, :ref:`RID` shape, :ref:`Transform3D` transform, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_central_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_central_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_force` **(** :ref:`RID` body, :ref:`Vector3` force, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse, :ref:`Vector3` position **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_apply_torque_impulse` **(** :ref:`RID` body, :ref:`Vector3` impulse **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_attach_object_instance_id` **(** :ref:`RID` body, :ref:`int` id **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_clear_shapes` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_body_get_collision_priority` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_body_get_constant_force` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_body_get_constant_torque` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_body_get_contacts_reported_depth_threshold` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectBodyState3D` | :ref:`_body_get_direct_state` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_max_contacts_reported` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BodyMode` | :ref:`_body_get_mode` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_object_instance_id` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_body_get_param` **(** :ref:`RID` body, :ref:`BodyParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_get_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_shape_count` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform3D` | :ref:`_body_get_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_body_get_user_flags` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_is_axis_locked` **(** :ref:`RID` body, :ref:`BodyAxis` axis **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_is_continuous_collision_detection_enabled` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_is_omitting_force_integration` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` excepted_body **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_remove_shape` **(** :ref:`RID` body, :ref:`int` shape_idx **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_reset_mass_properties` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_axis_lock` **(** :ref:`RID` body, :ref:`BodyAxis` axis, :ref:`bool` lock **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_axis_velocity` **(** :ref:`RID` body, :ref:`Vector3` axis_velocity **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_collision_priority` **(** :ref:`RID` body, :ref:`float` priority **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_constant_force` **(** :ref:`RID` body, :ref:`Vector3` force **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_constant_torque` **(** :ref:`RID` body, :ref:`Vector3` torque **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_contacts_reported_depth_threshold` **(** :ref:`RID` body, :ref:`float` threshold **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_enable_continuous_collision_detection` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_force_integration_callback` **(** :ref:`RID` body, :ref:`Callable` callable, :ref:`Variant` userdata **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_max_contacts_reported` **(** :ref:`RID` body, :ref:`int` amount **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_mode` **(** :ref:`RID` body, :ref:`BodyMode` mode **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_omit_force_integration` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_param` **(** :ref:`RID` body, :ref:`BodyParameter` param, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`RID` shape **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape_disabled` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`bool` disabled **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_shape_transform` **(** :ref:`RID` body, :ref:`int` shape_idx, :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` value **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_state_sync_callback` **(** :ref:`RID` body, :ref:`Callable` callable **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_body_set_user_flags` **(** :ref:`RID` body, :ref:`int` flags **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_body_test_motion` **(** :ref:`RID` body, :ref:`Transform3D` from, :ref:`Vector3` motion, :ref:`float` margin, :ref:`int` max_collisions, :ref:`bool` collide_separation_ray, :ref:`bool` recovery_as_collision, PhysicsServer3DExtensionMotionResult* result **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_box_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_capsule_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_concave_polygon_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_cone_twist_joint_get_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_cone_twist_joint_set_param` **(** :ref:`RID` joint, :ref:`ConeTwistJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_convex_polygon_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_custom_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_cylinder_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_end_sync` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_finish` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_flush_queries` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_generic_6dof_joint_get_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_generic_6dof_joint_get_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_generic_6dof_joint_set_flag` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisFlag` flag, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_generic_6dof_joint_set_param` **(** :ref:`RID` joint, Vector3.Axis axis, :ref:`G6DOFJointAxisParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_process_info` **(** :ref:`ProcessInfo` process_info **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_heightmap_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_hinge_joint_get_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_hinge_joint_get_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_hinge_joint_set_flag` **(** :ref:`RID` joint, :ref:`HingeJointFlag` flag, :ref:`bool` enabled **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_hinge_joint_set_param` **(** :ref:`RID` joint, :ref:`HingeJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_init` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_flushing_queries` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_clear` **(** :ref:`RID` joint **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_joint_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_disable_collisions_between_bodies` **(** :ref:`RID` joint, :ref:`bool` disable **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_joint_get_solver_priority` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`JointType` | :ref:`_joint_get_type` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_joint_is_disabled_collisions_between_bodies` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_cone_twist` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_generic_6dof` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_hinge` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` hinge_A, :ref:`RID` body_B, :ref:`Transform3D` hinge_B **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_hinge_simple` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` pivot_A, :ref:`Vector3` axis_A, :ref:`RID` body_B, :ref:`Vector3` pivot_B, :ref:`Vector3` axis_B **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_pin` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Vector3` local_A, :ref:`RID` body_B, :ref:`Vector3` local_B **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_make_slider` **(** :ref:`RID` joint, :ref:`RID` body_A, :ref:`Transform3D` local_ref_A, :ref:`RID` body_B, :ref:`Transform3D` local_ref_B **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_joint_set_solver_priority` **(** :ref:`RID` joint, :ref:`int` priority **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_pin_joint_get_local_a` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_pin_joint_get_local_b` **(** :ref:`RID` joint **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_pin_joint_get_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pin_joint_set_local_a` **(** :ref:`RID` joint, :ref:`Vector3` local_A **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pin_joint_set_local_b` **(** :ref:`RID` joint, :ref:`Vector3` local_B **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_pin_joint_set_param` **(** :ref:`RID` joint, :ref:`PinJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_separation_ray_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_active` **(** :ref:`bool` active **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shape_get_custom_solver_bias` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_shape_get_data` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shape_get_margin` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ShapeType` | :ref:`_shape_get_type` **(** :ref:`RID` shape **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shape_set_custom_solver_bias` **(** :ref:`RID` shape, :ref:`float` bias **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shape_set_data` **(** :ref:`RID` shape, :ref:`Variant` data **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shape_set_margin` **(** :ref:`RID` shape, :ref:`float` margin **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_slider_joint_get_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_slider_joint_set_param` **(** :ref:`RID` joint, :ref:`SliderJointParam` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_add_collision_exception` **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_soft_body_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AABB` | :ref:`_soft_body_get_bounds` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`_soft_body_get_collision_exceptions` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_soft_body_get_collision_layer` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_soft_body_get_collision_mask` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_damping_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_drag_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_linear_stiffness` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3` | :ref:`_soft_body_get_point_global_position` **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_pressure_coefficient` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_soft_body_get_simulation_precision` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_soft_body_get_space` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_soft_body_get_state` **(** :ref:`RID` body, :ref:`BodyState` state **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_soft_body_get_total_mass` **(** :ref:`RID` body **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_soft_body_is_point_pinned` **(** :ref:`RID` body, :ref:`int` point_index **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_move_point` **(** :ref:`RID` body, :ref:`int` point_index, :ref:`Vector3` global_position **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_pin_point` **(** :ref:`RID` body, :ref:`int` point_index, :ref:`bool` pin **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_remove_all_pinned_points` **(** :ref:`RID` body **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_remove_collision_exception` **(** :ref:`RID` body, :ref:`RID` body_b **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_collision_layer` **(** :ref:`RID` body, :ref:`int` layer **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_collision_mask` **(** :ref:`RID` body, :ref:`int` mask **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_damping_coefficient` **(** :ref:`RID` body, :ref:`float` damping_coefficient **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_drag_coefficient` **(** :ref:`RID` body, :ref:`float` drag_coefficient **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_linear_stiffness` **(** :ref:`RID` body, :ref:`float` linear_stiffness **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_mesh` **(** :ref:`RID` body, :ref:`RID` mesh **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_pressure_coefficient` **(** :ref:`RID` body, :ref:`float` pressure_coefficient **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_ray_pickable` **(** :ref:`RID` body, :ref:`bool` enable **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_simulation_precision` **(** :ref:`RID` body, :ref:`int` simulation_precision **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_space` **(** :ref:`RID` body, :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_state` **(** :ref:`RID` body, :ref:`BodyState` state, :ref:`Variant` variant **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_total_mass` **(** :ref:`RID` body, :ref:`float` total_mass **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_set_transform` **(** :ref:`RID` body, :ref:`Transform3D` transform **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_soft_body_update_rendering_server` **(** :ref:`RID` body, :ref:`PhysicsServer3DRenderingServerHandler` rendering_server_handler **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_space_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_space_get_contact_count` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector3Array` | :ref:`_space_get_contacts` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PhysicsDirectSpaceState3D` | :ref:`_space_get_direct_state` **(** :ref:`RID` space **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_space_get_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_space_is_active` **(** :ref:`RID` space **)** |virtual| |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_active` **(** :ref:`RID` space, :ref:`bool` active **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_debug_contacts` **(** :ref:`RID` space, :ref:`int` max_contacts **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_space_set_param` **(** :ref:`RID` space, :ref:`SpaceParameter` param, :ref:`float` value **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_sphere_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_step` **(** :ref:`float` step **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_sync` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_world_boundary_shape_create` **(** **)** |virtual| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`body_test_motion_is_excluding_body` **(** :ref:`RID` body **)** |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`body_test_motion_is_excluding_object` **(** :ref:`int` object **)** |const| | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -419,10 +419,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_PhysicsServer3DExtension_method__area_add_shape: +.. _class_PhysicsServer3DExtension_private_method__area_add_shape: .. rst-class:: classref-method @@ -430,13 +430,13 @@ void **_area_add_shape** **(** :ref:`RID` area, :ref:`RID` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_attach_object_instance_id: +.. _class_PhysicsServer3DExtension_private_method__area_attach_object_instance_id: .. rst-class:: classref-method @@ -444,13 +444,13 @@ void **_area_attach_object_instance_id** **(** :ref:`RID` area, :ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_clear_shapes: +.. _class_PhysicsServer3DExtension_private_method__area_clear_shapes: .. rst-class:: classref-method @@ -458,13 +458,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_create: +.. _class_PhysicsServer3DExtension_private_method__area_create: .. rst-class:: classref-method @@ -472,13 +472,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_get_collision_layer: +.. _class_PhysicsServer3DExtension_private_method__area_get_collision_layer: .. rst-class:: classref-method @@ -486,13 +486,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_get_collision_mask: +.. _class_PhysicsServer3DExtension_private_method__area_get_collision_mask: .. rst-class:: classref-method @@ -500,13 +500,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_get_object_instance_id: +.. _class_PhysicsServer3DExtension_private_method__area_get_object_instance_id: .. rst-class:: classref-method @@ -514,13 +514,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_get_param: +.. _class_PhysicsServer3DExtension_private_method__area_get_param: .. rst-class:: classref-method @@ -528,13 +528,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_get_shape: +.. _class_PhysicsServer3DExtension_private_method__area_get_shape: .. rst-class:: classref-method @@ -542,13 +542,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_get_shape_count: +.. _class_PhysicsServer3DExtension_private_method__area_get_shape_count: .. rst-class:: classref-method @@ -556,13 +556,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_get_shape_transform: +.. _class_PhysicsServer3DExtension_private_method__area_get_shape_transform: .. rst-class:: classref-method @@ -570,13 +570,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_get_space: +.. _class_PhysicsServer3DExtension_private_method__area_get_space: .. rst-class:: classref-method @@ -584,13 +584,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_get_transform: +.. _class_PhysicsServer3DExtension_private_method__area_get_transform: .. rst-class:: classref-method @@ -598,13 +598,13 @@ void **_area_clear_shapes** **(** :ref:`RID` area **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_remove_shape: +.. _class_PhysicsServer3DExtension_private_method__area_remove_shape: .. rst-class:: classref-method @@ -612,13 +612,13 @@ void **_area_remove_shape** **(** :ref:`RID` area, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_set_area_monitor_callback: +.. _class_PhysicsServer3DExtension_private_method__area_set_area_monitor_callback: .. rst-class:: classref-method @@ -626,13 +626,13 @@ void **_area_set_area_monitor_callback** **(** :ref:`RID` area, :ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_set_collision_layer: +.. _class_PhysicsServer3DExtension_private_method__area_set_collision_layer: .. rst-class:: classref-method @@ -640,13 +640,13 @@ void **_area_set_collision_layer** **(** :ref:`RID` area, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_set_collision_mask: +.. _class_PhysicsServer3DExtension_private_method__area_set_collision_mask: .. rst-class:: classref-method @@ -654,13 +654,13 @@ void **_area_set_collision_mask** **(** :ref:`RID` area, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_set_monitor_callback: +.. _class_PhysicsServer3DExtension_private_method__area_set_monitor_callback: .. rst-class:: classref-method @@ -668,13 +668,13 @@ void **_area_set_monitor_callback** **(** :ref:`RID` area, :ref:`Call .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_set_monitorable: +.. _class_PhysicsServer3DExtension_private_method__area_set_monitorable: .. rst-class:: classref-method @@ -682,13 +682,13 @@ void **_area_set_monitorable** **(** :ref:`RID` area, :ref:`bool`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_set_param: +.. _class_PhysicsServer3DExtension_private_method__area_set_param: .. rst-class:: classref-method @@ -696,13 +696,13 @@ void **_area_set_param** **(** :ref:`RID` area, :ref:`AreaParameter`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_set_ray_pickable: +.. _class_PhysicsServer3DExtension_private_method__area_set_ray_pickable: .. rst-class:: classref-method @@ -710,13 +710,13 @@ void **_area_set_ray_pickable** **(** :ref:`RID` area, :ref:`bool`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_set_shape: +.. _class_PhysicsServer3DExtension_private_method__area_set_shape: .. rst-class:: classref-method @@ -724,13 +724,13 @@ void **_area_set_shape** **(** :ref:`RID` area, :ref:`int` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_set_shape_disabled: +.. _class_PhysicsServer3DExtension_private_method__area_set_shape_disabled: .. rst-class:: classref-method @@ -738,13 +738,13 @@ void **_area_set_shape_disabled** **(** :ref:`RID` area, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_set_shape_transform: +.. _class_PhysicsServer3DExtension_private_method__area_set_shape_transform: .. rst-class:: classref-method @@ -752,13 +752,13 @@ void **_area_set_shape_transform** **(** :ref:`RID` area, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_set_space: +.. _class_PhysicsServer3DExtension_private_method__area_set_space: .. rst-class:: classref-method @@ -766,13 +766,13 @@ void **_area_set_space** **(** :ref:`RID` area, :ref:`RID` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__area_set_transform: +.. _class_PhysicsServer3DExtension_private_method__area_set_transform: .. rst-class:: classref-method @@ -780,13 +780,13 @@ void **_area_set_transform** **(** :ref:`RID` area, :ref:`Transform3D .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_add_collision_exception: +.. _class_PhysicsServer3DExtension_private_method__body_add_collision_exception: .. rst-class:: classref-method @@ -794,13 +794,13 @@ void **_body_add_collision_exception** **(** :ref:`RID` body, :ref:`R .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_add_constant_central_force: +.. _class_PhysicsServer3DExtension_private_method__body_add_constant_central_force: .. rst-class:: classref-method @@ -808,13 +808,13 @@ void **_body_add_constant_central_force** **(** :ref:`RID` body, :ref .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_add_constant_force: +.. _class_PhysicsServer3DExtension_private_method__body_add_constant_force: .. rst-class:: classref-method @@ -822,13 +822,13 @@ void **_body_add_constant_force** **(** :ref:`RID` body, :ref:`Vector .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_add_constant_torque: +.. _class_PhysicsServer3DExtension_private_method__body_add_constant_torque: .. rst-class:: classref-method @@ -836,13 +836,13 @@ void **_body_add_constant_torque** **(** :ref:`RID` body, :ref:`Vecto .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_add_shape: +.. _class_PhysicsServer3DExtension_private_method__body_add_shape: .. rst-class:: classref-method @@ -850,13 +850,13 @@ void **_body_add_shape** **(** :ref:`RID` body, :ref:`RID` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_apply_central_force: +.. _class_PhysicsServer3DExtension_private_method__body_apply_central_force: .. rst-class:: classref-method @@ -864,13 +864,13 @@ void **_body_apply_central_force** **(** :ref:`RID` body, :ref:`Vecto .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_apply_central_impulse: +.. _class_PhysicsServer3DExtension_private_method__body_apply_central_impulse: .. rst-class:: classref-method @@ -878,13 +878,13 @@ void **_body_apply_central_impulse** **(** :ref:`RID` body, :ref:`Vec .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_apply_force: +.. _class_PhysicsServer3DExtension_private_method__body_apply_force: .. rst-class:: classref-method @@ -892,13 +892,13 @@ void **_body_apply_force** **(** :ref:`RID` body, :ref:`Vector3`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_apply_impulse: +.. _class_PhysicsServer3DExtension_private_method__body_apply_impulse: .. rst-class:: classref-method @@ -906,13 +906,13 @@ void **_body_apply_impulse** **(** :ref:`RID` body, :ref:`Vector3`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_apply_torque: +.. _class_PhysicsServer3DExtension_private_method__body_apply_torque: .. rst-class:: classref-method @@ -920,13 +920,13 @@ void **_body_apply_torque** **(** :ref:`RID` body, :ref:`Vector3`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_apply_torque_impulse: +.. _class_PhysicsServer3DExtension_private_method__body_apply_torque_impulse: .. rst-class:: classref-method @@ -934,13 +934,13 @@ void **_body_apply_torque_impulse** **(** :ref:`RID` body, :ref:`Vect .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_attach_object_instance_id: +.. _class_PhysicsServer3DExtension_private_method__body_attach_object_instance_id: .. rst-class:: classref-method @@ -948,13 +948,13 @@ void **_body_attach_object_instance_id** **(** :ref:`RID` body, :ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_clear_shapes: +.. _class_PhysicsServer3DExtension_private_method__body_clear_shapes: .. rst-class:: classref-method @@ -962,13 +962,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_create: +.. _class_PhysicsServer3DExtension_private_method__body_create: .. rst-class:: classref-method @@ -976,13 +976,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_collision_exceptions: +.. _class_PhysicsServer3DExtension_private_method__body_get_collision_exceptions: .. rst-class:: classref-method @@ -990,13 +990,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_collision_layer: +.. _class_PhysicsServer3DExtension_private_method__body_get_collision_layer: .. rst-class:: classref-method @@ -1004,13 +1004,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_collision_mask: +.. _class_PhysicsServer3DExtension_private_method__body_get_collision_mask: .. rst-class:: classref-method @@ -1018,13 +1018,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_collision_priority: +.. _class_PhysicsServer3DExtension_private_method__body_get_collision_priority: .. rst-class:: classref-method @@ -1032,13 +1032,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_constant_force: +.. _class_PhysicsServer3DExtension_private_method__body_get_constant_force: .. rst-class:: classref-method @@ -1046,13 +1046,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_constant_torque: +.. _class_PhysicsServer3DExtension_private_method__body_get_constant_torque: .. rst-class:: classref-method @@ -1060,13 +1060,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_contacts_reported_depth_threshold: +.. _class_PhysicsServer3DExtension_private_method__body_get_contacts_reported_depth_threshold: .. rst-class:: classref-method @@ -1074,13 +1074,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_direct_state: +.. _class_PhysicsServer3DExtension_private_method__body_get_direct_state: .. rst-class:: classref-method @@ -1088,13 +1088,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_max_contacts_reported: +.. _class_PhysicsServer3DExtension_private_method__body_get_max_contacts_reported: .. rst-class:: classref-method @@ -1102,13 +1102,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_mode: +.. _class_PhysicsServer3DExtension_private_method__body_get_mode: .. rst-class:: classref-method @@ -1116,13 +1116,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_object_instance_id: +.. _class_PhysicsServer3DExtension_private_method__body_get_object_instance_id: .. rst-class:: classref-method @@ -1130,13 +1130,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_param: +.. _class_PhysicsServer3DExtension_private_method__body_get_param: .. rst-class:: classref-method @@ -1144,13 +1144,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_shape: +.. _class_PhysicsServer3DExtension_private_method__body_get_shape: .. rst-class:: classref-method @@ -1158,13 +1158,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_shape_count: +.. _class_PhysicsServer3DExtension_private_method__body_get_shape_count: .. rst-class:: classref-method @@ -1172,13 +1172,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_shape_transform: +.. _class_PhysicsServer3DExtension_private_method__body_get_shape_transform: .. rst-class:: classref-method @@ -1186,13 +1186,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_space: +.. _class_PhysicsServer3DExtension_private_method__body_get_space: .. rst-class:: classref-method @@ -1200,13 +1200,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_state: +.. _class_PhysicsServer3DExtension_private_method__body_get_state: .. rst-class:: classref-method @@ -1214,13 +1214,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_get_user_flags: +.. _class_PhysicsServer3DExtension_private_method__body_get_user_flags: .. rst-class:: classref-method @@ -1228,13 +1228,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_is_axis_locked: +.. _class_PhysicsServer3DExtension_private_method__body_is_axis_locked: .. rst-class:: classref-method @@ -1242,13 +1242,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_is_continuous_collision_detection_enabled: +.. _class_PhysicsServer3DExtension_private_method__body_is_continuous_collision_detection_enabled: .. rst-class:: classref-method @@ -1256,13 +1256,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_is_omitting_force_integration: +.. _class_PhysicsServer3DExtension_private_method__body_is_omitting_force_integration: .. rst-class:: classref-method @@ -1270,13 +1270,13 @@ void **_body_clear_shapes** **(** :ref:`RID` body **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_remove_collision_exception: +.. _class_PhysicsServer3DExtension_private_method__body_remove_collision_exception: .. rst-class:: classref-method @@ -1284,13 +1284,13 @@ void **_body_remove_collision_exception** **(** :ref:`RID` body, :ref .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_remove_shape: +.. _class_PhysicsServer3DExtension_private_method__body_remove_shape: .. rst-class:: classref-method @@ -1298,13 +1298,13 @@ void **_body_remove_shape** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_reset_mass_properties: +.. _class_PhysicsServer3DExtension_private_method__body_reset_mass_properties: .. rst-class:: classref-method @@ -1312,13 +1312,13 @@ void **_body_reset_mass_properties** **(** :ref:`RID` body **)** |vir .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_axis_lock: +.. _class_PhysicsServer3DExtension_private_method__body_set_axis_lock: .. rst-class:: classref-method @@ -1326,13 +1326,13 @@ void **_body_set_axis_lock** **(** :ref:`RID` body, :ref:`BodyAxis`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_axis_velocity: +.. _class_PhysicsServer3DExtension_private_method__body_set_axis_velocity: .. rst-class:: classref-method @@ -1340,13 +1340,13 @@ void **_body_set_axis_velocity** **(** :ref:`RID` body, :ref:`Vector3 .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_collision_layer: +.. _class_PhysicsServer3DExtension_private_method__body_set_collision_layer: .. rst-class:: classref-method @@ -1354,13 +1354,13 @@ void **_body_set_collision_layer** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_collision_mask: +.. _class_PhysicsServer3DExtension_private_method__body_set_collision_mask: .. rst-class:: classref-method @@ -1368,13 +1368,13 @@ void **_body_set_collision_mask** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_collision_priority: +.. _class_PhysicsServer3DExtension_private_method__body_set_collision_priority: .. rst-class:: classref-method @@ -1382,13 +1382,13 @@ void **_body_set_collision_priority** **(** :ref:`RID` body, :ref:`fl .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_constant_force: +.. _class_PhysicsServer3DExtension_private_method__body_set_constant_force: .. rst-class:: classref-method @@ -1396,13 +1396,13 @@ void **_body_set_constant_force** **(** :ref:`RID` body, :ref:`Vector .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_constant_torque: +.. _class_PhysicsServer3DExtension_private_method__body_set_constant_torque: .. rst-class:: classref-method @@ -1410,13 +1410,13 @@ void **_body_set_constant_torque** **(** :ref:`RID` body, :ref:`Vecto .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_contacts_reported_depth_threshold: +.. _class_PhysicsServer3DExtension_private_method__body_set_contacts_reported_depth_threshold: .. rst-class:: classref-method @@ -1424,13 +1424,13 @@ void **_body_set_contacts_reported_depth_threshold** **(** :ref:`RID` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_enable_continuous_collision_detection: +.. _class_PhysicsServer3DExtension_private_method__body_set_enable_continuous_collision_detection: .. rst-class:: classref-method @@ -1438,13 +1438,13 @@ void **_body_set_enable_continuous_collision_detection** **(** :ref:`RID`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_force_integration_callback: +.. _class_PhysicsServer3DExtension_private_method__body_set_force_integration_callback: .. rst-class:: classref-method @@ -1452,13 +1452,13 @@ void **_body_set_force_integration_callback** **(** :ref:`RID` body, .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_max_contacts_reported: +.. _class_PhysicsServer3DExtension_private_method__body_set_max_contacts_reported: .. rst-class:: classref-method @@ -1466,13 +1466,13 @@ void **_body_set_max_contacts_reported** **(** :ref:`RID` body, :ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_mode: +.. _class_PhysicsServer3DExtension_private_method__body_set_mode: .. rst-class:: classref-method @@ -1480,13 +1480,13 @@ void **_body_set_mode** **(** :ref:`RID` body, :ref:`BodyMode`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_omit_force_integration: +.. _class_PhysicsServer3DExtension_private_method__body_set_omit_force_integration: .. rst-class:: classref-method @@ -1494,13 +1494,13 @@ void **_body_set_omit_force_integration** **(** :ref:`RID` body, :ref .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_param: +.. _class_PhysicsServer3DExtension_private_method__body_set_param: .. rst-class:: classref-method @@ -1508,13 +1508,13 @@ void **_body_set_param** **(** :ref:`RID` body, :ref:`BodyParameter`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_ray_pickable: +.. _class_PhysicsServer3DExtension_private_method__body_set_ray_pickable: .. rst-class:: classref-method @@ -1522,13 +1522,13 @@ void **_body_set_ray_pickable** **(** :ref:`RID` body, :ref:`bool`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_shape: +.. _class_PhysicsServer3DExtension_private_method__body_set_shape: .. rst-class:: classref-method @@ -1536,13 +1536,13 @@ void **_body_set_shape** **(** :ref:`RID` body, :ref:`int` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_shape_disabled: +.. _class_PhysicsServer3DExtension_private_method__body_set_shape_disabled: .. rst-class:: classref-method @@ -1550,13 +1550,13 @@ void **_body_set_shape_disabled** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_shape_transform: +.. _class_PhysicsServer3DExtension_private_method__body_set_shape_transform: .. rst-class:: classref-method @@ -1564,13 +1564,13 @@ void **_body_set_shape_transform** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_space: +.. _class_PhysicsServer3DExtension_private_method__body_set_space: .. rst-class:: classref-method @@ -1578,13 +1578,13 @@ void **_body_set_space** **(** :ref:`RID` body, :ref:`RID` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_state: +.. _class_PhysicsServer3DExtension_private_method__body_set_state: .. rst-class:: classref-method @@ -1592,13 +1592,13 @@ void **_body_set_state** **(** :ref:`RID` body, :ref:`BodyState`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_state_sync_callback: +.. _class_PhysicsServer3DExtension_private_method__body_set_state_sync_callback: .. rst-class:: classref-method @@ -1606,13 +1606,13 @@ void **_body_set_state_sync_callback** **(** :ref:`RID` body, :ref:`C .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_set_user_flags: +.. _class_PhysicsServer3DExtension_private_method__body_set_user_flags: .. rst-class:: classref-method @@ -1620,13 +1620,13 @@ void **_body_set_user_flags** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__body_test_motion: +.. _class_PhysicsServer3DExtension_private_method__body_test_motion: .. rst-class:: classref-method @@ -1634,13 +1634,13 @@ void **_body_set_user_flags** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__box_shape_create: +.. _class_PhysicsServer3DExtension_private_method__box_shape_create: .. rst-class:: classref-method @@ -1648,13 +1648,13 @@ void **_body_set_user_flags** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__capsule_shape_create: +.. _class_PhysicsServer3DExtension_private_method__capsule_shape_create: .. rst-class:: classref-method @@ -1662,13 +1662,13 @@ void **_body_set_user_flags** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__concave_polygon_shape_create: +.. _class_PhysicsServer3DExtension_private_method__concave_polygon_shape_create: .. rst-class:: classref-method @@ -1676,13 +1676,13 @@ void **_body_set_user_flags** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__cone_twist_joint_get_param: +.. _class_PhysicsServer3DExtension_private_method__cone_twist_joint_get_param: .. rst-class:: classref-method @@ -1690,13 +1690,13 @@ void **_body_set_user_flags** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__cone_twist_joint_set_param: +.. _class_PhysicsServer3DExtension_private_method__cone_twist_joint_set_param: .. rst-class:: classref-method @@ -1704,13 +1704,13 @@ void **_cone_twist_joint_set_param** **(** :ref:`RID` joint, :ref:`Co .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__convex_polygon_shape_create: +.. _class_PhysicsServer3DExtension_private_method__convex_polygon_shape_create: .. rst-class:: classref-method @@ -1718,13 +1718,13 @@ void **_cone_twist_joint_set_param** **(** :ref:`RID` joint, :ref:`Co .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__custom_shape_create: +.. _class_PhysicsServer3DExtension_private_method__custom_shape_create: .. rst-class:: classref-method @@ -1732,13 +1732,13 @@ void **_cone_twist_joint_set_param** **(** :ref:`RID` joint, :ref:`Co .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__cylinder_shape_create: +.. _class_PhysicsServer3DExtension_private_method__cylinder_shape_create: .. rst-class:: classref-method @@ -1746,13 +1746,13 @@ void **_cone_twist_joint_set_param** **(** :ref:`RID` joint, :ref:`Co .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__end_sync: +.. _class_PhysicsServer3DExtension_private_method__end_sync: .. rst-class:: classref-method @@ -1760,13 +1760,13 @@ void **_end_sync** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__finish: +.. _class_PhysicsServer3DExtension_private_method__finish: .. rst-class:: classref-method @@ -1774,13 +1774,13 @@ void **_finish** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__flush_queries: +.. _class_PhysicsServer3DExtension_private_method__flush_queries: .. rst-class:: classref-method @@ -1788,13 +1788,13 @@ void **_flush_queries** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__free_rid: +.. _class_PhysicsServer3DExtension_private_method__free_rid: .. rst-class:: classref-method @@ -1802,13 +1802,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__generic_6dof_joint_get_flag: +.. _class_PhysicsServer3DExtension_private_method__generic_6dof_joint_get_flag: .. rst-class:: classref-method @@ -1816,13 +1816,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__generic_6dof_joint_get_param: +.. _class_PhysicsServer3DExtension_private_method__generic_6dof_joint_get_param: .. rst-class:: classref-method @@ -1830,13 +1830,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__generic_6dof_joint_set_flag: +.. _class_PhysicsServer3DExtension_private_method__generic_6dof_joint_set_flag: .. rst-class:: classref-method @@ -1844,13 +1844,13 @@ void **_generic_6dof_joint_set_flag** **(** :ref:`RID` joint, Vector3 .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__generic_6dof_joint_set_param: +.. _class_PhysicsServer3DExtension_private_method__generic_6dof_joint_set_param: .. rst-class:: classref-method @@ -1858,13 +1858,13 @@ void **_generic_6dof_joint_set_param** **(** :ref:`RID` joint, Vector .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__get_process_info: +.. _class_PhysicsServer3DExtension_private_method__get_process_info: .. rst-class:: classref-method @@ -1872,13 +1872,13 @@ void **_generic_6dof_joint_set_param** **(** :ref:`RID` joint, Vector .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__heightmap_shape_create: +.. _class_PhysicsServer3DExtension_private_method__heightmap_shape_create: .. rst-class:: classref-method @@ -1886,13 +1886,13 @@ void **_generic_6dof_joint_set_param** **(** :ref:`RID` joint, Vector .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__hinge_joint_get_flag: +.. _class_PhysicsServer3DExtension_private_method__hinge_joint_get_flag: .. rst-class:: classref-method @@ -1900,13 +1900,13 @@ void **_generic_6dof_joint_set_param** **(** :ref:`RID` joint, Vector .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__hinge_joint_get_param: +.. _class_PhysicsServer3DExtension_private_method__hinge_joint_get_param: .. rst-class:: classref-method @@ -1914,13 +1914,13 @@ void **_generic_6dof_joint_set_param** **(** :ref:`RID` joint, Vector .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__hinge_joint_set_flag: +.. _class_PhysicsServer3DExtension_private_method__hinge_joint_set_flag: .. rst-class:: classref-method @@ -1928,13 +1928,13 @@ void **_hinge_joint_set_flag** **(** :ref:`RID` joint, :ref:`HingeJoi .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__hinge_joint_set_param: +.. _class_PhysicsServer3DExtension_private_method__hinge_joint_set_param: .. rst-class:: classref-method @@ -1942,13 +1942,13 @@ void **_hinge_joint_set_param** **(** :ref:`RID` joint, :ref:`HingeJo .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__init: +.. _class_PhysicsServer3DExtension_private_method__init: .. rst-class:: classref-method @@ -1956,13 +1956,13 @@ void **_init** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__is_flushing_queries: +.. _class_PhysicsServer3DExtension_private_method__is_flushing_queries: .. rst-class:: classref-method @@ -1970,13 +1970,13 @@ void **_init** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__joint_clear: +.. _class_PhysicsServer3DExtension_private_method__joint_clear: .. rst-class:: classref-method @@ -1984,13 +1984,13 @@ void **_joint_clear** **(** :ref:`RID` joint **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__joint_create: +.. _class_PhysicsServer3DExtension_private_method__joint_create: .. rst-class:: classref-method @@ -1998,13 +1998,13 @@ void **_joint_clear** **(** :ref:`RID` joint **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__joint_disable_collisions_between_bodies: +.. _class_PhysicsServer3DExtension_private_method__joint_disable_collisions_between_bodies: .. rst-class:: classref-method @@ -2012,13 +2012,13 @@ void **_joint_disable_collisions_between_bodies** **(** :ref:`RID` jo .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__joint_get_solver_priority: +.. _class_PhysicsServer3DExtension_private_method__joint_get_solver_priority: .. rst-class:: classref-method @@ -2026,13 +2026,13 @@ void **_joint_disable_collisions_between_bodies** **(** :ref:`RID` jo .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__joint_get_type: +.. _class_PhysicsServer3DExtension_private_method__joint_get_type: .. rst-class:: classref-method @@ -2040,13 +2040,13 @@ void **_joint_disable_collisions_between_bodies** **(** :ref:`RID` jo .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__joint_is_disabled_collisions_between_bodies: +.. _class_PhysicsServer3DExtension_private_method__joint_is_disabled_collisions_between_bodies: .. rst-class:: classref-method @@ -2054,13 +2054,13 @@ void **_joint_disable_collisions_between_bodies** **(** :ref:`RID` jo .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__joint_make_cone_twist: +.. _class_PhysicsServer3DExtension_private_method__joint_make_cone_twist: .. rst-class:: classref-method @@ -2068,13 +2068,13 @@ void **_joint_make_cone_twist** **(** :ref:`RID` joint, :ref:`RID`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__joint_make_generic_6dof: +.. _class_PhysicsServer3DExtension_private_method__joint_make_generic_6dof: .. rst-class:: classref-method @@ -2082,13 +2082,13 @@ void **_joint_make_generic_6dof** **(** :ref:`RID` joint, :ref:`RID`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__joint_make_hinge: +.. _class_PhysicsServer3DExtension_private_method__joint_make_hinge: .. rst-class:: classref-method @@ -2096,13 +2096,13 @@ void **_joint_make_hinge** **(** :ref:`RID` joint, :ref:`RID`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__joint_make_hinge_simple: +.. _class_PhysicsServer3DExtension_private_method__joint_make_hinge_simple: .. rst-class:: classref-method @@ -2110,13 +2110,13 @@ void **_joint_make_hinge_simple** **(** :ref:`RID` joint, :ref:`RID`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__joint_make_pin: +.. _class_PhysicsServer3DExtension_private_method__joint_make_pin: .. rst-class:: classref-method @@ -2124,13 +2124,13 @@ void **_joint_make_pin** **(** :ref:`RID` joint, :ref:`RID .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__joint_make_slider: +.. _class_PhysicsServer3DExtension_private_method__joint_make_slider: .. rst-class:: classref-method @@ -2138,13 +2138,13 @@ void **_joint_make_slider** **(** :ref:`RID` joint, :ref:`RID`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__joint_set_solver_priority: +.. _class_PhysicsServer3DExtension_private_method__joint_set_solver_priority: .. rst-class:: classref-method @@ -2152,13 +2152,13 @@ void **_joint_set_solver_priority** **(** :ref:`RID` joint, :ref:`int .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__pin_joint_get_local_a: +.. _class_PhysicsServer3DExtension_private_method__pin_joint_get_local_a: .. rst-class:: classref-method @@ -2166,13 +2166,13 @@ void **_joint_set_solver_priority** **(** :ref:`RID` joint, :ref:`int .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__pin_joint_get_local_b: +.. _class_PhysicsServer3DExtension_private_method__pin_joint_get_local_b: .. rst-class:: classref-method @@ -2180,13 +2180,13 @@ void **_joint_set_solver_priority** **(** :ref:`RID` joint, :ref:`int .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__pin_joint_get_param: +.. _class_PhysicsServer3DExtension_private_method__pin_joint_get_param: .. rst-class:: classref-method @@ -2194,13 +2194,13 @@ void **_joint_set_solver_priority** **(** :ref:`RID` joint, :ref:`int .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__pin_joint_set_local_a: +.. _class_PhysicsServer3DExtension_private_method__pin_joint_set_local_a: .. rst-class:: classref-method @@ -2208,13 +2208,13 @@ void **_pin_joint_set_local_a** **(** :ref:`RID` joint, :ref:`Vector3 .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__pin_joint_set_local_b: +.. _class_PhysicsServer3DExtension_private_method__pin_joint_set_local_b: .. rst-class:: classref-method @@ -2222,13 +2222,13 @@ void **_pin_joint_set_local_b** **(** :ref:`RID` joint, :ref:`Vector3 .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__pin_joint_set_param: +.. _class_PhysicsServer3DExtension_private_method__pin_joint_set_param: .. rst-class:: classref-method @@ -2236,13 +2236,13 @@ void **_pin_joint_set_param** **(** :ref:`RID` joint, :ref:`PinJointP .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__separation_ray_shape_create: +.. _class_PhysicsServer3DExtension_private_method__separation_ray_shape_create: .. rst-class:: classref-method @@ -2250,13 +2250,13 @@ void **_pin_joint_set_param** **(** :ref:`RID` joint, :ref:`PinJointP .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__set_active: +.. _class_PhysicsServer3DExtension_private_method__set_active: .. rst-class:: classref-method @@ -2264,13 +2264,13 @@ void **_set_active** **(** :ref:`bool` active **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__shape_get_custom_solver_bias: +.. _class_PhysicsServer3DExtension_private_method__shape_get_custom_solver_bias: .. rst-class:: classref-method @@ -2278,13 +2278,13 @@ void **_set_active** **(** :ref:`bool` active **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__shape_get_data: +.. _class_PhysicsServer3DExtension_private_method__shape_get_data: .. rst-class:: classref-method @@ -2292,13 +2292,13 @@ void **_set_active** **(** :ref:`bool` active **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__shape_get_margin: +.. _class_PhysicsServer3DExtension_private_method__shape_get_margin: .. rst-class:: classref-method @@ -2306,13 +2306,13 @@ void **_set_active** **(** :ref:`bool` active **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__shape_get_type: +.. _class_PhysicsServer3DExtension_private_method__shape_get_type: .. rst-class:: classref-method @@ -2320,13 +2320,13 @@ void **_set_active** **(** :ref:`bool` active **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__shape_set_custom_solver_bias: +.. _class_PhysicsServer3DExtension_private_method__shape_set_custom_solver_bias: .. rst-class:: classref-method @@ -2334,13 +2334,13 @@ void **_shape_set_custom_solver_bias** **(** :ref:`RID` shape, :ref:` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__shape_set_data: +.. _class_PhysicsServer3DExtension_private_method__shape_set_data: .. rst-class:: classref-method @@ -2348,13 +2348,13 @@ void **_shape_set_data** **(** :ref:`RID` shape, :ref:`Variant`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__shape_set_margin: +.. _class_PhysicsServer3DExtension_private_method__shape_set_margin: .. rst-class:: classref-method @@ -2362,13 +2362,13 @@ void **_shape_set_margin** **(** :ref:`RID` shape, :ref:`float`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__slider_joint_get_param: +.. _class_PhysicsServer3DExtension_private_method__slider_joint_get_param: .. rst-class:: classref-method @@ -2376,13 +2376,13 @@ void **_shape_set_margin** **(** :ref:`RID` shape, :ref:`float`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__slider_joint_set_param: +.. _class_PhysicsServer3DExtension_private_method__slider_joint_set_param: .. rst-class:: classref-method @@ -2390,13 +2390,13 @@ void **_slider_joint_set_param** **(** :ref:`RID` joint, :ref:`Slider .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_add_collision_exception: +.. _class_PhysicsServer3DExtension_private_method__soft_body_add_collision_exception: .. rst-class:: classref-method @@ -2404,13 +2404,13 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_create: +.. _class_PhysicsServer3DExtension_private_method__soft_body_create: .. rst-class:: classref-method @@ -2418,13 +2418,13 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_bounds: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_bounds: .. rst-class:: classref-method @@ -2432,13 +2432,13 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_collision_exceptions: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_collision_exceptions: .. rst-class:: classref-method @@ -2446,13 +2446,13 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_collision_layer: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_collision_layer: .. rst-class:: classref-method @@ -2460,13 +2460,13 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_collision_mask: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_collision_mask: .. rst-class:: classref-method @@ -2474,13 +2474,13 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_damping_coefficient: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_damping_coefficient: .. rst-class:: classref-method @@ -2488,13 +2488,13 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_drag_coefficient: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_drag_coefficient: .. rst-class:: classref-method @@ -2502,13 +2502,13 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_linear_stiffness: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_linear_stiffness: .. rst-class:: classref-method @@ -2516,13 +2516,13 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_point_global_position: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_point_global_position: .. rst-class:: classref-method @@ -2530,13 +2530,13 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_pressure_coefficient: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_pressure_coefficient: .. rst-class:: classref-method @@ -2544,13 +2544,13 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_simulation_precision: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_simulation_precision: .. rst-class:: classref-method @@ -2558,13 +2558,13 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_space: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_space: .. rst-class:: classref-method @@ -2572,13 +2572,13 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_state: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_state: .. rst-class:: classref-method @@ -2586,13 +2586,13 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_get_total_mass: +.. _class_PhysicsServer3DExtension_private_method__soft_body_get_total_mass: .. rst-class:: classref-method @@ -2600,13 +2600,13 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_is_point_pinned: +.. _class_PhysicsServer3DExtension_private_method__soft_body_is_point_pinned: .. rst-class:: classref-method @@ -2614,13 +2614,13 @@ void **_soft_body_add_collision_exception** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_move_point: +.. _class_PhysicsServer3DExtension_private_method__soft_body_move_point: .. rst-class:: classref-method @@ -2628,13 +2628,13 @@ void **_soft_body_move_point** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_pin_point: +.. _class_PhysicsServer3DExtension_private_method__soft_body_pin_point: .. rst-class:: classref-method @@ -2642,13 +2642,13 @@ void **_soft_body_pin_point** **(** :ref:`RID` body, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_remove_all_pinned_points: +.. _class_PhysicsServer3DExtension_private_method__soft_body_remove_all_pinned_points: .. rst-class:: classref-method @@ -2656,13 +2656,13 @@ void **_soft_body_remove_all_pinned_points** **(** :ref:`RID` body ** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_remove_collision_exception: +.. _class_PhysicsServer3DExtension_private_method__soft_body_remove_collision_exception: .. rst-class:: classref-method @@ -2670,13 +2670,13 @@ void **_soft_body_remove_collision_exception** **(** :ref:`RID` body, .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_collision_layer: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_collision_layer: .. rst-class:: classref-method @@ -2684,13 +2684,13 @@ void **_soft_body_set_collision_layer** **(** :ref:`RID` body, :ref:` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_collision_mask: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_collision_mask: .. rst-class:: classref-method @@ -2698,13 +2698,13 @@ void **_soft_body_set_collision_mask** **(** :ref:`RID` body, :ref:`i .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_damping_coefficient: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_damping_coefficient: .. rst-class:: classref-method @@ -2712,13 +2712,13 @@ void **_soft_body_set_damping_coefficient** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_drag_coefficient: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_drag_coefficient: .. rst-class:: classref-method @@ -2726,13 +2726,13 @@ void **_soft_body_set_drag_coefficient** **(** :ref:`RID` body, :ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_linear_stiffness: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_linear_stiffness: .. rst-class:: classref-method @@ -2740,13 +2740,13 @@ void **_soft_body_set_linear_stiffness** **(** :ref:`RID` body, :ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_mesh: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_mesh: .. rst-class:: classref-method @@ -2754,13 +2754,13 @@ void **_soft_body_set_mesh** **(** :ref:`RID` body, :ref:`RID`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_pressure_coefficient: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_pressure_coefficient: .. rst-class:: classref-method @@ -2768,13 +2768,13 @@ void **_soft_body_set_pressure_coefficient** **(** :ref:`RID` body, : .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_ray_pickable: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_ray_pickable: .. rst-class:: classref-method @@ -2782,13 +2782,13 @@ void **_soft_body_set_ray_pickable** **(** :ref:`RID` body, :ref:`boo .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_simulation_precision: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_simulation_precision: .. rst-class:: classref-method @@ -2796,13 +2796,13 @@ void **_soft_body_set_simulation_precision** **(** :ref:`RID` body, : .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_space: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_space: .. rst-class:: classref-method @@ -2810,13 +2810,13 @@ void **_soft_body_set_space** **(** :ref:`RID` body, :ref:`RID`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_state: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_state: .. rst-class:: classref-method @@ -2824,13 +2824,13 @@ void **_soft_body_set_state** **(** :ref:`RID` body, :ref:`BodyState< .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_total_mass: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_total_mass: .. rst-class:: classref-method @@ -2838,13 +2838,13 @@ void **_soft_body_set_total_mass** **(** :ref:`RID` body, :ref:`float .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_set_transform: +.. _class_PhysicsServer3DExtension_private_method__soft_body_set_transform: .. rst-class:: classref-method @@ -2852,13 +2852,13 @@ void **_soft_body_set_transform** **(** :ref:`RID` body, :ref:`Transf .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__soft_body_update_rendering_server: +.. _class_PhysicsServer3DExtension_private_method__soft_body_update_rendering_server: .. rst-class:: classref-method @@ -2866,13 +2866,13 @@ void **_soft_body_update_rendering_server** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__space_create: +.. _class_PhysicsServer3DExtension_private_method__space_create: .. rst-class:: classref-method @@ -2880,13 +2880,13 @@ void **_soft_body_update_rendering_server** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__space_get_contact_count: +.. _class_PhysicsServer3DExtension_private_method__space_get_contact_count: .. rst-class:: classref-method @@ -2894,13 +2894,13 @@ void **_soft_body_update_rendering_server** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__space_get_contacts: +.. _class_PhysicsServer3DExtension_private_method__space_get_contacts: .. rst-class:: classref-method @@ -2908,13 +2908,13 @@ void **_soft_body_update_rendering_server** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__space_get_direct_state: +.. _class_PhysicsServer3DExtension_private_method__space_get_direct_state: .. rst-class:: classref-method @@ -2922,13 +2922,13 @@ void **_soft_body_update_rendering_server** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__space_get_param: +.. _class_PhysicsServer3DExtension_private_method__space_get_param: .. rst-class:: classref-method @@ -2936,13 +2936,13 @@ void **_soft_body_update_rendering_server** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__space_is_active: +.. _class_PhysicsServer3DExtension_private_method__space_is_active: .. rst-class:: classref-method @@ -2950,13 +2950,13 @@ void **_soft_body_update_rendering_server** **(** :ref:`RID` body, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__space_set_active: +.. _class_PhysicsServer3DExtension_private_method__space_set_active: .. rst-class:: classref-method @@ -2964,13 +2964,13 @@ void **_space_set_active** **(** :ref:`RID` space, :ref:`bool`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__space_set_debug_contacts: +.. _class_PhysicsServer3DExtension_private_method__space_set_debug_contacts: .. rst-class:: classref-method @@ -2978,13 +2978,13 @@ void **_space_set_debug_contacts** **(** :ref:`RID` space, :ref:`int< .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__space_set_param: +.. _class_PhysicsServer3DExtension_private_method__space_set_param: .. rst-class:: classref-method @@ -2992,13 +2992,13 @@ void **_space_set_param** **(** :ref:`RID` space, :ref:`SpaceParamete .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__sphere_shape_create: +.. _class_PhysicsServer3DExtension_private_method__sphere_shape_create: .. rst-class:: classref-method @@ -3006,13 +3006,13 @@ void **_space_set_param** **(** :ref:`RID` space, :ref:`SpaceParamete .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__step: +.. _class_PhysicsServer3DExtension_private_method__step: .. rst-class:: classref-method @@ -3020,13 +3020,13 @@ void **_step** **(** :ref:`float` step **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__sync: +.. _class_PhysicsServer3DExtension_private_method__sync: .. rst-class:: classref-method @@ -3034,13 +3034,13 @@ void **_sync** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DExtension_method__world_boundary_shape_create: +.. _class_PhysicsServer3DExtension_private_method__world_boundary_shape_create: .. rst-class:: classref-method @@ -3048,7 +3048,7 @@ void **_sync** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -3062,7 +3062,7 @@ void **_sync** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -3076,12 +3076,12 @@ void **_sync** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsserver3dmanager.rst b/classes/zh_CN/class_physicsserver3dmanager.rst index 3ff65c1ff5..f5f0e054a1 100644 --- a/classes/zh_CN/class_physicsserver3dmanager.rst +++ b/classes/zh_CN/class_physicsserver3dmanager.rst @@ -10,14 +10,14 @@ PhysicsServer3DManager ====================== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 用于管理 :ref:`PhysicsServer3D` 实现的单例。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **PhysicsServer3DManager** 是用于注册 :ref:`PhysicsServer3D` 实现、设置默认实现的 API。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PhysicsServer3DManager_method_register_server: @@ -66,10 +66,10 @@ void **set_default_server** **(** :ref:`String` name, :ref:`int` 实现设置为默认实现。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsserver3drenderingserverhandler.rst b/classes/zh_CN/class_physicsserver3drenderingserverhandler.rst index 111e7b341e..a3247c2712 100644 --- a/classes/zh_CN/class_physicsserver3drenderingserverhandler.rst +++ b/classes/zh_CN/class_physicsserver3drenderingserverhandler.rst @@ -10,31 +10,31 @@ PhysicsServer3DRenderingServerHandler ===================================== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` -用于为 :ref:`PhysicsServer3DExtension._soft_body_update_rendering_server` 提供柔体渲染处理器的类。 +用于为 :ref:`PhysicsServer3DExtension._soft_body_update_rendering_server` 提供柔体渲染处理器的类。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_aabb` **(** :ref:`AABB` aabb **)** |virtual| | - +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_normal` **(** :ref:`int` vertex_id, :ref:`Vector3` normal **)** |virtual| | - +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_vertex` **(** :ref:`int` vertex_id, :ref:`Vector3` vertex **)** |virtual| | - +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_aabb` **(** :ref:`AABB` aabb **)** | - +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_normal` **(** :ref:`int` vertex_id, :ref:`Vector3` normal **)** | - +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_vertex` **(** :ref:`int` vertex_id, :ref:`Vector3` vertex **)** | - +------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_aabb` **(** :ref:`AABB` aabb **)** |virtual| | + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_normal` **(** :ref:`int` vertex_id, :ref:`Vector3` normal **)** |virtual| | + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_vertex` **(** :ref:`int` vertex_id, :ref:`Vector3` vertex **)** |virtual| | + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_aabb` **(** :ref:`AABB` aabb **)** | + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_normal` **(** :ref:`int` vertex_id, :ref:`Vector3` normal **)** | + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_vertex` **(** :ref:`int` vertex_id, :ref:`Vector3` vertex **)** | + +------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -42,44 +42,44 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_PhysicsServer3DRenderingServerHandler_method__set_aabb: +.. _class_PhysicsServer3DRenderingServerHandler_private_method__set_aabb: .. rst-class:: classref-method void **_set_aabb** **(** :ref:`AABB` aabb **)** |virtual| -Called by the :ref:`PhysicsServer3D` to set the bounding box for the :ref:`SoftBody3D`. +由 :ref:`PhysicsServer3D` 调用以设置 :ref:`SoftBody3D` 的边界框。 .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DRenderingServerHandler_method__set_normal: +.. _class_PhysicsServer3DRenderingServerHandler_private_method__set_normal: .. rst-class:: classref-method void **_set_normal** **(** :ref:`int` vertex_id, :ref:`Vector3` normal **)** |virtual| -Called by the :ref:`PhysicsServer3D` to set the normal for the :ref:`SoftBody3D` vertex at the index specified by ``vertex_id``. +由 :ref:`PhysicsServer3D` 调用,以在 ``vertex_id`` 指定的索引处设置 :ref:`SoftBody3D` 顶点的法线。 -\ **Note:** The ``normal`` parameter used to be of type ``const void*`` prior to Godot 4.2. +\ **注意:**\ 在 Godot 4.2 之前,\ ``normal`` 参数的类型为 ``const void*``\ 。 .. rst-class:: classref-item-separator ---- -.. _class_PhysicsServer3DRenderingServerHandler_method__set_vertex: +.. _class_PhysicsServer3DRenderingServerHandler_private_method__set_vertex: .. rst-class:: classref-method void **_set_vertex** **(** :ref:`int` vertex_id, :ref:`Vector3` vertex **)** |virtual| -Called by the :ref:`PhysicsServer3D` to set the position for the :ref:`SoftBody3D` vertex at the index specified by ``vertex_id``. +由 :ref:`PhysicsServer3D` 调用,以在 ``vertex_id`` 指定的索引处设置 :ref:`SoftBody3D` 顶点的位置。 -\ **Note:** The ``vertex`` parameter used to be of type ``const void*`` prior to Godot 4.2. +\ **注意:**\ 在 Godot 4.2 之前,\ ``vertex`` 参数的类型为 ``const void*``\ 。 .. rst-class:: classref-item-separator @@ -91,7 +91,7 @@ Called by the :ref:`PhysicsServer3D` to set the position void **set_aabb** **(** :ref:`AABB` aabb **)** -Sets the bounding box for the :ref:`SoftBody3D`. +设置该 :ref:`SoftBody3D` 的边界框。 .. rst-class:: classref-item-separator @@ -103,7 +103,7 @@ Sets the bounding box for the :ref:`SoftBody3D`. void **set_normal** **(** :ref:`int` vertex_id, :ref:`Vector3` normal **)** -Sets the normal for the :ref:`SoftBody3D` vertex at the index specified by ``vertex_id``. +在由 ``vertex_id`` 指定的索引处设置该 :ref:`SoftBody3D` 顶点的法线。 .. rst-class:: classref-item-separator @@ -115,12 +115,12 @@ Sets the normal for the :ref:`SoftBody3D` vertex at the index void **set_vertex** **(** :ref:`int` vertex_id, :ref:`Vector3` vertex **)** -Sets the position for the :ref:`SoftBody3D` vertex at the index specified by ``vertex_id``. +在由 ``vertex_id`` 指定的索引处设置该 :ref:`SoftBody3D` 顶点的位置。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsshapequeryparameters2d.rst b/classes/zh_CN/class_physicsshapequeryparameters2d.rst index bf71ef1cfa..7e82dab4b2 100644 --- a/classes/zh_CN/class_physicsshapequeryparameters2d.rst +++ b/classes/zh_CN/class_physicsshapequeryparameters2d.rst @@ -10,21 +10,21 @@ PhysicsShapeQueryParameters2D ============================= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 为 :ref:`PhysicsDirectSpaceState2D.intersect_shape` 提供参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 你可以通过修改这个对象的形状等属性来为 :ref:`PhysicsDirectSpaceState2D.intersect_shape` 配置参数。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PhysicsShapeQueryParameters2D_property_collide_with_areas: @@ -240,10 +240,10 @@ The queried shape's :ref:`RID` that will be used for collision/inters 被查询形状的变换矩阵。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicsshapequeryparameters3d.rst b/classes/zh_CN/class_physicsshapequeryparameters3d.rst index fa397b00c1..d889922add 100644 --- a/classes/zh_CN/class_physicsshapequeryparameters3d.rst +++ b/classes/zh_CN/class_physicsshapequeryparameters3d.rst @@ -10,21 +10,21 @@ PhysicsShapeQueryParameters3D ============================= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 为 :ref:`PhysicsDirectSpaceState3D.intersect_shape` 提供参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 你可以通过修改这个对象的形状等属性来为 :ref:`PhysicsDirectSpaceState3D.intersect_shape` 配置参数。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PhysicsShapeQueryParameters3D_property_collide_with_areas: @@ -240,10 +240,10 @@ The queried shape's :ref:`RID` that will be used for collision/inters 被查询形状的变换矩阵。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicstestmotionparameters2d.rst b/classes/zh_CN/class_physicstestmotionparameters2d.rst index ed9b1082c4..8dae7bfffb 100644 --- a/classes/zh_CN/class_physicstestmotionparameters2d.rst +++ b/classes/zh_CN/class_physicstestmotionparameters2d.rst @@ -10,21 +10,21 @@ PhysicsTestMotionParameters2D ============================= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 为 :ref:`PhysicsServer2D.body_test_motion` 提供参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 更改该对象的运动等属性可以配置 :ref:`PhysicsServer2D.body_test_motion` 的参数。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -51,8 +51,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PhysicsTestMotionParameters2D_property_collide_separation_ray: @@ -173,10 +173,10 @@ Property Descriptions 如果设置为 ``false``\ ,则只会汇报移动造成的碰撞,一般符合预期行为。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicstestmotionparameters3d.rst b/classes/zh_CN/class_physicstestmotionparameters3d.rst index c252f26de3..d47484f016 100644 --- a/classes/zh_CN/class_physicstestmotionparameters3d.rst +++ b/classes/zh_CN/class_physicstestmotionparameters3d.rst @@ -10,21 +10,21 @@ PhysicsTestMotionParameters3D ============================= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 为 :ref:`PhysicsServer3D.body_test_motion` 提供参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 更改该对象的运动等属性可以配置 :ref:`PhysicsServer3D.body_test_motion` 的参数。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -53,8 +53,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PhysicsTestMotionParameters3D_property_collide_separation_ray: @@ -192,10 +192,10 @@ Property Descriptions 如果设置为 ``false``\ ,则只会汇报移动造成的碰撞,一般符合预期行为。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicstestmotionresult2d.rst b/classes/zh_CN/class_physicstestmotionresult2d.rst index 449ff73841..cb08589345 100644 --- a/classes/zh_CN/class_physicstestmotionresult2d.rst +++ b/classes/zh_CN/class_physicstestmotionresult2d.rst @@ -10,21 +10,21 @@ PhysicsTestMotionResult2D ========================= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 描述 :ref:`PhysicsServer2D.body_test_motion` 的运动和碰撞结果。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 描述 :ref:`PhysicsServer2D.body_test_motion` 的运动和碰撞结果。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -63,8 +63,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PhysicsTestMotionResult2D_method_get_collider: @@ -218,10 +218,10 @@ Method Descriptions 返回移动对象的在碰撞前的运动。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_physicstestmotionresult3d.rst b/classes/zh_CN/class_physicstestmotionresult3d.rst index 8bb48d0318..3baebe76c3 100644 --- a/classes/zh_CN/class_physicstestmotionresult3d.rst +++ b/classes/zh_CN/class_physicstestmotionresult3d.rst @@ -10,21 +10,21 @@ PhysicsTestMotionResult3D ========================= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 描述 :ref:`PhysicsServer3D.body_test_motion` 的运动和碰撞结果。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 描述 :ref:`PhysicsServer3D.body_test_motion` 的运动和碰撞结果。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -65,8 +65,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PhysicsTestMotionResult3D_method_get_collider: @@ -232,10 +232,10 @@ Method Descriptions 返回移动对象的在碰撞前的运动。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_pinjoint2d.rst b/classes/zh_CN/class_pinjoint2d.rst index 94daf36c90..4354fb7299 100644 --- a/classes/zh_CN/class_pinjoint2d.rst +++ b/classes/zh_CN/class_pinjoint2d.rst @@ -10,28 +10,38 @@ PinJoint2D ========== -**Inherits:** :ref:`Joint2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Joint2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 将两个 2D 物理体通过单点进行连接的物理关节,能够让它们自由旋转。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 将两个 2D 物理体通过单点进行连接的物理关节,能够让它们自由旋转。例如可以将 :ref:`RigidBody2D` 连接到 :ref:`StaticBody2D` 上,从而创建钟摆或跷跷板。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto - +---------------------------+-----------------------------------------------------+---------+ - | :ref:`float` | :ref:`softness` | ``0.0`` | - +---------------------------+-----------------------------------------------------+---------+ + +---------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`angular_limit_enabled` | ``false`` | + +---------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_lower` | ``0.0`` | + +---------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`angular_limit_upper` | ``0.0`` | + +---------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`motor_enabled` | ``false`` | + +---------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`motor_target_velocity` | ``0.0`` | + +---------------------------+-------------------------------------------------------------------------------+-----------+ + | :ref:`float` | :ref:`softness` | ``0.0`` | + +---------------------------+-------------------------------------------------------------------------------+-----------+ .. rst-class:: classref-section-separator @@ -39,8 +49,93 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- + +.. _class_PinJoint2D_property_angular_limit_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **angular_limit_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_angular_limit_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_angular_limit_enabled** **(** **)** + +如果为 ``true``\ ,则应用由 :ref:`angular_limit_lower` 和 :ref:`angular_limit_upper` 定义的销的最大和最小旋转。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_PinJoint2D_property_angular_limit_lower: + +.. rst-class:: classref-property + +:ref:`float` **angular_limit_lower** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_angular_limit_lower** **(** :ref:`float` value **)** +- :ref:`float` **get_angular_limit_lower** **(** **)** + +最小的旋转量。只有在 :ref:`angular_limit_enabled` 为 ``true`` 时才有效。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_PinJoint2D_property_angular_limit_upper: + +.. rst-class:: classref-property + +:ref:`float` **angular_limit_upper** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_angular_limit_upper** **(** :ref:`float` value **)** +- :ref:`float` **get_angular_limit_upper** **(** **)** + +最大的旋转量。只有在 :ref:`angular_limit_enabled` 为 ``true`` 时才有效。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_PinJoint2D_property_motor_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **motor_enabled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_motor_enabled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_motor_enabled** **(** **)** + +激活后,马达会转动该销。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_PinJoint2D_property_motor_target_velocity: + +.. rst-class:: classref-property + +:ref:`float` **motor_target_velocity** = ``0.0`` + +.. rst-class:: classref-property-setget + +- void **set_motor_target_velocity** **(** :ref:`float` value **)** +- :ref:`float` **get_motor_target_velocity** **(** **)** + +马达的目标速度。单位为弧度每秒。 + +.. rst-class:: classref-item-separator + +---- .. _class_PinJoint2D_property_softness: @@ -55,10 +150,10 @@ Property Descriptions 这个值越高,与被牵制的两个物体之间的的联系就越灵活。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_pinjoint3d.rst b/classes/zh_CN/class_pinjoint3d.rst index af77e10998..eee6dd1add 100644 --- a/classes/zh_CN/class_pinjoint3d.rst +++ b/classes/zh_CN/class_pinjoint3d.rst @@ -10,21 +10,21 @@ PinJoint3D ========== -**Inherits:** :ref:`Joint3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Joint3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 将两个 3D 物理体通过单点进行连接的物理关节,能够让它们自由旋转。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A physics joint that attaches two 3D physics bodies at a single point, allowing them to freely rotate. For example, a :ref:`RigidBody3D` can be attached to a :ref:`StaticBody3D` to create a pendulum or a seesaw. +将两个 3D 物理体通过单点进行连接的物理关节,能够让它们自由旋转。例如,可以将 :ref:`RigidBody3D` 连接到 :ref:`StaticBody3D` 上,从而创建钟摆或跷跷板。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -57,8 +57,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_PinJoint3D_Param: @@ -96,8 +96,8 @@ enum **Param**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PinJoint3D_property_params/bias: @@ -152,8 +152,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PinJoint3D_method_get_param: @@ -175,10 +175,10 @@ void **set_param** **(** :ref:`Param` param, :ref:`float< 设置指定参数的值。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_placeholdercubemap.rst b/classes/zh_CN/class_placeholdercubemap.rst index 416c9c1633..1d80fcc63c 100644 --- a/classes/zh_CN/class_placeholdercubemap.rst +++ b/classes/zh_CN/class_placeholdercubemap.rst @@ -10,27 +10,27 @@ PlaceholderCubemap ================== -**Inherits:** :ref:`PlaceholderTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PlaceholderTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A :ref:`Cubemap` without image data. +没有图像数据的 :ref:`Cubemap` 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This class replaces a :ref:`Cubemap` or a :ref:`Cubemap`-derived class in 2 conditions: +该类在以下两种情况下替换 :ref:`Cubemap` 或 :ref:`Cubemap` 派生类: -- In dedicated server mode, where the image data shouldn't affect game logic. This allows reducing the exported PCK's size significantly. +- 在专用服务器模式下,图像数据不应影响游戏逻辑。这样能够显著减小导出的 PCK 的大小。 -- When the :ref:`Cubemap`-derived class is missing, for example when using a different engine version. +- 当 :ref:`Cubemap` 派生类丢失时,例如使用不同的引擎版本时。 -\ **Note:** This class is not intended for rendering or for use in shaders. Operations like calculating UV are not guaranteed to work. +\ **注意:**\ 该类不适用于渲染或在着色器中使用。不保证计算 UV 之类的操作有效。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_placeholdercubemaparray.rst b/classes/zh_CN/class_placeholdercubemaparray.rst index 1b19ec51d7..21ccd35078 100644 --- a/classes/zh_CN/class_placeholdercubemaparray.rst +++ b/classes/zh_CN/class_placeholdercubemaparray.rst @@ -10,27 +10,27 @@ PlaceholderCubemapArray ======================= -**Inherits:** :ref:`PlaceholderTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PlaceholderTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A :ref:`CubemapArray` without image data. +没有图像数据的 :ref:`CubemapArray` 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This class replaces a :ref:`CubemapArray` or a :ref:`CubemapArray`-derived class in 2 conditions: +该类在以下两种情况下替换 :ref:`CubemapArray` 或 :ref:`CubemapArray` 派生类: -- In dedicated server mode, where the image data shouldn't affect game logic. This allows reducing the exported PCK's size significantly. +- 在专用服务器模式下,图像数据不应影响游戏逻辑。这样能够显著减小导出的 PCK 的大小。 -- When the :ref:`CubemapArray`-derived class is missing, for example when using a different engine version. +- 当 :ref:`CubemapArray` 派生类丢失时,例如使用不同的引擎版本时。 -\ **Note:** This class is not intended for rendering or for use in shaders. Operations like calculating UV are not guaranteed to work. +\ **注意:**\ 该类不适用于渲染或在着色器中使用。不保证计算 UV 之类的操作有效。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_placeholdermaterial.rst b/classes/zh_CN/class_placeholdermaterial.rst index d65a7529eb..e0e6ca7157 100644 --- a/classes/zh_CN/class_placeholdermaterial.rst +++ b/classes/zh_CN/class_placeholdermaterial.rst @@ -10,14 +10,14 @@ PlaceholderMaterial =================== -**Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 材质的占位类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 加载使用 :ref:`Material` 子类的项目时,使用这个类的情况有两种: @@ -25,10 +25,10 @@ Description - 由于引擎版本或构建不同而缺失这个子类(例如禁用了某些模块)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_placeholdermesh.rst b/classes/zh_CN/class_placeholdermesh.rst index e8682ae682..a577088d8f 100644 --- a/classes/zh_CN/class_placeholdermesh.rst +++ b/classes/zh_CN/class_placeholdermesh.rst @@ -10,14 +10,14 @@ PlaceholderMesh =============== -**Inherits:** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 网格的占位类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 加载使用 :ref:`Mesh` 子类的项目时,使用这个类的情况有两种: @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PlaceholderMesh_property_aabb: @@ -59,10 +59,10 @@ Property Descriptions 局部空间中,包含这个网格的最小 :ref:`AABB`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_placeholdertexture2d.rst b/classes/zh_CN/class_placeholdertexture2d.rst index 3adc6c4791..e1b38ccb86 100644 --- a/classes/zh_CN/class_placeholdertexture2d.rst +++ b/classes/zh_CN/class_placeholdertexture2d.rst @@ -10,14 +10,14 @@ PlaceholderTexture2D ==================== -**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 二维纹理的占位类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 加载使用 :ref:`Texture2D` 子类的项目时,使用这个类的情况有两种: @@ -29,8 +29,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PlaceholderTexture2D_property_size: @@ -63,10 +63,10 @@ Property Descriptions 纹理的尺寸(单位为像素)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_placeholdertexture2darray.rst b/classes/zh_CN/class_placeholdertexture2darray.rst index 7671f6f3cf..17d34e5464 100644 --- a/classes/zh_CN/class_placeholdertexture2darray.rst +++ b/classes/zh_CN/class_placeholdertexture2darray.rst @@ -10,14 +10,14 @@ PlaceholderTexture2DArray ========================= -**Inherits:** :ref:`PlaceholderTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PlaceholderTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 二维纹理数组的占位类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 加载使用 :ref:`Texture2D` 子类的项目时,使用这个类的情况有两种: @@ -27,10 +27,10 @@ Description \ **注意:**\ 设计这个类的目的并不是作为渲染的实际纹理。不保证能够在着色器和材质中正常工作(例如对 UV 进行计算)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_placeholdertexture3d.rst b/classes/zh_CN/class_placeholdertexture3d.rst index 0f345883f2..0e821b11da 100644 --- a/classes/zh_CN/class_placeholdertexture3d.rst +++ b/classes/zh_CN/class_placeholdertexture3d.rst @@ -10,14 +10,14 @@ PlaceholderTexture3D ==================== -**Inherits:** :ref:`Texture3D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture3D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 三维纹理的占位类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 加载使用 :ref:`Texture3D` 子类的项目时,使用这个类的情况有两种: @@ -29,8 +29,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PlaceholderTexture3D_property_size: @@ -61,10 +61,10 @@ Property Descriptions 纹理的尺寸(单位为像素)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_placeholdertexturelayered.rst b/classes/zh_CN/class_placeholdertexturelayered.rst index 4f5a2f9948..e21424f0cb 100644 --- a/classes/zh_CN/class_placeholdertexturelayered.rst +++ b/classes/zh_CN/class_placeholdertexturelayered.rst @@ -10,16 +10,16 @@ PlaceholderTextureLayered ========================= -**Inherits:** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`PlaceholderCubemap`, :ref:`PlaceholderCubemapArray`, :ref:`PlaceholderTexture2DArray` +**派生:** :ref:`PlaceholderCubemap`, :ref:`PlaceholderCubemapArray`, :ref:`PlaceholderTexture2DArray` 二维纹理数组的占位类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 加载使用 :ref:`TextureLayered` 子类的项目时,使用这个类的情况有两种: @@ -31,8 +31,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PlaceholderTextureLayered_property_layers: @@ -82,10 +82,10 @@ Property Descriptions 各层纹理的尺寸(单位为像素)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_plane.rst b/classes/zh_CN/class_plane.rst index 1bec7ddbf7..aef6c3beeb 100644 --- a/classes/zh_CN/class_plane.rst +++ b/classes/zh_CN/class_plane.rst @@ -14,22 +14,22 @@ Plane .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 代表归一化的平面方程。\ :ref:`normal` 是平面的法线(归一化的 a、b、c),而 :ref:`d` 是原点到平面的距离(沿“法线”方向)。平面的“上方”是平面朝向法线方向的一面。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`数学文档索引 <../tutorials/math/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -72,8 +72,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -104,8 +104,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -128,8 +128,8 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Plane_constant_PLANE_YZ: @@ -161,8 +161,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Plane_property_d: @@ -230,8 +230,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_Plane_constructor_Plane: @@ -313,8 +313,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Plane_method_distance_to: @@ -450,8 +450,8 @@ Method Descriptions .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Plane_operator_neq_Plane: @@ -473,7 +473,9 @@ Operator Descriptions :ref:`Plane` **operator *** **(** :ref:`Transform3D` right **)** -使用给定的 :ref:`Transform3D` 变换矩阵对该 **Plane** 进行逆变换(相乘)。 +将 **Plane** 逆向变换(乘以)给定的 :ref:`Transform3D` 变换矩阵。 + +\ ``plane * transform`` 相当于 ``transform.affine_inverse() * plane``\ 。请参阅 :ref:`Transform3D.affine_inverse`\ 。 .. rst-class:: classref-item-separator @@ -513,10 +515,10 @@ Operator Descriptions 返回该 **Plane** 的负值。和写 ``Plane(-p.normal, -p.d)`` 相同。该操作翻转了法线向量的方向,也翻转了距离值,得到的 Plane 位于同一个位置,但是朝向相反的方向。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_planemesh.rst b/classes/zh_CN/class_planemesh.rst index 489e08b1f4..6e370b2b9d 100644 --- a/classes/zh_CN/class_planemesh.rst +++ b/classes/zh_CN/class_planemesh.rst @@ -10,16 +10,16 @@ PlaneMesh ========= -**Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`QuadMesh` +**派生:** :ref:`QuadMesh` 表示平面 :ref:`PrimitiveMesh` 的类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 代表平面 :ref:`PrimitiveMesh` 的类。这个扁平的网格没有厚度。默认情况下,这个网格与 X 和 Z 轴对齐;这样的旋转并不适用于公告板材质。对于公告板材质,请将 :ref:`orientation` 改为 :ref:`FACE_Z`\ 。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -51,8 +51,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_PlaneMesh_Orientation: @@ -90,8 +90,8 @@ enum **Orientation**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PlaneMesh_property_center_offset: @@ -174,10 +174,10 @@ Property Descriptions 沿 X 轴细分的次数。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_pointlight2d.rst b/classes/zh_CN/class_pointlight2d.rst index ce6e0a4a41..83b80d3204 100644 --- a/classes/zh_CN/class_pointlight2d.rst +++ b/classes/zh_CN/class_pointlight2d.rst @@ -10,28 +10,28 @@ PointLight2D ============ -**Inherits:** :ref:`Light2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Light2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 位置性 2D 光源。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 在 2D 环境中投射光线。此灯的形状由(通常为灰度)纹理定义。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`2D 灯光和阴影 <../tutorials/2d/2d_lights_and_shadows>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PointLight2D_property_height: @@ -119,10 +119,10 @@ Property Descriptions :ref:`texture` 的缩放系数。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_pointmesh.rst b/classes/zh_CN/class_pointmesh.rst index c63b96b5ec..c107f856a7 100644 --- a/classes/zh_CN/class_pointmesh.rst +++ b/classes/zh_CN/class_pointmesh.rst @@ -10,14 +10,14 @@ PointMesh ========= -**Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 使用单个点图元的网格。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- PointMesh 由一个点构成。这个点不依赖于三角形,而是作为屏幕上的一个矩形来渲染,大小是固定的。旨在用于粒子系统,但也可以作为固定大小公告板精灵的轻量级渲染方法(例如在点云中使用)。 @@ -25,10 +25,10 @@ PointMesh 必须使用具有点大小的材质。点的大小可以在着色器 使用 PointMesh 时,会忽略平时用来改变顶点的属性,包括公告板模式、生长、剔除面等。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_polygon2d.rst b/classes/zh_CN/class_polygon2d.rst index 758c4bcad4..73b66561d7 100644 --- a/classes/zh_CN/class_polygon2d.rst +++ b/classes/zh_CN/class_polygon2d.rst @@ -10,21 +10,21 @@ Polygon2D ========= -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 2D 多边形。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- Polygon2D 由一组点定义。每个点都连接到下一个点,最后一个点连接到第一个点,从而形成一个封闭的多边形。Polygon2D 可以填充颜色(纯色或渐变),也可以填充给定的纹理。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -65,8 +65,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -95,8 +95,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Polygon2D_property_antialiased: @@ -138,7 +138,7 @@ Property Descriptions - void **set_color** **(** :ref:`Color` value **)** - :ref:`Color` **get_color** **(** **)** -多边形的填充颜色.如果定义了\ ``texture``\ (贴图),它将乘以该颜色.对于\ ``vertex_colors``\ 中未设置的顶点,它也将是默认颜色. +该多边形的填充颜色。如果设置了 :ref:`texture`\ ,它将乘以该颜色。它也将是未在 :ref:`vertex_colors` 中设置的顶点的默认颜色。 .. rst-class:: classref-item-separator @@ -276,7 +276,7 @@ Property Descriptions - void **set_texture** **(** :ref:`Texture2D` value **)** - :ref:`Texture2D` **get_texture** **(** **)** -多边形的填充纹理。使用 ``uv`` 设置纹理坐标。 +该多边形的填充纹理。使用 :ref:`uv` 设置纹理坐标。 .. rst-class:: classref-item-separator @@ -293,7 +293,7 @@ Property Descriptions - void **set_texture_offset** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_texture_offset** **(** **)** -多边形 ``texture`` 纹理的偏移量。如果为 ``(0, 0)``\ ,则纹理的原点(其左上角)将放置在多边形的 ``position`` 处。 +多边形的 :ref:`texture` 纹理的偏移量。如果设置为 ``Vector2(0, 0)``\ ,则纹理的原点(其左上角)将放置在该多边形的位置。 .. rst-class:: classref-item-separator @@ -327,7 +327,7 @@ Property Descriptions - void **set_texture_scale** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_texture_scale** **(** **)** -使用 ``texture`` 纹理时乘以 ``uv`` 坐标的值。值越大,纹理越小,反之亦然。 +使用 :ref:`texture` 时乘以 :ref:`uv` 坐标的量。值越大,纹理越小,反之亦然。 .. rst-class:: classref-item-separator @@ -344,7 +344,7 @@ Property Descriptions - void **set_uv** **(** :ref:`PackedVector2Array` value **)** - :ref:`PackedVector2Array` **get_uv** **(** **)** -多边形每个顶点的纹理坐标。每个多边形顶点应该有一个 ``uv``\ 。如果数量少,则未定义的顶点将使用 ``(0, 0)``\ 。 +多边形每个顶点的纹理坐标。每个多边形顶点应该有一个 UV 值。如果数量少,则未定义的顶点将使用 ``Vector2(0, 0)``\ 。 .. rst-class:: classref-item-separator @@ -361,7 +361,7 @@ Property Descriptions - void **set_vertex_colors** **(** :ref:`PackedColorArray` value **)** - :ref:`PackedColorArray` **get_vertex_colors** **(** **)** -每个顶点的颜色.颜色在顶点之间插值,从而获得平滑的渐变.每个多边形顶点应有一个.如果数量少,则未定义的顶点将使用\ ``color``. +每个顶点的颜色。颜色在顶点之间插值,从而产生平滑的渐变。每个多边形顶点应该有一个。如果数量较少,则未定义的顶点将使用 :ref:`color`\ 。 .. rst-class:: classref-section-separator @@ -369,8 +369,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Polygon2D_method_add_bone: @@ -464,10 +464,10 @@ void **set_bone_weights** **(** :ref:`int` index, :ref:`PackedFloat32 设置指定骨骼的权重值。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_polygonoccluder3d.rst b/classes/zh_CN/class_polygonoccluder3d.rst index 60df04b502..7f84e530db 100644 --- a/classes/zh_CN/class_polygonoccluder3d.rst +++ b/classes/zh_CN/class_polygonoccluder3d.rst @@ -10,14 +10,14 @@ PolygonOccluder3D ================= -**Inherits:** :ref:`Occluder3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Occluder3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 平面 2D 多边形形状,用于 :ref:`OccluderInstance3D` 的遮挡剔除。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **PolygonOccluder3D** 储存的是多边形形状,可用于引擎的遮挡剔除系统。在编辑器中选中具有 **PolygonOccluder3D** 的 :ref:`OccluderInstance3D` 时,3D 视口的顶部会出现用于添加/移除顶点的编辑器。所有的顶点都必须在相同的 2D 平面中放置,也就是说,使用单个 **PolygonOccluder3D** 是无法任意创建 3D 形状的。要将任意 3D 形状作为遮挡器,请改用 :ref:`ArrayOccluder3D` 或 :ref:`OccluderInstance3D` 的烘焙功能。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Occlusion culling <../tutorials/3d/occlusion_culling>` +- :doc:`遮挡剔除 <../tutorials/3d/occlusion_culling>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PolygonOccluder3D_property_polygon: @@ -66,10 +66,10 @@ Property Descriptions 多边形必须\ *不存在*\ 相交的线。否则三角形化会失败(同时会输出错误信息)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_polygonpathfinder.rst b/classes/zh_CN/class_polygonpathfinder.rst index 950989059c..189bf13e84 100644 --- a/classes/zh_CN/class_polygonpathfinder.rst +++ b/classes/zh_CN/class_polygonpathfinder.rst @@ -10,16 +10,16 @@ PolygonPathFinder ================= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PolygonPathFinder_method_find_path: @@ -59,7 +59,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -73,7 +73,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -87,7 +87,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -101,7 +101,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -115,7 +115,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -129,7 +129,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -143,7 +143,7 @@ void **set_point_penalty** **(** :ref:`int` idx, :ref:`float`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -157,12 +157,12 @@ void **setup** **(** :ref:`PackedVector2Array` points, .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_popup.rst b/classes/zh_CN/class_popup.rst index a2c87c9829..e3bcd6f307 100644 --- a/classes/zh_CN/class_popup.rst +++ b/classes/zh_CN/class_popup.rst @@ -10,23 +10,23 @@ Popup ===== -**Inherits:** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`PopupMenu`, :ref:`PopupPanel` +**派生:** :ref:`PopupMenu`, :ref:`PopupPanel` 上下文窗口以及固定位置的面板的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **Popup** 是上下文窗口以及固定位置的面板的基类。默认情况下是模态的(见 :ref:`Window.popup_window`\ ),还提供了用于自定义弹出行为的方法。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,14 +45,26 @@ Properties | :ref:`bool` | wrap_controls | ``true`` (overrides :ref:`Window`) | +-------------------------+---------------+-------------------------------------------------------------------------+ +.. rst-class:: classref-reftable-group + +主题属性 +-------- + +.. table:: + :widths: auto + + +---------------------------------+---------------------------------------------+ + | :ref:`StyleBox` | :ref:`panel` | + +---------------------------------+---------------------------------------------+ + .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Popup_signal_popup_hide: @@ -62,10 +74,27 @@ Signals 当该弹出窗口被隐藏时发出。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +主题属性说明 +------------ + +.. _class_Popup_theme_style_panel: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **panel** + +该 **Popup** 的默认 :ref:`StyleBox` 。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_popupmenu.rst b/classes/zh_CN/class_popupmenu.rst index 55576694b5..270f61c893 100644 --- a/classes/zh_CN/class_popupmenu.rst +++ b/classes/zh_CN/class_popupmenu.rst @@ -10,14 +10,14 @@ PopupMenu ========= -**Inherits:** :ref:`Popup` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Popup` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` 用于显示选项列表的模态窗口。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **PopupMenu** 是用于显示选项列表的模态窗口,常见于工具栏和上下文菜单。 @@ -31,8 +31,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -53,8 +53,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -92,7 +92,7 @@ Methods +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_submenu_item` **(** :ref:`String` label, :ref:`String` submenu, :ref:`int` id=-1 **)** | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear` **(** **)** | + | void | :ref:`clear` **(** :ref:`bool` free_submenus=false **)** | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_focused_item` **(** **)** |const| | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -189,8 +189,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -260,10 +260,6 @@ Theme Properties +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`StyleBox` | :ref:`labeled_separator_right` | | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`panel` | | - +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`StyleBox` | :ref:`panel_disabled` | | - +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`StyleBox` | :ref:`separator` | | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ @@ -273,8 +269,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_PopupMenu_signal_id_focused: @@ -328,8 +324,8 @@ ID 为 ``id`` 的菜单项被按下或者由快捷键激活时发出。 .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PopupMenu_property_allow_search: @@ -435,8 +431,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PopupMenu_method_activate_item_by_event: @@ -444,11 +440,11 @@ Method Descriptions :ref:`bool` **activate_item_by_event** **(** :ref:`InputEvent` event, :ref:`bool` for_global_only=false **)** -Checks the provided ``event`` against the **PopupMenu**'s shortcuts and accelerators, and activates the first item with matching events. If ``for_global_only`` is ``true``, only shortcuts and accelerators with ``global`` set to ``true`` will be called. +根据 **PopupMenu** 的快捷键和加速器检查提供的 ``event``\ ,并激活匹配事件的第一个项目。如果 ``for_global_only`` 为 ``true``\ ,则仅调用 ``global`` 被设置为 ``true`` 的快捷键和加速器。 -Returns ``true`` if an item was successfully activated. +如果项目已成功激活,则返回 ``true``\ 。 -\ **Note:** Certain :ref:`Control`\ s, such as :ref:`MenuButton`, will call this method automatically. +\ **注意:**\ 某些 :ref:`Control`\ ,例如 :ref:`MenuButton`\ ,会自动调用该方法。 .. rst-class:: classref-item-separator @@ -562,11 +558,11 @@ void **add_icon_radio_check_shortcut** **(** :ref:`Texture2D` t void **add_icon_shortcut** **(** :ref:`Texture2D` texture, :ref:`Shortcut` shortcut, :ref:`int` id=-1, :ref:`bool` global=false, :ref:`bool` allow_echo=false **)** -Adds a new item and assigns the specified :ref:`Shortcut` and icon ``texture`` to it. Sets the label of the checkbox to the :ref:`Shortcut`'s name. +添加新的菜单项,并为其分配指定的 :ref:`Shortcut` 和图标 ``texture``\ 。复选框的标签会被设为 :ref:`Shortcut` 的名称。 -An ``id`` can optionally be provided. If no ``id`` is provided, one will be created from the index. +还可以提供 ``id``\ 。如果没有提供 ``id``\ ,则会根据索引来创建。 -If ``allow_echo`` is ``true``, the shortcut can be activated with echo events. +如果 ``allow_echo`` 为 ``true``\ ,则快捷键可以被回响事件激活。 .. rst-class:: classref-item-separator @@ -656,11 +652,11 @@ void **add_separator** **(** :ref:`String` label="", :ref:`int` shortcut, :ref:`int` id=-1, :ref:`bool` global=false, :ref:`bool` allow_echo=false **)** -Adds a :ref:`Shortcut`. +添加 :ref:`Shortcut`\ 。 -An ``id`` can optionally be provided. If no ``id`` is provided, one will be created from the index. +还可以提供 ``id``\ 。如果没有提供 ``id``\ ,则会根据索引来创建。 -If ``allow_echo`` is ``true``, the shortcut can be activated with echo events. +如果 ``allow_echo`` 为 ``true``\ ,则快捷键可以被回响事件激活。 .. rst-class:: classref-item-separator @@ -672,7 +668,7 @@ If ``allow_echo`` is ``true``, the shortcut can be activated with echo events. void **add_submenu_item** **(** :ref:`String` label, :ref:`String` submenu, :ref:`int` id=-1 **)** -添加菜单项,点击时会作为父级 **PopupMenu** 节点的子菜单。\ ``submenu`` 参数为子 **PopupMenu** 节点的名称,会在点击菜单项时显示。 +添加菜单项,点击时会作为父级 **PopupMenu** 节点的子菜单。\ ``submenu`` 参数必须是已作为子节点添加到此节点的现有 **PopupMenu** 的名称。当点击该项目、悬停足够长的时间、或使用 ``ui_select`` 或 ``ui_right`` 输入操作激活该子菜单时,将显示该子菜单。 还可以提供 ``id``\ 。如果没有提供 ``id``\ ,则会根据索引来创建。 @@ -684,9 +680,9 @@ void **add_submenu_item** **(** :ref:`String` label, :ref:`String< .. rst-class:: classref-method -void **clear** **(** **)** +void **clear** **(** :ref:`bool` free_submenus=false **)** -从该 **PopupMenu** 中移除所有项目。 +移除 **PopupMenu** 中的所有项目。如果 ``free_submenus`` 为 ``true``\ ,则自动释放子菜单节点。 .. rst-class:: classref-item-separator @@ -1260,8 +1256,8 @@ void **toggle_item_multistate** **(** :ref:`int` index **)** .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_PopupMenu_theme_color_font_accelerator_color: @@ -1649,30 +1645,6 @@ Theme Property Descriptions ---- -.. _class_PopupMenu_theme_style_panel: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **panel** - -**PopupMenu** 菜单项的默认 :ref:`StyleBox`\ 。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_PopupMenu_theme_style_panel_disabled: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **panel_disabled** - -**PopupMenu** 菜单项被禁用时使用的 :ref:`StyleBox`\ 。 - -.. rst-class:: classref-item-separator - ----- - .. _class_PopupMenu_theme_style_separator: .. rst-class:: classref-themeproperty @@ -1681,10 +1653,10 @@ Theme Property Descriptions 用于分隔符的 :ref:`StyleBox`\ 。请参阅 :ref:`add_separator`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_popuppanel.rst b/classes/zh_CN/class_popuppanel.rst index 9a7696f597..cca460c1a7 100644 --- a/classes/zh_CN/class_popuppanel.rst +++ b/classes/zh_CN/class_popuppanel.rst @@ -10,50 +10,21 @@ PopupPanel ========== -**Inherits:** :ref:`Popup` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Popup` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` 带有面板背景的弹出窗口。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 带有可配置面板背景的弹出窗口。添加到这个节点的子控件都会被拉伸到面板的大小(类似于 :ref:`PanelContainer` 的原理)。如果你制作的是窗口,请参阅 :ref:`Window`\ 。 -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +---------------------------------+--------------------------------------------------+ - | :ref:`StyleBox` | :ref:`panel` | - +---------------------------------+--------------------------------------------------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_PopupPanel_theme_style_panel: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **panel** - -这个 **PopupPanel** 的背景面板样式。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_portablecompressedtexture2d.rst b/classes/zh_CN/class_portablecompressedtexture2d.rst index 6fe89be3f6..3f1d052708 100644 --- a/classes/zh_CN/class_portablecompressedtexture2d.rst +++ b/classes/zh_CN/class_portablecompressedtexture2d.rst @@ -10,14 +10,14 @@ PortableCompressedTexture2D =========================== -**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 为磁盘和/或显存提供可移植的压缩纹理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类能够将压缩纹理存储为自包含的资源(与导入资源相对)。 @@ -31,8 +31,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -73,8 +73,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_PortableCompressedTexture2D_CompressionMode: @@ -136,8 +136,8 @@ enum **CompressionMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PortableCompressedTexture2D_property__data: @@ -147,7 +147,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -191,8 +191,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PortableCompressedTexture2D_method_create_from_image: @@ -254,10 +254,10 @@ void **set_keep_all_compressed_buffers** **(** :ref:`bool` keep **)* 为该类型的所有纹理全局覆盖该标志。主要由编辑器使用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_primitivemesh.rst b/classes/zh_CN/class_primitivemesh.rst index dac4bd4cbc..aa1c8e6c56 100644 --- a/classes/zh_CN/class_primitivemesh.rst +++ b/classes/zh_CN/class_primitivemesh.rst @@ -10,23 +10,23 @@ PrimitiveMesh ============= -**Inherits:** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`BoxMesh`, :ref:`CapsuleMesh`, :ref:`CylinderMesh`, :ref:`PlaneMesh`, :ref:`PointMesh`, :ref:`PrismMesh`, :ref:`RibbonTrailMesh`, :ref:`SphereMesh`, :ref:`TextMesh`, :ref:`TorusMesh`, :ref:`TubeTrailMesh` +**派生:** :ref:`BoxMesh`, :ref:`CapsuleMesh`, :ref:`CylinderMesh`, :ref:`PlaneMesh`, :ref:`PointMesh`, :ref:`PrismMesh`, :ref:`RibbonTrailMesh`, :ref:`SphereMesh`, :ref:`TextMesh`, :ref:`TorusMesh`, :ref:`TubeTrailMesh` 所有图元网格的基类。处理将 :ref:`Material` 应用到图元网格的问题。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 所有基本网格的基类,能够处理将 :ref:`Material` 应用到基本网格的操作。有 :ref:`BoxMesh`\ 、\ :ref:`CapsuleMesh`\ 、\ :ref:`CylinderMesh`\ 、\ :ref:`PlaneMesh`\ 、\ :ref:`PrismMesh`\ 、\ :ref:`SphereMesh` 等基本网格。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,17 +45,17 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`_create_mesh_array` **(** **)** |virtual| |const| | - +---------------------------+--------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`get_mesh_arrays` **(** **)** |const| | - +---------------------------+--------------------------------------------------------------------------------------------------------+ + +---------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`_create_mesh_array` **(** **)** |virtual| |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`get_mesh_arrays` **(** **)** |const| | + +---------------------------+----------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -63,8 +63,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PrimitiveMesh_property_add_uv2: @@ -157,10 +157,10 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_PrimitiveMesh_method__create_mesh_array: +.. _class_PrimitiveMesh_private_method__create_mesh_array: .. rst-class:: classref-method @@ -168,7 +168,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -199,10 +199,10 @@ Method Descriptions -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_prismmesh.rst b/classes/zh_CN/class_prismmesh.rst index 43719b3f39..d5dc653fe5 100644 --- a/classes/zh_CN/class_prismmesh.rst +++ b/classes/zh_CN/class_prismmesh.rst @@ -10,21 +10,21 @@ PrismMesh ========= -**Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 表示棱柱形 :ref:`PrimitiveMesh` 的类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 表示棱柱形 :ref:`PrimitiveMesh` 的类。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_PrismMesh_property_left_to_right: @@ -131,10 +131,10 @@ Property Descriptions 沿 X 轴添加的边循环数。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_proceduralskymaterial.rst b/classes/zh_CN/class_proceduralskymaterial.rst index 7bb1f2b052..ab126d80e2 100644 --- a/classes/zh_CN/class_proceduralskymaterial.rst +++ b/classes/zh_CN/class_proceduralskymaterial.rst @@ -10,25 +10,25 @@ ProceduralSkyMaterial ===================== -**Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A material that defines a simple sky for a :ref:`Sky` resource. +一种材质,可为 :ref:`Sky` 资源定义简单天空。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**ProceduralSkyMaterial** provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are defined by a main color, a color at the horizon, and an easing curve to interpolate between them. Suns are described by a position in the sky, a color, and a max angle from the sun at which the easing curve ends. The max angle therefore defines the size of the sun in the sky. +**ProceduralSkyMaterial** 提供了一种通过为太阳、天空、和地面定义程序参数,来快速创建一个有效背景的方法。天空和地面由主颜色、地平线颜色、以及在它们之间插值的缓动曲线定义。太阳通过天空中的位置、颜色、以及缓动曲线结束时距太阳的最大角度来描述。因此,最大角度定义了天空中太阳的大小。 -\ **ProceduralSkyMaterial** supports up to 4 suns, using the color, and energy, direction, and angular distance of the first four :ref:`DirectionalLight3D` nodes in the scene. This means that the suns are defined individually by the properties of their corresponding :ref:`DirectionalLight3D`\ s and globally by :ref:`sun_angle_max` and :ref:`sun_curve`. +\ **ProceduralSkyMaterial** 支持最多 4 个太阳,它们使用场景中前四个 :ref:`DirectionalLight3D` 节点的颜色、能量、方向、和角距离。这意味着太阳由其相应的 :ref:`DirectionalLight3D` 的属性单独定义,并由 :ref:`sun_angle_max` 和 :ref:`sun_curve` 全局定义。 -\ **ProceduralSkyMaterial** uses a lightweight shader to draw the sky and is therefore suited for real time updates. This makes it a great option for a sky that is simple and computationally cheap, but unrealistic. If you need a more realistic procedural option, use :ref:`PhysicalSkyMaterial`. +\ **ProceduralSkyMaterial** 使用轻量级着色器来绘制天空,因此适合实时更新。这使得它成为简单、低计算成本且不切实际的天空的绝佳选择。如果你需要更真实的程序化选项,请使用 :ref:`PhysicalSkyMaterial`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -67,8 +67,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ProceduralSkyMaterial_property_ground_bottom_color: @@ -287,10 +287,10 @@ Property Descriptions 如果为 ``true``\ ,则启用去色带。去色带会增加少量噪点,这有助于减少天空中颜色的平滑变化而出现的色带。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_progressbar.rst b/classes/zh_CN/class_progressbar.rst index 585b4bd06e..227530588d 100644 --- a/classes/zh_CN/class_progressbar.rst +++ b/classes/zh_CN/class_progressbar.rst @@ -10,21 +10,21 @@ ProgressBar =========== -**Inherits:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 将百分比可视化表示的控件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 将百分比可视化表示的控件。显示从右到左的填充百分比。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -37,8 +37,8 @@ Properties .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -48,8 +48,6 @@ Theme Properties +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ | :ref:`Color` | :ref:`font_outline_color` | ``Color(1, 1, 1, 1)`` | +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ - | :ref:`Color` | :ref:`font_shadow_color` | ``Color(0, 0, 0, 1)`` | - +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +---------------------------------+-----------------------------------------------------------------------------+--------------------------------+ | :ref:`Font` | :ref:`font` | | @@ -67,8 +65,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_ProgressBar_FillMode: @@ -114,8 +112,8 @@ enum **FillMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ProgressBar_property_fill_mode: @@ -153,8 +151,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_ProgressBar_theme_color_font_color: @@ -180,18 +178,6 @@ Theme Property Descriptions ---- -.. _class_ProgressBar_theme_color_font_shadow_color: - -.. rst-class:: classref-themeproperty - -:ref:`Color` **font_shadow_color** = ``Color(0, 0, 0, 1)`` - -文本阴影的颜色。 - -.. rst-class:: classref-item-separator - ----- - .. _class_ProgressBar_theme_constant_outline_size: .. rst-class:: classref-themeproperty @@ -250,10 +236,10 @@ Theme Property Descriptions 进度的样式(即填充进度条的部分)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_projection.rst b/classes/zh_CN/class_projection.rst index 34a239f5ed..d5bb95acd0 100644 --- a/classes/zh_CN/class_projection.rst +++ b/classes/zh_CN/class_projection.rst @@ -14,8 +14,8 @@ Projection .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于 3D 投影变换的 4×4 矩阵,可以表示平移、旋转、缩放、剪切和透视分割等变换,由四个 :ref:`Vector4` 列组成。 @@ -25,12 +25,12 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -65,8 +65,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -127,8 +127,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -151,8 +151,8 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Projection_constant_PLANE_NEAR: @@ -224,8 +224,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Projection_property_w: @@ -277,8 +277,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_Projection_constructor_Projection: @@ -324,8 +324,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Projection_method_create_depth_correction: @@ -659,8 +659,8 @@ Method Descriptions .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Projection_operator_neq_Projection: @@ -724,10 +724,10 @@ Operator Descriptions 索引按以下顺序排列:x、y、z、w。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_projectsettings.rst b/classes/zh_CN/class_projectsettings.rst index 7f41e58c82..696dfeb474 100644 --- a/classes/zh_CN/class_projectsettings.rst +++ b/classes/zh_CN/class_projectsettings.rst @@ -10,14 +10,14 @@ ProjectSettings =============== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 存储全局变量。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 储存可以从任何地方访问的变量。请使用 :ref:`get_setting`\ 、\ :ref:`set_setting`\ 、\ :ref:`has_setting` 访问。存储在 ``project.godot`` 中的变量也会被加载到 **ProjectSettings** 中,因此这个对象常用于读取自定义游戏配置选项。 @@ -29,8 +29,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 物理测试演示 `__ @@ -40,8 +40,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -129,6 +129,10 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`audio/general/3d_panning_strength` | ``0.5`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`audio/general/ios/mix_with_others` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`audio/general/ios/session_category` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`audio/general/text_to_speech` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`audio/video/video_delay_compensation_ms` | ``0`` | @@ -145,6 +149,10 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`compression/formats/zstd/window_log_size` | ``27`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`debug/canvas_items/debug_redraw_color` | ``Color(1, 0.2, 0.2, 0.5)`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`debug/canvas_items/debug_redraw_time` | ``1.0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/file_logging/enable_file_logging` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debug/file_logging/enable_file_logging.pc` | ``true`` | @@ -181,6 +189,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/inference_on_variant` | ``2`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debug/gdscript/warnings/inferred_declaration` | ``0`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/int_as_enum_without_cast` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/gdscript/warnings/int_as_enum_without_match` | ``1`` | @@ -663,6 +673,10 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`input_devices/pen_tablet/driver.windows` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`input_devices/pointing/android/enable_long_press_as_right_click` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`input_devices/pointing/android/enable_pan_and_scale_gestures` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`input_devices/pointing/emulate_mouse_from_touch` | ``true`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`input_devices/pointing/emulate_touch_from_mouse` | ``false`` | @@ -1295,19 +1309,27 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/environment/volumetric_fog/volume_size` | ``64`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`rendering/gl_compatibility/driver` | ``"opengl3"`` | + | :ref:`String` | :ref:`rendering/gl_compatibility/driver` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`rendering/gl_compatibility/driver.android` | ``"opengl3"`` | + | :ref:`String` | :ref:`rendering/gl_compatibility/driver.android` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`rendering/gl_compatibility/driver.ios` | ``"opengl3"`` | + | :ref:`String` | :ref:`rendering/gl_compatibility/driver.ios` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`rendering/gl_compatibility/driver.linuxbsd` | ``"opengl3"`` | + | :ref:`String` | :ref:`rendering/gl_compatibility/driver.linuxbsd` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`rendering/gl_compatibility/driver.macos` | ``"opengl3"`` | + | :ref:`String` | :ref:`rendering/gl_compatibility/driver.macos` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`rendering/gl_compatibility/driver.web` | ``"opengl3"`` | + | :ref:`String` | :ref:`rendering/gl_compatibility/driver.web` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`rendering/gl_compatibility/driver.windows` | ``"opengl3"`` | + | :ref:`String` | :ref:`rendering/gl_compatibility/driver.windows` | | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/gl_compatibility/fallback_to_angle` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/gl_compatibility/fallback_to_gles` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`rendering/gl_compatibility/fallback_to_native` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`rendering/gl_compatibility/force_angle_on_devices` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/gl_compatibility/item_buffer_size` | ``16384`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -1331,19 +1353,21 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/high_quality_probe_ray_count` | ``512`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/high_quality_ray_count` | ``256`` | + | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/high_quality_ray_count` | ``512`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/low_quality_probe_ray_count` | ``64`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/low_quality_ray_count` | ``16`` | + | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/low_quality_ray_count` | ``32`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/medium_quality_probe_ray_count` | ``256`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/medium_quality_ray_count` | ``64`` | + | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/medium_quality_ray_count` | ``128`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count` | ``2048`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/ultra_quality_ray_count` | ``1024`` | + | :ref:`int` | :ref:`rendering/lightmapping/bake_quality/ultra_quality_ray_count` | ``2048`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`rendering/lightmapping/denoising/denoiser` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`rendering/lightmapping/primitive_meshes/texel_size` | ``0.2`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -1429,17 +1453,17 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`rendering/renderer/rendering_method.web` | ``"gl_compatibility"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`rendering/rendering_device/driver` | ``"vulkan"`` | + | :ref:`String` | :ref:`rendering/rendering_device/driver` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`rendering/rendering_device/driver.android` | ``"vulkan"`` | + | :ref:`String` | :ref:`rendering/rendering_device/driver.android` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`rendering/rendering_device/driver.ios` | ``"vulkan"`` | + | :ref:`String` | :ref:`rendering/rendering_device/driver.ios` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`rendering/rendering_device/driver.linuxbsd` | ``"vulkan"`` | + | :ref:`String` | :ref:`rendering/rendering_device/driver.linuxbsd` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`rendering/rendering_device/driver.macos` | ``"vulkan"`` | + | :ref:`String` | :ref:`rendering/rendering_device/driver.macos` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`rendering/rendering_device/driver.windows` | ``"vulkan"`` | + | :ref:`String` | :ref:`rendering/rendering_device/driver.windows` | | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`rendering/rendering_device/pipeline_cache/save_chunk_size_mb` | ``3.0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ @@ -1519,8 +1543,16 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`xr/openxr/environment_blend_mode` | ``"0"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`xr/openxr/extensions/eye_gaze_interaction` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`xr/openxr/extensions/hand_tracking` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`xr/openxr/form_factor` | ``"0"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`xr/openxr/foveation_dynamic` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`xr/openxr/foveation_level` | ``"0"`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`xr/openxr/reference_space` | ``"1"`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`xr/openxr/startup_alert` | ``true`` | @@ -1534,8 +1566,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -1584,8 +1616,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_ProjectSettings_signal_settings_changed: @@ -1593,7 +1625,7 @@ Signals **settings_changed** **(** **)** -Emitted when any setting is changed, up to once per process frame. +任何设置项发生改变的时候发出,每个处理帧最多一次。 .. rst-class:: classref-section-separator @@ -1601,8 +1633,8 @@ Emitted when any setting is changed, up to once per process frame. .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ProjectSettings_property_application/boot_splash/bg_color: @@ -1634,11 +1666,11 @@ Property Descriptions :ref:`String` **application/boot_splash/image** = ``""`` -Path to an image used as the boot splash. If left empty, the default Godot Engine splash will be displayed instead. +图像的路径,会作为启动画面使用。留空时将使用默认的 Godot 引擎启动画面。 -\ **Note:** Only effective if :ref:`application/boot_splash/show_image` is ``true``. +\ **注意:**\ 仅在 :ref:`application/boot_splash/show_image` 为 ``true`` 时有效。 -\ **Note:** The only supported format is PNG. Using another image format will result in an error. +\ **注意:**\ 只支持 PNG 格式。使用其他图像格式会导致出错。 .. rst-class:: classref-item-separator @@ -1832,7 +1864,7 @@ Path to an image used as the boot splash. If left empty, the default Godot Engin :ref:`String` **application/config/version** = ``""`` -The project's human-readable version identifier. This is used by exporters if the version identifier isn't overridden there. If :ref:`application/config/version` is an empty string and the version identifier isn't overridden in an exporter, the exporter will use ``1.0.0`` as a version identifier. +项目的人类可读版本标识符。如果导出器中没有覆盖版本标识符,就会使用这个标识符。如果 :ref:`application/config/version` 为空字符串,并且导出器中没有覆盖版本标识符,则导出器会使用 ``1.0.0`` 作为版本标识符。 .. rst-class:: classref-item-separator @@ -1932,7 +1964,9 @@ The project's human-readable version identifier. This is used by exporters if th :ref:`int` **application/run/frame_delay_msec** = ``0`` -强制主循环中帧之间的延迟(以毫秒为单位)。如果你计划禁用垂直同步,这可能很有用。 +强制主循环中的帧之间有\ *恒定的*\ 延迟(以毫秒为单位)。在大多数情况下,应首选 :ref:`application/run/max_fps` 作为 FPS 限制器,因为它更精确。 + +可以使用 ``--frame-delay `` 命令行参数覆盖该设置。 .. rst-class:: classref-item-separator @@ -1992,21 +2026,21 @@ The project's human-readable version identifier. This is used by exporters if th :ref:`int` **application/run/max_fps** = ``0`` -Maximum number of frames per second allowed. A value of ``0`` means "no limit". The actual number of frames per second may still be below this value if the CPU or GPU cannot keep up with the project logic and rendering. +每秒允许的最大帧数。\ ``0`` 表示“不限制”。如果 CPU 或 GPU 无法满足项目逻辑和渲染,则实际每秒的帧数可能仍然比这个值小。 -Limiting the FPS can be useful to reduce system power consumption, which reduces heat and noise emissions (and improves battery life on mobile devices). +限制 FPS 可以降低系统对电源的消耗,能够降低发热、减少噪音(延长移动设备的电池寿命)。 -If :ref:`display/window/vsync/vsync_mode` is set to ``Enabled`` or ``Adaptive``, it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate. +\ :ref:`display/window/vsync/vsync_mode` 为 ``Enabled`` 或 ``Adaptive`` 时,该设置优先生效,强制的 FPS 数无法超过显示器的刷新率。 -If :ref:`display/window/vsync/vsync_mode` is ``Enabled``, on monitors with variable refresh rate enabled (G-Sync/FreeSync), using a FPS limit a few frames lower than the monitor's refresh rate will `reduce input lag while avoiding tearing `__. +\ :ref:`display/window/vsync/vsync_mode` 为 ``Enabled`` 时,在启用了可变刷新率(G-Sync/FreeSync)的显示器上使用比显示器刷新率略低几帧的 FPS 限制会\ `降低输入延迟,避免画面撕裂 `__\ 。 -If :ref:`display/window/vsync/vsync_mode` is ``Disabled``, limiting the FPS to a high value that can be consistently reached on the system can reduce input lag compared to an uncapped framerate. Since this works by ensuring the GPU load is lower than 100%, this latency reduction is only effective in GPU-bottlenecked scenarios, not CPU-bottlenecked scenarios. +\ :ref:`display/window/vsync/vsync_mode` 为 ``Disabled`` 时,与不限制帧率相比,将 FPS 限制设为系统所能达到的较高值能够降低输入延迟。因为原理是确保 GPU 负载低于 100%,所以只有在 GPU 为瓶颈时才会降低延迟,无法缓解 CPU 瓶颈导致的延迟。 -See also :ref:`physics/common/physics_ticks_per_second`. +另见 :ref:`physics/common/physics_ticks_per_second`\ 。 -This setting can be overridden using the ``--max-fps `` command line argument (including with a value of ``0`` for unlimited framerate). +这个设置可以使用 ``--max-fps `` 命令行参数覆盖(设为 ``0`` 则是不限制帧率)。 -\ **Note:** This property is only read when the project starts. To change the rendering FPS cap at runtime, set :ref:`Engine.max_fps` instead. +\ **注意:**\ 这个属性仅在项目启动时读取。要在运行时修改渲染 FPS 上限,请改为设置 :ref:`Engine.max_fps`\ 。 .. rst-class:: classref-item-separator @@ -2108,13 +2142,13 @@ This setting can be overridden using the ``--max-fps `` command line argum :ref:`int` **audio/driver/output_latency** = ``15`` -Specifies the preferred output latency in milliseconds for audio. Lower values will result in lower audio latency at the cost of increased CPU usage. Low values may result in audible cracking on slower hardware. +指定音频的首选输出延迟,单位为毫秒。较低的值将导致较低的音频延迟,但会增加 CPU 使用率。低值可能会导致在较慢的硬件上发出可听见的破裂声。 -Audio output latency may be constrained by the host operating system and audio hardware drivers. If the host can not provide the specified audio output latency then Godot will attempt to use the nearest latency allowed by the host. As such you should always use :ref:`AudioServer.get_output_latency` to determine the actual audio output latency. +音频输出延迟可能会受到主机操作系统和音频硬件驱动程序的限制。如果主机无法提供指定的音频输出延迟,那么 Godot 将尝试使用主机允许的最近延迟。因此,应该始终使用 :ref:`AudioServer.get_output_latency` 来确定实际的音频输出延迟。 -Audio output latency can be overridden using the ``--audio-output-latency `` command line argument. +音频输出延迟可以使用 ``--audio-output-latency `` 命令行参数覆盖。 -\ **Note:** This setting is ignored on Android, and on all versions of Windows prior to Windows 10. +\ **注意:**\ Android 以及 Windows 10 之前的所有版本都会忽略这个设置。 .. rst-class:: classref-item-separator @@ -2160,6 +2194,32 @@ Audio output latency can be overridden using the ``--audio-output-latency `` ---- +.. _class_ProjectSettings_property_audio/general/ios/mix_with_others: + +.. rst-class:: classref-property + +:ref:`bool` **audio/general/ios/mix_with_others** = ``false`` + +设置 iOS 的 AVAudioSession 的 `mixWithOthers `__ 选项。当类别为 ``Play and Record``\ 、\ ``Playback``\ 、\ ``Multi Route`` 时会覆盖混音行为。 + +\ ``Ambient`` 默认会设置这个选项。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_audio/general/ios/session_category: + +.. rst-class:: classref-property + +:ref:`int` **audio/general/ios/session_category** = ``0`` + +设置 iOS 的 `AVAudioSessionCategory `__\ 。如果需要让手机在静音模式时也进行声音输出,请使用 ``Playback`` 类别。 + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_audio/general/text_to_speech: .. rst-class:: classref-property @@ -2192,7 +2252,7 @@ Audio output latency can be overridden using the ``--audio-output-latency `` :ref:`bool` **collada/use_ambient** = ``false`` -If ``true``, ambient lights will be imported from COLLADA models as :ref:`DirectionalLight3D`. If ``false``, ambient lights will be ignored. +如果为 ``true``\ ,则 COLLADA 模型中的环境光源会被导入为 :ref:`DirectionalLight3D`\ 。如果为 ``false``\ ,则会忽略环境光源。 .. rst-class:: classref-item-separator @@ -2258,6 +2318,30 @@ Zstandard 的默认压缩级别。影响压缩的场景和资源。较高的级 ---- +.. _class_ProjectSettings_property_debug/canvas_items/debug_redraw_color: + +.. rst-class:: classref-property + +:ref:`Color` **debug/canvas_items/debug_redraw_color** = ``Color(1, 0.2, 0.2, 0.5)`` + +如果画布项重绘调试处于活动状态,则画布项重绘时会使用这个颜色进行闪光。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_debug/canvas_items/debug_redraw_time: + +.. rst-class:: classref-property + +:ref:`float` **debug/canvas_items/debug_redraw_time** = ``1.0`` + +如果画布项重绘调试处于活动状态,则这个选项表示画布项每次重绘时闪光的持续时间。 + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/file_logging/enable_file_logging: .. rst-class:: classref-property @@ -2348,7 +2432,7 @@ Zstandard 的默认压缩级别。影响压缩的场景和资源。较高的级 :ref:`int` **debug/gdscript/warnings/confusable_local_declaration** = ``1`` -When set to ``warn`` or ``error``, produces a warning or an error respectively when an identifier declared in the nested block has the same name as an identifier declared below in the parent block. +设为 ``warn`` 或 ``error`` 时,会在嵌套块中声明的标识符与父块中下面声明的标识符同名时,分别产生警告或错误。 .. rst-class:: classref-item-separator @@ -2360,7 +2444,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w :ref:`int` **debug/gdscript/warnings/confusable_local_usage** = ``1`` -When set to ``warn`` or ``error``, produces a warning or an error respectively when an identifier that will be shadowed below in the block is used. +设为 ``warn`` 或 ``error`` 时,会在该块下的一个将被隐藏的标识符被使用时,分别产生警告或错误。 .. rst-class:: classref-item-separator @@ -2474,6 +2558,20 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w ---- +.. _class_ProjectSettings_property_debug/gdscript/warnings/inferred_declaration: + +.. rst-class:: classref-property + +:ref:`int` **debug/gdscript/warnings/inferred_declaration** = ``0`` + +设置为 ``warn`` 或 ``error`` 时,当变量、常量、或参数具有隐式推断的静态类型时,分别产生警告或错误。 + +\ **注意:**\ 如果你希望始终显式指定类型,则推荐该警告,\ *除了* :ref:`debug/gdscript/warnings/untyped_declaration`\ 。使 ``INFERRED_DECLARATION`` 警告级别高于 ``UNTYPED_DECLARATION`` 警告级别意义不大,且不被推荐。 + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_debug/gdscript/warnings/int_as_enum_without_cast: .. rst-class:: classref-property @@ -2792,7 +2890,9 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w :ref:`int` **debug/gdscript/warnings/untyped_declaration** = ``0`` -When set to ``warn`` or ``error``, produces a warning or an error respectively when a variable or parameter has no static type, or if a function has no static return type. +设置为 ``warn`` 或 ``error`` 时,当变量或参数没有静态类型,或函数没有静态返回类型时,会分别产生一个警告或一个错误。 + +\ **注意:**\ 建议将该警告与 :ref:`EditorSettings.text_editor/completion/add_type_hints` 一起使用,以帮助实现类型安全。 .. rst-class:: classref-item-separator @@ -3804,7 +3904,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w 在桌面平台上,覆盖游戏的初始窗口宽度。另见 :ref:`display/window/size/window_height_override`\ 、\ :ref:`display/window/size/viewport_width` 和 :ref:`display/window/size/viewport_height`\ 。 -\ **注意:**\ 默认情况下,或者当设置为\ ``0`` 时,初始窗口宽度为 :ref:`display/window/size/viewport_width`\ 。在 iOS、Android 和 Web 上会忽略这个设置。 +\ **注意:**\ 默认情况下,或者当设置为 ``0`` 时,初始窗口宽度为 :ref:`display/window/size/viewport_width`\ 。在 iOS、Android 和 Web 上会忽略该设置。 .. rst-class:: classref-item-separator @@ -3818,7 +3918,7 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -3830,13 +3930,13 @@ When set to ``warn`` or ``error``, produces a warning or an error respectively w :ref:`String` **display/window/stretch/mode** = ``"disabled"`` -Defines how the base size is stretched to fit the resolution of the window or screen. +定义如何将基础大小进行拉伸,从而适应窗口或屏幕的分辨率。 -\ **"disabled"**: No stretching happens. One unit in the scene corresponds to one pixel on the screen. In this mode, :ref:`display/window/stretch/aspect` has no effect. Recommended for non-game applications. +\ **"disabled"**\ :不进行拉伸。场景中的一个单位对应屏幕上的一个像素。\ :ref:`display/window/stretch/aspect` 在该模式下无效。推荐非游戏应用程序使用。 -\ **"canvas_items"**: The base size specified in width and height in the project settings is stretched to cover the whole screen (taking :ref:`display/window/stretch/aspect` into account). This means that everything is rendered directly at the target resolution. 3D is unaffected, while in 2D, there is no longer a 1:1 correspondence between sprite pixels and screen pixels, which may result in scaling artifacts. Recommended for most games that don't use a pixel art esthetic, although it is possible to use this stretch mode for pixel art games too (especially in 3D). +\ **"canvas_items"**\ :将项目设置中指定的基础大小拉伸至覆盖整个屏幕(会考虑 :ref:`display/window/stretch/aspect`\ )。这样所有东西都是直接按照目标分辨率渲染的。3D 不受影响,但在 2D 中精灵的像素和屏幕像素就不再是 1:1 的关系了,缩放可能导致画面问题。推荐大多数非像素风的游戏使用,但像素风游戏也是可以使用该拉伸模式的(尤其是 3D)。 -\ **"viewport"**: The size of the root :ref:`Viewport` is set precisely to the base size specified in the Project Settings' Display section. The scene is rendered to this viewport first. Finally, this viewport is scaled to fit the screen (taking :ref:`display/window/stretch/aspect` into account). Recommended for games that use a pixel art esthetic. +\ **"viewport"**\ :将根 :ref:`Viewport` 的大小设为项目设置中“显示”部分中指定的基础大小。场景会现在这个视口中渲染。最终会将该视口缩放至适合屏幕的尺寸(会考虑 :ref:`display/window/stretch/aspect`\ )。推荐像素风游戏使用。 .. rst-class:: classref-item-separator @@ -3848,7 +3948,7 @@ Defines how the base size is stretched to fit the resolution of the window or sc :ref:`float` **display/window/stretch/scale** = ``1.0`` -The scale factor multiplier to use for 2D elements. This multiplies the final scale factor determined by :ref:`display/window/stretch/mode`. If using the **Disabled** stretch mode, this scale factor is applied as-is. This can be adjusted to make the UI easier to read on certain displays. +2D 元素缩放系数的乘数。这个乘数会与由 :ref:`display/window/stretch/mode` 决定的最终缩放系数相乘。如果使用的是 **Disabled** 拉伸模式,那么这个缩放系数是原样使用的。可以通过调节这个数值来让 UI 则某些屏幕上更易于阅读。 .. rst-class:: classref-item-separator @@ -3860,7 +3960,13 @@ The scale factor multiplier to use for 2D elements. This multiplies the final sc :ref:`String` **display/window/stretch/scale_mode** = ``"fractional"`` -The policy to use to determine the final scale factor for 2D elements. This affects how :ref:`display/window/stretch/scale` is applied, in addition to the automatic scale factor determined by :ref:`display/window/stretch/mode`. +决定 2D 元素最终缩放系数的策略。会影响 :ref:`display/window/stretch/scale` 的使用,与 :ref:`display/window/stretch/mode` 决定的自动缩放系数共同生效。 + +\ **"fractional"**\ :小数。不改变缩放系数。 + +\ **"integer"**\ :整数。将缩放系数向下取整,屏幕大小始终为基础视口大小的整数倍。能够显示锐利的像素风画面。 + +\ **注意:**\ 使用整数缩放并设置拉伸模式时,将窗口大小调整得比基础视口大小更小会将内容进行裁剪。请考虑将 :ref:`Window.min_size` 设为与 :ref:`display/window/size/viewport_width` 和 :ref:`display/window/size/viewport_height` 定义的基础视口大小一致,避免这种情况的发生。 .. rst-class:: classref-item-separator @@ -3916,7 +4022,7 @@ The policy to use to determine the final scale factor for 2D elements. This affe :ref:`int` **dotnet/project/assembly_reload_attempts** = ``3`` -Number of times to attempt assembly reloading after rebuilding .NET assemblies. Effectively also the timeout in seconds to wait for unloading of script assemblies to finish. +重新构建 .NET 程序集后尝试重新加载程序集的次数。实际也是等待脚本程序集卸载完成的超时秒数。 .. rst-class:: classref-item-separator @@ -3958,7 +4064,7 @@ Number of times to attempt assembly reloading after rebuilding .NET assemblies. .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -4176,7 +4282,7 @@ Godot 有两个内置的 :ref:`MovieWriter`\ : .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -4190,7 +4296,7 @@ Godot 有两个内置的 :ref:`MovieWriter`\ : .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -4302,9 +4408,9 @@ Godot 有两个内置的 :ref:`MovieWriter`\ : :ref:`bool` **gui/common/swap_cancel_ok** -If ``true``, swaps **Cancel** and **OK** buttons in dialogs on Windows to follow interface conventions. :ref:`DisplayServer.get_swap_cancel_ok` can be used to query whether buttons are swapped at run-time. +如果为 ``true`` ,则会在 Windows 上交换对话框中的\ **确定**\ 和\ **取消**\ 按钮,从而遵循界面规范。可以使用 :ref:`DisplayServer.get_swap_cancel_ok` 查询运行时是否交换这两个按钮。 -\ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`DisplayServer.dialog_show`. +\ **注意:**\ 由 :ref:`DisplayServer.dialog_show` 等生成的原生对话框不受影响。 .. rst-class:: classref-item-separator @@ -4330,7 +4436,7 @@ If ``true``, swaps **Cancel** and **OK** buttons in dialogs on Windows to follow .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -4366,9 +4472,9 @@ If ``true``, swaps **Cancel** and **OK** buttons in dialogs on Windows to follow :ref:`int` **gui/theme/default_font_antialiasing** = ``1`` -Font anti-aliasing mode for the default project font. See :ref:`FontFile.antialiasing`. +默认项目字体的字体抗锯齿模式。见 :ref:`FontFile.antialiasing`\ 。 -\ **Note:** This setting does not affect custom :ref:`Font`\ s used within the project. Use the **Import** dock for that instead (see :ref:`ResourceImporterDynamicFont.antialiasing`). +\ **注意:**\ 这项设置不影响项目中使用的自定义 :ref:`Font`\ 。请改用\ **导入**\ 面板(见 :ref:`ResourceImporterDynamicFont.antialiasing`\ )。 .. rst-class:: classref-item-separator @@ -4380,11 +4486,11 @@ Font anti-aliasing mode for the default project font. See :ref:`FontFile.antiali :ref:`bool` **gui/theme/default_font_generate_mipmaps** = ``false`` -If set to ``true``, the default font will have mipmaps generated. This prevents text from looking grainy when a :ref:`Control` is scaled down, or when a :ref:`Label3D` is viewed from a long distance (if :ref:`Label3D.texture_filter` is set to a mode that displays mipmaps). +如果设置为 ``true``\ ,则默认字体将生成 mipmap。这样可以防止文本在 :ref:`Control` 被按比例缩小或从远距离查看 :ref:`Label3D` 时看起来有颗粒感(如果 :ref:`Label3D.texture_filter` 设置为显示 mipmap 的模式)。 -Enabling :ref:`gui/theme/default_font_generate_mipmaps` increases font generation time and memory usage. Only enable this setting if you actually need it. +启用 :ref:`gui/theme/default_font_generate_mipmaps` 会增加字体生成时间和内存使用量。请只在你确实需要时才启用此设置。 -\ **Note:** This setting does not affect custom :ref:`Font`\ s used within the project. Use the **Import** dock for that instead (see :ref:`ResourceImporterDynamicFont.generate_mipmaps`). +\ **注意:**\ 此设置不会影响项目中使用的自定义 :ref:`Font`\ 。这种情况下请改用\ **导入**\ 面板(见 :ref:`ResourceImporterDynamicFont.generate_mipmaps`\ )。 .. rst-class:: classref-item-separator @@ -4396,9 +4502,9 @@ Enabling :ref:`gui/theme/default_font_generate_mipmaps` **gui/theme/default_font_hinting** = ``1`` -Font hinting mode for the default project font. See :ref:`FontFile.hinting`. +默认项目字体的字体微调模式。见 :ref:`FontFile.hinting`\ 。 -\ **Note:** This setting does not affect custom :ref:`Font`\ s used within the project. Use the **Import** dock for that instead (see :ref:`ResourceImporterDynamicFont.hinting`). +\ **注意:**\ 这项设置不影响项目中使用的自定义 :ref:`Font`\ 。请改用\ **导入**\ 面板(见 :ref:`ResourceImporterDynamicFont.hinting`\ )。 .. rst-class:: classref-item-separator @@ -4410,11 +4516,11 @@ Font hinting mode for the default project font. See :ref:`FontFile.hinting` **gui/theme/default_font_multichannel_signed_distance_field** = ``false`` -If set to ``true``, the default font will use multichannel signed distance field (MSDF) for crisp rendering at any size. Since this approach does not rely on rasterizing the font every time its size changes, this allows for resizing the font in real-time without any performance penalty. Text will also not look grainy for :ref:`Control`\ s that are scaled down (or for :ref:`Label3D`\ s viewed from a long distance). +如果设置为 ``true``\ ,默认字体将使用多通道带符号距离场(MSDF),任何尺寸都能够进行清晰的渲染。由于这种方法不需要在每次字体大小更改时都对字体进行光栅化,因此可以实时调整字体大小,不会造成任何性能损失。对于按比例缩小的 :ref:`Control`\ (或从远距离查看的 :ref:`Label3D`\ ),文本也不会看起来有颗粒感。 -MSDF font rendering can be combined with :ref:`gui/theme/default_font_generate_mipmaps` to further improve font rendering quality when scaled down. +MSDF 字体渲染可以与 :ref:`gui/theme/default_font_generate_mipmaps` 结合使用,从而进一步提高缩小时的字体渲染质量。 -\ **Note:** This setting does not affect custom :ref:`Font`\ s used within the project. Use the **Import** dock for that instead (see :ref:`ResourceImporterDynamicFont.multichannel_signed_distance_field`). +\ **注意:**\ 此设置不会影响项目中使用的自定义 :ref:`Font`\ 。这种情况下请改用\ **导入**\ 面板(见 :ref:`ResourceImporterDynamicFont.multichannel_signed_distance_field`\ )。 .. rst-class:: classref-item-separator @@ -4426,9 +4532,9 @@ MSDF font rendering can be combined with :ref:`gui/theme/default_font_generate_m :ref:`int` **gui/theme/default_font_subpixel_positioning** = ``1`` -Font glyph subpixel positioning mode for the default project font. See :ref:`FontFile.subpixel_positioning`. +默认项目字体的字体字形次像素定位模式。见 :ref:`FontFile.subpixel_positioning`\ 。 -\ **Note:** This setting does not affect custom :ref:`Font`\ s used within the project. Use the **Import** dock for that instead (see :ref:`ResourceImporterDynamicFont.subpixel_positioning`). +\ **注意:**\ 这项设置不影响项目中使用的自定义 :ref:`Font`\ 。请改用\ **导入**\ 面板(见 :ref:`ResourceImporterDynamicFont.subpixel_positioning`\ )。 .. rst-class:: classref-item-separator @@ -5604,6 +5710,30 @@ LCD 次像素布局,用于字体抗锯齿。见 :ref:`FontLCDSubpixelLayout` **input_devices/pointing/android/enable_long_press_as_right_click** = ``false`` + +如果为 ``true``\ ,则在 Android 触摸屏上的长按事件会被转换为右键单击事件。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_input_devices/pointing/android/enable_pan_and_scale_gestures: + +.. rst-class:: classref-property + +:ref:`bool` **input_devices/pointing/android/enable_pan_and_scale_gestures** = ``false`` + +如果为 ``true``\ ,则会在 Android 设备上启用多点平移和缩放手势。 + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_input_devices/pointing/emulate_mouse_from_touch: .. rst-class:: classref-property @@ -8346,7 +8476,7 @@ Godot 使用一个消息队列来延迟一些函数调用。如果你的空间 :ref:`Vector3` **navigation/3d/default_up** = ``Vector3(0, 1, 0)`` -Default up orientation for 3D navigation maps. See :ref:`NavigationServer3D.map_set_up`. +3D 导航地图的默认上方向。见 :ref:`NavigationServer3D.map_set_up`\ 。 .. rst-class:: classref-item-separator @@ -8394,7 +8524,7 @@ Default up orientation for 3D navigation maps. See :ref:`NavigationServer3D.map_ :ref:`bool` **navigation/baking/thread_model/baking_use_high_priority_threads** = ``true`` -If enabled and async navmesh baking uses multiple threads the threads run with high priority. +如果启用,并且使用多线程进行异步导航网格烘焙,则执行的线程为高优先级。 .. rst-class:: classref-item-separator @@ -8406,7 +8536,7 @@ If enabled and async navmesh baking uses multiple threads the threads run with h :ref:`bool` **navigation/baking/thread_model/baking_use_multiple_threads** = ``true`` -If enabled the async navmesh baking uses multiple threads. +如果启用,则会使用多线程进行异步导航网格烘焙。 .. rst-class:: classref-item-separator @@ -8754,21 +8884,21 @@ If enabled the async navmesh baking uses multiple threads. :ref:`float` **physics/3d/default_gravity** = ``9.8`` -The default gravity strength in 3D (in meters per second squared). +3D 默认重力强度(单位为米每平方秒)。 -\ **Note:** This property is only read when the project starts. To change the default gravity at runtime, use the following code sample: +\ **注意:**\ 这个属性只在项目启动时读取。要在运行时改变默认重力,请使用以下代码示例: .. tabs:: .. code-tab:: gdscript - # Set the default gravity strength to 9.8. + # 将默认重力强度设置为 9.8。 PhysicsServer3D.area_set_param(get_viewport().find_world_3d().space, PhysicsServer3D.AREA_PARAM_GRAVITY, 9.8) .. code-tab:: csharp - // Set the default gravity strength to 9.8. + // 将默认重力强度设置为 9.8。 PhysicsServer3D.AreaSetParam(GetViewport().FindWorld3D().Space, PhysicsServer3D.AreaParameter.Gravity, 9.8); @@ -8783,21 +8913,21 @@ The default gravity strength in 3D (in meters per second squared). :ref:`Vector3` **physics/3d/default_gravity_vector** = ``Vector3(0, -1, 0)`` -The default gravity direction in 3D. +3D 默认重力方向。 -\ **Note:** This property is only read when the project starts. To change the default gravity vector at runtime, use the following code sample: +\ **注意:**\ 这个属性只在项目启动时读取。要在运行时改变默认重力向量,请使用以下代码示例: .. tabs:: .. code-tab:: gdscript - # Set the default gravity direction to `Vector3(0, -1, 0)`. + # 将默认整理方向设置为 `Vector3(0, -1, 0)`。 PhysicsServer3D.area_set_param(get_viewport().find_world_3d().space, PhysicsServer3D.AREA_PARAM_GRAVITY_VECTOR, Vector3.DOWN) .. code-tab:: csharp - // Set the default gravity direction to `Vector3(0, -1, 0)`. + // 将默认整理方向设置为 `Vector3(0, -1, 0)`。 PhysicsServer3D.AreaSetParam(GetViewport().FindWorld3D().Space, PhysicsServer3D.AreaParameter.GravityVector, Vector3.Down) @@ -8980,7 +9110,7 @@ The default gravity direction in 3D. \ **注意:**\ 为了获得最佳的结果,使用自定义物理插值解决方案时,应通过将 :ref:`physics/common/physics_jitter_fix` 设置为 ``0`` 来禁用物理抖动修复。 -\ **注意:**\ 该属性仅在项目启动时读取。 要在运行时更改物理 FPS,请改为设置 :ref:`Engine.physics_jitter_fix`\ 。 +\ **注意:**\ 该属性仅在项目启动时读取。 要在运行时更改物理抖动修复,请改为设置 :ref:`Engine.physics_jitter_fix`\ 。 .. rst-class:: classref-item-separator @@ -8992,7 +9122,7 @@ The default gravity direction in 3D. :ref:`int` **physics/common/physics_ticks_per_second** = ``60`` -每秒执行的固定迭代次数。用于控制物理仿真和 :ref:`Node._physics_process` 的执行频率。另见 :ref:`application/run/max_fps`\ 。 +每秒执行的固定迭代次数。用于控制物理仿真和 :ref:`Node._physics_process` 的执行频率。另见 :ref:`application/run/max_fps`\ 。 \ **注意:**\ 这个属性只在项目启动时读取。要在运行时改变物理 FPS,请改为设置 :ref:`Engine.physics_ticks_per_second`\ 。 @@ -9098,7 +9228,7 @@ The default gravity direction in 3D. :ref:`int` **rendering/anti_aliasing/quality/msaa_3d** = ``0`` -设置用于 3D 渲染的 MSAA 采样数(为 2 的幂)。MSAA 用于减少多边形边缘周围的锯齿。较高的 MSAA 值会产生更平滑的边缘,但在某些硬件上可能会明显变慢,尤其是显存带宽比较有限的集成显卡。另请参见用于超级采样的双线性缩放 3d :ref:`rendering/scaling_3d/mode`\ ,它提供更高的质量但更昂贵。这对着色器引起的锯齿或纹理锯齿无效。 +设置用于 3D 渲染的 MSAA 采样数(为 2 的幂)。MSAA 用于减少多边形边缘周围的锯齿。较高的 MSAA 值会产生更平滑的边缘,但在某些硬件上可能会明显变慢,尤其是显存带宽比较有限的集成显卡。另见用于超级采样的双线性缩放 3d :ref:`rendering/scaling_3d/mode`\ ,它提供更高的质量但更昂贵。这对着色器引起的锯齿或纹理锯齿无效。 \ **注意:**\ MSAA 仅支持 Forward+ 和 Mobile 渲染方式,不支持 Compatibility。 @@ -9556,7 +9686,7 @@ The default gravity direction in 3D. .. rst-class:: classref-property -:ref:`String` **rendering/gl_compatibility/driver** = ``"opengl3"`` +:ref:`String` **rendering/gl_compatibility/driver** 设置渲染器驱动程序,在使用 Compatibility(兼容性)渲染器时使用。这个属性不能直接编辑,请改用特定平台的覆盖项来设置驱动程序。 @@ -9568,7 +9698,7 @@ The default gravity direction in 3D. .. rst-class:: classref-property -:ref:`String` **rendering/gl_compatibility/driver.android** = ``"opengl3"`` +:ref:`String` **rendering/gl_compatibility/driver.android** :ref:`rendering/gl_compatibility/driver` 在 Android 的覆盖项。 @@ -9580,7 +9710,7 @@ The default gravity direction in 3D. .. rst-class:: classref-property -:ref:`String` **rendering/gl_compatibility/driver.ios** = ``"opengl3"`` +:ref:`String` **rendering/gl_compatibility/driver.ios** :ref:`rendering/gl_compatibility/driver` 在 iOS 的覆盖项。 @@ -9592,7 +9722,7 @@ The default gravity direction in 3D. .. rst-class:: classref-property -:ref:`String` **rendering/gl_compatibility/driver.linuxbsd** = ``"opengl3"`` +:ref:`String` **rendering/gl_compatibility/driver.linuxbsd** :ref:`rendering/gl_compatibility/driver` 在 LinuxBSD 的覆盖项。 @@ -9604,7 +9734,7 @@ The default gravity direction in 3D. .. rst-class:: classref-property -:ref:`String` **rendering/gl_compatibility/driver.macos** = ``"opengl3"`` +:ref:`String` **rendering/gl_compatibility/driver.macos** :ref:`rendering/gl_compatibility/driver` 在 macOS 的覆盖项。 @@ -9616,7 +9746,7 @@ The default gravity direction in 3D. .. rst-class:: classref-property -:ref:`String` **rendering/gl_compatibility/driver.web** = ``"opengl3"`` +:ref:`String` **rendering/gl_compatibility/driver.web** :ref:`rendering/gl_compatibility/driver` 在 Web 的覆盖项。 @@ -9628,7 +9758,7 @@ The default gravity direction in 3D. .. rst-class:: classref-property -:ref:`String` **rendering/gl_compatibility/driver.windows** = ``"opengl3"`` +:ref:`String` **rendering/gl_compatibility/driver.windows** :ref:`rendering/gl_compatibility/driver` 在 Windows 的覆盖项。 @@ -9636,6 +9766,64 @@ The default gravity direction in 3D. ---- +.. _class_ProjectSettings_property_rendering/gl_compatibility/fallback_to_angle: + +.. rst-class:: classref-property + +:ref:`bool` **rendering/gl_compatibility/fallback_to_angle** = ``true`` + +为 ``true`` 时,如果原生 OpenGL 不受支持或设备被列在 :ref:`rendering/gl_compatibility/force_angle_on_devices` 中,则兼容性渲染器将回退到 ANGLE。 + +\ **注意:**\ 该设置仅在 Windows 上实现。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/gl_compatibility/fallback_to_gles: + +.. rst-class:: classref-property + +:ref:`bool` **rendering/gl_compatibility/fallback_to_gles** = ``true`` + +为 ``true`` 时,如果桌面 OpenGL 不被支持,则兼容性渲染器将回退到 OpenGLES。 + +\ **注意:**\ 该设置仅在 Linux/X11 上实现。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/gl_compatibility/fallback_to_native: + +.. rst-class:: classref-property + +:ref:`bool` **rendering/gl_compatibility/fallback_to_native** = ``true`` + +如果为 ``true``\ ,如果 ANGLE 乃至 Metal 不被支持,则兼容性渲染器将回退到原生 OpenGL。 + +\ **注意:**\ 该设置仅在 macOS 上实现。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_rendering/gl_compatibility/force_angle_on_devices: + +.. rst-class:: classref-property + +:ref:`Array` **rendering/gl_compatibility/force_angle_on_devices** + +应始终使用 ANGLE 渲染器的设备的 :ref:`Array`\ 。 + +每个条目都是一个带有以下键的 :ref:`Dictionary`\ :\ ``vendor`` 和 ``name``\ 。\ ``name`` 可以被设置为 ``*`` 以添加所有带有指定 ``vendor`` 的设备。 + +\ **注意:**\ 该设置仅在 Windows 上实现。 + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/gl_compatibility/item_buffer_size: .. rst-class:: classref-property @@ -9786,7 +9974,7 @@ The default gravity direction in 3D. .. rst-class:: classref-property -:ref:`int` **rendering/lightmapping/bake_quality/high_quality_ray_count** = ``256`` +:ref:`int` **rendering/lightmapping/bake_quality/high_quality_ray_count** = ``512`` 当 :ref:`LightmapGI.quality` 为 :ref:`LightmapGI.BAKE_QUALITY_HIGH` 时,用于使用 :ref:`LightmapGI` 烘焙光照贴图的光线数。 @@ -9810,7 +9998,7 @@ The default gravity direction in 3D. .. rst-class:: classref-property -:ref:`int` **rendering/lightmapping/bake_quality/low_quality_ray_count** = ``16`` +:ref:`int` **rendering/lightmapping/bake_quality/low_quality_ray_count** = ``32`` 当 :ref:`LightmapGI.quality` 为 :ref:`LightmapGI.BAKE_QUALITY_LOW` 时,用于使用 :ref:`LightmapGI` 烘焙光照贴图的光线数。 @@ -9834,7 +10022,7 @@ The default gravity direction in 3D. .. rst-class:: classref-property -:ref:`int` **rendering/lightmapping/bake_quality/medium_quality_ray_count** = ``64`` +:ref:`int` **rendering/lightmapping/bake_quality/medium_quality_ray_count** = ``128`` 当 :ref:`LightmapGI.quality` 为 :ref:`LightmapGI.BAKE_QUALITY_MEDIUM` 时,用于使用 :ref:`LightmapGI` 烘焙光照贴图的光线数。 @@ -9858,7 +10046,7 @@ The default gravity direction in 3D. .. rst-class:: classref-property -:ref:`int` **rendering/lightmapping/bake_quality/ultra_quality_ray_count** = ``1024`` +:ref:`int` **rendering/lightmapping/bake_quality/ultra_quality_ray_count** = ``2048`` 当 :ref:`LightmapGI.quality` 为 :ref:`LightmapGI.BAKE_QUALITY_ULTRA` 时,用于使用 :ref:`LightmapGI` 烘焙光照贴图的光线数。 @@ -9866,6 +10054,30 @@ The default gravity direction in 3D. ---- +.. _class_ProjectSettings_property_rendering/lightmapping/denoising/denoiser: + +.. rst-class:: classref-property + +:ref:`int` **rendering/lightmapping/denoising/denoiser** = ``0`` + +用于对光照贴图进行降噪的降噪器工具。 + +使用 `OpenImageDenoise `__\ (OIDN)需要在 :ref:`EditorSettings.filesystem/tools/oidn/oidn_denoise_path` 的编辑器设置中配置 OIDN 可执行文件的路径。OIDN 可以从 `OpenImageDenoise 的下载页面 `__\ 下载。 + +OIDN 将在可用时使用 GPU 加速。与使用计算着色器进行加速的 JNLM 不同,OIDN 使用特定于供应商的加速方法。要使 GPU 加速可用,必须根据你的 GPU 在系统上安装以下库: + +- NVIDIA GPU:CUDA 库 + +- AMD GPU:HIP 库 + +- Intel GPU:SYCL 库 + +如果系统上没有配置 GPU 加速,则会执行基于 CPU 的多线程去噪。在大多数情况下,这种基于 CPU 的降噪明显慢于 JNLM 降噪器。 + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_rendering/lightmapping/primitive_meshes/texel_size: .. rst-class:: classref-property @@ -10102,7 +10314,7 @@ The default gravity direction in 3D. .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10116,7 +10328,7 @@ The default gravity direction in 3D. .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10172,7 +10384,7 @@ The default gravity direction in 3D. .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10186,7 +10398,7 @@ The default gravity direction in 3D. .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10200,7 +10412,7 @@ The default gravity direction in 3D. .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10256,11 +10468,11 @@ The default gravity direction in 3D. :ref:`bool` **rendering/occlusion_culling/use_occlusion_culling** = ``false`` -If ``true``, :ref:`OccluderInstance3D` nodes will be usable for occlusion culling in 3D in the root viewport. In custom viewports, :ref:`Viewport.use_occlusion_culling` must be set to ``true`` instead. +如果为 ``true``\ ,则 :ref:`OccluderInstance3D` 节点在根视口的 3D 遮挡剔除中可用。对于自定义视口,必须改为将 :ref:`Viewport.use_occlusion_culling` 设为 ``true``\ 。 -\ **Note:** Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it. Large open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges (:ref:`GeometryInstance3D.visibility_range_begin` and :ref:`GeometryInstance3D.visibility_range_end`) compared to occlusion culling. +\ **注意:**\ 启用遮挡剔除会消耗 CPU 资源。请只在打算使用时启用遮挡剔除。阻挡视线的对象很少或根本不存在的大型开放场景通常不会因遮挡剔除而获得什么优化。相对于遮挡剔除,大型开放场景通常能够从网格 LOD 和可见范围(\ :ref:`GeometryInstance3D.visibility_range_begin` 和 :ref:`GeometryInstance3D.visibility_range_end`\ )中获益。 -\ **Note:** Due to memory constraints, occlusion culling is not supported by default in Web export templates. It can be enabled by compiling custom Web export templates with ``module_raycast_enabled=yes``. +\ **注意:**\ 由于内存限制,Web 导出模板中默认不支持遮挡剔除。编译自定义 Web 导出模板时使用 ``module_raycast_enabled=yes`` 可以启用。 .. rst-class:: classref-item-separator @@ -10420,7 +10632,7 @@ Web 平台的 :ref:`rendering/renderer/rendering_method` **rendering/rendering_device/driver** = ``"vulkan"`` +:ref:`String` **rendering/rendering_device/driver** 设置渲染器驱动程序,在使用集群渲染器、移动渲染器等基于 RenderingDevice 的渲染器时使用。这个属性不能直接编辑,请改用特定平台的覆盖项来设置驱动程序。 @@ -10432,7 +10644,7 @@ Web 平台的 :ref:`rendering/renderer/rendering_method` **rendering/rendering_device/driver.android** = ``"vulkan"`` +:ref:`String` **rendering/rendering_device/driver.android** :ref:`rendering/rendering_device/driver` 在 Android 的覆盖项。 @@ -10444,7 +10656,7 @@ Web 平台的 :ref:`rendering/renderer/rendering_method` **rendering/rendering_device/driver.ios** = ``"vulkan"`` +:ref:`String` **rendering/rendering_device/driver.ios** :ref:`rendering/rendering_device/driver` 在 iOS 的覆盖项。 @@ -10456,7 +10668,7 @@ Web 平台的 :ref:`rendering/renderer/rendering_method` **rendering/rendering_device/driver.linuxbsd** = ``"vulkan"`` +:ref:`String` **rendering/rendering_device/driver.linuxbsd** :ref:`rendering/rendering_device/driver` 在 LinuxBSD 的覆盖项。 @@ -10468,7 +10680,7 @@ Web 平台的 :ref:`rendering/renderer/rendering_method` **rendering/rendering_device/driver.macos** = ``"vulkan"`` +:ref:`String` **rendering/rendering_device/driver.macos** :ref:`rendering/rendering_device/driver` 在 macOS 的覆盖项。 @@ -10480,7 +10692,7 @@ Web 平台的 :ref:`rendering/renderer/rendering_method` **rendering/rendering_device/driver.windows** = ``"vulkan"`` +:ref:`String` **rendering/rendering_device/driver.windows** :ref:`rendering/rendering_device/driver` 在 Windows 的覆盖项。 @@ -10508,7 +10720,7 @@ Web 平台的 :ref:`rendering/renderer/rendering_method`! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10522,7 +10734,7 @@ Web 平台的 :ref:`rendering/renderer/rendering_method`! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10536,7 +10748,7 @@ Web 平台的 :ref:`rendering/renderer/rendering_method`! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10550,7 +10762,7 @@ Web 平台的 :ref:`rendering/renderer/rendering_method`! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10602,7 +10814,7 @@ Web 平台的 :ref:`rendering/renderer/rendering_method`! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10628,7 +10840,7 @@ Web 平台的 :ref:`rendering/renderer/rendering_method`! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10642,7 +10854,7 @@ Web 平台的 :ref:`rendering/renderer/rendering_method`! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10656,7 +10868,7 @@ Web 平台的 :ref:`rendering/renderer/rendering_method`! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10774,13 +10986,11 @@ Web 平台的 :ref:`rendering/renderer/rendering_method` **rendering/textures/default_filters/texture_mipmap_bias** = ``0.0`` -Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). +通过从更低或更高的 mipmap 中读取数据影响最终纹理的锐度(也叫“纹理 LOD 偏置”)。负值会让 mipmap 纹理更锐利,但从较远处观察时颗粒更明显,而正值会让 mipmap 纹理更模糊(即便凑近看也一样)。 -Enabling temporal antialiasing (:ref:`rendering/anti_aliasing/quality/use_taa`) will automatically apply a ``-0.5`` offset to this value, while enabling FXAA (:ref:`rendering/anti_aliasing/quality/screen_space_aa`) will automatically apply a ``-0.25`` offset to this value. If both TAA and FXAA are enabled at the same time, an offset of ``-0.75`` is applied to this value. +启用时间抗锯齿(\ :ref:`rendering/anti_aliasing/quality/use_taa`\ )会对这个值应用 ``-0.5`` 的偏移量,而启用 FXAA(\ :ref:`rendering/anti_aliasing/quality/screen_space_aa`\ )则会对这个值应用 ``-0.25`` 的偏移量。如果同时启用 TAA 和 FXAA,则会对这个值应用 ``-0.75`` 的偏移量。 -\ **Note:** If :ref:`rendering/scaling_3d/scale` is lower than ``1.0`` (exclusive), :ref:`rendering/textures/default_filters/texture_mipmap_bias` is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is ``log2(scaling_3d_scale) + mipmap_bias``. - -\ **Note:** This property is only read when the project starts. To change the mipmap LOD bias at run-time, set :ref:`Viewport.texture_mipmap_bias` instead. +\ **注意:**\ 如果 :ref:`rendering/scaling_3d/scale` 比 ``1.0`` 小(包含),则会使用 :ref:`rendering/textures/default_filters/texture_mipmap_bias` 自动调整 mipmap 偏置,内部会根据缩放系数进行计算。公式为 ``log2(scaling_3d_scale) + mipmap_bias``\ 。 .. rst-class:: classref-item-separator @@ -10886,7 +11096,7 @@ WebP 的默认压缩方法。影响有损和无损 WebP。较高的值会以压 :ref:`bool` **rendering/viewport/hdr_2d** = ``false`` -If ``true``, enables :ref:`Viewport.use_hdr_2d` on the root viewport. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow). +如果为 ``true``\ ,则会在根视口上启用 :ref:`Viewport.use_hdr_2d`\ 。这样 2D 渲染就能够利用需要高动态范围的效果(例如 2D 辉光)。 .. rst-class:: classref-item-separator @@ -10951,7 +11161,7 @@ If ``true``, enables :ref:`Viewport.use_hdr_2d`! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10977,7 +11187,7 @@ If ``true``, enables :ref:`Viewport.use_hdr_2d`! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -11013,7 +11223,31 @@ If ``true``, enables :ref:`Viewport.use_hdr_2d` **xr/openxr/environment_blend_mode** = ``"0"`` -Specify how OpenXR should blend in the environment. This is specific to certain AR and passthrough devices where camera images are blended in by the XR compositor. +指定 OpenXR 应如何混合环境。针对的是部分 AR 和穿透设备,XR 合成器会混合相机图像。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_xr/openxr/extensions/eye_gaze_interaction: + +.. rst-class:: classref-property + +:ref:`bool` **xr/openxr/extensions/eye_gaze_interaction** = ``false`` + +指定是否为该项目启用眼动追踪。根据平台的不同,可能需要额外的导出配置。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_xr/openxr/extensions/hand_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **xr/openxr/extensions/hand_tracking** = ``true`` + +如果为 true,则将启用手部跟踪扩展(如果可用)。 .. rst-class:: classref-item-separator @@ -11031,6 +11265,30 @@ Specify how OpenXR should blend in the environment. This is specific to certain ---- +.. _class_ProjectSettings_property_xr/openxr/foveation_dynamic: + +.. rst-class:: classref-property + +:ref:`bool` **xr/openxr/foveation_dynamic** = ``false`` + +如果为 true 并且支持注视点,将根据帧速率自动调整注视点级别,直至达到 :ref:`xr/openxr/foveation_level` 上设置的级别。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ProjectSettings_property_xr/openxr/foveation_level: + +.. rst-class:: classref-property + +:ref:`int` **xr/openxr/foveation_level** = ``"0"`` + +应用的注视点级别(如果支持):0 = 关闭、1 = 低、2 = 中、3 = 高。 + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_xr/openxr/reference_space: .. rst-class:: classref-property @@ -11093,8 +11351,8 @@ Specify how OpenXR should blend in the environment. This is specific to certain .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ProjectSettings_method_add_property_info: @@ -11102,15 +11360,15 @@ Method Descriptions void **add_property_info** **(** :ref:`Dictionary` hint **)** -Adds a custom property info to a property. The dictionary must contain: +为某个属性添加自定义属性信息。字典必须包含: -- ``"name"``: :ref:`String` (the property's name) +- ``"name"``\ :\ :ref:`String`\ (属性名称) -- ``"type"``: :ref:`int` (see :ref:`Variant.Type`) +- ``"type"``\ :\ :ref:`int`\ (见 :ref:`Variant.Type`\ ) -- optionally ``"hint"``: :ref:`int` (see :ref:`PropertyHint`) and ``"hint_string"``: :ref:`String`\ +- 可选的 ``"hint"``\ :\ :ref:`int`\ (见 :ref:`PropertyHint`\ )和 ``"hint_string"``\ :\ :ref:`String`\ -\ **Example:**\ +\ **示例:**\ .. tabs:: @@ -11439,10 +11697,10 @@ void **set_setting** **(** :ref:`String` name, :ref:`Variant` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Tweener` **<** :ref:`RefCounted` **<** :ref:`Object` 随时间对 :ref:`Object` 的属性进行插值。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **PropertyTweener** 用于为对象的属性进行插值。详细的用法见 :ref:`Tween.tween_property`\ 。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -51,8 +51,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_PropertyTweener_method_as_relative: @@ -141,10 +141,10 @@ Method Descriptions 设置所使用的过渡类型 :ref:`TransitionType`\ 。如果没有设置,则使用包含这个 Tweener 的 :ref:`Tween` 的默认过渡类型。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_quadmesh.rst b/classes/zh_CN/class_quadmesh.rst index 0db399a321..7ce92ed26a 100644 --- a/classes/zh_CN/class_quadmesh.rst +++ b/classes/zh_CN/class_quadmesh.rst @@ -10,21 +10,21 @@ QuadMesh ======== -**Inherits:** :ref:`PlaneMesh` **<** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PlaneMesh` **<** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 表示面向相机的正方形网格的类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 代表正方形 :ref:`PrimitiveMesh` 的类。这个平面网格没有厚度。默认情况下,这个网格与 X 轴和 Y 轴对齐;这种旋转方式更适合于使用公告板的材质。\ **QuadMesh** 和 :ref:`PlaneMesh` 是等价的,区别是 :ref:`PlaneMesh.orientation` 默认为 :ref:`PlaneMesh.FACE_Z`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D GUI 演示 `__ @@ -32,8 +32,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -44,10 +44,10 @@ Properties | :ref:`Vector2` | size | ``Vector2(1, 1)`` (overrides :ref:`PlaneMesh`) | +------------------------------------------------+-------------+-------------------------------------------------------------------------------+ -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_quadoccluder3d.rst b/classes/zh_CN/class_quadoccluder3d.rst index e3eac219a1..a6cbebcec8 100644 --- a/classes/zh_CN/class_quadoccluder3d.rst +++ b/classes/zh_CN/class_quadoccluder3d.rst @@ -10,14 +10,14 @@ QuadOccluder3D ============== -**Inherits:** :ref:`Occluder3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Occluder3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于 :ref:`OccluderInstance3D` 遮挡剔除的扁平平面形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **QuadOccluder3D** 存储的是一个扁平的平面形状,可以用于引擎的遮挡剔除系统。如果你需要自定义正方形的形状,请参阅 :ref:`PolygonOccluder3D`\ 。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Occlusion culling <../tutorials/3d/occlusion_culling>` +- :doc:`遮挡剔除 <../tutorials/3d/occlusion_culling>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_QuadOccluder3D_property_size: @@ -64,10 +64,10 @@ Property Descriptions 该四边形的大小,使用 3D 单位。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_quaternion.rst b/classes/zh_CN/class_quaternion.rst index 0ad5dbfd85..fd512d8547 100644 --- a/classes/zh_CN/class_quaternion.rst +++ b/classes/zh_CN/class_quaternion.rst @@ -14,8 +14,8 @@ Quaternion .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 四元数与 :ref:`Basis` 类似,实现的是旋转的矩阵表示。但 :ref:`Basis` 存储了旋转、缩放、切变,四元数只存储旋转。 @@ -25,12 +25,12 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `使用 3D 变换 <../tutorials/3d/using_transforms.html#interpolating-with-quaternions>`__ @@ -38,8 +38,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -78,8 +78,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -126,8 +126,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -166,8 +166,8 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Quaternion_constant_IDENTITY: @@ -183,8 +183,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Quaternion_property_w: @@ -244,8 +244,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_Quaternion_constructor_Quaternion: @@ -311,8 +311,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Quaternion_method_angle_to: @@ -348,7 +348,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -374,7 +374,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -388,7 +388,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -486,7 +486,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -550,7 +550,7 @@ Method Descriptions 在四元数 ``pre_a``\ 、该向量、\ ``b`` 和 ``post_b`` 之间,按给定量 ``weight`` 执行三次球面插值。 -它可以根据时间值执行比 ``spherical_cubic_interpolate()`` 更平滑的插值。 +它可以根据时间值执行比 :ref:`spherical_cubic_interpolate` 更平滑的插值。 .. rst-class:: classref-section-separator @@ -558,8 +558,8 @@ Method Descriptions .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Quaternion_operator_neq_Quaternion: @@ -717,10 +717,10 @@ Operator Descriptions 返回该 **Quaternion** 的负值。和写 ``Quaternion(-q.x, -q.y, -q.z, -q.w)`` 相同。这个操作得到的是代表相同旋转的四元数。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_randomnumbergenerator.rst b/classes/zh_CN/class_randomnumbergenerator.rst index 6237ff585d..9e423dcaab 100644 --- a/classes/zh_CN/class_randomnumbergenerator.rst +++ b/classes/zh_CN/class_randomnumbergenerator.rst @@ -10,14 +10,14 @@ RandomNumberGenerator ===================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 提供生成伪随机数的方法。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- RandomNumberGenerator 是一个用于生成伪随机数的类。它目前使用 `PCG32 `__\ 。 @@ -33,15 +33,15 @@ RandomNumberGenerator 是一个用于生成伪随机数的类。它目前使用 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`随机数生成 <../tutorials/math/random_number_generation>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -80,8 +80,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RandomNumberGenerator_property_seed: @@ -144,8 +144,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RandomNumberGenerator_method_randf: @@ -213,12 +213,12 @@ Method Descriptions void **randomize** **(** **)** -为这个 **RandomNumberGenerator** 实例设置基于时间的种子。与 :ref:`@GlobalScope` 随机数生成函数不同,不同的 **RandomNumberGenerator** 可以使用不同的种子。 +为这个 **RandomNumberGenerator** 实例设置基于时间的种子。与 :ref:`@GlobalScope` 随机数生成函数不同,不同的 **RandomNumberGenerator** 实例可以使用不同的种子。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_range.rst b/classes/zh_CN/class_range.rst index 699ac7fdf3..39b22abf35 100644 --- a/classes/zh_CN/class_range.rst +++ b/classes/zh_CN/class_range.rst @@ -10,23 +10,23 @@ Range ===== -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`EditorSpinSlider`, :ref:`ProgressBar`, :ref:`ScrollBar`, :ref:`Slider`, :ref:`SpinBox`, :ref:`TextureProgressBar` +**派生:** :ref:`EditorSpinSlider`, :ref:`ProgressBar`, :ref:`ScrollBar`, :ref:`Slider`, :ref:`SpinBox`, :ref:`TextureProgressBar` 代表特定范围内数字的控件的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- Range 是代表特定范围内数字的控件的抽象基类,能够对步长 :ref:`step` 和分页大小 :ref:`page` 进行配置。使用 Range 的高阶节点示例请参考 :ref:`ScrollBar` 和 :ref:`Slider`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -57,21 +57,21 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +------+--------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_value_changed` **(** :ref:`float` new_value **)** |virtual| | - +------+--------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_value_no_signal` **(** :ref:`float` value **)** | - +------+--------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`share` **(** :ref:`Node` with **)** | - +------+--------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`unshare` **(** **)** | - +------+--------------------------------------------------------------------------------------------------------------------+ + +------+----------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_value_changed` **(** :ref:`float` new_value **)** |virtual| | + +------+----------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_value_no_signal` **(** :ref:`float` value **)** | + +------+----------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`share` **(** :ref:`Node` with **)** | + +------+----------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`unshare` **(** **)** | + +------+----------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -79,8 +79,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Range_signal_changed: @@ -110,8 +110,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Range_property_allow_greater: @@ -285,10 +285,10 @@ Range 的当前值。更改这个属性(即便是通过代码修改的)会 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_Range_method__value_changed: +.. _class_Range_private_method__value_changed: .. rst-class:: classref-method @@ -332,10 +332,10 @@ void **unshare** **(** **)** 使该 **Range** 停止与任何其他 Range 共享其成员变量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_raycast2d.rst b/classes/zh_CN/class_raycast2d.rst index c34f128705..500f950557 100644 --- a/classes/zh_CN/class_raycast2d.rst +++ b/classes/zh_CN/class_raycast2d.rst @@ -10,14 +10,14 @@ RayCast2D ========= -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 2D 空间中的射线,用于查找第一个相交的 :ref:`CollisionObject2D`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- Raycast 代表的是从它的原点到 :ref:`target_position` 的射线,如果与碰撞对象相交,就能找到路径上距离最近的 :ref:`CollisionObject2D`\ 。可以用来做很多事情,例如 @@ -29,15 +29,15 @@ Raycast 代表的是从它的原点到 :ref:`target_position` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -60,8 +60,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -102,8 +102,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RayCast2D_property_collide_with_areas: @@ -116,7 +116,7 @@ Property Descriptions - void **set_collide_with_areas** **(** :ref:`bool` value **)** - :ref:`bool` **is_collide_with_areas_enabled** **(** **)** -If ``true``, collisions with :ref:`Area2D`\ s will be reported. +如果为 ``true``\ ,则会报告与 :ref:`Area2D` 的碰撞。 .. rst-class:: classref-item-separator @@ -133,7 +133,7 @@ If ``true``, collisions with :ref:`Area2D`\ s will be reported. - void **set_collide_with_bodies** **(** :ref:`bool` value **)** - :ref:`bool` **is_collide_with_bodies_enabled** **(** **)** -If ``true``, collisions with :ref:`PhysicsBody2D`\ s will be reported. +如果为 ``true``\ ,则会报告与 :ref:`PhysicsBody2D` 的碰撞。 .. rst-class:: classref-item-separator @@ -150,7 +150,7 @@ If ``true``, collisions with :ref:`PhysicsBody2D`\ s will b - void **set_collision_mask** **(** :ref:`int` value **)** - :ref:`int` **get_collision_mask** **(** **)** -光线的碰撞遮罩。只有在遮罩中启用至少一个碰撞层中物体,才会被检测到。有关更多信息,请参阅文档中的 `《碰撞层与掩码》 <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__\ 。 +射线的碰撞遮罩。只能检测到至少启用了一个遮罩中碰撞层的对象。详情请参阅文档中的\ `《碰撞层与掩码》 <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__\ 。 .. rst-class:: classref-item-separator @@ -218,7 +218,7 @@ If ``true``, collisions with :ref:`PhysicsBody2D`\ s will b - void **set_target_position** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_target_position** **(** **)** -光线的目标点,相对于该 RayCast 的 ``position``\ 。 +射线的目标点,相对于该 RayCast 的 ``position``\ 。 .. rst-class:: classref-section-separator @@ -226,8 +226,8 @@ If ``true``, collisions with :ref:`PhysicsBody2D`\ s will b .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RayCast2D_method_add_exception: @@ -271,9 +271,9 @@ void **clear_exceptions** **(** **)** void **force_raycast_update** **(** **)** -Updates the collision information for the ray immediately, without waiting for the next ``_physics_process`` call. Use this method, for example, when the ray or its parent has changed state. +立即更新射线的碰撞信息,不等待下一次的 ``_physics_process`` 调用。例如,请在射线或其父级更改状态后使用该方法。 -\ **Note:** :ref:`enabled` does not need to be ``true`` for this to work. +\ **注意:**\ :ref:`enabled` 不需要为 ``true`` 即可生效。 .. rst-class:: classref-item-separator @@ -397,10 +397,10 @@ void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref 根据 ``value``\ ,启用或禁用 :ref:`collision_mask` 中指定的层,给定的 ``layer_number`` 应在 1 和 32 之间。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_raycast3d.rst b/classes/zh_CN/class_raycast3d.rst index ded92fb246..7c2f72a1dc 100644 --- a/classes/zh_CN/class_raycast3d.rst +++ b/classes/zh_CN/class_raycast3d.rst @@ -10,14 +10,14 @@ RayCast3D ========= -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 3D 空间中的射线,用于查找第一个相交的 :ref:`CollisionObject3D`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- Raycast 代表的是从它的原点到 :ref:`target_position` 的射线,如果与碰撞对象相交,就能找到路径上距离最近的 :ref:`CollisionObject3D`\ 。可以用来做很多事情,例如 @@ -29,8 +29,8 @@ Raycast 代表的是从它的原点到 :ref:`target_position` @@ -38,8 +38,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -68,8 +68,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -112,8 +112,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RayCast3D_property_collide_with_areas: @@ -126,7 +126,7 @@ Property Descriptions - void **set_collide_with_areas** **(** :ref:`bool` value **)** - :ref:`bool` **is_collide_with_areas_enabled** **(** **)** -If ``true``, collisions with :ref:`Area3D`\ s will be reported. +如果为 ``true``\ ,则会报告与 :ref:`Area3D` 的碰撞。 .. rst-class:: classref-item-separator @@ -143,7 +143,7 @@ If ``true``, collisions with :ref:`Area3D`\ s will be reported. - void **set_collide_with_bodies** **(** :ref:`bool` value **)** - :ref:`bool` **is_collide_with_bodies_enabled** **(** **)** -If ``true``, collisions with :ref:`PhysicsBody3D`\ s will be reported. +如果为 ``true``\ ,则会报告与 :ref:`PhysicsBody3D` 的碰撞。 .. rst-class:: classref-item-separator @@ -160,7 +160,7 @@ If ``true``, collisions with :ref:`PhysicsBody3D`\ s will b - void **set_collision_mask** **(** :ref:`int` value **)** - :ref:`int` **get_collision_mask** **(** **)** -光线的碰撞遮罩。只有在遮罩中启用至少一个碰撞层中物体,才会被检测到。有关更多信息,请参阅文档中的 `《碰撞层与掩码》 <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__\ 。 +射线的碰撞遮罩。只能检测到至少启用了一个遮罩中碰撞层的对象。详情请参阅文档中的\ `《碰撞层与掩码》 <../tutorials/physics/physics_introduction.html#collision-layers-and-masks>`__\ 。 .. rst-class:: classref-item-separator @@ -247,7 +247,7 @@ If ``true``, collisions with :ref:`PhysicsBody3D`\ s will b - void **set_hit_back_faces** **(** :ref:`bool` value **)** - :ref:`bool` **is_hit_back_faces_enabled** **(** **)** -If ``true``, the ray will hit back faces with concave polygon shapes with back face enabled or heightmap shapes. +如果为 ``true``\ ,射线将命中背部面,这些背部面是启用了背面的凹多边形形状,或高度图形状。 .. rst-class:: classref-item-separator @@ -281,7 +281,7 @@ If ``true``, the ray will hit back faces with concave polygon shapes with back f - void **set_target_position** **(** :ref:`Vector3` value **)** - :ref:`Vector3` **get_target_position** **(** **)** -光线的目标点,相对于该 RayCast 的 ``position``\ 。 +射线的目标点,相对于该 RayCast 的 ``position``\ 。 .. rst-class:: classref-section-separator @@ -289,8 +289,8 @@ If ``true``, the ray will hit back faces with concave polygon shapes with back f .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RayCast3D_method_add_exception: @@ -334,9 +334,9 @@ void **clear_exceptions** **(** **)** void **force_raycast_update** **(** **)** -Updates the collision information for the ray immediately, without waiting for the next ``_physics_process`` call. Use this method, for example, when the ray or its parent has changed state. +立即更新射线的碰撞信息,不等待下一次的 ``_physics_process`` 调用。例如,请在射线或其父级更改状态后使用该方法。 -\ **Note:** :ref:`enabled` does not need to be ``true`` for this to work. +\ **注意:**\ :ref:`enabled` 不需要为 ``true`` 即可生效。 .. rst-class:: classref-item-separator @@ -384,7 +384,7 @@ Updates the collision information for the ray immediately, without waiting for t :ref:`int` **get_collision_face_index** **(** **)** |const| -Returns the collision object's face index at the collision point, or ``-1`` if the shape intersecting the ray is not a :ref:`ConcavePolygonShape3D`. +返回碰撞点处碰撞对象的面索引,如果与射线相交的形状不是 :ref:`ConcavePolygonShape3D`\ ,则返回 ``-1``\ 。 .. rst-class:: classref-item-separator @@ -472,10 +472,10 @@ void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref 根据 ``value``\ ,启用或禁用 :ref:`collision_mask` 中指定的层,给定的 ``layer_number`` 应在 1 和 32 之间。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rdattachmentformat.rst b/classes/zh_CN/class_rdattachmentformat.rst index 2c5ac31c2c..8ed0db3f77 100644 --- a/classes/zh_CN/class_rdattachmentformat.rst +++ b/classes/zh_CN/class_rdattachmentformat.rst @@ -10,21 +10,21 @@ RDAttachmentFormat ================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 附件格式(由 :ref:`RenderingDevice` 使用)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个对象由 :ref:`RenderingDevice` 使用。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RDAttachmentFormat_property_format: @@ -93,10 +93,10 @@ Property Descriptions 该附件的用途标志,用于确定能够进行的操作。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rdframebufferpass.rst b/classes/zh_CN/class_rdframebufferpass.rst index aa5eec3c63..8b655041ff 100644 --- a/classes/zh_CN/class_rdframebufferpass.rst +++ b/classes/zh_CN/class_rdframebufferpass.rst @@ -10,14 +10,14 @@ RDFramebufferPass ================= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 帧缓冲区阶段的附件描述(由 :ref:`RenderingDevice` 使用)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该类包含帧缓冲区通道的附件描述列表。每个点都有一个指向先前提供的纹理附件列表的索引。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -51,8 +51,8 @@ Properties .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_RDFramebufferPass_constant_ATTACHMENT_UNUSED: @@ -68,8 +68,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RDFramebufferPass_property_color_attachments: @@ -152,10 +152,10 @@ Property Descriptions 如果颜色附件是多重采样的,则可以提供非多重采样的解析附件。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rdpipelinecolorblendstate.rst b/classes/zh_CN/class_rdpipelinecolorblendstate.rst index 938b043611..b7b2005e9b 100644 --- a/classes/zh_CN/class_rdpipelinecolorblendstate.rst +++ b/classes/zh_CN/class_rdpipelinecolorblendstate.rst @@ -10,21 +10,21 @@ RDPipelineColorBlendState ========================= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 管线颜色混合状态(由 :ref:`RenderingDevice` 使用)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个对象由 :ref:`RenderingDevice` 使用。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RDPipelineColorBlendState_property_attachments: @@ -112,10 +112,10 @@ Property Descriptions 混合时执行的逻辑运算。仅在 :ref:`enable_logic_op` 为 ``true`` 时有效。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rdpipelinecolorblendstateattachment.rst b/classes/zh_CN/class_rdpipelinecolorblendstateattachment.rst index 2dc2f1a74f..f03ed71e8f 100644 --- a/classes/zh_CN/class_rdpipelinecolorblendstateattachment.rst +++ b/classes/zh_CN/class_rdpipelinecolorblendstateattachment.rst @@ -10,14 +10,14 @@ RDPipelineColorBlendStateAttachment =================================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 管线颜色混合状态附件(由 :ref:`RenderingDevice` 使用)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 控制使用 :ref:`RenderingDevice` 时如何在来源和目标片段之间进行混合。 @@ -90,8 +90,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -122,8 +122,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -138,8 +138,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RDPipelineColorBlendStateAttachment_property_alpha_blend_op: @@ -330,8 +330,8 @@ Alpha 通道使用的混合模式。 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RDPipelineColorBlendStateAttachment_method_set_as_mix: @@ -341,10 +341,10 @@ void **set_as_mix** **(** **)** 使用普通(非预乘)Alpha 进行标准混合混合(mix blending)的简便方法。这个方法会将 :ref:`enable_blend` 设为 ``true``\ ,将 :ref:`src_color_blend_factor` 设为 :ref:`RenderingDevice.BLEND_FACTOR_SRC_ALPHA`\ ,将 :ref:`dst_color_blend_factor` 设为 :ref:`RenderingDevice.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA`\ ,将 :ref:`src_alpha_blend_factor` 设为 :ref:`RenderingDevice.BLEND_FACTOR_SRC_ALPHA`\ ,将 :ref:`dst_alpha_blend_factor` 设为 :ref:`RenderingDevice.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rdpipelinedepthstencilstate.rst b/classes/zh_CN/class_rdpipelinedepthstencilstate.rst index c7073e6f09..efd7232f04 100644 --- a/classes/zh_CN/class_rdpipelinedepthstencilstate.rst +++ b/classes/zh_CN/class_rdpipelinedepthstencilstate.rst @@ -10,21 +10,21 @@ RDPipelineDepthStencilState =========================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 管线的深度/模板状态(由 :ref:`RenderingDevice` 使用)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **RDPipelineDepthStencilState** 控制的是在使用 :ref:`RenderingDevice` 对深度和模板进行采样时,如何进行深度和模板的比较。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -79,8 +79,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RDPipelineDepthStencilState_property_back_op_compare: @@ -95,7 +95,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -114,7 +114,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -133,7 +133,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -152,7 +152,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -171,7 +171,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -190,7 +190,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -209,7 +209,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -228,7 +228,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -247,7 +247,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -266,7 +266,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -285,7 +285,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -321,7 +321,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -340,7 +340,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -359,7 +359,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -378,7 +378,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -397,7 +397,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -416,7 +416,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -435,7 +435,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -454,7 +454,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -473,12 +473,12 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rdpipelinemultisamplestate.rst b/classes/zh_CN/class_rdpipelinemultisamplestate.rst index 4dbd02d33b..281801e22f 100644 --- a/classes/zh_CN/class_rdpipelinemultisamplestate.rst +++ b/classes/zh_CN/class_rdpipelinemultisamplestate.rst @@ -10,21 +10,21 @@ RDPipelineMultisampleState ========================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 管线的多重采样状态(由 :ref:`RenderingDevice` 使用)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **RDPipelineMultisampleState** 控制的是在使用 :ref:`RenderingDevice` 进行渲染时,如何进行多重采样和超采样抗锯齿。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RDPipelineMultisampleState_property_enable_alpha_to_coverage: @@ -148,12 +148,12 @@ Property Descriptions - void **set_sample_masks** **(** :ref:`int[]` value **)** - :ref:`int[]` **get_sample_masks** **(** **)** -The sample mask array. See the `sample mask Vulkan documentation `__ for more details. +样本掩码。详情见 `Vulkan 的样本掩码文档 `__\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rdpipelinerasterizationstate.rst b/classes/zh_CN/class_rdpipelinerasterizationstate.rst index 14f8152778..a8bb28aa21 100644 --- a/classes/zh_CN/class_rdpipelinerasterizationstate.rst +++ b/classes/zh_CN/class_rdpipelinerasterizationstate.rst @@ -10,21 +10,21 @@ RDPipelineRasterizationState ============================ -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 管线栅格化状态(由 :ref:`RenderingDevice` 使用)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个对象由 :ref:`RenderingDevice` 使用。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -59,8 +59,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RDPipelineRasterizationState_property_cull_mode: @@ -92,7 +92,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -111,7 +111,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -130,7 +130,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -149,7 +149,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -185,7 +185,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -219,7 +219,7 @@ Property Descriptions - void **set_line_width** **(** :ref:`float` value **)** - :ref:`float` **get_line_width** **(** **)** -The line width to use when drawing lines (in pixels). Thick lines may not be supported on all hardware. +绘制线段时使用的线宽(单位为像素)。可能不是所有硬件都支持粗线段。 .. rst-class:: classref-item-separator @@ -255,10 +255,10 @@ The line width to use when drawing lines (in pixels). Thick lines may not be sup 如果为 ``true``\ ,则会为三角形进行线框渲染,不进行平面或纹理渲染。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rdpipelinespecializationconstant.rst b/classes/zh_CN/class_rdpipelinespecializationconstant.rst index b09ae049c7..8d7001f755 100644 --- a/classes/zh_CN/class_rdpipelinespecializationconstant.rst +++ b/classes/zh_CN/class_rdpipelinespecializationconstant.rst @@ -10,14 +10,14 @@ RDPipelineSpecializationConstant ================================ -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 管线特化常量(由 :ref:`RenderingDevice` 使用)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- *特化常量*\ 可以创建同一着色器的额外版本,但不会导致实际编译的着色器版本数增加。这样就能减少着色器的版本数、减少 ``if`` 分支,从而提升性能,但与此同时保持着色器能够在不同场合灵活运用。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RDPipelineSpecializationConstant_property_constant_id: @@ -76,10 +76,10 @@ Property Descriptions 特化常量的值。只有 :ref:`bool`\ 、\ :ref:`int`\ 、\ :ref:`float` 类型是有效的特化常量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rdsamplerstate.rst b/classes/zh_CN/class_rdsamplerstate.rst index ff6d726015..2ef8f4ec1c 100644 --- a/classes/zh_CN/class_rdsamplerstate.rst +++ b/classes/zh_CN/class_rdsamplerstate.rst @@ -10,21 +10,21 @@ RDSamplerState ============== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 采样器状态(由 :ref:`RenderingDevice` 使用)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个对象由 :ref:`RenderingDevice` 使用。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -67,8 +67,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RDSamplerState_property_anisotropy_max: @@ -204,7 +204,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -308,7 +308,7 @@ Mipmap 使用的过滤方法。 .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -327,10 +327,10 @@ Mipmap 使用的过滤方法。 如果为 ``true``\ ,则执行各向异性采样。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rdshaderfile.rst b/classes/zh_CN/class_rdshaderfile.rst index 0826536bc5..d0441d8cfd 100644 --- a/classes/zh_CN/class_rdshaderfile.rst +++ b/classes/zh_CN/class_rdshaderfile.rst @@ -10,14 +10,14 @@ RDShaderFile ============ -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 编译后的 SPIR-V 形式的着色器文件(由 :ref:`RenderingDevice` 使用)。请勿与 Godot 自身的 :ref:`Shader` 混淆。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 编译后的 SPIR-V 形式的着色器文件。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -37,8 +37,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -57,8 +57,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RDShaderFile_property_base_error: @@ -79,8 +79,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RDShaderFile_method_get_spirv: @@ -114,10 +114,10 @@ void **set_bytecode** **(** :ref:`RDShaderSPIRV` bytecode, 设置指定着色器版本 ``version`` 要编译的 SPIR-V 字节码 ``bytecode``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rdshadersource.rst b/classes/zh_CN/class_rdshadersource.rst index 31494d6a76..3af8a902c2 100644 --- a/classes/zh_CN/class_rdshadersource.rst +++ b/classes/zh_CN/class_rdshadersource.rst @@ -10,14 +10,14 @@ RDShaderSource ============== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 着色器源代码(由 :ref:`RenderingDevice` 使用)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 文本形式的着色器源代码。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -65,8 +65,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RDShaderSource_property_language: @@ -172,8 +172,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RDShaderSource_method_get_stage_source: @@ -195,10 +195,10 @@ void **set_stage_source** **(** :ref:`ShaderStage`\ 、\ :ref:`source_fragment`\ 、\ :ref:`source_tesselation_control`\ 、\ :ref:`source_tesselation_evaluation` 或 :ref:`source_vertex`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rdshaderspirv.rst b/classes/zh_CN/class_rdshaderspirv.rst index da4fadb5ba..b837ecaf8a 100644 --- a/classes/zh_CN/class_rdshaderspirv.rst +++ b/classes/zh_CN/class_rdshaderspirv.rst @@ -10,23 +10,23 @@ RDShaderSPIRV ============= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` SPIR-V 中间表示,是 :ref:`RDShaderFile` 的一部分(由 :ref:`RenderingDevice` 使用)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**RDShaderSPIRV** represents a :ref:`RDShaderFile`'s `SPIR-V `__ code for various shader stages, as well as possible compilation error messages. SPIR-V is a low-level intermediate shader representation. This intermediate representation is not used directly by GPUs for rendering, but it can be compiled into binary shaders that GPUs can understand. Unlike compiled shaders, SPIR-V is portable across GPU models and driver versions. +**RDShaderSPIRV** 代表 :ref:`RDShaderFile` 不同着色器阶段的 `SPIR-V `__ 代码,以及可能的编译错误消息。SPIR-V 是一种低阶着色器中间表示。这种中间表示无法直接用于 GPU 渲染,但可以被编译为 GPU 能够理解的二进制着色器。与编译后的着色器不同,SPIR-V 可以在不同 GPU 型号以及驱动版本之间移植。 -This object is used by :ref:`RenderingDevice`. +这个对象由 :ref:`RenderingDevice` 使用。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -77,8 +77,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RDShaderSPIRV_property_bytecode_compute: @@ -252,8 +252,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RDShaderSPIRV_method_get_stage_bytecode: @@ -299,10 +299,10 @@ void **set_stage_compile_error** **(** :ref:`ShaderStage`\ 、\ :ref:`compile_error_fragment`\ 、\ :ref:`compile_error_tesselation_control`\ 、\ :ref:`compile_error_tesselation_evaluation`\ 、\ :ref:`compile_error_vertex` 的其中之一。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rdtextureformat.rst b/classes/zh_CN/class_rdtextureformat.rst index f3c2c1f6c7..18a7bc4c9e 100644 --- a/classes/zh_CN/class_rdtextureformat.rst +++ b/classes/zh_CN/class_rdtextureformat.rst @@ -10,21 +10,21 @@ RDTextureFormat =============== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 纹理格式(由 :ref:`RenderingDevice` 使用)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个对象由 :ref:`RenderingDevice` 使用。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -51,8 +51,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -69,8 +69,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RDTextureFormat_property_array_layers: @@ -227,8 +227,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RDTextureFormat_method_add_shareable_format: @@ -238,7 +238,7 @@ void **add_shareable_format** **(** :ref:`DataFormat`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -252,12 +252,12 @@ void **remove_shareable_format** **(** :ref:`DataFormat`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rdtextureview.rst b/classes/zh_CN/class_rdtextureview.rst index 164c6f639d..d1d097407a 100644 --- a/classes/zh_CN/class_rdtextureview.rst +++ b/classes/zh_CN/class_rdtextureview.rst @@ -10,21 +10,21 @@ RDTextureView ============= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 纹理视图(由 :ref:`RenderingDevice` 使用)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个对象由 :ref:`RenderingDevice` 使用。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RDTextureView_property_format_override: @@ -131,10 +131,10 @@ Property Descriptions 对红色通道进行采样时采样的通道。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rduniform.rst b/classes/zh_CN/class_rduniform.rst index 2e3d745da7..17beb4d436 100644 --- a/classes/zh_CN/class_rduniform.rst +++ b/classes/zh_CN/class_rduniform.rst @@ -10,21 +10,21 @@ RDUniform ========= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 着色器 Uniform(由 :ref:`RenderingDevice` 使用)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个对象由 :ref:`RenderingDevice` 使用。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -37,8 +37,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -57,8 +57,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RDUniform_property_binding: @@ -96,8 +96,8 @@ Uniform 的数据类型。 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RDUniform_method_add_id: @@ -107,7 +107,7 @@ void **add_id** **(** :ref:`RID` id **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -121,7 +121,7 @@ void **clear_ids** **(** **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -135,12 +135,12 @@ void **clear_ids** **(** **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rdvertexattribute.rst b/classes/zh_CN/class_rdvertexattribute.rst index 208c34907d..b06c1284b2 100644 --- a/classes/zh_CN/class_rdvertexattribute.rst +++ b/classes/zh_CN/class_rdvertexattribute.rst @@ -10,21 +10,21 @@ RDVertexAttribute ================= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 顶点属性(由 :ref:`RenderingDevice` 使用)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个对象由 :ref:`RenderingDevice` 使用。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RDVertexAttribute_property_format: @@ -63,7 +63,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -82,7 +82,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -101,7 +101,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -120,7 +120,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -139,12 +139,12 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rect2.rst b/classes/zh_CN/class_rect2.rst index fc7e3702aa..81f6af6504 100644 --- a/classes/zh_CN/class_rect2.rst +++ b/classes/zh_CN/class_rect2.rst @@ -14,25 +14,25 @@ Rect2 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -The **Rect2** built-in :ref:`Variant` type represents an axis-aligned rectangle in a 2D space. It is defined by its :ref:`position` and :ref:`size`, which are :ref:`Vector2`. It is frequently used for fast overlap tests (see :ref:`intersects`). Although **Rect2** itself is axis-aligned, it can be combined with :ref:`Transform2D` to represent a rotated or skewed rectangle. +**Rect2** 内置 :ref:`Variant` 类型表示 2D 空间中的轴对齐矩形。它由其 :ref:`position` 和 :ref:`size` 定义,皆为 :ref:`Vector2` 类型。它经常被用于快速重叠测试(参见 :ref:`intersects`\ )。虽然 **Rect2** 本身是轴对齐的,但它可以与 :ref:`Transform2D` 组合来表示旋转或倾斜的矩形。 -For integer coordinates, use :ref:`Rect2i`. The 3D equivalent to **Rect2** is :ref:`AABB`. +对于整数坐标,请使用 :ref:`Rect2i`\ 。\ **Rect2** 的 3D 等效体是 :ref:`AABB`\ 。 -\ **Note:** Negative values for :ref:`size` are not supported. With negative size, most **Rect2** methods do not work correctly. Use :ref:`abs` to get an equivalent **Rect2** with a non-negative size. +\ **注意:**\ 不支持负的 :ref:`size`\ 。对于负大小,大多数 **Rect2** 方法都无法正常工作。使用 :ref:`abs` 获取具有非负大小的等效 **Rect2**\ 。 -\ **Note:** In a boolean context, a **Rect2** evaluates to ``false`` if both :ref:`position` and :ref:`size` are zero (equal to :ref:`Vector2.ZERO`). Otherwise, it always evaluates to ``true``. +\ **注意:**\ 在布尔上下文中,如果 :ref:`position` 和 :ref:`size` 均为零(等于 :ref:`Vector2.ZERO`\ ),则 **Rect2** 的计算结果为 ``false``\ 。否则,它的计算结果始终为 ``true``\ 。 .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`数学文档索引 <../tutorials/math/index>` @@ -42,8 +42,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -78,8 +78,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -118,8 +118,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -138,8 +138,8 @@ Operators .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Rect2_property_end: @@ -147,7 +147,7 @@ Property Descriptions :ref:`Vector2` **end** = ``Vector2(0, 0)`` -The ending point. This is usually the bottom-right corner of the rectangle, and is equivalent to ``position + size``. Setting this point affects the :ref:`size`. +终点。通常为矩形的右下角,等价于 ``position + size``\ 。设置该点会影响 :ref:`size`\ 。 .. rst-class:: classref-item-separator @@ -159,7 +159,7 @@ The ending point. This is usually the bottom-right corner of the rectangle, and :ref:`Vector2` **position** = ``Vector2(0, 0)`` -The origin point. This is usually the top-left corner of the rectangle. +原点。通常为矩形的左上角。 .. rst-class:: classref-item-separator @@ -171,9 +171,9 @@ The origin point. This is usually the top-left corner of the rectangle. :ref:`Vector2` **size** = ``Vector2(0, 0)`` -The rectangle's width and height, starting from :ref:`position`. Setting this value also affects the :ref:`end` point. +矩形的宽和高,相对于 :ref:`position`\ 。设置该值会影响终点 :ref:`end`\ 。 -\ **Note:** It's recommended setting the width and height to non-negative values, as most methods in Godot assume that the :ref:`position` is the top-left corner, and the :ref:`end` is the bottom-right corner. To get an equivalent rectangle with non-negative size, use :ref:`abs`. +\ **注意:**\ 建议将宽和高设置为非负数,因为 Godot 中的大多数方法假设 :ref:`position` 为左上角、\ :ref:`end` 为右下角。要获取等价且大小非负的矩形,请使用 :ref:`abs`\ 。 .. rst-class:: classref-section-separator @@ -181,8 +181,8 @@ The rectangle's width and height, starting from :ref:`position` **Rect2** **(** **)** -Constructs a **Rect2** with its :ref:`position` and :ref:`size` set to :ref:`Vector2.ZERO`. +构造 **Rect2**\ ,将 :ref:`position` 和 :ref:`size` 设置为 :ref:`Vector2.ZERO`\ 。 .. rst-class:: classref-item-separator @@ -220,7 +220,7 @@ Constructs a **Rect2** with its :ref:`position` a :ref:`Rect2` **Rect2** **(** :ref:`Vector2` position, :ref:`Vector2` size **)** -Constructs a **Rect2** by ``position`` and ``size``. +使用指定的 ``position`` 和 ``size`` 构造 **Rect2**\ 。 .. rst-class:: classref-item-separator @@ -230,7 +230,7 @@ Constructs a **Rect2** by ``position`` and ``size``. :ref:`Rect2` **Rect2** **(** :ref:`float` x, :ref:`float` y, :ref:`float` width, :ref:`float` height **)** -Constructs a **Rect2** by setting its :ref:`position` to (``x``, ``y``), and its :ref:`size` to (``width``, ``height``). +构造 **Rect2**\ ,将 :ref:`position` 设置为 (``x``, ``y``),将 :ref:`size` 设置为 (``width``, ``height``)。 .. rst-class:: classref-section-separator @@ -238,8 +238,8 @@ Constructs a **Rect2** by setting its :ref:`position` **abs** **(** **)** |const| -Returns a **Rect2** equivalent to this rectangle, with its width and height modified to be non-negative values, and with its :ref:`position` being the top-left corner of the rectangle. +返回一个与该矩形等效的 **Rect2**\ ,其宽度和高度被修改为非负值,其 :ref:`position` 为矩形的左上角。 .. tabs:: @@ -255,16 +255,16 @@ Returns a **Rect2** equivalent to this rectangle, with its width and height modi .. code-tab:: gdscript var rect = Rect2(25, 25, -100, -50) - var absolute = rect.abs() # absolute is Rect2(-75, -25, 100, 50) + var absolute = rect.abs() # 绝对值为 Rect2(-75, -25, 100, 50) .. code-tab:: csharp var rect = new Rect2(25, 25, -100, -50); - var absolute = rect.Abs(); // absolute is Rect2(-75, -25, 100, 50) + var absolute = rect.Abs(); // 绝对值为 Rect2(-75, -25, 100, 50) -\ **Note:** It's recommended to use this method when :ref:`size` is negative, as most other methods in Godot assume that the :ref:`position` is the top-left corner, and the :ref:`end` is the bottom-right corner. +\ **注意:**\ 当 :ref:`size` 为负时,建议使用该方法,因为 Godot 中的大多数其他方法都假设 :ref:`position` 是左上角,\ :ref:`end` 是右下角。 .. rst-class:: classref-item-separator @@ -276,7 +276,7 @@ Returns a **Rect2** equivalent to this rectangle, with its width and height modi :ref:`bool` **encloses** **(** :ref:`Rect2` b **)** |const| -Returns ``true`` if this rectangle *completely* encloses the ``b`` rectangle. +如果该矩形\ *完全*\ 包含 ``b`` 矩形,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -288,7 +288,7 @@ Returns ``true`` if this rectangle *completely* encloses the ``b`` rectangle. :ref:`Rect2` **expand** **(** :ref:`Vector2` to **)** |const| -Returns a copy of this rectangle expanded to align the edges with the given ``to`` point, if necessary. +返回该矩形的副本,如有必要,该矩形被扩展为将边缘与给定的 ``to`` 点对齐。 .. tabs:: @@ -297,15 +297,15 @@ Returns a copy of this rectangle expanded to align the edges with the given ``to var rect = Rect2(0, 0, 5, 2) - rect = rect.expand(Vector2(10, 0)) # rect is Rect2(0, 0, 10, 2) - rect = rect.expand(Vector2(-5, 5)) # rect is Rect2(-5, 0, 10, 5) + rect = rect.expand(Vector2(10, 0)) # rect 为 Rect2(0, 0, 10, 2) + rect = rect.expand(Vector2(-5, 5)) # rect 为 Rect2(-5, 0, 10, 5) .. code-tab:: csharp var rect = new Rect2(0, 0, 5, 2); - rect = rect.Expand(new Vector2(10, 0)); // rect is Rect2(0, 0, 10, 2) - rect = rect.Expand(new Vector2(-5, 5)); // rect is Rect2(-5, 0, 10, 5) + rect = rect.Expand(new Vector2(10, 0)); // rect 为 Rect2(0, 0, 10, 2) + rect = rect.Expand(new Vector2(-5, 5)); // rect 为 Rect2(-5, 0, 10, 5) @@ -319,7 +319,7 @@ Returns a copy of this rectangle expanded to align the edges with the given ``to :ref:`float` **get_area** **(** **)** |const| -Returns the rectangle's area. This is equivalent to ``size.x * size.y``. See also :ref:`has_area`. +返回该矩形的面积。这相当于 ``size.x * size.y``\ 。另请参阅 :ref:`has_area`\ 。 .. rst-class:: classref-item-separator @@ -331,7 +331,7 @@ Returns the rectangle's area. This is equivalent to ``size.x * size.y``. See als :ref:`Vector2` **get_center** **(** **)** |const| -Returns the center point of the rectangle. This is the same as ``position + (size / 2.0)``. +返回该矩形的中心点。这与 ``position + (size / 2.0)`` 相同。 .. rst-class:: classref-item-separator @@ -343,20 +343,20 @@ Returns the center point of the rectangle. This is the same as ``position + (siz :ref:`Rect2` **grow** **(** :ref:`float` amount **)** |const| -Returns a copy of this rectangle extended on all sides by the given ``amount``. A negative ``amount`` shrinks the rectangle instead. See also :ref:`grow_individual` and :ref:`grow_side`. +返回该矩形的副本,该矩形在所有边上扩展给定的 ``amount``\ 。负的 ``amount`` 会缩小该矩形。另见 :ref:`grow_individual` and :ref:`grow_side`\ 。 .. tabs:: .. code-tab:: gdscript - var a = Rect2(4, 4, 8, 8).grow(4) # a is Rect2(0, 0, 16, 16) - var b = Rect2(0, 0, 8, 4).grow(2) # b is Rect2(-2, -2, 12, 8) + var a = Rect2(4, 4, 8, 8).grow(4) # a 为 Rect2(0, 0, 16, 16) + var b = Rect2(0, 0, 8, 4).grow(2) # b 为 Rect2(-2, -2, 12, 8) .. code-tab:: csharp - var a = new Rect2(4, 4, 8, 8).Grow(4); // a is Rect2(0, 0, 16, 16) - var b = new Rect2(0, 0, 8, 4).Grow(2); // b is Rect2(-2, -2, 12, 8) + var a = new Rect2(4, 4, 8, 8).Grow(4); // a 为 Rect2(0, 0, 16, 16) + var b = new Rect2(0, 0, 8, 4).Grow(2); // b 为 Rect2(-2, -2, 12, 8) @@ -370,7 +370,7 @@ Returns a copy of this rectangle extended on all sides by the given ``amount``. :ref:`Rect2` **grow_individual** **(** :ref:`float` left, :ref:`float` top, :ref:`float` right, :ref:`float` bottom **)** |const| -Returns a copy of this rectangle with its ``left``, ``top``, ``right``, and ``bottom`` sides extended by the given amounts. Negative values shrink the sides, instead. See also :ref:`grow` and :ref:`grow_side`. +返回该矩形的副本,其 ``left``\ 、\ ``top``\ 、\ ``right``\ 、和 ``bottom`` 边扩展了给定的量。相反,负值会缩小边。另见 :ref:`grow` and :ref:`grow_side`\ 。 .. rst-class:: classref-item-separator @@ -382,7 +382,7 @@ Returns a copy of this rectangle with its ``left``, ``top``, ``right``, and ``bo :ref:`Rect2` **grow_side** **(** :ref:`int` side, :ref:`float` amount **)** |const| -Returns a copy of this rectangle with its ``side`` extended by the given ``amount`` (see :ref:`Side` constants). A negative ``amount`` shrinks the rectangle, instead. See also :ref:`grow` and :ref:`grow_individual`. +返回该矩形的副本,其 ``side`` 按给定的 ``amount`` 扩展(请参阅 :ref:`Side` 常量)。相反,负的 ``amount`` 会缩小该矩形。另见 :ref:`grow` 和 :ref:`grow_individual`\ 。 .. rst-class:: classref-item-separator @@ -394,7 +394,7 @@ Returns a copy of this rectangle with its ``side`` extended by the given ``amoun :ref:`bool` **has_area** **(** **)** |const| -Returns ``true`` if this rectangle has positive width and height. See also :ref:`get_area`. +如果该矩形具有正的宽度和高度,则返回 ``true``\ 。另见 :ref:`get_area`\ 。 .. rst-class:: classref-item-separator @@ -406,9 +406,9 @@ Returns ``true`` if this rectangle has positive width and height. See also :ref: :ref:`bool` **has_point** **(** :ref:`Vector2` point **)** |const| -Returns ``true`` if the rectangle contains the given ``point``. By convention, points on the right and bottom edges are **not** included. +如果该矩形包含给定的 ``point``\ ,则返回 ``true``\ 。依照惯例,\ **不**\ 包括右侧和底部边缘上的点。 -\ **Note:** This method is not reliable for **Rect2** with a *negative* :ref:`size`. Use :ref:`abs` first to get a valid rectangle. +\ **注意:**\ 对于\ *大小为负*\ 的 **Rect2**\ ,该方法并不可靠。请首先使用 :ref:`abs` 获取一个有效的矩形。 .. rst-class:: classref-item-separator @@ -420,7 +420,7 @@ Returns ``true`` if the rectangle contains the given ``point``. By convention, p :ref:`Rect2` **intersection** **(** :ref:`Rect2` b **)** |const| -Returns the intersection between this rectangle and ``b``. If the rectangles do not intersect, returns an empty **Rect2**. +返回该矩形与 ``b`` 之间的交集。如果该矩形不相交,则返回空的 **Rect2**\ 。 .. tabs:: @@ -430,18 +430,18 @@ Returns the intersection between this rectangle and ``b``. If the rectangles do var rect1 = Rect2(0, 0, 5, 10) var rect2 = Rect2(2, 0, 8, 4) - var a = rect1.intersection(rect2) # a is Rect2(2, 0, 3, 4) + var a = rect1.intersection(rect2) # a 为 Rect2(2, 0, 3, 4) .. code-tab:: csharp var rect1 = new Rect2(0, 0, 5, 10); var rect2 = new Rect2(2, 0, 8, 4); - var a = rect1.Intersection(rect2); // a is Rect2(2, 0, 3, 4) + var a = rect1.Intersection(rect2); // a 为 Rect2(2, 0, 3, 4) -\ **Note:** If you only need to know whether two rectangles are overlapping, use :ref:`intersects`, instead. +\ **注意:**\ 如果你只需要知道两个矩形是否重叠,请改用 :ref:`intersects`\ 。 .. rst-class:: classref-item-separator @@ -453,7 +453,7 @@ Returns the intersection between this rectangle and ``b``. If the rectangles do :ref:`bool` **intersects** **(** :ref:`Rect2` b, :ref:`bool` include_borders=false **)** |const| -Returns ``true`` if this rectangle overlaps with the ``b`` rectangle. The edges of both rectangles are excluded, unless ``include_borders`` is ``true``. +如果该矩形与 ``b`` 矩形重叠,则返回 ``true``\ 。除非 ``include_borders`` 为 ``true``\ ,否则两个矩形的边缘均被排除。 .. rst-class:: classref-item-separator @@ -465,7 +465,7 @@ Returns ``true`` if this rectangle overlaps with the ``b`` rectangle. The edges :ref:`bool` **is_equal_approx** **(** :ref:`Rect2` rect **)** |const| -Returns ``true`` if this rectangle and ``rect`` are approximately equal, by calling :ref:`Vector2.is_equal_approx` on the :ref:`position` and the :ref:`size`. +如果该矩形和 ``rect`` 近似相等,判断方法是通过在 :ref:`position` 和 :ref:`size` 上调用 :ref:`Vector2.is_equal_approx`\ ,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -477,7 +477,7 @@ Returns ``true`` if this rectangle and ``rect`` are approximately equal, by call :ref:`bool` **is_finite** **(** **)** |const| -Returns ``true`` if this rectangle's values are finite, by calling :ref:`Vector2.is_finite` on the :ref:`position` and the :ref:`size`. +如果该矩形是有限的,则返回 ``true``\ ,判断方法是对 :ref:`position` 和 :ref:`size` 调用 :ref:`Vector2.is_finite`\ 。 .. rst-class:: classref-item-separator @@ -489,7 +489,7 @@ Returns ``true`` if this rectangle's values are finite, by calling :ref:`Vector2 :ref:`Rect2` **merge** **(** :ref:`Rect2` b **)** |const| -Returns a **Rect2** that encloses both this rectangle and ``b`` around the edges. See also :ref:`encloses`. +返回边界包围该矩形和 ``b`` 的 **Rect2**\ 。另见 :ref:`encloses`\ 。 .. rst-class:: classref-section-separator @@ -497,8 +497,8 @@ Returns a **Rect2** that encloses both this rectangle and ``b`` around the edges .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Rect2_operator_neq_Rect2: @@ -506,9 +506,9 @@ Operator Descriptions :ref:`bool` **operator !=** **(** :ref:`Rect2` right **)** -Returns ``true`` if the :ref:`position` or :ref:`size` of both rectangles are not equal. +如果两个矩形的 :ref:`position` 不相等或 :ref:`size` 不相等,则返回 ``true``\ 。 -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **注意:**\ 由于浮点数精度误差,请考虑改用 :ref:`is_equal_approx`\ ,会更可靠。 .. rst-class:: classref-item-separator @@ -520,7 +520,11 @@ Returns ``true`` if the :ref:`position` or :ref:` :ref:`Rect2` **operator *** **(** :ref:`Transform2D` right **)** -使用给定的 :ref:`Transform2D` 变换矩阵对该 **Rect2** 进行逆变换(相乘)。 +假设该变换的基是正交的(即旋转/反射可以,缩放/倾斜则不然),将 **Rect2** 逆向变换(乘以)给定的 :ref:`Transform2D` 变换矩阵。 + +\ ``rect * transform`` 相当于 ``transform.inverse() * rect``\ 。请参阅 :ref:`Transform2D.inverse`\ 。 + +对于通过仿射变换的逆变换(例如,通过缩放)进行变换,可以使用 ``transform.affine_inverse() * rect`` 来代替。请参阅 :ref:`Transform2D.affine_inverse`\ 。 .. rst-class:: classref-item-separator @@ -532,14 +536,14 @@ Returns ``true`` if the :ref:`position` or :ref:` :ref:`bool` **operator ==** **(** :ref:`Rect2` right **)** -Returns ``true`` if both :ref:`position` and :ref:`size` of the rectangles are exactly equal, respectively. +如果两个矩形的 :ref:`position` 完全相等且 :ref:`size` 完全相等,则返回 ``true``\ 。 -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **注意:**\ 由于浮点数精度误差,请考虑改用 :ref:`is_equal_approx`\ ,会更可靠。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rect2i.rst b/classes/zh_CN/class_rect2i.rst index 08c9c695e4..526031ab54 100644 --- a/classes/zh_CN/class_rect2i.rst +++ b/classes/zh_CN/class_rect2i.rst @@ -14,25 +14,25 @@ Rect2i .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -The **Rect2i** built-in :ref:`Variant` type represents an axis-aligned rectangle in a 2D space, using integer coordinates. It is defined by its :ref:`position` and :ref:`size`, which are :ref:`Vector2i`. Because it does not rotate, it is frequently used for fast overlap tests (see :ref:`intersects`). +**Rect2i** 是内置的 :ref:`Variant` 类型,代表 2D 空间中与轴对齐的矩形,使用整数坐标。由 :ref:`position` 和 :ref:`size` 定义,它们都是 :ref:`Vector2i`\ 。因为这个矩形不会旋转,所以可以进行快速的重合检查(见 :ref:`intersects`\ )。 -For floating-point coordinates, see :ref:`Rect2`. +浮点数坐标的版本见 :ref:`Rect2`\ 。 -\ **Note:** Negative values for :ref:`size` are not supported. With negative size, most **Rect2i** methods do not work correctly. Use :ref:`abs` to get an equivalent **Rect2i** with a non-negative size. +\ **注意:**\ 不支持负数的 :ref:`size`\ 。如果大小为负数,\ **Rect2i** 的大多数方法都无法正常工作。请使用 :ref:`abs` 获取等价且大小非负的 **Rect2i**\ 。 -\ **Note:** In a boolean context, a **Rect2i** evaluates to ``false`` if both :ref:`position` and :ref:`size` are zero (equal to :ref:`Vector2i.ZERO`). Otherwise, it always evaluates to ``true``. +\ **注意:**\ 在布尔值上下文中,\ :ref:`position` 和 :ref:`size` 均为零(等于 :ref:`Vector2i.ZERO`\ )的 **Rect2i** 会得到 ``false``\ 。否则得到 ``true``\ 。 .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`数学文档索引 <../tutorials/math/index>` @@ -40,8 +40,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -76,8 +76,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -112,8 +112,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -130,8 +130,8 @@ Operators .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Rect2i_property_end: @@ -139,7 +139,7 @@ Property Descriptions :ref:`Vector2i` **end** = ``Vector2i(0, 0)`` -The ending point. This is usually the bottom-right corner of the rectangle, and is equivalent to ``position + size``. Setting this point affects the :ref:`size`. +终点。通常为矩形的右下角,等价于 ``position + size``\ 。设置该点会影响 :ref:`size`\ 。 .. rst-class:: classref-item-separator @@ -151,7 +151,7 @@ The ending point. This is usually the bottom-right corner of the rectangle, and :ref:`Vector2i` **position** = ``Vector2i(0, 0)`` -The origin point. This is usually the top-left corner of the rectangle. +原点。通常为矩形的左上角。 .. rst-class:: classref-item-separator @@ -163,9 +163,9 @@ The origin point. This is usually the top-left corner of the rectangle. :ref:`Vector2i` **size** = ``Vector2i(0, 0)`` -The rectangle's width and height, starting from :ref:`position`. Setting this value also affects the :ref:`end` point. +矩形的宽和高,相对于 :ref:`position`\ 。设置该值会影响终点 :ref:`end`\ 。 -\ **Note:** It's recommended setting the width and height to non-negative values, as most methods in Godot assume that the :ref:`position` is the top-left corner, and the :ref:`end` is the bottom-right corner. To get an equivalent rectangle with non-negative size, use :ref:`abs`. +\ **注意:**\ 建议将宽和高设置为非负数,因为 Godot 中的大多数方法假设 :ref:`position` 为左上角、\ :ref:`end` 为右下角。要获取等价且大小非负的矩形,请使用 :ref:`abs`\ 。 .. rst-class:: classref-section-separator @@ -173,8 +173,8 @@ The rectangle's width and height, starting from :ref:`position` **Rect2i** **(** **)** -Constructs a **Rect2i** with its :ref:`position` and :ref:`size` set to :ref:`Vector2i.ZERO`. +构造 **Rect2i**\ ,将 :ref:`position` 和 :ref:`size` 设置为 :ref:`Vector2i.ZERO`\ 。 .. rst-class:: classref-item-separator @@ -202,7 +202,7 @@ Constructs a **Rect2i** with its :ref:`position` :ref:`Rect2i` **Rect2i** **(** :ref:`Rect2` from **)** -Constructs a **Rect2i** from a :ref:`Rect2`. The floating-point coordinates are truncated. +根据 :ref:`Rect2` 构造 **Rect2i**\ 。会截断浮点数坐标。 .. rst-class:: classref-item-separator @@ -212,7 +212,7 @@ Constructs a **Rect2i** from a :ref:`Rect2`. The floating-point coo :ref:`Rect2i` **Rect2i** **(** :ref:`Vector2i` position, :ref:`Vector2i` size **)** -Constructs a **Rect2i** by ``position`` and ``size``. +使用指定的 ``position`` 和 ``size`` 构造 **Rect2i**\ 。 .. rst-class:: classref-item-separator @@ -222,7 +222,7 @@ Constructs a **Rect2i** by ``position`` and ``size``. :ref:`Rect2i` **Rect2i** **(** :ref:`int` x, :ref:`int` y, :ref:`int` width, :ref:`int` height **)** -Constructs a **Rect2i** by setting its :ref:`position` to (``x``, ``y``), and its :ref:`size` to (``width``, ``height``). +构造 **Rect2i**\ ,将 :ref:`position` 设置为 (``x``, ``y``),将 :ref:`size` 设置为 (``width``, ``height``)。 .. rst-class:: classref-section-separator @@ -230,8 +230,8 @@ Constructs a **Rect2i** by setting its :ref:`position` **abs** **(** **)** |const| -Returns a **Rect2i** equivalent to this rectangle, with its width and height modified to be non-negative values, and with its :ref:`position` being the top-left corner of the rectangle. +返回一个与该矩形等效的 **Rect2i**\ ,其宽度和高度被修改为非负值,其 :ref:`position` 为该矩形的左上角。 .. tabs:: @@ -247,16 +247,16 @@ Returns a **Rect2i** equivalent to this rectangle, with its width and height mod .. code-tab:: gdscript var rect = Rect2i(25, 25, -100, -50) - var absolute = rect.abs() # absolute is Rect2i(-75, -25, 100, 50) + var absolute = rect.abs() # 绝对值为 Rect2i(-75, -25, 100, 50) .. code-tab:: csharp var rect = new Rect2I(25, 25, -100, -50); - var absolute = rect.Abs(); // absolute is Rect2I(-75, -25, 100, 50) + var absolute = rect.Abs(); // 绝对值为 Rect2I(-75, -25, 100, 50) -\ **Note:** It's recommended to use this method when :ref:`size` is negative, as most other methods in Godot assume that the :ref:`position` is the top-left corner, and the :ref:`end` is the bottom-right corner. +\ **注意:**\ 当 :ref:`size` 为负时,建议使用该方法,因为 Godot 中的大多数其他方法都假设 :ref:`position` 是左上角,\ :ref:`end` 是右下角。 .. rst-class:: classref-item-separator @@ -280,7 +280,7 @@ Returns a **Rect2i** equivalent to this rectangle, with its width and height mod :ref:`Rect2i` **expand** **(** :ref:`Vector2i` to **)** |const| -Returns a copy of this rectangle expanded to align the edges with the given ``to`` point, if necessary. +返回该矩形的副本,如有必要,该矩形被扩展为将边缘与给定的 ``to`` 点对齐。 .. tabs:: @@ -289,15 +289,15 @@ Returns a copy of this rectangle expanded to align the edges with the given ``to var rect = Rect2i(0, 0, 5, 2) - rect = rect.expand(Vector2i(10, 0)) # rect is Rect2i(0, 0, 10, 2) - rect = rect.expand(Vector2i(-5, 5)) # rect is Rect2i(-5, 0, 10, 5) + rect = rect.expand(Vector2i(10, 0)) # rect 为 Rect2i(0, 0, 10, 2) + rect = rect.expand(Vector2i(-5, 5)) # rect 为 Rect2i(-5, 0, 10, 5) .. code-tab:: csharp var rect = new Rect2I(0, 0, 5, 2); - rect = rect.Expand(new Vector2I(10, 0)); // rect is Rect2I(0, 0, 10, 2) - rect = rect.Expand(new Vector2I(-5, 5)); // rect is Rect2I(-5, 0, 10, 5) + rect = rect.Expand(new Vector2I(10, 0)); // rect 为 Rect2I(0, 0, 10, 2) + rect = rect.Expand(new Vector2I(-5, 5)); // rect 为 Rect2I(-5, 0, 10, 5) @@ -311,7 +311,7 @@ Returns a copy of this rectangle expanded to align the edges with the given ``to :ref:`int` **get_area** **(** **)** |const| -Returns the rectangle's area. This is equivalent to ``size.x * size.y``. See also :ref:`has_area`. +返回该矩形的面积。这相当于 ``size.x * size.y``\ 。另请参阅 :ref:`has_area`\ 。 .. rst-class:: classref-item-separator @@ -323,9 +323,9 @@ Returns the rectangle's area. This is equivalent to ``size.x * size.y``. See als :ref:`Vector2i` **get_center** **(** **)** |const| -Returns the center point of the rectangle. This is the same as ``position + (size / 2)``. +返回该矩形的中心点。这与 ``position + (size / 2)`` 相同。 -\ **Note:** If the :ref:`size` is odd, the result will be rounded towards :ref:`position`. +\ **注意:**\ 如果 :ref:`size` 为奇数,则结果将向 :ref:`position` 舍入。 .. rst-class:: classref-item-separator @@ -337,20 +337,20 @@ Returns the center point of the rectangle. This is the same as ``position + (siz :ref:`Rect2i` **grow** **(** :ref:`int` amount **)** |const| -Returns a copy of this rectangle extended on all sides by the given ``amount``. A negative ``amount`` shrinks the rectangle instead. See also :ref:`grow_individual` and :ref:`grow_side`. +返回该矩形的副本,该矩形在所有边上扩展给定的 ``amount``\ 。负的 ``amount`` 会缩小该矩形。另见 :ref:`grow_individual` 和 :ref:`grow_side`\ 。 .. tabs:: .. code-tab:: gdscript - var a = Rect2i(4, 4, 8, 8).grow(4) # a is Rect2i(0, 0, 16, 16) - var b = Rect2i(0, 0, 8, 4).grow(2) # b is Rect2i(-2, -2, 12, 8) + var a = Rect2i(4, 4, 8, 8).grow(4) # a 为 Rect2i(0, 0, 16, 16) + var b = Rect2i(0, 0, 8, 4).grow(2) # b 为 Rect2i(-2, -2, 12, 8) .. code-tab:: csharp - var a = new Rect2I(4, 4, 8, 8).Grow(4); // a is Rect2I(0, 0, 16, 16) - var b = new Rect2I(0, 0, 8, 4).Grow(2); // b is Rect2I(-2, -2, 12, 8) + var a = new Rect2I(4, 4, 8, 8).Grow(4); // a 为 Rect2I(0, 0, 16, 16) + var b = new Rect2I(0, 0, 8, 4).Grow(2); // b 为 Rect2I(-2, -2, 12, 8) @@ -364,7 +364,7 @@ Returns a copy of this rectangle extended on all sides by the given ``amount``. :ref:`Rect2i` **grow_individual** **(** :ref:`int` left, :ref:`int` top, :ref:`int` right, :ref:`int` bottom **)** |const| -Returns a copy of this rectangle with its ``left``, ``top``, ``right``, and ``bottom`` sides extended by the given amounts. Negative values shrink the sides, instead. See also :ref:`grow` and :ref:`grow_side`. +返回该矩形的副本,其 ``left``\ 、\ ``top``\ 、\ ``right``\ 、和 ``bottom`` 边扩展了给定的量。相反,负值会缩小边。另见 :ref:`grow` and :ref:`grow_side`\ 。 .. rst-class:: classref-item-separator @@ -376,7 +376,7 @@ Returns a copy of this rectangle with its ``left``, ``top``, ``right``, and ``bo :ref:`Rect2i` **grow_side** **(** :ref:`int` side, :ref:`int` amount **)** |const| -Returns a copy of this rectangle with its ``side`` extended by the given ``amount`` (see :ref:`Side` constants). A negative ``amount`` shrinks the rectangle, instead. See also :ref:`grow` and :ref:`grow_individual`. +返回该矩形的副本,其 ``side`` 按给定的 ``amount`` 扩展(请参阅 :ref:`Side` 常量)。相反,负的 ``amount`` 会缩小该矩形。另见 :ref:`grow` 和 :ref:`grow_individual`\ 。 .. rst-class:: classref-item-separator @@ -388,7 +388,7 @@ Returns a copy of this rectangle with its ``side`` extended by the given ``amoun :ref:`bool` **has_area** **(** **)** |const| -Returns ``true`` if this rectangle has positive width and height. See also :ref:`get_area`. +如果该矩形具有正的宽度和高度,则返回 ``true``\ 。另见 :ref:`get_area`\ 。 .. rst-class:: classref-item-separator @@ -400,9 +400,9 @@ Returns ``true`` if this rectangle has positive width and height. See also :ref: :ref:`bool` **has_point** **(** :ref:`Vector2i` point **)** |const| -Returns ``true`` if the rectangle contains the given ``point``. By convention, points on the right and bottom edges are **not** included. +如果该矩形包含给定的 ``point``\ ,则返回 ``true``\ 。依照惯例,\ **不**\ 包括右侧和底部边缘上的点。 -\ **Note:** This method is not reliable for **Rect2i** with a *negative* :ref:`size`. Use :ref:`abs` first to get a valid rectangle. +\ **注意:**\ 对于\ *大小为负*\ 的 **Rect2i**\ ,该方法并不可靠。请首先使用 :ref:`abs` 获取一个有效的矩形。 .. rst-class:: classref-item-separator @@ -414,7 +414,7 @@ Returns ``true`` if the rectangle contains the given ``point``. By convention, p :ref:`Rect2i` **intersection** **(** :ref:`Rect2i` b **)** |const| -Returns the intersection between this rectangle and ``b``. If the rectangles do not intersect, returns an empty **Rect2i**. +返回该矩形与 ``b`` 之间的交集。如果矩形不相交,则返回空的 **Rect2i**\ 。 .. tabs:: @@ -424,18 +424,18 @@ Returns the intersection between this rectangle and ``b``. If the rectangles do var a = Rect2i(0, 0, 5, 10) var b = Rect2i(2, 0, 8, 4) - var c = a.intersection(b) # c is Rect2i(2, 0, 3, 4) + var c = a.intersection(b) # c 为 Rect2i(2, 0, 3, 4) .. code-tab:: csharp var a = new Rect2I(0, 0, 5, 10); var b = new Rect2I(2, 0, 8, 4); - var c = rect1.Intersection(rect2); // c is Rect2I(2, 0, 3, 4) + var c = rect1.Intersection(rect2); // c 为 Rect2I(2, 0, 3, 4) -\ **Note:** If you only need to know whether two rectangles are overlapping, use :ref:`intersects`, instead. +\ **注意:**\ 如果你只需要知道两个矩形是否重叠,请改用 :ref:`intersects`\ 。 .. rst-class:: classref-item-separator @@ -447,7 +447,7 @@ Returns the intersection between this rectangle and ``b``. If the rectangles do :ref:`bool` **intersects** **(** :ref:`Rect2i` b **)** |const| -Returns ``true`` if this rectangle overlaps with the ``b`` rectangle. The edges of both rectangles are excluded. +如果该矩形与 ``b`` 矩形重叠,则返回 ``true``\ 。两个矩形的边缘均被排除。 .. rst-class:: classref-item-separator @@ -459,7 +459,7 @@ Returns ``true`` if this rectangle overlaps with the ``b`` rectangle. The edges :ref:`Rect2i` **merge** **(** :ref:`Rect2i` b **)** |const| -Returns a **Rect2i** that encloses both this rectangle and ``b`` around the edges. See also :ref:`encloses`. +返回一个包含该矩形和边缘周围的 ``b`` 的 **Rect2i**\ 。另见 :ref:`encloses`\ 。 .. rst-class:: classref-section-separator @@ -467,8 +467,8 @@ Returns a **Rect2i** that encloses both this rectangle and ``b`` around the edge .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Rect2i_operator_neq_Rect2i: @@ -476,7 +476,7 @@ Operator Descriptions :ref:`bool` **operator !=** **(** :ref:`Rect2i` right **)** -Returns ``true`` if the :ref:`position` or :ref:`size` of both rectangles are not equal. +如果两个矩形的 :ref:`position` 或 :ref:`size` 不相等,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -488,12 +488,12 @@ Returns ``true`` if the :ref:`position` or :ref: :ref:`bool` **operator ==** **(** :ref:`Rect2i` right **)** -Returns ``true`` if both :ref:`position` and :ref:`size` of the rectangles are equal, respectively. +如果该矩形的 :ref:`position` 和 :ref:`size` 分别相等,则返回 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rectangleshape2d.rst b/classes/zh_CN/class_rectangleshape2d.rst index 58ffb813b5..3b7b2b8461 100644 --- a/classes/zh_CN/class_rectangleshape2d.rst +++ b/classes/zh_CN/class_rectangleshape2d.rst @@ -10,23 +10,23 @@ RectangleShape2D ================ -**Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 2D 矩形,旨在用于物理学。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 2D 矩形,旨在用于物理学。通常用于为 :ref:`CollisionShape2D` 提供形状。 -\ **性能:**\ **RectangleShape2D** 可以快速检测碰撞。比 :ref:`CapsuleShape2D` 快,但比 :ref:`CapsuleShape2D` 慢。 +\ **性能:**\ **RectangleShape2D** 可以快速检测碰撞。比 :ref:`CapsuleShape2D` 快,但比 :ref:`CircleShape2D` 慢。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `2D Pong 演示 `__ @@ -34,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RectangleShape2D_property_size: @@ -66,10 +66,10 @@ Property Descriptions 该矩形的宽度和高度。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_refcounted.rst b/classes/zh_CN/class_refcounted.rst index eda41b76d1..7a32fe9c21 100644 --- a/classes/zh_CN/class_refcounted.rst +++ b/classes/zh_CN/class_refcounted.rst @@ -10,36 +10,38 @@ RefCounted ========== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` -**Inherited By:** :ref:`AESContext`, :ref:`AStar2D`, :ref:`AStar3D`, :ref:`AStarGrid2D`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DirAccess`, :ref:`DTLSServer`, :ref:`EditorDebuggerPlugin`, :ref:`EditorDebuggerSession`, :ref:`EditorExportPlatform`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorResourceTooltipPlugin`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`ENetConnection`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`FileAccess`, :ref:`HashingContext`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`ImageFormatLoader`, :ref:`JavaClass`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshConvexDecompositionSettings`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`NavigationPathQueryParameters2D`, :ref:`NavigationPathQueryParameters3D`, :ref:`NavigationPathQueryResult2D`, :ref:`NavigationPathQueryResult3D`, :ref:`Node3DGizmo`, :ref:`OggPacketSequencePlayback`, :ref:`OpenXRAPIExtension`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PCKPacker`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RandomNumberGenerator`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`RenderSceneBuffers`, :ref:`RenderSceneBuffersConfiguration`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TLSOptions`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRPositionalTracker`, :ref:`ZIPPacker`, :ref:`ZIPReader` +**派生:** :ref:`AESContext`, :ref:`AStar2D`, :ref:`AStar3D`, :ref:`AStarGrid2D`, :ref:`AudioEffectInstance`, :ref:`AudioStreamPlayback`, :ref:`CameraFeed`, :ref:`CharFXTransform`, :ref:`ConfigFile`, :ref:`Crypto`, :ref:`DirAccess`, :ref:`DTLSServer`, :ref:`EditorDebuggerPlugin`, :ref:`EditorDebuggerSession`, :ref:`EditorExportPlatform`, :ref:`EditorExportPlugin`, :ref:`EditorFeatureProfile`, :ref:`EditorFileSystemImportFormatSupportQuery`, :ref:`EditorInspectorPlugin`, :ref:`EditorResourceConversionPlugin`, :ref:`EditorResourcePreviewGenerator`, :ref:`EditorResourceTooltipPlugin`, :ref:`EditorSceneFormatImporter`, :ref:`EditorScenePostImport`, :ref:`EditorScenePostImportPlugin`, :ref:`EditorScript`, :ref:`EditorTranslationParserPlugin`, :ref:`EncodedObjectAsID`, :ref:`ENetConnection`, :ref:`EngineProfiler`, :ref:`Expression`, :ref:`FileAccess`, :ref:`HashingContext`, :ref:`HMACContext`, :ref:`HTTPClient`, :ref:`ImageFormatLoader`, :ref:`JavaClass`, :ref:`JavaScriptObject`, :ref:`KinematicCollision2D`, :ref:`KinematicCollision3D`, :ref:`Lightmapper`, :ref:`MeshConvexDecompositionSettings`, :ref:`MeshDataTool`, :ref:`MultiplayerAPI`, :ref:`Mutex`, :ref:`NavigationPathQueryParameters2D`, :ref:`NavigationPathQueryParameters3D`, :ref:`NavigationPathQueryResult2D`, :ref:`NavigationPathQueryResult3D`, :ref:`Node3DGizmo`, :ref:`OggPacketSequencePlayback`, :ref:`OpenXRAPIExtension`, :ref:`PackedDataContainerRef`, :ref:`PacketPeer`, :ref:`PCKPacker`, :ref:`PhysicsPointQueryParameters2D`, :ref:`PhysicsPointQueryParameters3D`, :ref:`PhysicsRayQueryParameters2D`, :ref:`PhysicsRayQueryParameters3D`, :ref:`PhysicsShapeQueryParameters2D`, :ref:`PhysicsShapeQueryParameters3D`, :ref:`PhysicsTestMotionParameters2D`, :ref:`PhysicsTestMotionParameters3D`, :ref:`PhysicsTestMotionResult2D`, :ref:`PhysicsTestMotionResult3D`, :ref:`RandomNumberGenerator`, :ref:`RDAttachmentFormat`, :ref:`RDFramebufferPass`, :ref:`RDPipelineColorBlendState`, :ref:`RDPipelineColorBlendStateAttachment`, :ref:`RDPipelineDepthStencilState`, :ref:`RDPipelineMultisampleState`, :ref:`RDPipelineRasterizationState`, :ref:`RDPipelineSpecializationConstant`, :ref:`RDSamplerState`, :ref:`RDShaderSource`, :ref:`RDTextureFormat`, :ref:`RDTextureView`, :ref:`RDUniform`, :ref:`RDVertexAttribute`, :ref:`RegEx`, :ref:`RegExMatch`, :ref:`RenderSceneBuffers`, :ref:`RenderSceneBuffersConfiguration`, :ref:`Resource`, :ref:`ResourceFormatLoader`, :ref:`ResourceFormatSaver`, :ref:`ResourceImporter`, :ref:`SceneState`, :ref:`SceneTreeTimer`, :ref:`Semaphore`, :ref:`SkinReference`, :ref:`StreamPeer`, :ref:`SurfaceTool`, :ref:`TCPServer`, :ref:`TextLine`, :ref:`TextParagraph`, :ref:`TextServer`, :ref:`Thread`, :ref:`TLSOptions`, :ref:`TriangleMesh`, :ref:`Tween`, :ref:`Tweener`, :ref:`UDPServer`, :ref:`UPNP`, :ref:`UPNPDevice`, :ref:`WeakRef`, :ref:`WebRTCPeerConnection`, :ref:`XMLParser`, :ref:`XRInterface`, :ref:`XRPose`, :ref:`XRPositionalTracker`, :ref:`ZIPPacker`, :ref:`ZIPReader` 引用计数对象的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 所有保持引用计数的对象的基类。\ :ref:`Resource` 和许多其他辅助对象继承该类。 与其他 :ref:`Object` 类型不同,\ **RefCounted** 保留一个内部引用计数器,以便它们在不再使用时自动释放,并且仅在那时才会如此。因此,\ **RefCounted** 不需要使用 :ref:`Object.free` 手动释放。 +陷入循环引用的 **RefCounted** 实例将\ **不会**\ 自动释放。例如,如果节点持有对实例 ``A`` 的引用,而该实例直接或间接持有对 ``A`` 的引用,则 ``A`` 的引用计数将为 2。该节点的销毁将使 ``A`` 悬空,引用计数为 1,并且会出现内存泄漏。为了防止这种情况,可以使用 :ref:`@GlobalScope.weakref` 将循环中的引用之一设置为弱引用。 + 在绝大多数用例中,只需实例化和使用 **RefCounted** 派生类型即可。该类中提供的方法仅适用于高级用户,如果使用不当可能会导致问题。 \ **注意:**\ 在 C# 中,引用计数的对象在不再使用后不会立即被释放。相反,垃圾收集将定期运行,并释放不再使用的引用计数对象。这意味着未使用的引用计数对象会在被移除之前停留一段时间。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`何时以及如何避免为任何事情使用节点 <../tutorials/best_practices/node_alternatives>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -60,8 +62,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RefCounted_method_get_reference_count: @@ -111,12 +113,12 @@ Method Descriptions 内部引用减量计数器。只有在你真的知道你在做什么的时候才使用这个。 -如果减量成功,返回 ``true``\ ,否则返回 ``false``\ 。 +如果该对象在递减后应被释放,则返回 ``true``\ ,否则返回 ``false``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_referencerect.rst b/classes/zh_CN/class_referencerect.rst index 7bd156a754..656473e3fc 100644 --- a/classes/zh_CN/class_referencerect.rst +++ b/classes/zh_CN/class_referencerect.rst @@ -10,21 +10,21 @@ ReferenceRect ============= -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 设计 UI 使用的矩形提示。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 仅在对应矩形周围上显示彩色边框的矩形框。用于将 :ref:`Control` 的范围可视化。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ReferenceRect_property_border_color: @@ -93,10 +93,10 @@ Property Descriptions 如果为 ``true``\ ,则 **ReferenceRect** 仅在编辑器中可见。否则,\ **ReferenceRect** 将在正在运行的项目中可见。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_reflectionprobe.rst b/classes/zh_CN/class_reflectionprobe.rst index 03c7e95aeb..1a666345be 100644 --- a/classes/zh_CN/class_reflectionprobe.rst +++ b/classes/zh_CN/class_reflectionprobe.rst @@ -10,14 +10,14 @@ ReflectionProbe =============== -**Inherits:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 捕捉某个位置周围的环境,用于快速创建准确的反射。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 将其周围环境捕捉为立方体贴图,并存储不同版本,其模糊级别递增以模拟不同的材质粗糙度。 @@ -31,15 +31,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`反射探针 <../tutorials/3d/global_illumination/reflection_probes>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -78,8 +78,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_ReflectionProbe_UpdateMode: @@ -143,8 +143,8 @@ enum **AmbientMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ReflectionProbe_property_ambient_color: @@ -371,10 +371,10 @@ Property Descriptions 设置该 **ReflectionProbe** 的更新频率。可以是 :ref:`UPDATE_ONCE` 或 :ref:`UPDATE_ALWAYS`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_regex.rst b/classes/zh_CN/class_regex.rst index 92dec12da0..e693a10c4a 100644 --- a/classes/zh_CN/class_regex.rst +++ b/classes/zh_CN/class_regex.rst @@ -10,27 +10,27 @@ RegEx ===== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 使用正则表达式搜索文本的类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A regular expression (or regex) is a compact language that can be used to recognize strings that follow a specific pattern, such as URLs, email addresses, complete sentences, etc. For example, a regex of ``ab[0-9]`` would find any string that is ``ab`` followed by any number from ``0`` to ``9``. For a more in-depth look, you can easily find various tutorials and detailed explanations on the Internet. +正则表达式(或称 regex)是一种紧凑的语言,可用于识别遵循特定模式的字符串,如 URL、电子邮件地址、完整句子等。例如正则表达式 ``ab[0-9]`` 可以找到 ``ab`` 后面跟着 ``0`` 到 ``9`` 的任何数字的字符串。要想更深入地了解,你可以很容易地在互联网上找到各种教程和详细解释。 -To begin, the RegEx object needs to be compiled with the search pattern using :ref:`compile` before it can be used. +首先,在使用 RegEx 对象之前,需要用 :ref:`compile` 对其进行搜索模式的编译。 :: var regex = RegEx.new() regex.compile("\\w-(\\d+)") -The search pattern must be escaped first for GDScript before it is escaped for the expression. For example, ``compile("\\d+")`` would be read by RegEx as ``\d+``. Similarly, ``compile("\"(?:\\\\.|[^\"])*\"")`` would be read as ``"(?:\\.|[^"])*"``. In GDScript, you can also use raw string literals (r-strings). For example, ``compile(r'"(?:\\.|[^"])*"')`` would be read the same. +在为表达式转义之前,必须先为 GDScript 转义搜索模式。例如,\ ``compile("\\d+")`` 会被 RegEx 读成 ``\d+``\ 。同样,\ ``compile("\"(?:\\\\.|[^\"])*\")`` 会被读作 ``"(?:\.|[^"])*"``\ 。在 GDScript 中,你还可以使用原始字符串文字(r-字符串)。例如,\ ``compile(r'"(?:\\.|[^"])*"')`` 将被读取为相同的。 -Using :ref:`search`, you can find the pattern within the given text. If a pattern is found, :ref:`RegExMatch` is returned and you can retrieve details of the results using methods such as :ref:`RegExMatch.get_string` and :ref:`RegExMatch.get_start`. +使用 :ref:`search`\ ,你可以在给定的文本中匹配模式。如果匹配到一个模式,将返回 :ref:`RegExMatch`\ ,你可以使用 :ref:`RegExMatch.get_string` 和 :ref:`RegExMatch.get_start` 等方法检索结果的细节。 :: @@ -38,47 +38,47 @@ Using :ref:`search`, you can find the pattern within regex.compile("\\w-(\\d+)") var result = regex.search("abc n-0123") if result: - print(result.get_string()) # Would print n-0123 + print(result.get_string()) # 会输出 n-0123 -The results of capturing groups ``()`` can be retrieved by passing the group number to the various methods in :ref:`RegExMatch`. Group 0 is the default and will always refer to the entire pattern. In the above example, calling ``result.get_string(1)`` would give you ``0123``. +捕获组的结果 ``()`` 可以通过向 :ref:`RegExMatch` 中的各种方法传递组号来检索。默认是组 0,并且将总是指整个模式。在上面的例子中,调用 ``result.get_string(1)`` 会得到 ``0123``\ 。 -This version of RegEx also supports named capturing groups, and the names can be used to retrieve the results. If two or more groups have the same name, the name would only refer to the first one with a match. +这个版本的 RegEx 也支持命名的捕获组,名称可以用来检索结果。如果两个或更多的组有相同的名称,那么这个名称将只指第一个有匹配的组。 :: var regex = RegEx.new() regex.compile("d(?[0-9]+)|x(?[0-9a-f]+)") - var result = regex.search("the number is x2f") + var result = regex.search("数字是 x2f") if result: - print(result.get_string("digit")) # Would print 2f + print(result.get_string("digit")) # 会输出 2f -If you need to process multiple results, :ref:`search_all` generates a list of all non-overlapping results. This can be combined with a ``for`` loop for convenience. +如果你需要处理多个结果,\ :ref:`search_all` 会生成一个所有不重叠的结果列表。为了方便起见,这可以和一个 ``for`` 循环结合起来。 :: for result in regex.search_all("d01, d03, d0c, x3f and x42"): print(result.get_string("digit")) - # Would print 01 03 0 3f 42 + # 会输出 01 03 0 3f 42 -\ **Example of splitting a string using a RegEx:**\ +\ **使用 RegEx 分割字符串的例子:**\ :: var regex = RegEx.new() - regex.compile("\\S+") # Negated whitespace character class. + regex.compile("\\S+") # 非空白字符类。 var results = [] for result in regex.search_all("One Two \n\tThree"): results.push_back(result.get_string()) - # The `results` array now contains "One", "Two", "Three". + # `results` 数组包含 "One"、"Two"、"Three"。 -\ **Note:** Godot's regex implementation is based on the `PCRE2 `__ library. You can view the full pattern reference `here `__. +\ **注意:**\ Godot 的 regex 实现基于的是 `PCRE2 `__\ 。你可以查看完整的模式参考\ `这里 `__\ 。 -\ **Tip:** You can use `Regexr `__ to test regular expressions online. +\ **提示:**\ 你可以使用 `Regexr `__ 来在线测试正则表达式。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -111,8 +111,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RegEx_method_clear: @@ -236,10 +236,10 @@ void **clear** **(** **)** 可以使用 ``offset`` 和 ``end`` 指定要搜索的区域。这对在上一次成功后再次调用该方法,以相同的 ``subject`` 搜索另一个匹配项时很有用。请注意,设置这些参数不同于传递缩短后的字符串。例如,起始锚点 ``^`` 不受 ``offset`` 的影响,会为单词边界 ``\b`` 检查 ``offset`` 之前的字符。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_regexmatch.rst b/classes/zh_CN/class_regexmatch.rst index 553a2edb02..e8305ab185 100644 --- a/classes/zh_CN/class_regexmatch.rst +++ b/classes/zh_CN/class_regexmatch.rst @@ -10,21 +10,21 @@ RegExMatch ========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 包含 :ref:`RegEx` 搜索的结果。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 包含由 :ref:`RegEx.search` 和 :ref:`RegEx.search_all` 返回的单个 :ref:`RegEx` 匹配结果。它可以用来查找匹配的位置和范围以及它的捕获组,并且可以提取其子字符串。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -61,8 +61,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RegExMatch_property_names: @@ -114,8 +114,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RegExMatch_method_get_end: @@ -167,10 +167,10 @@ Method Descriptions 如果组没有匹配或不存在,则返回一个空字符串。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_remotetransform2d.rst b/classes/zh_CN/class_remotetransform2d.rst index 8e074bdc8f..8e9f42dc28 100644 --- a/classes/zh_CN/class_remotetransform2d.rst +++ b/classes/zh_CN/class_remotetransform2d.rst @@ -10,14 +10,14 @@ RemoteTransform2D ================= -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` RemoteTransform2D 会将自己的 :ref:`Transform2D` 推送到场景中另一个派生自 :ref:`CanvasItem` 的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- RemoteTransform2D 会将自己的 :ref:`Transform2D` 推送到场景中另一个派生自 :ref:`CanvasItem` 的节点(称为远程节点)。 @@ -25,8 +25,8 @@ RemoteTransform2D 会将自己的 :ref:`Transform2D` 推送 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -61,8 +61,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RemoteTransform2D_property_remote_path: @@ -151,8 +151,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RemoteTransform2D_method_force_update_cache: @@ -162,10 +162,10 @@ void **force_update_cache** **(** **)** **RemoteTransform2D** 缓存了远程节点。如果远程节点消失了,它可能不会通知;\ :ref:`force_update_cache` 强制它再次更新缓存。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_remotetransform3d.rst b/classes/zh_CN/class_remotetransform3d.rst index 012635745d..0fac5dbefa 100644 --- a/classes/zh_CN/class_remotetransform3d.rst +++ b/classes/zh_CN/class_remotetransform3d.rst @@ -10,14 +10,14 @@ RemoteTransform3D ================= -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` RemoteTransform3D 会将自己的 :ref:`Transform3D` 推送到场景中另一个派生自 :ref:`Node3D` 的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- RemoteTransform3D 会将自己的 :ref:`Transform3D` 推送到场景中另一个派生自 :ref:`Node3D` 的节点(称为远程节点)。 @@ -25,8 +25,8 @@ RemoteTransform3D 会将自己的 :ref:`Transform3D` 推送 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -61,8 +61,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RemoteTransform3D_property_remote_path: @@ -151,8 +151,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RemoteTransform3D_method_force_update_cache: @@ -162,10 +162,10 @@ void **force_update_cache** **(** **)** **RemoteTransform3D** 缓存了远程节点。如果远程节点消失了,它可能不会通知;\ :ref:`force_update_cache` 强制它再次更新缓存。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_renderingdevice.rst b/classes/zh_CN/class_renderingdevice.rst index 9be334a1cd..16161413a6 100644 --- a/classes/zh_CN/class_renderingdevice.rst +++ b/classes/zh_CN/class_renderingdevice.rst @@ -10,14 +10,14 @@ RenderingDevice =============== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 用于处理现代低阶图形 API 的抽象。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **RenderingDevice** 是用来使用 Vulkan 等现代低阶图形 API 的抽象。与(适用于 Godot 自有渲染子系统的)\ :ref:`RenderingServer` 相比,\ **RenderingDevice** 所处的层级更低,能够更加直接地使用底层图形 API。Godot 使用 **RenderingDevice** 来支持部分现代低阶图形 API,能够减少所需的重复代码。你也可以在自己的项目中使用 **RenderingDevice**\ ,从而执行 :ref:`RenderingServer` 和高阶节点未暴露的功能,例如使用计算着色器。 @@ -31,15 +31,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用计算着色器 <../tutorials/shaders/compute_shaders>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -203,6 +203,8 @@ Methods +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`texture_create` **(** :ref:`RDTextureFormat` format, :ref:`RDTextureView` view, :ref:`PackedByteArray[]` data=[] **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`texture_create_from_extension` **(** :ref:`TextureType` type, :ref:`DataFormat` format, :ref:`TextureSamples` samples, |bitfield|\<:ref:`TextureUsageBits`\> usage_flags, :ref:`int` image, :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`int` layers **)** | + +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`texture_create_shared` **(** :ref:`RDTextureView` view, :ref:`RID` with_texture **)** | +------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`texture_create_shared_from_slice` **(** :ref:`RDTextureView` view, :ref:`RID` with_texture, :ref:`int` layer, :ref:`int` mipmap, :ref:`int` mipmaps=1, :ref:`TextureSliceType` slice_type=0 **)** | @@ -242,8 +244,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_RenderingDevice_DeviceType: @@ -2193,7 +2195,7 @@ flags **BarrierMask**: :ref:`BarrierMask` **BARRIER_MASK_VERTEX** = ``1`` -Vertex shader barrier mask. +顶点着色器屏障掩码。 .. _class_RenderingDevice_constant_BARRIER_MASK_FRAGMENT: @@ -2201,7 +2203,7 @@ Vertex shader barrier mask. :ref:`BarrierMask` **BARRIER_MASK_FRAGMENT** = ``8`` -Fragment shader barrier mask. +片段着色器屏障掩码。 .. _class_RenderingDevice_constant_BARRIER_MASK_COMPUTE: @@ -2225,7 +2227,7 @@ Fragment shader barrier mask. :ref:`BarrierMask` **BARRIER_MASK_RASTER** = ``9`` -Raster barrier mask (vertex and fragment). Equivalent to ``BARRIER_MASK_VERTEX | BARRIER_MASK_FRAGMENT``. +光栅屏障掩码(顶点及片段)。等价于 ``BARRIER_MASK_VERTEX | BARRIER_MASK_FRAGMENT``\ 。 .. _class_RenderingDevice_constant_BARRIER_MASK_ALL_BARRIERS: @@ -2233,7 +2235,7 @@ Raster barrier mask (vertex and fragment). Equivalent to ``BARRIER_MASK_VERTEX | :ref:`BarrierMask` **BARRIER_MASK_ALL_BARRIERS** = ``32767`` -Barrier mask for all types (vertex, fragment, compute, transfer). +所有类型的屏障掩码(顶点、片段、计算、传输)。 .. _class_RenderingDevice_constant_BARRIER_MASK_NO_BARRIER: @@ -2241,7 +2243,7 @@ Barrier mask for all types (vertex, fragment, compute, transfer). :ref:`BarrierMask` **BARRIER_MASK_NO_BARRIER** = ``32768`` -没有任何类型的屏障。 +任何类型都没有屏障。 .. rst-class:: classref-item-separator @@ -2825,7 +2827,7 @@ enum **UniformType**: :ref:`UniformType` **UNIFORM_TYPE_SAMPLER** = ``0`` -Sampler uniform. +采样器 uniform。 .. _class_RenderingDevice_constant_UNIFORM_TYPE_SAMPLER_WITH_TEXTURE: @@ -2849,7 +2851,7 @@ Sampler uniform. :ref:`UniformType` **UNIFORM_TYPE_IMAGE** = ``3`` -Image uniform. +图像 uniform。 .. _class_RenderingDevice_constant_UNIFORM_TYPE_TEXTURE_BUFFER: @@ -2857,7 +2859,7 @@ Image uniform. :ref:`UniformType` **UNIFORM_TYPE_TEXTURE_BUFFER** = ``4`` -Texture buffer uniform. +纹理缓冲 uniform。 .. _class_RenderingDevice_constant_UNIFORM_TYPE_SAMPLER_WITH_TEXTURE_BUFFER: @@ -2865,7 +2867,7 @@ Texture buffer uniform. :ref:`UniformType` **UNIFORM_TYPE_SAMPLER_WITH_TEXTURE_BUFFER** = ``5`` -Sampler uniform with a texture buffer. +带有纹理缓冲的采样器 uniform。 .. _class_RenderingDevice_constant_UNIFORM_TYPE_IMAGE_BUFFER: @@ -2873,7 +2875,7 @@ Sampler uniform with a texture buffer. :ref:`UniformType` **UNIFORM_TYPE_IMAGE_BUFFER** = ``6`` -Image buffer uniform. +图像缓冲 uniform。 .. _class_RenderingDevice_constant_UNIFORM_TYPE_UNIFORM_BUFFER: @@ -4299,8 +4301,8 @@ enum **MemoryType**: .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_RenderingDevice_constant_INVALID_ID: @@ -4324,8 +4326,8 @@ Constants .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RenderingDevice_method_barrier: @@ -4345,17 +4347,17 @@ void **barrier** **(** |bitfield|\<:ref:`BarrierMask` **buffer_clear** **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** -Clears the contents of the ``buffer``, clearing ``size_bytes`` bytes, starting at ``offset``. Always raises a memory barrier. +清除 ``buffer`` 的内容,清除 ``size_bytes`` 字节,从 ``offset`` 开始。总是会造成内存障碍。 -Prints an error if: +如果出现以下情况,则打印错误: -- the size isn't a multiple of four +- 大小不是四的倍数 -- the region specified by ``offset`` + ``size_bytes`` exceeds the buffer +- ``offset`` + ``size_bytes`` 指定的区域超出缓冲区 -- a draw list is currently active (created by :ref:`draw_list_begin`) +- 绘制列表当前处于活动状态(由 :ref:`draw_list_begin` 创建) -- a compute list is currently active (created by :ref:`compute_list_begin`) +- 计算列表当前处于活动状态(由 :ref:`compute_list_begin` 创建) .. rst-class:: classref-item-separator @@ -4379,15 +4381,15 @@ Prints an error if: :ref:`Error` **buffer_update** **(** :ref:`RID` buffer, :ref:`int` offset, :ref:`int` size_bytes, :ref:`PackedByteArray` data, |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** -Updates a region of ``size_bytes`` bytes, starting at ``offset``, in the buffer, with the specified ``data``. Raises a memory barrier except when ``post_barrier`` is set to :ref:`BARRIER_MASK_NO_BARRIER`. +使用指定的 ``data`` 更新缓冲区中从 ``offset`` 开始的 ``size_bytes`` 字节区块。引发一个内存屏障,除非 ``post_barrier`` 被设置为 :ref:`BARRIER_MASK_NO_BARRIER`\ 。 -Prints an error if: +如果出现以下情况,则打印错误: -- the region specified by ``offset`` + ``size_bytes`` exceeds the buffer +- ``offset`` + ``size_bytes`` 指定的区块超出该缓冲区 -- a draw list is currently active (created by :ref:`draw_list_begin`) +- 绘制列表当前处于活动状态(由 :ref:`draw_list_begin` 创建) -- a compute list is currently active (created by :ref:`compute_list_begin`) +- 计算列表当前处于活动状态(由 :ref:`compute_list_begin` 创建) .. rst-class:: classref-item-separator @@ -4411,7 +4413,7 @@ void **capture_timestamp** **(** :ref:`String` name **)** void **compute_list_add_barrier** **(** :ref:`int` compute_list **)** -Raises a Vulkan compute barrier in the specified ``compute_list``. +在指定的 ``compute_list`` 中引发 Vulkan 计算屏障。 .. rst-class:: classref-item-separator @@ -4455,7 +4457,7 @@ Raises a Vulkan compute barrier in the specified ``compute_list``. void **compute_list_bind_compute_pipeline** **(** :ref:`int` compute_list, :ref:`RID` compute_pipeline **)** -Tells the GPU what compute pipeline to use when processing the compute list. If the shader has changed since the last time this function was called, Godot will unbind all descriptor sets and will re-bind them inside :ref:`compute_list_dispatch`. +告诉 GPU 在处理计算列表时使用什么计算管道。如果自上次调用该函数以来着色器发生了更改,Godot 将取消绑定所有描述符集,并在 :ref:`compute_list_dispatch` 中重新绑定它们。 .. rst-class:: classref-item-separator @@ -4467,7 +4469,7 @@ Tells the GPU what compute pipeline to use when processing the compute list. If void **compute_list_bind_uniform_set** **(** :ref:`int` compute_list, :ref:`RID` uniform_set, :ref:`int` set_index **)** -Binds the ``uniform_set`` to this ``compute_list``. Godot ensures that all textures in the uniform set have the correct Vulkan access masks. If Godot had to change access masks of textures, it will raise a Vulkan image memory barrier. +将 ``uniform_set`` 绑定到该 ``compute_list``\ 。Godot 确保统一集中的所有纹理都具有正确的 Vulkan 访问蒙版。如果 Godot 必须更改纹理的访问蒙版,则会引发 Vulkan 图像内存障碍。 .. rst-class:: classref-item-separator @@ -4626,9 +4628,9 @@ void **draw_command_insert_label** **(** :ref:`String` name, :ref: :ref:`int` **draw_list_begin_for_screen** **(** :ref:`int` screen=0, :ref:`Color` clear_color=Color(0, 0, 0, 1) **)** -High-level variant of :ref:`draw_list_begin`, with the parameters automatically being adjusted for drawing onto the window specified by the ``screen`` ID. +:ref:`draw_list_begin` 的高阶变体,会针对绘制到 ``screen`` ID 指定的窗口上自动调整参数。 -\ **Note:** Cannot be used with local RenderingDevices, as these don't have a screen. If called on a local RenderingDevice, :ref:`draw_list_begin_for_screen` returns :ref:`INVALID_ID`. +\ **注意:**\ 局部 RenderingDevice 没有屏幕,所以无法使用。如果在局部 RenderingDevice 上调用,\ :ref:`draw_list_begin_for_screen` 会返回 :ref:`INVALID_ID`\ 。 .. rst-class:: classref-item-separator @@ -5278,7 +5280,7 @@ RID 使用结束后,应该使用 RenderingDevice 的 :ref:`free_rid` **shader_create_placeholder** **(** **)** -Create a placeholder RID by allocating an RID without initializing it for use in :ref:`shader_create_from_bytecode`. This allows you to create an RID for a shader and pass it around, but defer compiling the shader to a later time. +通过分配 RID 来创建占位符 RID,而不对其进行初始化以供在 :ref:`shader_create_from_bytecode` 中使用。这允许你为着色器创建 RID 并传递它,但将着色器的编译推迟到以后的时间。 .. rst-class:: classref-item-separator @@ -5290,7 +5292,7 @@ Create a placeholder RID by allocating an RID without initializing it for use in :ref:`int` **shader_get_vertex_input_attribute_mask** **(** :ref:`RID` shader **)** -Returns the internal vertex input mask. Internally, the vertex input mask is an unsigned integer consisting of the locations (specified in GLSL via. ``layout(location = ...)``) of the input variables (specified in GLSL by the ``in`` keyword). +返回内部顶点输入掩码。在内部,顶点输入掩码是一个无符号整数,由输入变量(在 GLSL 中通过 ``in`` 关键字指定)的位置(在 GLSL 中通过 ``layout(location = ...)`` 指定)组成。 .. rst-class:: classref-item-separator @@ -5360,9 +5362,9 @@ RID 使用结束后,应该使用 RenderingServer 的 :ref:`free_rid` **texture_clear** **(** :ref:`RID` texture, :ref:`Color` color, :ref:`int` base_mipmap, :ref:`int` mipmap_count, :ref:`int` base_layer, :ref:`int` layer_count, |bitfield|\<:ref:`BarrierMask`\> post_barrier=32767 **)** -将指定的 ``texture`` 清屏,将所有像素替换为指定的颜色 ``color``\ 。\ ``base_mipmap`` 和 ``mipmap_count`` 决定该清屏操作影响纹理的哪个 mipmap,而 ``base_layer`` 和 ``layer_count`` 决定该清屏操作影响 3D 纹理(或纹理数组)的哪一层。如果是 2D 纹理(本来就只有一层),则 ``base_layer`` 和 ``layer_count`` 必须都为 ``0``\ 。 +将指定的 ``texture`` 清屏,将所有像素替换为指定的颜色 ``color``\ 。\ ``base_mipmap`` 和 ``mipmap_count`` 决定该清屏操作影响纹理的哪些 mipmap,而 ``base_layer`` 和 ``layer_count`` 决定该清屏操作影响 3D 纹理(或纹理数组)的哪几层。如果是 2D 纹理(本来就只有一层),则 ``base_layer`` 必须为 ``0``\ ,\ ``layer_count`` 必须为 ``1``\ 。 -\ **注意:**\ 如果使用 ``texture`` 的绘图列表是创建的帧缓冲的一部分,则该纹理不能被清屏。绘图列表释放后(并且使用它的颜色和深度纹理没有被设为 :ref:`FINAL_ACTION_CONTINUE`\ )才能对该纹理做清屏操作。 +\ **注意:**\ 如果使用 ``texture`` 的绘图列表是创建的帧缓冲的一部分,则该纹理不能被清屏。确保绘图列表释放后(并且使用它的颜色和深度纹理没有被设为 :ref:`FINAL_ACTION_CONTINUE`\ )才能对该纹理做清屏操作。 .. rst-class:: classref-item-separator @@ -5406,6 +5408,18 @@ RID 使用结束后,应该使用 RenderingServer 的 :ref:`free_rid` **texture_create_from_extension** **(** :ref:`TextureType` type, :ref:`DataFormat` format, :ref:`TextureSamples` samples, |bitfield|\<:ref:`TextureUsageBits`\> usage_flags, :ref:`int` image, :ref:`int` width, :ref:`int` height, :ref:`int` depth, :ref:`int` layers **)** + +使用给定的 ``type``\ 、\ ``format``\ 、\ ``samples``\ 、\ ``usage_flags``\ 、\ ``width``\ 、\ ``height``\ 、\ ``depth``\ 、和 ``layers`` 返回已有 ``image``\ (\ ``VkImage``\ )的 RID。这可被用于允许 Godot 渲染到外部图像上。 + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingDevice_method_texture_create_shared: .. rst-class:: classref-method @@ -5456,7 +5470,7 @@ RID 使用结束后,应该使用 RenderingServer 的 :ref:`free_rid` **texture_get_format** **(** :ref:`RID` texture **)** -Returns the data format used to create this texture. +返回用于创建该纹理的数据格式。 .. rst-class:: classref-item-separator @@ -5562,9 +5576,9 @@ Returns the data format used to create this texture. :ref:`RID` **uniform_buffer_create** **(** :ref:`int` size_bytes, :ref:`PackedByteArray` data=PackedByteArray() **)** -Creates a new uniform buffer. It can be accessed with the RID that is returned. +新建 uniform 缓冲。可以通过返回的 RID 进行访问。 -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. +RID 使用结束后,应该使用 RenderingDevice 的 :ref:`free_rid` 方法进行释放。 .. rst-class:: classref-item-separator @@ -5576,9 +5590,9 @@ Once finished with your RID, you will want to free the RID using the RenderingDe :ref:`RID` **uniform_set_create** **(** :ref:`RDUniform[]` uniforms, :ref:`RID` shader, :ref:`int` shader_set **)** -Creates a new uniform set. It can be accessed with the RID that is returned. +新建 uniform 集。可以通过返回的 RID 进行访问。 -Once finished with your RID, you will want to free the RID using the RenderingDevice's :ref:`free_rid` method. +RID 使用结束后,应该使用 RenderingDevice 的 :ref:`free_rid` 方法进行释放。 .. rst-class:: classref-item-separator @@ -5590,7 +5604,7 @@ Once finished with your RID, you will want to free the RID using the RenderingDe :ref:`bool` **uniform_set_is_valid** **(** :ref:`RID` uniform_set **)** -Checks if the ``uniform_set`` is valid, i.e. is owned. +检查 ``uniform_set`` 是否有效,即是否有归属。 .. rst-class:: classref-item-separator @@ -5630,10 +5644,10 @@ RID 使用结束后,应该使用 RenderingServer 的 :ref:`free_rid` +**继承:** :ref:`Object` 任何可见的东西的服务器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 渲染服务器是所有可见内容的 API 后端。整个场景系统都挂载在它上面来显示。渲染服务器是完全不透明的:内部实现完全取决于具体的实现,无法进行访问。 @@ -39,15 +39,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用服务器进行优化 <../tutorials/performance/using_servers>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -569,6 +569,8 @@ Methods +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`mesh_surface_get_format_attribute_stride` **(** |bitfield|\<:ref:`ArrayFormat`\> format, :ref:`int` vertex_count **)** |const| | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`mesh_surface_get_format_normal_tangent_stride` **(** |bitfield|\<:ref:`ArrayFormat`\> format, :ref:`int` vertex_count **)** |const| | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`mesh_surface_get_format_offset` **(** |bitfield|\<:ref:`ArrayFormat`\> format, :ref:`int` vertex_count, :ref:`int` array_index **)** |const| | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`mesh_surface_get_format_skin_stride` **(** |bitfield|\<:ref:`ArrayFormat`\> format, :ref:`int` vertex_count **)** |const| | @@ -665,6 +667,8 @@ Methods +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`particles_set_amount` **(** :ref:`RID` particles, :ref:`int` amount **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_amount_ratio` **(** :ref:`RID` particles, :ref:`float` ratio **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`particles_set_collision_base_size` **(** :ref:`RID` particles, :ref:`float` size **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`particles_set_custom_aabb` **(** :ref:`RID` particles, :ref:`AABB` aabb **)** | @@ -677,6 +681,8 @@ Methods +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`particles_set_emission_transform` **(** :ref:`RID` particles, :ref:`Transform3D` transform **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_emitter_velocity` **(** :ref:`RID` particles, :ref:`Vector3` velocity **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`particles_set_emitting` **(** :ref:`RID` particles, :ref:`bool` emitting **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`particles_set_explosiveness_ratio` **(** :ref:`RID` particles, :ref:`float` ratio **)** | @@ -685,6 +691,8 @@ Methods +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`particles_set_fractional_delta` **(** :ref:`RID` particles, :ref:`bool` enable **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`particles_set_interp_to_end` **(** :ref:`RID` particles, :ref:`float` factor **)** | + +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`particles_set_interpolate` **(** :ref:`RID` particles, :ref:`bool` enable **)** | +----------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`particles_set_lifetime` **(** :ref:`RID` particles, :ref:`float` lifetime **)** | @@ -998,8 +1006,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_RenderingServer_signal_frame_post_draw: @@ -1027,8 +1035,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_RenderingServer_TextureLayeredType: @@ -1588,7 +1596,7 @@ flags **ArrayFormat**: :ref:`ArrayFormat` **ARRAY_FLAG_USE_8_BONE_WEIGHTS** = ``134217728`` -Flag used to mark that the array uses 8 bone weights instead of 4. +用于标记数组使用 8 个骨骼权重而不是 4 个的标志。 .. _class_RenderingServer_constant_ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY: @@ -1596,7 +1604,63 @@ Flag used to mark that the array uses 8 bone weights instead of 4. :ref:`ArrayFormat` **ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY** = ``268435456`` +用于标记网格没有顶点数组,而是使用索引和其他信息推断着色器中的顶点位置的标志。 +.. _class_RenderingServer_constant_ARRAY_FLAG_COMPRESS_ATTRIBUTES: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FLAG_COMPRESS_ATTRIBUTES** = ``536870912`` + +用于标记网格正在使用的压缩的属性(顶点、法线、切线、UV)的标志。启用这种形式的压缩后,顶点位置将被打包到 RGBA16UNORM 属性中,并在顶点着色器中进行缩放。法线和切线将被打包到表示一个轴的 RG16UNORM 中,并在顶点的 A 通道中存储一个 16 位浮点数。UV 将使用 16 位标准化浮点数而不是完整的 32 位有符号浮点数。使用该压缩模式时,必须使用顶点、法线、和切线或仅使用顶点。你无法使用没有切线的法线。如果可以的话,导入器将自动启用这种压缩。 + +.. _class_RenderingServer_constant_ARRAY_FLAG_FORMAT_VERSION_BASE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FLAG_FORMAT_VERSION_BASE** = ``35`` + +用于标记被用于存储网格版本的位的起始的标志。 + +.. _class_RenderingServer_constant_ARRAY_FLAG_FORMAT_VERSION_SHIFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FLAG_FORMAT_VERSION_SHIFT** = ``35`` + +用于移动网格格式 int,以将版本带入最低位的标志。 + +.. _class_RenderingServer_constant_ARRAY_FLAG_FORMAT_VERSION_1: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FLAG_FORMAT_VERSION_1** = ``0`` + +用于记录版本引入之前先前网格版本所使用的格式的标志。 + +.. _class_RenderingServer_constant_ARRAY_FLAG_FORMAT_VERSION_2: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FLAG_FORMAT_VERSION_2** = ``34359738368`` + +用于记录第二次迭代的网格版本标志的标志。该版本与 :ref:`ARRAY_FLAG_FORMAT_VERSION_1` 之间的主要区别在于,该版本支持 :ref:`ARRAY_FLAG_COMPRESS_ATTRIBUTES`\ ,并且在该版本中,顶点位置与法线和切线去交错。 + +.. _class_RenderingServer_constant_ARRAY_FLAG_FORMAT_CURRENT_VERSION: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FLAG_FORMAT_CURRENT_VERSION** = ``34359738368`` + +用于记录引擎期望的当前版本的标志。目前这与 :ref:`ARRAY_FLAG_FORMAT_VERSION_2` 相同。 + +.. _class_RenderingServer_constant_ARRAY_FLAG_FORMAT_VERSION_MASK: + +.. rst-class:: classref-enumeration-constant + +:ref:`ArrayFormat` **ARRAY_FLAG_FORMAT_VERSION_MASK** = ``255`` + +使用 :ref:`ARRAY_FLAG_FORMAT_VERSION_SHIFT` 将用于网格版本的位转移到位后,用于隔离这些位的标志。 .. rst-class:: classref-item-separator @@ -2468,7 +2532,7 @@ enum **ParticlesDrawOrder**: :ref:`ParticlesDrawOrder` **PARTICLES_DRAW_ORDER_LIFETIME** = ``1`` -根据粒子的寿命对其进行分类。 +根据粒子的寿命对其进行排序。换句话说,寿命最长的粒子被绘制在前面。 .. _class_RenderingServer_constant_PARTICLES_DRAW_ORDER_REVERSE_LIFETIME: @@ -2476,7 +2540,7 @@ enum **ParticlesDrawOrder**: :ref:`ParticlesDrawOrder` **PARTICLES_DRAW_ORDER_REVERSE_LIFETIME** = ``2`` - +根据粒子寿命的倒数对粒子进行排序。换句话说,寿命最短的粒子被绘制在前面。 .. _class_RenderingServer_constant_PARTICLES_DRAW_ORDER_VIEW_DEPTH: @@ -2702,11 +2766,19 @@ enum **ViewportScaling3DMode**: 对视口的 3D 缓冲区使用 AMD FidelityFX 超分辨率 1.0 放大。可以使用 :ref:`Viewport.scaling_3d_scale` 设置缩放量。小于 ``1.0`` 的值将导致使用 FSR 放大视口。不支持大于 ``1.0`` 的值,将改用双线性降采样。\ ``1.0`` 的值将禁用缩放。 +.. _class_RenderingServer_constant_VIEWPORT_SCALING_3D_MODE_FSR2: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportScaling3DMode` **VIEWPORT_SCALING_3D_MODE_FSR2** = ``2`` + +对视口的 3D 缓冲区使用 AMD FidelityFX 超分辨率 2.2 放大。可以使用 :ref:`Viewport.scaling_3d_scale` 设置缩放量。小于 ``1.0`` 的值将导致使用 FSR2 放大视口。不支持大于 ``1.0`` 的值,将改用双线性降采样。\ ``1.0`` 的值将使用原生分辨率下的 FSR2 作为 TAA 解决方案。 + .. _class_RenderingServer_constant_VIEWPORT_SCALING_3D_MODE_MAX: .. rst-class:: classref-enumeration-constant -:ref:`ViewportScaling3DMode` **VIEWPORT_SCALING_3D_MODE_MAX** = ``2`` +:ref:`ViewportScaling3DMode` **VIEWPORT_SCALING_3D_MODE_MAX** = ``3`` 代表 :ref:`ViewportScaling3DMode` 枚举的大小。 @@ -3220,11 +3292,11 @@ enum **ViewportDebugDraw**: :ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS** = ``10`` -Draws the shadow atlas that stores shadows from :ref:`DirectionalLight3D`\ s in the upper left quadrant of the :ref:`Viewport`. +绘制阴影图集,该阴影图集存储 :ref:`Viewport` 左上象限中 :ref:`DirectionalLight3D` 的阴影。 -The slice of the camera frustum related to the shadow map cascade is superimposed to visualize coverage. The color of each slice matches the colors used for :ref:`VIEWPORT_DEBUG_DRAW_PSSM_SPLITS`. When shadow cascades are blended the overlap is taken into account when drawing the frustum slices. +与阴影贴图级联相关的相机视锥体切片被叠加以可视化覆盖范围。每个切片的颜色与 :ref:`VIEWPORT_DEBUG_DRAW_PSSM_SPLITS` 使用的颜色匹配。当混合阴影级联时,绘制视锥体切片时会考虑重叠。 -The last cascade shows all frustum slices to illustrate the coverage of all slices. +最后一个级联显示了所有视锥体切片,以说明所有切片的覆盖范围。 .. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_SCENE_LUMINANCE: @@ -3346,6 +3418,14 @@ The last cascade shows all frustum slices to illustrate the coverage of all slic 绘制运动向量缓冲。由时间抗锯齿使用,能够修正在游戏过程中发生的运动。 +.. _class_RenderingServer_constant_VIEWPORT_DEBUG_DRAW_INTERNAL_BUFFER: + +.. rst-class:: classref-enumeration-constant + +:ref:`ViewportDebugDraw` **VIEWPORT_DEBUG_DRAW_INTERNAL_BUFFER** = ``26`` + +绘制内部缓冲区而不是常规场景,因此可以看到将被后处理效果使用的每像素输出。 + .. rst-class:: classref-item-separator ---- @@ -5160,8 +5240,8 @@ enum **Features**: .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_RenderingServer_constant_NO_INDEX_ARRAY: @@ -5289,8 +5369,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RenderingServer_property_render_loop_enabled: @@ -5311,8 +5391,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RenderingServer_method_bake_render_uv2: @@ -5332,7 +5412,7 @@ Method Descriptions void **call_on_render_thread** **(** :ref:`Callable` callable **)** -As the RenderingServer actual logic may run on an separate thread, accessing its internals from the main (or any other) thread will result in errors. To make it easier to run code that can safely access the rendering internals (such as :ref:`RenderingDevice` and similar RD classes), push a callable via this function so it will be executed on the render thread. +由于 RenderingServer 实际逻辑可能在单独的线程上运行,因此从主(或任何其他)线程访问其内部将导致错误。为了更轻松地运行可以安全访问渲染内部的代码(例如 :ref:`RenderingDevice` 和类似的 RD 类),请通过该函数推送一个可调用对象,以便它将在渲染线程上执行。 .. rst-class:: classref-item-separator @@ -6148,7 +6228,7 @@ void **canvas_light_occluder_set_as_sdf_collision** **(** :ref:`RID` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -6466,7 +6546,7 @@ void **canvas_set_disable_scale** **(** :ref:`bool` disable **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -7046,7 +7126,7 @@ void **environment_set_ssr_roughness_quality** **(** :ref:`EnvironmentSSRRoughne .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -7182,7 +7262,7 @@ void **force_sync** **(** **)** void **free_rid** **(** :ref:`RID` rid **)** -Tries to free an object in the RenderingServer. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RenderingServer directly. +尝试释放 RenderingServer 中的某个对象。为了避免内存泄漏,应该在使用完对象后调用,因为直接使用 RenderingServer 时不会自动进行内存管理。 .. rst-class:: classref-item-separator @@ -7314,11 +7394,11 @@ Tries to free an object in the RenderingServer. To avoid memory leaks, this shou :ref:`String` **get_video_adapter_name** **(** **)** |const| -Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). +返回视频适配器的名称(例如“GeForce GTX 1080/PCIe/SSE2”)。 -\ **Note:** When running a headless or server binary, this function returns an empty string. +\ **注意:**\ 运行无头或服务器二进制文件时,该函数返回空字符串。 -\ **Note:** On the web platform, some browsers such as Firefox may report a different, fixed GPU name such as "GeForce GTX 980" (regardless of the user's actual GPU model). This is done to make fingerprinting more difficult. +\ **注意:**\ 在 web 平台上,某些浏览器(例如 Firefox)可能会报告不同的固定 GPU 名称,例如“GeForce GTX 980”(无论用户的实际 GPU 型号如何)。这样做是为了使指纹识别更加困难。 .. rst-class:: classref-item-separator @@ -8110,7 +8190,7 @@ RID 使用结束后,应该使用 RenderingServer 的 :ref:`free_rid`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -8124,7 +8204,7 @@ RID 使用结束后,应该使用 RenderingServer 的 :ref:`free_rid`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -8138,7 +8218,7 @@ RID 使用结束后,应该使用 RenderingServer 的 :ref:`free_rid`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -8152,7 +8232,7 @@ RID 使用结束后,应该使用 RenderingServer 的 :ref:`free_rid`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -8178,7 +8258,7 @@ void **lightmap_set_probe_bounds** **(** :ref:`RID` lightmap, :ref:`A .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -8192,7 +8272,7 @@ void **lightmap_set_probe_capture_data** **(** :ref:`RID` lightmap, : .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -8206,7 +8286,7 @@ void **lightmap_set_probe_capture_update_speed** **(** :ref:`float` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -8220,7 +8300,7 @@ void **lightmap_set_probe_interior** **(** :ref:`RID` lightmap, :ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -8334,7 +8414,7 @@ void **mesh_add_surface** **(** :ref:`RID` mesh, :ref:`Dictionary`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -8348,7 +8428,7 @@ void **mesh_add_surface_from_arrays** **(** :ref:`RID` mesh, :ref:`Pr .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -8392,7 +8472,7 @@ RID 使用结束后,应该使用 RenderingServer 的 :ref:`free_rid`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -8442,7 +8522,7 @@ RID 使用结束后,应该使用 RenderingServer 的 :ref:`free_rid`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -8492,7 +8572,7 @@ void **mesh_set_shadow_mesh** **(** :ref:`RID` mesh, :ref:`RID`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -8528,9 +8608,19 @@ void **mesh_set_shadow_mesh** **(** :ref:`RID` mesh, :ref:`RID` **mesh_surface_get_format_attribute_stride** **(** |bitfield|\<:ref:`ArrayFormat`\> format, :ref:`int` vertex_count **)** |const| -.. container:: contribute +返回具有给定 ``format`` 的网格的属性缓冲区的步幅。 - There is currently no description for this method. Please help us by :ref:`contributing one `! +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderingServer_method_mesh_surface_get_format_normal_tangent_stride: + +.. rst-class:: classref-method + +:ref:`int` **mesh_surface_get_format_normal_tangent_stride** **(** |bitfield|\<:ref:`ArrayFormat`\> format, :ref:`int` vertex_count **)** |const| + +返回具有给定 ``format`` 的网格的组合法线和切线的步幅。重要的是请注意,虽然法线和切线位于带有顶点的顶点缓冲区中,但它们仅彼此交错,因此具有与顶点位置不同的步幅。 .. rst-class:: classref-item-separator @@ -8542,9 +8632,7 @@ void **mesh_set_shadow_mesh** **(** :ref:`RID` mesh, :ref:`RID` **mesh_surface_get_format_offset** **(** |bitfield|\<:ref:`ArrayFormat`\> format, :ref:`int` vertex_count, :ref:`int` array_index **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +返回由 ``array_index`` 给定属性在其各自缓冲区开头的偏移量。 .. rst-class:: classref-item-separator @@ -8556,9 +8644,7 @@ void **mesh_set_shadow_mesh** **(** :ref:`RID` mesh, :ref:`RID` **mesh_surface_get_format_skin_stride** **(** |bitfield|\<:ref:`ArrayFormat`\> format, :ref:`int` vertex_count **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +返回具有给定 ``format`` 的网格的皮肤缓冲区的步幅。 .. rst-class:: classref-item-separator @@ -8570,9 +8656,7 @@ void **mesh_set_shadow_mesh** **(** :ref:`RID` mesh, :ref:`RID` **mesh_surface_get_format_vertex_stride** **(** |bitfield|\<:ref:`ArrayFormat`\> format, :ref:`int` vertex_count **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +返回具有给定 ``format`` 的网格的顶点位置的步幅。请注意,重要的是,顶点位置是连续存储的,并且不与顶点缓冲区中的其他属性(法线和切线)交错。 .. rst-class:: classref-item-separator @@ -8610,7 +8694,7 @@ void **mesh_surface_update_attribute_region** **(** :ref:`RID` mesh, .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -8624,7 +8708,7 @@ void **mesh_surface_update_skin_region** **(** :ref:`RID` mesh, :ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -8638,7 +8722,7 @@ void **mesh_surface_update_vertex_region** **(** :ref:`RID` mesh, :re .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -8652,7 +8736,7 @@ void **multimesh_allocate_data** **(** :ref:`RID` multimesh, :ref:`in .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -9169,6 +9253,18 @@ void **particles_set_amount** **(** :ref:`RID` particles, :ref:`int` particles, :ref:`float` ratio **)** + +设置要被发射的粒子的数量比率。相当于 :ref:`GPUParticles3D.amount_ratio`\ 。 + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_particles_set_collision_base_size: .. rst-class:: classref-method @@ -9177,7 +9273,7 @@ void **particles_set_collision_base_size** **(** :ref:`RID` particles .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -9243,6 +9339,18 @@ void **particles_set_emission_transform** **(** :ref:`RID` particles, ---- +.. _class_RenderingServer_method_particles_set_emitter_velocity: + +.. rst-class:: classref-method + +void **particles_set_emitter_velocity** **(** :ref:`RID` particles, :ref:`Vector3` velocity **)** + +设置粒子节点的速度,将由 :ref:`ParticleProcessMaterial.inherit_velocity_ratio` 使用。 + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_particles_set_emitting: .. rst-class:: classref-method @@ -9291,6 +9399,18 @@ void **particles_set_fractional_delta** **(** :ref:`RID` particles, : ---- +.. _class_RenderingServer_method_particles_set_interp_to_end: + +.. rst-class:: classref-method + +void **particles_set_interp_to_end** **(** :ref:`RID` particles, :ref:`float` factor **)** + +设置通知 :ref:`ParticleProcessMaterial` 将所有粒子冲向其生命周期终点的值。 + +.. rst-class:: classref-item-separator + +---- + .. _class_RenderingServer_method_particles_set_interpolate: .. rst-class:: classref-method @@ -9299,7 +9419,7 @@ void **particles_set_interpolate** **(** :ref:`RID` particles, :ref:` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -9399,7 +9519,7 @@ void **particles_set_subemitter** **(** :ref:`RID` particles, :ref:`R .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -9413,7 +9533,7 @@ void **particles_set_trail_bind_poses** **(** :ref:`RID` particles, : .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -9439,7 +9559,7 @@ void **particles_set_transform_align** **(** :ref:`RID` particles, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -9867,7 +9987,7 @@ void **skeleton_allocate_data** **(** :ref:`RID` skeleton, :ref:`int< .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -9955,7 +10075,7 @@ void **skeleton_set_base_transform_2d** **(** :ref:`RID` skeleton, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10237,7 +10357,7 @@ void **texture_3d_update** **(** :ref:`RID` texture, :ref:`Image[]` **texture_get_format** **(** :ref:`RID` texture **)** |const| -Returns the :ref:`Format` for the texture. +返回该纹理的 :ref:`Format`\ 。 .. rst-class:: classref-item-separator @@ -10265,7 +10385,7 @@ Returns the :ref:`Format` for the texture. .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10313,7 +10433,7 @@ void **texture_proxy_update** **(** :ref:`RID` texture, :ref:`RID` **texture_rd_create** **(** :ref:`RID` rd_texture, :ref:`TextureLayeredType` layer_type=0 **)** -Creates a new texture object based on a texture created directly on the :ref:`RenderingDevice`. If the texture contains layers, ``layer_type`` is used to define the layer type. +基于直接在 :ref:`RenderingDevice` 上创建的纹理创建新的纹理对象。如果该纹理包含图层,则 ``layer_type`` 被用于定义图层类型。 .. rst-class:: classref-item-separator @@ -10339,7 +10459,7 @@ void **texture_set_force_redraw_if_visible** **(** :ref:`RID` texture .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10353,7 +10473,7 @@ void **texture_set_path** **(** :ref:`RID` texture, :ref:`String`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10367,7 +10487,7 @@ void **texture_set_size_override** **(** :ref:`RID` texture, :ref:`in .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -10958,9 +11078,9 @@ void **viewport_set_use_debanding** **(** :ref:`RID` viewport, :ref:` void **viewport_set_use_hdr_2d** **(** :ref:`RID` viewport, :ref:`bool` enabled **)** -If ``true``, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be a ``RGBA16`` framebuffer, while when using the Mobile renderer it will be a ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. This setting has the same effect as :ref:`Viewport.use_hdr_2d`. +如果为 ``true``\ ,2D 渲染将使用与 3D 帧缓冲区的位深度匹配的高动态范围(HDR)格式帧缓冲区。当使用 Forward+ 渲染器时,这将是一个 ``RGBA16`` 帧缓冲区,而当使用 Mobile 渲染器时,它将是一个 ``RGB10_A2`` 帧缓冲区。此外,2D 渲染将在线性色彩空间中进行,并在位块传输到屏幕之前(如果视口被连接到屏幕)立即转换为 sRGB 空间。实际上,这意味着视口的最终结果不会被钳制在 ``0-1`` 范围内,并且可以在不进行色彩空间调整的情况下被用于 3D 渲染。这使得 2D 渲染能够利用需要高动态范围的效果(例如 2D 辉光),并显著改善需要高度详细渐变的效果的外观。该设置与 :ref:`Viewport.use_hdr_2d` 效果相同。 -\ **Note:** This setting will have no effect when using the GL Compatibility renderer as the GL Compatibility renderer always renders in low dynamic range for performance reasons. +\ **注意:**\ 使用 GL 兼容渲染器时,该设置无效,因为出于性能原因,GL 兼容渲染器始终在低动态范围内渲染。 .. rst-class:: classref-item-separator @@ -11052,7 +11172,7 @@ void **visibility_notifier_set_aabb** **(** :ref:`RID` notifier, :ref .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -11066,7 +11186,7 @@ void **visibility_notifier_set_callbacks** **(** :ref:`RID` notifier, .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -11080,7 +11200,7 @@ void **voxel_gi_allocate_data** **(** :ref:`RID` voxel_gi, :ref:`Tran .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -11110,7 +11230,7 @@ RID 使用结束后,应该使用 RenderingServer 的 :ref:`free_rid`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -11124,7 +11244,7 @@ RID 使用结束后,应该使用 RenderingServer 的 :ref:`free_rid`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -11138,7 +11258,7 @@ RID 使用结束后,应该使用 RenderingServer 的 :ref:`free_rid`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -11152,7 +11272,7 @@ RID 使用结束后,应该使用 RenderingServer 的 :ref:`free_rid`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -11166,7 +11286,7 @@ RID 使用结束后,应该使用 RenderingServer 的 :ref:`free_rid`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -11180,7 +11300,7 @@ RID 使用结束后,应该使用 RenderingServer 的 :ref:`free_rid`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -11290,10 +11410,10 @@ void **voxel_gi_set_use_two_bounces** **(** :ref:`RID` voxel_gi, :ref 为 :ref:`RID` 为 ``voxel_gi`` 的对象设置 :ref:`VoxelGIData.use_two_bounces` 值。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_renderscenebuffers.rst b/classes/zh_CN/class_renderscenebuffers.rst index c72d1ccc7f..9fc1e4d2d7 100644 --- a/classes/zh_CN/class_renderscenebuffers.rst +++ b/classes/zh_CN/class_renderscenebuffers.rst @@ -10,25 +10,25 @@ RenderSceneBuffers ================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`RenderSceneBuffersExtension`, :ref:`RenderSceneBuffersRD` +**派生:** :ref:`RenderSceneBuffersExtension`, :ref:`RenderSceneBuffersRD` -Abstract scene buffers object, created for each viewport for which 3D rendering is done. +抽象场景缓冲对象,为完成 3D 渲染的每个视口创建。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Abstract scene buffers object, created for each viewport for which 3D rendering is done. It manages any additional buffers used during rendering and will discard buffers when the viewport is resized. +抽象场景缓冲对象,为完成 3D 渲染的每个视口创建。它管理渲染期间使用的任何额外缓冲区,并在调整视口大小时丢弃缓冲区。 -\ **Note:** this is an internal rendering server object only exposed for GDExtension plugins. +\ **注意:**\ 这是一个仅为 GDExtension 插件公开的内部渲染服务器对象。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RenderSceneBuffers_method_configure: @@ -52,12 +52,12 @@ Method Descriptions void **configure** **(** :ref:`RenderSceneBuffersConfiguration` config **)** -This method is called by the rendering server when the associated viewports configuration is changed. It will discard the old buffers and recreate the internal buffers used. +当关联的视口配置更改时,渲染服务器会调用该方法。它将丢弃旧的缓冲区并重新创建使用的内部缓冲区。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_renderscenebuffersconfiguration.rst b/classes/zh_CN/class_renderscenebuffersconfiguration.rst index e445a3ddd2..cc656ff790 100644 --- a/classes/zh_CN/class_renderscenebuffersconfiguration.rst +++ b/classes/zh_CN/class_renderscenebuffersconfiguration.rst @@ -10,21 +10,21 @@ RenderSceneBuffersConfiguration =============================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -Configuration object used to setup a :ref:`RenderSceneBuffers` object. +用于设置 :ref:`RenderSceneBuffers` 对象的配置对象。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This configuration object is created and populated by the render engine on a viewport change and used to (re)configure a :ref:`RenderSceneBuffers` object. +该配置对象由渲染引擎在视口更改时创建和填充,并用于(重新)配置 :ref:`RenderSceneBuffers` 对象。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RenderSceneBuffersConfiguration_property_fsr_sharpness: @@ -69,7 +69,7 @@ Property Descriptions - void **set_fsr_sharpness** **(** :ref:`float` value **)** - :ref:`float` **get_fsr_sharpness** **(** **)** -FSR Sharpness applicable if FSR upscaling is used. +如果使用 FSR 放大,则 FSR 锐度适用。 .. rst-class:: classref-item-separator @@ -86,7 +86,7 @@ FSR Sharpness applicable if FSR upscaling is used. - void **set_internal_size** **(** :ref:`Vector2i` value **)** - :ref:`Vector2i` **get_internal_size** **(** **)** -The size of the 3D render buffer used for rendering. +用于渲染的 3D 渲染缓冲区的大小。 .. rst-class:: classref-item-separator @@ -103,7 +103,7 @@ The size of the 3D render buffer used for rendering. - void **set_msaa_3d** **(** :ref:`ViewportMSAA` value **)** - :ref:`ViewportMSAA` **get_msaa_3d** **(** **)** -The MSAA mode we're using for 3D rendering. +用于 3D 渲染的 MSAA 模式。 .. rst-class:: classref-item-separator @@ -120,7 +120,7 @@ The MSAA mode we're using for 3D rendering. - void **set_render_target** **(** :ref:`RID` value **)** - :ref:`RID` **get_render_target** **(** **)** -The render target associated with these buffer. +与这些缓冲区关联的渲染目标。 .. rst-class:: classref-item-separator @@ -137,7 +137,7 @@ The render target associated with these buffer. - void **set_scaling_3d_mode** **(** :ref:`ViewportScaling3DMode` value **)** - :ref:`ViewportScaling3DMode` **get_scaling_3d_mode** **(** **)** -The requested scaling mode with which we upscale/downscale if :ref:`internal_size` and :ref:`target_size` are not equal. +如果 :ref:`internal_size` 和 :ref:`target_size` 不相等,则将使用所请求的缩放模式进行放大/缩小。 .. rst-class:: classref-item-separator @@ -154,7 +154,7 @@ The requested scaling mode with which we upscale/downscale if :ref:`internal_siz - void **set_screen_space_aa** **(** :ref:`ViewportScreenSpaceAA` value **)** - :ref:`ViewportScreenSpaceAA` **get_screen_space_aa** **(** **)** -The requested screen space AA applied in post processing. +请求在后期处理中应用的屏幕空间抗锯齿。 .. rst-class:: classref-item-separator @@ -171,7 +171,7 @@ The requested screen space AA applied in post processing. - void **set_target_size** **(** :ref:`Vector2i` value **)** - :ref:`Vector2i` **get_target_size** **(** **)** -The target (upscale) size if scaling is used. +使用缩放时的目标(放大)大小。 .. rst-class:: classref-item-separator @@ -188,7 +188,7 @@ The target (upscale) size if scaling is used. - void **set_texture_mipmap_bias** **(** :ref:`float` value **)** - :ref:`float` **get_texture_mipmap_bias** **(** **)** -Bias applied to mipmaps. +应用于 mipmap 的偏置。 .. rst-class:: classref-item-separator @@ -205,12 +205,12 @@ Bias applied to mipmaps. - void **set_view_count** **(** :ref:`int` value **)** - :ref:`int` **get_view_count** **(** **)** -The number of views we're rendering. +渲染的视图数。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_renderscenebuffersextension.rst b/classes/zh_CN/class_renderscenebuffersextension.rst index 58a90fd824..2f179ab3e3 100644 --- a/classes/zh_CN/class_renderscenebuffersextension.rst +++ b/classes/zh_CN/class_renderscenebuffersextension.rst @@ -10,34 +10,34 @@ RenderSceneBuffersExtension =========================== -**Inherits:** :ref:`RenderSceneBuffers` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RenderSceneBuffers` **<** :ref:`RefCounted` **<** :ref:`Object` -This class allows for a RenderSceneBuffer implementation to be made in GDExtension. +该类允许在 GDExtension 中实现 RenderSceneBuffer。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This class allows for a RenderSceneBuffer implementation to be made in GDExtension. +该类允许在 GDExtension 中实现 RenderSceneBuffer。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_configure` **(** :ref:`RenderSceneBuffersConfiguration` config **)** |virtual| | - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_fsr_sharpness` **(** :ref:`float` fsr_sharpness **)** |virtual| | - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_texture_mipmap_bias` **(** :ref:`float` texture_mipmap_bias **)** |virtual| | - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_use_debanding` **(** :ref:`bool` use_debanding **)** |virtual| | - +------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_configure` **(** :ref:`RenderSceneBuffersConfiguration` config **)** |virtual| | + +------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_fsr_sharpness` **(** :ref:`float` fsr_sharpness **)** |virtual| | + +------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_texture_mipmap_bias` **(** :ref:`float` texture_mipmap_bias **)** |virtual| | + +------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_use_debanding` **(** :ref:`bool` use_debanding **)** |virtual| | + +------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -45,57 +45,57 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_RenderSceneBuffersExtension_method__configure: +.. _class_RenderSceneBuffersExtension_private_method__configure: .. rst-class:: classref-method void **_configure** **(** :ref:`RenderSceneBuffersConfiguration` config **)** |virtual| -Implement this in GDExtension to handle the (re)sizing of a viewport. +在 GDExtension 中实现它来处理视口的(重新)大小调整。 .. rst-class:: classref-item-separator ---- -.. _class_RenderSceneBuffersExtension_method__set_fsr_sharpness: +.. _class_RenderSceneBuffersExtension_private_method__set_fsr_sharpness: .. rst-class:: classref-method void **_set_fsr_sharpness** **(** :ref:`float` fsr_sharpness **)** |virtual| -Implement this in GDExtension to record a new FSR sharpness value. +在 GDExtension 中实现该功能以记录新的 FSR 锐度值。 .. rst-class:: classref-item-separator ---- -.. _class_RenderSceneBuffersExtension_method__set_texture_mipmap_bias: +.. _class_RenderSceneBuffersExtension_private_method__set_texture_mipmap_bias: .. rst-class:: classref-method void **_set_texture_mipmap_bias** **(** :ref:`float` texture_mipmap_bias **)** |virtual| -Implement this in GDExtension to change the texture mipmap bias. +在 GDExtension 中实现该功能以更改纹理多级渐远纹理偏置。 .. rst-class:: classref-item-separator ---- -.. _class_RenderSceneBuffersExtension_method__set_use_debanding: +.. _class_RenderSceneBuffersExtension_private_method__set_use_debanding: .. rst-class:: classref-method void **_set_use_debanding** **(** :ref:`bool` use_debanding **)** |virtual| -Implement this in GDExtension to react to the debanding flag changing. +在 GDExtension 中实现该功能以对去色带标志的更改做出反应。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_renderscenebuffersrd.rst b/classes/zh_CN/class_renderscenebuffersrd.rst index 3fcad41630..ec8491204e 100644 --- a/classes/zh_CN/class_renderscenebuffersrd.rst +++ b/classes/zh_CN/class_renderscenebuffersrd.rst @@ -10,27 +10,27 @@ RenderSceneBuffersRD ==================== -**Inherits:** :ref:`RenderSceneBuffers` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RenderSceneBuffers` **<** :ref:`RefCounted` **<** :ref:`Object` -Abstract render scene buffer implementation for the RenderingDevice based renderers. +RenderingDevice 基于的渲染器的抽象渲染场景缓冲区实现。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This object manages all 3D rendering buffers for the rendering device based renderers. An instance of this object is created for every viewport that has 3D rendering enabled. +该对象管理基于渲染设备的渲染器的所有 3D 渲染缓冲区。为每个启用 3D 渲染的视口创建该对象的实例。 -All buffers are organized in **contexts**. The default context is called **render_buffers** and can contain amongst others the color buffer, depth buffer, velocity buffers, VRS density map and MSAA variants of these buffers. +所有缓冲区都被组织在\ **上下文**\ 中。默认上下文被称为 **render_buffers**\ ,可以包含颜色缓冲区、深度缓冲区、速度缓冲区、VRS 密度图和这些缓冲区的 MSAA 变体等。 -Buffers are only guaranteed to exist during rendering of the viewport. +缓冲区仅保证在视口渲染期间存在。 -\ **Note:** this is an internal rendering server object only exposed for GDExtension plugins. +\ **注意:**\ 这是一个仅为 GDExtension 插件公开的内部渲染服务器对象。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -64,6 +64,8 @@ Methods +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`get_texture_slice_size` **(** :ref:`StringName` context, :ref:`StringName` name, :ref:`int` mipmap **)** | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_texture_slice_view` **(** :ref:`StringName` context, :ref:`StringName` name, :ref:`int` layer, :ref:`int` mipmap, :ref:`int` layers, :ref:`int` mipmaps, :ref:`RDTextureView` view **)** | + +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_use_taa` **(** **)** |const| | +-----------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_velocity_layer` **(** :ref:`int` layer **)** | @@ -81,8 +83,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RenderSceneBuffersRD_method_clear_context: @@ -90,7 +92,7 @@ Method Descriptions void **clear_context** **(** :ref:`StringName` context **)** -Frees all buffers related to this context. +释放与这个上下文相关的所有缓冲。 .. rst-class:: classref-item-separator @@ -102,7 +104,7 @@ Frees all buffers related to this context. :ref:`RID` **create_texture** **(** :ref:`StringName` context, :ref:`StringName` name, :ref:`DataFormat` data_format, :ref:`int` usage_bits, :ref:`TextureSamples` texture_samples, :ref:`Vector2i` size, :ref:`int` layers, :ref:`int` mipmaps, :ref:`bool` unique **)** -Create a new texture with the given definition and cache this under the given name. Will return the existing texture if it already exists. +使用给定的定义创建一个新纹理,并将其缓存在给定的名称下。如果已有纹理已经存在,则返回该已有纹理。 .. rst-class:: classref-item-separator @@ -114,7 +116,7 @@ Create a new texture with the given definition and cache this under the given na :ref:`RID` **create_texture_from_format** **(** :ref:`StringName` context, :ref:`StringName` name, :ref:`RDTextureFormat` format, :ref:`RDTextureView` view, :ref:`bool` unique **)** -Create a new texture using the given format and view and cache this under the given name. Will return the existing texture if it already exists. +使用给定的格式创建一个新纹理,并在给定的名称下查看和缓存它。如果已有纹理已经存在,则返回该已有纹理。 .. rst-class:: classref-item-separator @@ -126,7 +128,7 @@ Create a new texture using the given format and view and cache this under the gi :ref:`RID` **create_texture_view** **(** :ref:`StringName` context, :ref:`StringName` name, :ref:`StringName` view_name, :ref:`RDTextureView` view **)** -Create a new texture view for an existing texture and cache this under the given view_name. Will return the existing teture view if it already exists. Will error if the source texture doesn't exist. +为已有纹理创建一个新的纹理视图,并将其缓存在给定的 view_name 下。如果已有的纹理视图已经存在,则返回该视图。如果源纹理不存在,将会出错。 .. rst-class:: classref-item-separator @@ -138,7 +140,7 @@ Create a new texture view for an existing texture and cache this under the given :ref:`RID` **get_color_layer** **(** :ref:`int` layer **)** -Returns the specified layer from the color texture we are rendering 3D content to. +从渲染 3D 内容的颜色纹理返回指定的图层。 .. rst-class:: classref-item-separator @@ -150,7 +152,7 @@ Returns the specified layer from the color texture we are rendering 3D content t :ref:`RID` **get_color_texture** **(** **)** -Returns the color texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. +返回渲染 3D 内容的颜色纹理。如果使用多视图,这将是一个包含所有视图的纹理数组。 .. rst-class:: classref-item-separator @@ -162,7 +164,7 @@ Returns the color texture we are rendering 3D content to. If multiview is used t :ref:`RID` **get_depth_layer** **(** :ref:`int` layer **)** -Returns the specified layer from the depth texture we are rendering 3D content to. +从渲染 3D 内容的深度纹理返回指定的图层。 .. rst-class:: classref-item-separator @@ -174,7 +176,7 @@ Returns the specified layer from the depth texture we are rendering 3D content t :ref:`RID` **get_depth_texture** **(** **)** -Returns the depth texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. +返回渲染 3D 内容的深度纹理。如果使用多视图,这将是一个包含所有视图的纹理数组。 .. rst-class:: classref-item-separator @@ -186,7 +188,7 @@ Returns the depth texture we are rendering 3D content to. If multiview is used t :ref:`Vector2i` **get_internal_size** **(** **)** |const| -Returns the internal size of the render buffer (size before upscaling) with which textures are created by default. +返回默认情况下创建纹理的渲染缓冲区的内部大小(放大之前的大小)。 .. rst-class:: classref-item-separator @@ -198,7 +200,7 @@ Returns the internal size of the render buffer (size before upscaling) with whic :ref:`RID` **get_render_target** **(** **)** |const| -Returns the render target associated with this buffers object. +返回与该缓冲区对象关联的渲染目标。 .. rst-class:: classref-item-separator @@ -210,7 +212,7 @@ Returns the render target associated with this buffers object. :ref:`RID` **get_texture** **(** :ref:`StringName` context, :ref:`StringName` name **)** |const| -Returns a cached texture with this name. +返回具有该名称的缓存纹理。 .. rst-class:: classref-item-separator @@ -222,7 +224,7 @@ Returns a cached texture with this name. :ref:`RDTextureFormat` **get_texture_format** **(** :ref:`StringName` context, :ref:`StringName` name **)** |const| -Returns the texture format information with which a cached texture was created. +返回用于创建缓存纹理的纹理格式信息。 .. rst-class:: classref-item-separator @@ -234,7 +236,7 @@ Returns the texture format information with which a cached texture was created. :ref:`RID` **get_texture_slice** **(** :ref:`StringName` context, :ref:`StringName` name, :ref:`int` layer, :ref:`int` mipmap, :ref:`int` layers, :ref:`int` mipmaps **)** -Returns a specific slice (layer or mipmap) for a cached texture. +返回缓存纹理的指定切片(层或 mipmap)。 .. rst-class:: classref-item-separator @@ -246,7 +248,19 @@ Returns a specific slice (layer or mipmap) for a cached texture. :ref:`Vector2i` **get_texture_slice_size** **(** :ref:`StringName` context, :ref:`StringName` name, :ref:`int` mipmap **)** -Returns the texture size of a given slice of a cached texture. +返回缓存纹理给定切片的纹理大小。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_RenderSceneBuffersRD_method_get_texture_slice_view: + +.. rst-class:: classref-method + +:ref:`RID` **get_texture_slice_view** **(** :ref:`StringName` context, :ref:`StringName` name, :ref:`int` layer, :ref:`int` mipmap, :ref:`int` layers, :ref:`int` mipmaps, :ref:`RDTextureView` view **)** + +返回缓存纹理的指定切片视图(层或 mipmap)。 .. rst-class:: classref-item-separator @@ -258,7 +272,7 @@ Returns the texture size of a given slice of a cached texture. :ref:`bool` **get_use_taa** **(** **)** |const| -Returns ``true`` if TAA is enabled. +如果启用 TAA,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -270,7 +284,7 @@ Returns ``true`` if TAA is enabled. :ref:`RID` **get_velocity_layer** **(** :ref:`int` layer **)** -Returns the specified layer from the velocity texture we are rendering 3D content to. +从渲染 3D 内容的速度纹理返回指定的图层。 .. rst-class:: classref-item-separator @@ -282,7 +296,7 @@ Returns the specified layer from the velocity texture we are rendering 3D conten :ref:`RID` **get_velocity_texture** **(** **)** -Returns the velocity texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. +返回渲染 3D 内容的速度纹理。如果使用多视图,这将是一个包含所有视图的纹理数组。 .. rst-class:: classref-item-separator @@ -294,7 +308,7 @@ Returns the velocity texture we are rendering 3D content to. If multiview is use :ref:`int` **get_view_count** **(** **)** |const| -Returns the view count for the associated viewport. +返回关联视口的视图数。 .. rst-class:: classref-item-separator @@ -306,12 +320,12 @@ Returns the view count for the associated viewport. :ref:`bool` **has_texture** **(** :ref:`StringName` context, :ref:`StringName` name **)** |const| -Returns ``true`` if a cached texture exists for this name. +如果存在使用该名称的缓冲纹理,则返回 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resource.rst b/classes/zh_CN/class_resource.rst index d21a8a8757..cf7403b8b6 100644 --- a/classes/zh_CN/class_resource.rst +++ b/classes/zh_CN/class_resource.rst @@ -10,16 +10,16 @@ Resource ======== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`Animation`, :ref:`AnimationLibrary`, :ref:`AnimationNode`, :ref:`AnimationNodeStateMachinePlayback`, :ref:`AnimationNodeStateMachineTransition`, :ref:`AudioBusLayout`, :ref:`AudioEffect`, :ref:`AudioStream`, :ref:`BitMap`, :ref:`BoneMap`, :ref:`ButtonGroup`, :ref:`CameraAttributes`, :ref:`CryptoKey`, :ref:`Curve`, :ref:`Curve2D`, :ref:`Curve3D`, :ref:`EditorNode3DGizmoPlugin`, :ref:`EditorSettings`, :ref:`Environment`, :ref:`Font`, :ref:`GDExtension`, :ref:`GLTFAccessor`, :ref:`GLTFAnimation`, :ref:`GLTFBufferView`, :ref:`GLTFCamera`, :ref:`GLTFDocument`, :ref:`GLTFDocumentExtension`, :ref:`GLTFLight`, :ref:`GLTFMesh`, :ref:`GLTFNode`, :ref:`GLTFPhysicsBody`, :ref:`GLTFPhysicsShape`, :ref:`GLTFSkeleton`, :ref:`GLTFSkin`, :ref:`GLTFSpecGloss`, :ref:`GLTFState`, :ref:`GLTFTexture`, :ref:`GLTFTextureSampler`, :ref:`Gradient`, :ref:`Image`, :ref:`ImporterMesh`, :ref:`InputEvent`, :ref:`JSON`, :ref:`LabelSettings`, :ref:`LightmapGIData`, :ref:`Material`, :ref:`Mesh`, :ref:`MeshLibrary`, :ref:`MissingResource`, :ref:`MultiMesh`, :ref:`NavigationMesh`, :ref:`NavigationMeshSourceGeometryData3D`, :ref:`NavigationPolygon`, :ref:`Noise`, :ref:`Occluder3D`, :ref:`OccluderPolygon2D`, :ref:`OggPacketSequence`, :ref:`OpenXRAction`, :ref:`OpenXRActionMap`, :ref:`OpenXRActionSet`, :ref:`OpenXRInteractionProfile`, :ref:`OpenXRIPBinding`, :ref:`PackedDataContainer`, :ref:`PackedScene`, :ref:`PhysicsMaterial`, :ref:`PolygonPathFinder`, :ref:`RDShaderFile`, :ref:`RDShaderSPIRV`, :ref:`RichTextEffect`, :ref:`SceneReplicationConfig`, :ref:`Script`, :ref:`Shader`, :ref:`ShaderInclude`, :ref:`Shape2D`, :ref:`Shape3D`, :ref:`Shortcut`, :ref:`SkeletonModification2D`, :ref:`SkeletonModificationStack2D`, :ref:`SkeletonProfile`, :ref:`Skin`, :ref:`Sky`, :ref:`SpriteFrames`, :ref:`StyleBox`, :ref:`SyntaxHighlighter`, :ref:`Texture`, :ref:`Theme`, :ref:`TileMapPattern`, :ref:`TileSet`, :ref:`TileSetSource`, :ref:`Translation`, :ref:`VideoStream`, :ref:`VideoStreamPlayback`, :ref:`VisualShaderNode`, :ref:`VoxelGIData`, :ref:`World2D`, :ref:`World3D`, :ref:`X509Certificate` +**派生:** :ref:`Animation`, :ref:`AnimationLibrary`, :ref:`AnimationNode`, :ref:`AnimationNodeStateMachinePlayback`, :ref:`AnimationNodeStateMachineTransition`, :ref:`AudioBusLayout`, :ref:`AudioEffect`, :ref:`AudioStream`, :ref:`BitMap`, :ref:`BoneMap`, :ref:`ButtonGroup`, :ref:`CameraAttributes`, :ref:`CryptoKey`, :ref:`Curve`, :ref:`Curve2D`, :ref:`Curve3D`, :ref:`EditorNode3DGizmoPlugin`, :ref:`EditorSettings`, :ref:`Environment`, :ref:`Font`, :ref:`GDExtension`, :ref:`GLTFAccessor`, :ref:`GLTFAnimation`, :ref:`GLTFBufferView`, :ref:`GLTFCamera`, :ref:`GLTFDocument`, :ref:`GLTFDocumentExtension`, :ref:`GLTFLight`, :ref:`GLTFMesh`, :ref:`GLTFNode`, :ref:`GLTFPhysicsBody`, :ref:`GLTFPhysicsShape`, :ref:`GLTFSkeleton`, :ref:`GLTFSkin`, :ref:`GLTFSpecGloss`, :ref:`GLTFState`, :ref:`GLTFTexture`, :ref:`GLTFTextureSampler`, :ref:`Gradient`, :ref:`Image`, :ref:`ImporterMesh`, :ref:`InputEvent`, :ref:`JSON`, :ref:`LabelSettings`, :ref:`LightmapGIData`, :ref:`Material`, :ref:`Mesh`, :ref:`MeshLibrary`, :ref:`MissingResource`, :ref:`MultiMesh`, :ref:`NavigationMesh`, :ref:`NavigationMeshSourceGeometryData2D`, :ref:`NavigationMeshSourceGeometryData3D`, :ref:`NavigationPolygon`, :ref:`Noise`, :ref:`Occluder3D`, :ref:`OccluderPolygon2D`, :ref:`OggPacketSequence`, :ref:`OpenXRAction`, :ref:`OpenXRActionMap`, :ref:`OpenXRActionSet`, :ref:`OpenXRInteractionProfile`, :ref:`OpenXRIPBinding`, :ref:`PackedDataContainer`, :ref:`PackedScene`, :ref:`PhysicsMaterial`, :ref:`PolygonPathFinder`, :ref:`RDShaderFile`, :ref:`RDShaderSPIRV`, :ref:`RichTextEffect`, :ref:`SceneReplicationConfig`, :ref:`Script`, :ref:`Shader`, :ref:`ShaderInclude`, :ref:`Shape2D`, :ref:`Shape3D`, :ref:`Shortcut`, :ref:`SkeletonModification2D`, :ref:`SkeletonModificationStack2D`, :ref:`SkeletonProfile`, :ref:`Skin`, :ref:`Sky`, :ref:`SpriteFrames`, :ref:`StyleBox`, :ref:`SyntaxHighlighter`, :ref:`Texture`, :ref:`Theme`, :ref:`TileMapPattern`, :ref:`TileSet`, :ref:`TileSetSource`, :ref:`Translation`, :ref:`VideoStream`, :ref:`VideoStreamPlayback`, :ref:`VisualShaderNode`, :ref:`VoxelGIData`, :ref:`World2D`, :ref:`World3D`, :ref:`X509Certificate` 可序列化对象的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 资源是所有 Godot 特定资源类型的基类,主要作为数据容器。因为资源继承自 :ref:`RefCounted`\ ,所以进行了引用计数,不再使用时会被释放。资源也可以嵌套到其他资源里、保存到磁盘上。一旦从磁盘加载,后续尝试使用 :ref:`resource_path` 加载资源时都会返回相同的引用。\ :ref:`PackedScene` 也是一种资源,它是 Godot 项目中最常用的 :ref:`Object` 之一,独特的能力是可以将若干 :ref:`Node` 保存起来、随意进行实例化。 @@ -29,8 +29,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`资源 <../tutorials/scripting/resources>` @@ -38,8 +38,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,14 +54,16 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +---------------------------------+------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_get_rid` **(** **)** |virtual| | + | :ref:`RID` | :ref:`_get_rid` **(** **)** |virtual| | + +---------------------------------+------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_setup_local_to_scene` **(** **)** |virtual| | +---------------------------------+------------------------------------------------------------------------------------------------------------------+ | :ref:`Resource` | :ref:`duplicate` **(** :ref:`bool` subresources=false **)** |const| | +---------------------------------+------------------------------------------------------------------------------------------------------------------+ @@ -82,8 +84,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Resource_signal_changed: @@ -105,7 +107,9 @@ Signals **setup_local_to_scene_requested** **(** **)** -Emitted by the newly duplicated resource with :ref:`resource_local_to_scene` set to ``true``, when the scene is instantiated. Custom behavior can be defined by connecting this signal. +由新复制的资源发出,并将 :ref:`resource_local_to_scene` 设置为 ``true``\ 。 + +\ *已弃用。*\ 该信号仅在创建资源时发出。改为覆盖 :ref:`_setup_local_to_scene`\ 。 .. rst-class:: classref-section-separator @@ -113,8 +117,8 @@ Emitted by the newly duplicated resource with :ref:`resource_local_to_scene` 被设置为 ``true``\ ,则覆盖该方法以自定义从 :ref:`PackedScene.instantiate` 创建的新复制的资源。 + +\ **示例:**\ 为实例化场景中的每个本地资源设置随机 ``damage`` 值。 + +:: + + extends Resource + + var damage = 0 + + func _setup_local_to_scene(): + damage = randi_range(10, 40) + +.. rst-class:: classref-item-separator + +---- + .. _class_Resource_method_duplicate: .. rst-class:: classref-method @@ -200,7 +229,7 @@ Method Descriptions 带有 :ref:`@GlobalScope.PROPERTY_USAGE_ALWAYS_DUPLICATE` 标志的子资源属性始终会被复制,即便 ``subresources`` 为 ``false``\ 。而带有 :ref:`@GlobalScope.PROPERTY_USAGE_NEVER_DUPLICATE` 标志的子资源属性始终不会被复制,即便 ``subresources`` 为 ``true``\ 。 -\ **注意:**\ 对于自定义资源,如果定义 :ref:`Object._init` 时使用了必填的参数,则此方法会失败。 +\ **注意:**\ 对于自定义资源,如果定义 :ref:`Object._init` 时使用了必填的参数,则此方法会失败。 .. rst-class:: classref-item-separator @@ -212,9 +241,9 @@ Method Descriptions void **emit_changed** **(** **)** -Emits the :ref:`changed` signal. This method is called automatically for some built-in resources. +发出 :ref:`changed` 更改信号。某些内置资源会自动调用此方法。 -\ **Note:** For custom resources, it's recommended to call this method whenever a meaningful change occurs, such as a modified property. This ensures that custom :ref:`Object`\ s depending on the resource are properly updated. +\ **注意:**\ 对于自定义资源,推荐在发生任何有意义的变化时都调用此方法,例如修改属性时。这样能够保证依赖于此资源的自定义 :ref:`Object` 能够正确更新其属性。 :: @@ -258,9 +287,9 @@ Emits the :ref:`changed` signal. This method is c void **setup_local_to_scene** **(** **)** -Emits the :ref:`setup_local_to_scene_requested` signal. If :ref:`resource_local_to_scene` is set to ``true``, this method is called from :ref:`PackedScene.instantiate` by the newly duplicated resource within the scene instance. +调用 :ref:`_setup_local_to_scene`\ 。如果 :ref:`resource_local_to_scene` 被设置为 ``true``\ ,则场景实例中新复制的资源会自动从 :ref:`PackedScene.instantiate` 中调用该方法。 -For most resources, this method performs no logic of its own. Custom behavior can be defined by connecting :ref:`setup_local_to_scene_requested` from a script, **not** by overriding this method. +\ *已弃用。*\ 该方法只能被内部调用。使用覆盖 :ref:`_setup_local_to_scene` 代替。 .. rst-class:: classref-item-separator @@ -274,10 +303,10 @@ void **take_over_path** **(** :ref:`String` path **)** 将 :ref:`resource_path` 设置为 ``path``\ ,可能会覆盖这个路径对应的已有缓存条目。后续尝试通过路径加载覆盖后的资源时,会返回这个资源。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceformatloader.rst b/classes/zh_CN/class_resourceformatloader.rst index 29938529df..20200be3dd 100644 --- a/classes/zh_CN/class_resourceformatloader.rst +++ b/classes/zh_CN/class_resourceformatloader.rst @@ -10,14 +10,14 @@ ResourceFormatLoader ==================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 从文件中加载特定资源类型。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- Godot 在编辑器或导出的游戏中使用 ResourceFormatLoaders 来加载资源。它们通过 :ref:`ResourceLoader` 单例自动查询,或在加载具有内部依赖项的资源时自动查询。每种文件类型可以作为不同的资源类型加载,因此在引擎中注册多个 ResourceFormatLoaders。 @@ -27,35 +27,35 @@ Godot 在编辑器或导出的游戏中使用 ResourceFormatLoaders 来加载资 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_exists` **(** :ref:`String` path **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_classes_used` **(** :ref:`String` path **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_dependencies` **(** :ref:`String` path, :ref:`bool` add_types **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_resource_script_class` **(** :ref:`String` path **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_resource_type` **(** :ref:`String` path **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_resource_uid` **(** :ref:`String` path **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_handles_type` **(** :ref:`StringName` type **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_load` **(** :ref:`String` path, :ref:`String` original_path, :ref:`bool` use_sub_threads, :ref:`int` cache_mode **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_recognize_path` **(** :ref:`String` path, :ref:`StringName` type **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_rename_dependencies` **(** :ref:`String` path, :ref:`Dictionary` renames **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_exists` **(** :ref:`String` path **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_classes_used` **(** :ref:`String` path **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_dependencies` **(** :ref:`String` path, :ref:`bool` add_types **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_resource_script_class` **(** :ref:`String` path **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_resource_type` **(** :ref:`String` path **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_resource_uid` **(** :ref:`String` path **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handles_type` **(** :ref:`StringName` type **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_load` **(** :ref:`String` path, :ref:`String` original_path, :ref:`bool` use_sub_threads, :ref:`int` cache_mode **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_recognize_path` **(** :ref:`String` path, :ref:`StringName` type **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_rename_dependencies` **(** :ref:`String` path, :ref:`Dictionary` renames **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -63,8 +63,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_ResourceFormatLoader_CacheMode: @@ -102,10 +102,10 @@ enum **CacheMode**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_ResourceFormatLoader_method__exists: +.. _class_ResourceFormatLoader_private_method__exists: .. rst-class:: classref-method @@ -113,13 +113,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ResourceFormatLoader_method__get_classes_used: +.. _class_ResourceFormatLoader_private_method__get_classes_used: .. rst-class:: classref-method @@ -127,13 +127,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ResourceFormatLoader_method__get_dependencies: +.. _class_ResourceFormatLoader_private_method__get_dependencies: .. rst-class:: classref-method @@ -147,7 +147,7 @@ Method Descriptions ---- -.. _class_ResourceFormatLoader_method__get_recognized_extensions: +.. _class_ResourceFormatLoader_private_method__get_recognized_extensions: .. rst-class:: classref-method @@ -159,7 +159,7 @@ Method Descriptions ---- -.. _class_ResourceFormatLoader_method__get_resource_script_class: +.. _class_ResourceFormatLoader_private_method__get_resource_script_class: .. rst-class:: classref-method @@ -171,7 +171,7 @@ Method Descriptions ---- -.. _class_ResourceFormatLoader_method__get_resource_type: +.. _class_ResourceFormatLoader_private_method__get_resource_type: .. rst-class:: classref-method @@ -185,7 +185,7 @@ Method Descriptions ---- -.. _class_ResourceFormatLoader_method__get_resource_uid: +.. _class_ResourceFormatLoader_private_method__get_resource_uid: .. rst-class:: classref-method @@ -193,13 +193,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ResourceFormatLoader_method__handles_type: +.. _class_ResourceFormatLoader_private_method__handles_type: .. rst-class:: classref-method @@ -213,7 +213,7 @@ Method Descriptions ---- -.. _class_ResourceFormatLoader_method__load: +.. _class_ResourceFormatLoader_private_method__load: .. rst-class:: classref-method @@ -227,7 +227,7 @@ Method Descriptions ---- -.. _class_ResourceFormatLoader_method__recognize_path: +.. _class_ResourceFormatLoader_private_method__recognize_path: .. rst-class:: classref-method @@ -235,13 +235,13 @@ Method Descriptions 判断该加载器是否应对于给定类型从其资源路径加载资源。 -如果未实现,则默认行为是检查路径的扩展名是否在\ :ref:`_get_recognized_extensions`\ 提供的范围内,以及类型是否在\ :ref:`_get_resource_type`\ 提供的范围内。 +如果未实现,则默认行为是检查路径的扩展名是否在\ :ref:`_get_recognized_extensions`\ 提供的范围内,以及类型是否在\ :ref:`_get_resource_type`\ 提供的范围内。 .. rst-class:: classref-item-separator ---- -.. _class_ResourceFormatLoader_method__rename_dependencies: +.. _class_ResourceFormatLoader_private_method__rename_dependencies: .. rst-class:: classref-method @@ -251,10 +251,10 @@ Method Descriptions 成功时返回 :ref:`@GlobalScope.OK`\ ,失败时返回 :ref:`Error` 常量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceformatsaver.rst b/classes/zh_CN/class_resourceformatsaver.rst index a495e95ecc..34864d3106 100644 --- a/classes/zh_CN/class_resourceformatsaver.rst +++ b/classes/zh_CN/class_resourceformatsaver.rst @@ -10,14 +10,14 @@ ResourceFormatSaver =================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 将特定资源类型保存到文件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 当你从编辑器执行此操作或使用 :ref:`ResourceSaver` 单例时,引擎可以节省资源。这要归功于多个 **ResourceFormatSaver**\ ,每个都处理自己的格式并由引擎自动调用。 @@ -25,23 +25,23 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** :ref:`Resource` resource **)** |virtual| |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_recognize` **(** :ref:`Resource` resource **)** |virtual| |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_recognize_path` **(** :ref:`Resource` resource, :ref:`String` path **)** |virtual| |const| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_save` **(** :ref:`Resource` resource, :ref:`String` path, :ref:`int` flags **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_set_uid` **(** :ref:`String` path, :ref:`int` uid **)** |virtual| | - +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** :ref:`Resource` resource **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_recognize` **(** :ref:`Resource` resource **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_recognize_path` **(** :ref:`Resource` resource, :ref:`String` path **)** |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_save` **(** :ref:`Resource` resource, :ref:`String` path, :ref:`int` flags **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_set_uid` **(** :ref:`String` path, :ref:`int` uid **)** |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -49,22 +49,22 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_ResourceFormatSaver_method__get_recognized_extensions: +.. _class_ResourceFormatSaver_private_method__get_recognized_extensions: .. rst-class:: classref-method :ref:`PackedStringArray` **_get_recognized_extensions** **(** :ref:`Resource` resource **)** |virtual| |const| -返回可用于保存资源对象的扩展名列表,前提是该资源对象已被识别(请参见\ :ref:`_recognize`\ )。 +返回可用于保存资源对象的扩展名列表,前提是该资源对象已被识别(见 :ref:`_recognize`\ )。 .. rst-class:: classref-item-separator ---- -.. _class_ResourceFormatSaver_method__recognize: +.. _class_ResourceFormatSaver_private_method__recognize: .. rst-class:: classref-method @@ -76,7 +76,7 @@ Method Descriptions ---- -.. _class_ResourceFormatSaver_method__recognize_path: +.. _class_ResourceFormatSaver_private_method__recognize_path: .. rst-class:: classref-method @@ -84,13 +84,13 @@ Method Descriptions 如果该saver可以处理给定的保存路径,则返回\ ``true``\ ,否则返回\ ``false``\ 。 -如果未实现该方法,则默认行为是检查路径的扩展名是否在\ :ref:`_get_recognized_extensions`\ 提供的范围内。 +如果未实现该方法,则默认行为是检查路径的扩展名是否在\ :ref:`_get_recognized_extensions`\ 提供的范围内。 .. rst-class:: classref-item-separator ---- -.. _class_ResourceFormatSaver_method__save: +.. _class_ResourceFormatSaver_private_method__save: .. rst-class:: classref-method @@ -104,7 +104,7 @@ Method Descriptions ---- -.. _class_ResourceFormatSaver_method__set_uid: +.. _class_ResourceFormatSaver_private_method__set_uid: .. rst-class:: classref-method @@ -112,10 +112,10 @@ Method Descriptions 为给定 ``path`` 处的资源设置新的 UID。成功时返回 :ref:`@GlobalScope.OK`\ ,失败时返回 :ref:`Error` 常量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceimporter.rst b/classes/zh_CN/class_resourceimporter.rst index c2013089ee..2da35346af 100644 --- a/classes/zh_CN/class_resourceimporter.rst +++ b/classes/zh_CN/class_resourceimporter.rst @@ -10,23 +10,23 @@ ResourceImporter ================ -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`EditorImportPlugin`, :ref:`ResourceImporterBitMap`, :ref:`ResourceImporterBMFont`, :ref:`ResourceImporterCSVTranslation`, :ref:`ResourceImporterDynamicFont`, :ref:`ResourceImporterImage`, :ref:`ResourceImporterImageFont`, :ref:`ResourceImporterLayeredTexture`, :ref:`ResourceImporterMP3`, :ref:`ResourceImporterOBJ`, :ref:`ResourceImporterOggVorbis`, :ref:`ResourceImporterScene`, :ref:`ResourceImporterShaderFile`, :ref:`ResourceImporterTexture`, :ref:`ResourceImporterTextureAtlas`, :ref:`ResourceImporterWAV` +**派生:** :ref:`EditorImportPlugin`, :ref:`ResourceImporterBitMap`, :ref:`ResourceImporterBMFont`, :ref:`ResourceImporterCSVTranslation`, :ref:`ResourceImporterDynamicFont`, :ref:`ResourceImporterImage`, :ref:`ResourceImporterImageFont`, :ref:`ResourceImporterLayeredTexture`, :ref:`ResourceImporterMP3`, :ref:`ResourceImporterOBJ`, :ref:`ResourceImporterOggVorbis`, :ref:`ResourceImporterScene`, :ref:`ResourceImporterShaderFile`, :ref:`ResourceImporterTexture`, :ref:`ResourceImporterTextureAtlas`, :ref:`ResourceImporterWAV` 资源导入器的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这是 Godot 资源导入器的基类。要使用编辑器插件实现你自己的资源导入器,请参考 :ref:`EditorImportPlugin`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`导入插件 <../tutorials/plugins/editor/import_plugins>` @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_ResourceImporter_ImportOrder: @@ -61,10 +61,10 @@ enum **ImportOrder**: 场景的导入顺序,确保场景被导入在所有其他核心资源(如纹理)\ *之后*\ 。自定义导入器的导入顺序一般应低于\ ``100``\ ,以避免导入依赖自定义资源的场景时出现问题。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceimporterbitmap.rst b/classes/zh_CN/class_resourceimporterbitmap.rst index 3f540631db..5928f53c23 100644 --- a/classes/zh_CN/class_resourceimporterbitmap.rst +++ b/classes/zh_CN/class_resourceimporterbitmap.rst @@ -10,28 +10,28 @@ ResourceImporterBitMap ====================== -**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -Imports a :ref:`BitMap` resource (2D array of boolean values). +导入 :ref:`BitMap` 资源(布尔值的 2D 数组)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -:ref:`BitMap` resources are typically used as click masks in :ref:`TextureButton` and :ref:`TouchScreenButton`. +:ref:`BitMap` 资源通常被用作 :ref:`TextureButton` 和 :ref:`TouchScreenButton` 的点击遮罩。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`导入图像 <../tutorials/assets_pipeline/importing_images>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ResourceImporterBitMap_property_create_from: @@ -57,11 +57,11 @@ Property Descriptions :ref:`int` **create_from** = ``0`` -The data source to use for generating the bitmap. +用于生成位图的数据源。 -\ **Black & White:** Pixels whose HSV value is greater than the :ref:`threshold` will be considered as "enabled" (bit is ``true``). If the pixel is lower than or equal to the threshold, it will be considered as "disabled" (bit is ``false``). +\ **黑白:**\ HSV 值大于 :ref:`threshold` 的像素将被视为“启用”(位为 ``true``\ )。如果像素低于或等于阈值,则将被视为“禁用”(位为 ``false``\ )。 -\ **Alpha:** Pixels whose alpha value is greater than the :ref:`threshold` will be considered as "enabled" (bit is ``true``). If the pixel is lower than or equal to the threshold, it will be considered as "disabled" (bit is ``false``). +\ **Alpha:**\ Alpha值大于 :ref:`threshold` 的像素将被视为“启用”(位为 ``true``\ )。如果像素低于或等于阈值,则将被视为“禁用”(位为 ``false``\ )。 .. rst-class:: classref-item-separator @@ -73,12 +73,12 @@ The data source to use for generating the bitmap. :ref:`float` **threshold** = ``0.5`` -The threshold to use to determine which bits should be considered enabled or disabled. See also :ref:`create_from`. +用于确定哪些位应被视为启用或禁用的阈值。另见 :ref:`create_from`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceimporterbmfont.rst b/classes/zh_CN/class_resourceimporterbmfont.rst index 5a1da3f944..97398b3b2a 100644 --- a/classes/zh_CN/class_resourceimporterbmfont.rst +++ b/classes/zh_CN/class_resourceimporterbmfont.rst @@ -10,41 +10,43 @@ ResourceImporterBMFont ====================== -**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -Imports a bitmap font in the BMFont (``.fnt``) format. +导入 BMFont(\ ``.fnt``\ )格式的位图字体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -The BMFont format is a format created by the `BMFont `__ program. Many BMFont-compatible programs also exist, like `BMGlyph `__. +BMFont 格式是由 `BMFont `__ 程序创建的格式。也存在许多与 BMFont 兼容的程序,例如 `BMGlyph `__\ 。 -Compared to :ref:`ResourceImporterImageFont`, **ResourceImporterBMFont** supports bitmap fonts with varying glyph widths/heights. +与 :ref:`ResourceImporterImageFont` 相比,\ **ResourceImporterBMFont** 能够支持不同字形宽高的位图字体。 -See also :ref:`ResourceImporterDynamicFont`. +另见 :ref:`ResourceImporterDynamicFont`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- `Bitmap fonts - Using fonts <../tutorials/ui/gui_using_fonts.html#bitmap-fonts>`__ +- `位图字体——使用字体 <../tutorials/ui/gui_using_fonts.html#bitmap-fonts>`__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto - +---------------------------+-------------------------------------------------------------------+----------+ - | :ref:`bool` | :ref:`compress` | ``true`` | - +---------------------------+-------------------------------------------------------------------+----------+ - | :ref:`Array` | :ref:`fallbacks` | ``[]`` | - +---------------------------+-------------------------------------------------------------------+----------+ + +---------------------------+-------------------------------------------------------------------------+----------+ + | :ref:`bool` | :ref:`compress` | ``true`` | + +---------------------------+-------------------------------------------------------------------------+----------+ + | :ref:`Array` | :ref:`fallbacks` | ``[]`` | + +---------------------------+-------------------------------------------------------------------------+----------+ + | :ref:`int` | :ref:`scaling_mode` | ``2`` | + +---------------------------+-------------------------------------------------------------------------+----------+ .. rst-class:: classref-section-separator @@ -52,8 +54,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ResourceImporterBMFont_property_compress: @@ -61,7 +63,7 @@ Property Descriptions :ref:`bool` **compress** = ``true`` -If ``true``, uses lossless compression for the resulting font. +如果为 ``true``\ ,则会对得到的字体使用无损压缩。 .. rst-class:: classref-item-separator @@ -73,12 +75,24 @@ If ``true``, uses lossless compression for the resulting font. :ref:`Array` **fallbacks** = ``[]`` -List of font fallbacks to use if a glyph isn't found in this bitmap font. Fonts at the beginning of the array are attempted first. +回退字体列表,在这个位图字体中未找到某个字形时使用。优先尝试靠前的字体。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterBMFont_property_scaling_mode: + +.. rst-class:: classref-property + +:ref:`int` **scaling_mode** = ``2`` + +字体缩放模式。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceimportercsvtranslation.rst b/classes/zh_CN/class_resourceimportercsvtranslation.rst index bc8964211e..b3738b8940 100644 --- a/classes/zh_CN/class_resourceimportercsvtranslation.rst +++ b/classes/zh_CN/class_resourceimportercsvtranslation.rst @@ -10,18 +10,18 @@ ResourceImporterCSVTranslation ============================== -**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -Imports comma-separated values +导入 CSV .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Comma-separated values are a plain text table storage format. The format's simplicity makes it easy to edit in any text editor or spreadsheet software. This makes it a common choice for game localization. +逗号分隔值是纯文本表格存储格式。该格式的简单性使其可以轻松地在任何文本编辑器或电子表格软件中进行编辑。这使其成为游戏本地化的常见选择。 -\ **Example CSV file:**\ +\ **示例 CSV 文件:**\ :: @@ -33,15 +33,15 @@ Comma-separated values are a plain text table storage format. The format's simpl .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Importing translations <../tutorials/assets_pipeline/importing_translations>` +- :doc:`导入翻译 <../tutorials/assets_pipeline/importing_translations>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ResourceImporterCSVTranslation_property_compress: @@ -67,7 +67,7 @@ Property Descriptions :ref:`bool` **compress** = ``true`` -If ``true``, creates an :ref:`OptimizedTranslation` instead of a :ref:`Translation`. This makes the resulting file smaller at the cost of a small CPU overhead. +如果为 ``true``\ ,则会创建 :ref:`OptimizedTranslation` 而不是 :ref:`Translation`\ 。这样得到的文件会更小,但代价是 CPU 会消耗得稍多一些。 .. rst-class:: classref-item-separator @@ -79,12 +79,12 @@ If ``true``, creates an :ref:`OptimizedTranslation` :ref:`int` **delimiter** = ``0`` -The delimiter to use in the CSV file. The default value matches the common CSV convention. Tab-separated values are sometimes called TSV files. +在 CSV 文件中使用的分隔符。该默认值符合常见的 CSV 约定。制表符分隔值有时被称为 TSV 文件。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceimporterdynamicfont.rst b/classes/zh_CN/class_resourceimporterdynamicfont.rst index 9e4cca200d..48f882b98c 100644 --- a/classes/zh_CN/class_resourceimporterdynamicfont.rst +++ b/classes/zh_CN/class_resourceimporterdynamicfont.rst @@ -10,32 +10,32 @@ ResourceImporterDynamicFont =========================== -**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -Imports a TTF, TTC, OTF, OTC, WOFF or WOFF2 font file for font rendering that adapts to any size. +导入 TTF、TTC、OTF、OTC、WOFF、WOFF2 字体文件,用于能够适配任何大小的字体渲染。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Unlike bitmap fonts, dynamic fonts can be resized to any size and still look crisp. Dynamic fonts also optionally support MSDF font rendering, which allows for run-time scale changes with no re-rasterization cost. +与位图字体不同,动态字体可以被调整为任意大小,并且看起来仍然清晰。动态字体还可以选择支持 MSDF 字体渲染,从而允许运行时缩放更改,且没有重新光栅化成本。 -While WOFF and especially WOFF2 tend to result in smaller file sizes, there is no universally "better" font format. In most situations, it's recommended to use the font format that was shipped on the font developer's website. +虽然 WOFF(尤其是 WOFF2)往往会产生较小的文件大小,但不存在普遍“更好”的字体格式。在大多数情况下,建议使用字体开发人员网站上提供的字体格式。 -See also :ref:`ResourceImporterBMFont` and :ref:`ResourceImporterImageFont`. +另请参见 :ref:`ResourceImporterBMFont` 和 :ref:`ResourceImporterImageFont`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- `Dynamic fonts - Using fonts <../tutorials/ui/gui_using_fonts.html#dynamic-fonts>`__ +- `动态字体——使用字体 <../tutorials/ui/gui_using_fonts.html#dynamic-fonts>`__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -80,8 +80,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ResourceImporterDynamicFont_property_allow_system_fallback: @@ -89,9 +89,9 @@ Property Descriptions :ref:`bool` **allow_system_fallback** = ``true`` -If ``true``, automatically use system fonts as a fallback if a glyph isn't found in this dynamic font. This makes supporting CJK characters or emoji more straightforward, as you don't need to include a CJK/emoji font in your project. See also :ref:`fallbacks`. +为 ``true`` 时,如果在该动态字体中找不到字形,则自动使用系统字体作为后备。这使得支持 CJK 字符或表情符号更加简单,因为你不需要在项目中包含 CJK/表情符号字体。另请参阅 :ref:`fallbacks`\ 。 -\ **Note:** The appearance of system fonts varies across platforms. Loading system fonts is only supported on Windows, macOS, Linux, Android and iOS. +\ **注意:**\ 系统字体的外观因平台而异。仅 Windows、macOS、Linux、Android 和 iOS 支持加载系统字体。 .. rst-class:: classref-item-separator @@ -103,13 +103,13 @@ If ``true``, automatically use system fonts as a fallback if a glyph isn't found :ref:`int` **antialiasing** = ``1`` -The font antialiasing method to use. +要使用的字体抗锯齿方法。 -\ **Disabled:** Most suited for pixel art fonts, although you do not *have* to change the antialiasing from the default **Grayscale** if the font file was well-created and the font is used at an integer multiple of its intended size. If pixel art fonts have a bad appearance at their intended size, try setting :ref:`subpixel_positioning` to **Disabled** instead. +\ **禁用:**\ 最适合像素艺术字体,如果字体文件创建良好并且字体以其预期大小的整数倍使用,则你不\ *必*\ 更改默认的\ **灰度**\ 抗锯齿。如果像素艺术字体在其预期大小下外观不佳,请尝试将 :ref:`subpixel_positioning` 设置为 **Disabled**\ 。 -\ **Grayscale:** Use grayscale antialiasing. This is the approach used by the operating system on macOS, Android and iOS. +\ **灰度:**\ 使用灰度抗锯齿。这是 macOS、Android 和 iOS 上的操作系统使用的方法。 -\ **LCD Subpixel:** Use antialiasing with subpixel patterns to make fonts sharper on LCD displays. This is the approach used by the operating system on Windows and most Linux distributions. The downside is that this can introduce "fringing" on edges, especially on display technologies that don't use standard RGB subpixels (such as OLED displays). The LCD subpixel layout is globally controlled by :ref:`ProjectSettings.gui/theme/lcd_subpixel_layout`, which also allows falling back to grayscale antialiasing. +\ **LCD 子像素:**\ 使用子像素模式的抗锯齿,使 LCD 显示器上的字体更加清晰。这是 Windows 和大多数 Linux 发行版上的操作系统使用的方法。缺点是这可能会在边缘产生“边缘”,尤其是在不使用标准 RGB 子像素的显示技术上(例如 OLED 显示器)。LCD 子像素布局由 :ref:`ProjectSettings.gui/theme/lcd_subpixel_layout` 全局控制,这也允许回退到灰度抗锯齿。 .. rst-class:: classref-item-separator @@ -121,7 +121,7 @@ The font antialiasing method to use. :ref:`bool` **compress** = ``true`` -If ``true``, uses lossless compression for the resulting font. +如果为 ``true``\ ,则会对得到的字体使用无损压缩。 .. rst-class:: classref-item-separator @@ -133,7 +133,7 @@ If ``true``, uses lossless compression for the resulting font. :ref:`Array` **fallbacks** = ``[]`` -List of font fallbacks to use if a glyph isn't found in this dynamic font. Fonts at the beginning of the array are attempted first, but fallback fonts that don't support the glyph's language and script are attempted last (see :ref:`language_support` and :ref:`script_support`). See also :ref:`allow_system_fallback`. +如果在该动态字体中找不到字形,则要使用的字体后备列表。首先尝试位于数组开头的字体,最后尝试不支持字形语言和脚本的后备字体(请参阅 :ref:`language_support` 和 :ref:`script_support`\ )。另请参阅 :ref:`allow_system_fallback`\ 。 .. rst-class:: classref-item-separator @@ -145,7 +145,7 @@ List of font fallbacks to use if a glyph isn't found in this dynamic font. Fonts :ref:`bool` **force_autohinter** = ``false`` -If ``true``, forces generation of hinting data for the font using `FreeType `__'s autohinter. This will make :ref:`hinting` effective with fonts that don't include hinting data. +如果为 ``true``\ ,则使用 `FreeType `__ 的自动提示器强制生成字体的提示数据。这将使 :ref:`hinting` 对不包含提示数据的字体有效。 .. rst-class:: classref-item-separator @@ -157,9 +157,9 @@ If ``true``, forces generation of hinting data for the font using `FreeType ` **generate_mipmaps** = ``false`` -If ``true``, this font will have mipmaps generated. This prevents text from looking grainy when a :ref:`Control` is scaled down, or when a :ref:`Label3D` is viewed from a long distance (if :ref:`Label3D.texture_filter` is set to a mode that displays mipmaps). +如果为 ``true``\ ,则该字体将生成 mipmap。这样可以防止文本在 :ref:`Control` 被按比例缩小或从远距离查看 :ref:`Label3D` 时看起来有颗粒感(如果 :ref:`Label3D.texture_filter` 被设置为显示 mipmap 的模式)。 -Enabling :ref:`generate_mipmaps` increases font generation time and memory usage. Only enable this setting if you actually need it. +启用 :ref:`generate_mipmaps` 会增加字体生成时间和内存使用量。请只在你确实需要时才启用此设置。 .. rst-class:: classref-item-separator @@ -171,13 +171,13 @@ Enabling :ref:`generate_mipmaps` **hinting** = ``1`` -The hinting mode to use. This controls how aggressively glyph edges should be snapped to pixels when rasterizing the font. Depending on personal preference, you may prefer using one hinting mode over the other. Hinting modes other than **None** are only effective if the font contains hinting data (see :ref:`force_autohinter`). +要使用的提示模式。这控制在光栅化字体时应如何积极地将字形边缘吸附到像素。根据个人喜好,你可能更喜欢使用一种提示模式而不是另一种。除 **None** 之外的提示模式仅在字体包含提示数据时才有效(请参阅 :ref:`force_autohinter`\ )。 -\ **None:** Smoothest appearance, which can make the font look blurry at small sizes. +\ **None:**\ 最平滑的外观,这会使字体在小尺寸下看起来模糊。 -\ **Light:** Sharp result by snapping glyph edges to pixels on the Y axis only. +\ **Light:**\ 通过仅将字形边缘吸附到 Y 轴上的像素来获得清晰的结果。 -\ **Full:** Sharpest by snapping glyph edges to pixels on both X and Y axes. +\ **Full:**\ 通过将字形边缘吸附到 X 轴和 Y 轴上的像素获得最清晰的结果。 .. rst-class:: classref-item-separator @@ -189,7 +189,7 @@ The hinting mode to use. This controls how aggressively glyph edges should be sn :ref:`Dictionary` **language_support** = ``{}`` -Override the list of languages supported by this font. If left empty, this is supplied by the font metadata. There is usually no need to change this. See also :ref:`script_support`. +覆盖该字体支持的语言列表。如果留空,则由字体元数据提供。通常无需更改该设置。另见 :ref:`script_support`\ 。 .. rst-class:: classref-item-separator @@ -201,7 +201,7 @@ Override the list of languages supported by this font. If left empty, this is su :ref:`int` **msdf_pixel_range** = ``8`` -The width of the range around the shape between the minimum and maximum representable signed distance. If using font outlines, :ref:`msdf_pixel_range` must be set to at least *twice* the size of the largest font outline. The default :ref:`msdf_pixel_range` value of ``8`` allows outline sizes up to ``4`` to look correct. +最小和最大可表示的有符号距离之间的形状周围的范围宽度。如果使用字体轮廓,\ :ref:`msdf_pixel_range` 必须至少设置为最大字体轮廓大小的\ *两倍*\ 。\ :ref:`msdf_pixel_range` 的默认值为 ``8``\ ,允许大小最大到 ``4`` 的轮廓看起来正确。 .. rst-class:: classref-item-separator @@ -213,7 +213,7 @@ The width of the range around the shape between the minimum and maximum represen :ref:`int` **msdf_size** = ``48`` -Source font size used to generate MSDF textures. Higher values allow for more precision, but are slower to render and require more memory. Only increase this value if you notice a visible lack of precision in glyph rendering. Only effective if :ref:`multichannel_signed_distance_field` is ``true``. +用于生成 MSDF 纹理的源字体大小。较高的值允许更高的精度,但渲染速度较慢并且需要更多内存。只有当注意到字形渲染中明显缺乏精度时,才增加该属性的值。仅在 :ref:`multichannel_signed_distance_field` 为 ``true`` 时有效。 .. rst-class:: classref-item-separator @@ -225,9 +225,9 @@ Source font size used to generate MSDF textures. Higher values allow for more pr :ref:`bool` **multichannel_signed_distance_field** = ``false`` -If set to ``true``, the default font will use multichannel signed distance field (MSDF) for crisp rendering at any size. Since this approach does not rely on rasterizing the font every time its size changes, this allows for resizing the font in real-time without any performance penalty. Text will also not look grainy for :ref:`Control`\ s that are scaled down (or for :ref:`Label3D`\ s viewed from a long distance). +如果设置为 ``true``\ ,默认字体将使用多通道带符号距离场(MSDF),任何尺寸都能够进行清晰的渲染。由于这种方法不需要在每次字体大小更改时都对字体进行光栅化,因此可以实时调整字体大小,不会造成任何性能损失。对于按比例缩小的 :ref:`Control`\ (或从远距离查看的 :ref:`Label3D`\ ),文本也不会看起来有颗粒感。 -MSDF font rendering can be combined with :ref:`generate_mipmaps` to further improve font rendering quality when scaled down. +MSDF 字体渲染可以与 :ref:`generate_mipmaps` 结合使用,从而进一步提高缩小时的字体渲染质量。 .. rst-class:: classref-item-separator @@ -239,7 +239,7 @@ MSDF font rendering can be combined with :ref:`generate_mipmaps` **opentype_features** = ``{}`` -The OpenType features to enable, disable or set a value for this font. This can be used to enable optional features provided by the font, such as ligatures or alternative glyphs. The list of supported OpenType features varies on a per-font basis. +要为这个字体启用、禁用或设值的 OpenType 特性。可以用来启用字体所提供的可选特性,例如合字和备选字形。不同字体所支持的 OpenType 特性列表各有不同。 .. rst-class:: classref-item-separator @@ -251,7 +251,7 @@ The OpenType features to enable, disable or set a value for this font. This can :ref:`float` **oversampling** = ``0.0`` -If set to a value greater than ``0.0``, overrides the oversampling factor for the font. This can be used to render the font at a higher or lower resolution than intended without affecting its physical size. In most cases, this should be left at ``0.0``. +如果设为大于 ``0.0`` 的值,则会覆盖字体的过采样系数。可以用来在保持字体物理大小的前提下,使用比原计划更高或更低的分辨率渲染。大多数情况下应该保持为 ``0.0``\ 。 .. rst-class:: classref-item-separator @@ -263,7 +263,7 @@ If set to a value greater than ``0.0``, overrides the oversampling factor for th :ref:`Array` **preload** = ``[]`` -The glyph ranges to prerender. This can avoid stuttering during gameplay when new characters need to be rendered, especially if :ref:`subpixel_positioning` is enabled. The downside of using preloading is that initial project load times will increase, as well as memory usage. +要预渲染的字形范围。这可以避免在游戏过程中需要渲染新角色时出现卡顿,特别是在启用 :ref:`subpixel_positioning` 的情况下。使用预加载的缺点是初始项目加载时间会增加,内存使用量也会增加。 .. rst-class:: classref-item-separator @@ -275,7 +275,7 @@ The glyph ranges to prerender. This can avoid stuttering during gameplay when ne :ref:`Dictionary` **script_support** = ``{}`` -Override the list of language scripts supported by this font. If left empty, this is supplied by the font metadata. There is usually no need to change this. See also :ref:`language_support`. +覆盖该字体支持的语言脚本列表。如果留空,则由字体元数据提供。通常无需更改该设置。另见 :ref:`language_support`\ 。 .. rst-class:: classref-item-separator @@ -287,20 +287,20 @@ Override the list of language scripts supported by this font. If left empty, thi :ref:`int` **subpixel_positioning** = ``1`` -Subpixel positioning improves font rendering appearance, especially at smaller font sizes. The downside is that it takes more time to initially render the font, which can cause stuttering during gameplay, especially if used with large font sizes. This should be set to **Disabled** for fonts with a pixel art appearance. +子像素定位可改善字体渲染外观,尤其是在较小的字体大小下。缺点是初始渲染字体需要更多时间,这可能会导致游戏过程中出现卡顿,特别是在使用大字体时。对于具有像素艺术外观的字体,应将其设置为\ **禁用**\ 。 -\ **Disabled:** No subpixel positioning. Lowest quality, fastest rendering. +\ **禁用:**\ 无子像素定位。质量最低,渲染最快。 -\ **Auto:** Use subpixel positioning at small font sizes (the chosen quality varies depending on font size). Large fonts will not use subpixel positioning. This is a good tradeoff between performance and quality. +\ **自动:**\ 在小字体大小下使用子像素定位(所选质量根据字体大小而变化)。大字体不会使用子像素定位。这是性能和质量之间的良好权衡。 -\ **One Half of a Pixel:** Always perform intermediate subpixel positioning regardless of font size. High quality, slow rendering. +\ **半像素:**\ 无论字体大小如何,始终执行中间子像素定位。质量高,渲染速度慢。 -\ **One Quarter of a Pixel:** Always perform precise subpixel positioning regardless of font size. Highest quality, slowest rendering. +\ **四分之一像素:**\ 无论字体大小如何,始终执行精确的子像素定位。质量最高,渲染最慢。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceimporterimage.rst b/classes/zh_CN/class_resourceimporterimage.rst index 2c41212567..913c536203 100644 --- a/classes/zh_CN/class_resourceimporterimage.rst +++ b/classes/zh_CN/class_resourceimporterimage.rst @@ -10,28 +10,28 @@ ResourceImporterImage ===================== -**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -Imports a image for use in scripting, with no rendering capabilities. +导入图像以用于脚本编写,但不具有渲染功能。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This importer imports :ref:`Image` resources, as opposed to :ref:`CompressedTexture2D`. If you need to render the image in 2D or 3D, use :ref:`ResourceImporterTexture` instead. +该导入器导入 :ref:`Image` 资源,而不是 :ref:`CompressedTexture2D`\ 。如果你需要以 2D 或 3D 方式渲染图像,请改用 :ref:`ResourceImporterTexture`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`导入图像 <../tutorials/assets_pipeline/importing_images>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceimporterimagefont.rst b/classes/zh_CN/class_resourceimporterimagefont.rst index b443200fbe..7b6be7d3ca 100644 --- a/classes/zh_CN/class_resourceimporterimagefont.rst +++ b/classes/zh_CN/class_resourceimporterimagefont.rst @@ -10,30 +10,30 @@ ResourceImporterImageFont ========================= -**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -Imports a fixed-width bitmap font where all glyphs have the same width and height. +导入等宽位图字体,所有字形使用的都是相同的宽高。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This image-based workflow can be easier to use than :ref:`ResourceImporterBMFont`, but it requires all glyphs to have the same width and height. This makes **ResourceImporterImageFont** most suited to fixed-width fonts. +这种基于图像的工作流程比 :ref:`ResourceImporterBMFont` 更易于使用,但它要求所有字形具有相同的宽度和高度。这使得 **ResourceImporterImageFont** 最适合固定宽度字体。 -See also :ref:`ResourceImporterDynamicFont`. +另请参见 :ref:`ResourceImporterDynamicFont`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- `Bitmap fonts - Using fonts <../tutorials/ui/gui_using_fonts.html#bitmap-fonts>`__ +- `位图字体——使用字体 <../tutorials/ui/gui_using_fonts.html#bitmap-fonts>`__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -53,6 +53,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------+-------------------------+ | :ref:`int` | :ref:`rows` | ``1`` | +---------------------------------------------------+------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`scaling_mode` | ``2`` | + +---------------------------------------------------+------------------------------------------------------------------------------------+-------------------------+ .. rst-class:: classref-section-separator @@ -60,8 +62,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ResourceImporterImageFont_property_character_margin: @@ -69,7 +71,7 @@ Property Descriptions :ref:`Rect2i` **character_margin** = ``Rect2i(0, 0, 0, 0)`` -Margin applied around every imported glyph. If your font image contains guides (in the form of lines between glyphs) or if spacing between characters appears incorrect, try adjusting :ref:`character_margin`. +在每个导入的字形周围应用边距。如果你的字体图像包含参考线(以字形之间的线的形式)或者字符之间的间距看起来不正确,请尝试调整 :ref:`character_margin`\ 。 .. rst-class:: classref-item-separator @@ -81,11 +83,11 @@ Margin applied around every imported glyph. If your font image contains guides ( :ref:`PackedStringArray` **character_ranges** = ``PackedStringArray()`` -The character ranges to import from the font image. This is an array that maps each position on the image (in tile coordinates, not pixels). The font atlas is traversed from left to right and top to bottom. Characters can be specified with decimal numbers (127), hexadecimal numbers (``0x007f``) or between single quotes (``'~'``). Ranges can be specified with a hyphen between characters. +从字体图像导入的字符范围。这是一个映射图像上每个位置的数组(以图块坐标,而不是像素映射)。字体图集是从左到右、从上到下遍历的。可以使用十进制数字(127)、十六进制数字(\ ``0x007f``\ )、或单引号之间(\ ``'~'``\ )指定字符。可以使用字符之间的连字符指定范围。 -For instance, ``0-127`` (or ``0x0000-0x007f``) denotes the full ASCII range. As another example, ``' '-'~'`` is equivalent to ``32-127`` and denotes the range of printable (visible) ASCII characters. +例如,\ ``0-127``\ (或 ``0x0000-0x007f``\ )表示完整的 ASCII 范围。再比如,\ ``' '-'~'`` 等价于 ``32-127``\ ,表示可打印(可见)ASCII 字符的范围。 -Make sure :ref:`character_ranges` doesn't exceed the number of :ref:`columns` \* :ref:`rows` defined. Otherwise, the font will fail to import. +确保 :ref:`character_ranges` 不超过定义的 :ref:`columns` \* :ref:`rows` 的数量。否则,该字体将无法导入。 .. rst-class:: classref-item-separator @@ -97,7 +99,7 @@ Make sure :ref:`character_ranges` **columns** = ``1`` -Number of columns in the font image. See also :ref:`rows`. +字体图像中的列数。另见 :ref:`rows`\ 。 .. rst-class:: classref-item-separator @@ -109,7 +111,7 @@ Number of columns in the font image. See also :ref:`rows` **compress** = ``true`` -If ``true``, uses lossless compression for the resulting font. +如果为 ``true``\ ,则会对得到的字体使用无损压缩。 .. rst-class:: classref-item-separator @@ -121,7 +123,7 @@ If ``true``, uses lossless compression for the resulting font. :ref:`Array` **fallbacks** = ``[]`` -List of font fallbacks to use if a glyph isn't found in this bitmap font. Fonts at the beginning of the array are attempted first. +回退字体列表,在这个位图字体中未找到某个字形时使用。优先尝试靠前的字体。 .. rst-class:: classref-item-separator @@ -133,7 +135,7 @@ List of font fallbacks to use if a glyph isn't found in this bitmap font. Fonts :ref:`Rect2i` **image_margin** = ``Rect2i(0, 0, 0, 0)`` -Margin to cut on the sides of the entire image. This can be used to cut parts of the image that contain attribution information or similar. +整个图像两侧的裁减边距。这可被用于裁减该图像包含属性信息或类似信息的部分。 .. rst-class:: classref-item-separator @@ -145,12 +147,24 @@ Margin to cut on the sides of the entire image. This can be used to cut parts of :ref:`int` **rows** = ``1`` -Number of rows in the font image. See also :ref:`columns`. +字体图像中的行数。另见 :ref:`columns`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterImageFont_property_scaling_mode: + +.. rst-class:: classref-property + +:ref:`int` **scaling_mode** = ``2`` + +字体缩放模式。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceimporterlayeredtexture.rst b/classes/zh_CN/class_resourceimporterlayeredtexture.rst index 9b46a75cb9..066061916e 100644 --- a/classes/zh_CN/class_resourceimporterlayeredtexture.rst +++ b/classes/zh_CN/class_resourceimporterlayeredtexture.rst @@ -10,28 +10,28 @@ ResourceImporterLayeredTexture ============================== -**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -Imports a 3-dimensional texture (:ref:`Texture3D`), a :ref:`Texture2DArray`, a :ref:`Cubemap` or a :ref:`CubemapArray`. +导入 3 维纹理(\ :ref:`Texture3D`\ )、\ :ref:`Texture2DArray`\ 、\ :ref:`Cubemap` 或 :ref:`CubemapArray`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This imports a 3-dimensional texture, which can then be used in custom shaders, as a :ref:`FogMaterial` density map or as a :ref:`GPUParticlesAttractorVectorField3D`. See also :ref:`ResourceImporterTexture` and :ref:`ResourceImporterTextureAtlas`. +这会导入一个三维纹理,然后可以在自定义着色器中将其用作 :ref:`FogMaterial` 密度图或 :ref:`GPUParticlesAttractorVectorField3D`\ 。另请参见 :ref:`ResourceImporterTexture` 和 :ref:`ResourceImporterTextureAtlas`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`导入图像 <../tutorials/assets_pipeline/importing_images>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -60,8 +60,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ResourceImporterLayeredTexture_property_compress/channel_pack: @@ -69,13 +69,13 @@ Property Descriptions :ref:`int` **compress/channel_pack** = ``0`` -Controls how color channels should be used in the imported texture. +控制在导入的纹理中应如何使用颜色通道。 -\ **sRGB Friendly:**, prevents the RG color format from being used, as it does not support sRGB color. +\ **sRGB 友好:**\ 阻止使用 RG 颜色格式,因为它不支持 sRGB 颜色。 -\ **Optimized:**, allows the RG color format to be used if the texture does not use the blue channel. This reduces memory usage if the texture's blue channel can be discarded (all pixels must have a blue value of ``0``). +\ **优化:**\ 如果纹理不使用蓝色通道,则允许使用 RG 颜色格式。如果可以丢弃纹理的蓝色通道(所有像素的蓝色值必须为 ``0``\ ),则可以减少内存使用量。 -\ **Normal Map (RG Channels):** This forces all layers from the texture to be imported with the RG color format to reduce memory usage, with only the red and green channels preserved. This only has an effect on textures with the VRAM Compressed or Basis Universal compression modes. This mode is only available in layered textures (:ref:`Cubemap`, :ref:`CubemapArray`, :ref:`Texture2DArray` and :ref:`Texture3D`). +\ **法线贴图(RG 通道):**\ 这会强制使用 RG 颜色格式导入纹理中的所有图层,以减少内存使用量,仅保留红色和绿色通道。这仅对具有 VRAM 压缩或 Basis Universal 压缩模式的纹理有影响。该模式仅适用于分层纹理(\ :ref:`Cubemap`\ 、\ :ref:`CubemapArray`\ 、\ :ref:`Texture2DArray` 和 :ref:`Texture3D`\ )。 .. rst-class:: classref-item-separator @@ -87,15 +87,15 @@ Controls how color channels should be used in the imported texture. :ref:`int` **compress/hdr_compression** = ``1`` -Controls how VRAM compression should be performed for HDR images. +控制如何对 HDR 图像执行 VRAM 压缩。 -\ **Disabled:** Never use VRAM compression for HDR textures, regardless of whether they're opaque or transparent. Instead, the texture is converted to RGBE9995 (9-bits per channel + 5-bit exponent = 32 bits per pixel) to reduce memory usage compared to a half-float or single-precision float image format. +\ **禁用:**\ 永远不要对 HDR 纹理使用 VRAM 压缩,无论它们是否透明。相反,该纹理会被转换为 RGBE9995(每通道 9 位 + 5 位指数 = 每像素 32 位),与半浮点或单精度浮点图像格式相比,会减少内存使用量。 -\ **Opaque Only:** Only uses VRAM compression for opaque HDR textures. This is due to a limitation of HDR formats, as there is no VRAM-compressed HDR format that supports transparency at the same time. +\ **仅不透明:**\ 仅对不透明 HDR 纹理使用 VRAM 压缩。这是由于 HDR 格式的限制,因为没有支持 VRAM 压缩且同时支持透明度的 HDR 格式。 -\ **Always:** Force VRAM compression even for HDR textures with an alpha channel. To perform this, the alpha channel is discarded on import. +\ **始终:**\ 强制 VRAM 压缩,即使对于具有 Alpha 通道的 HDR 纹理也是如此。为此,在导入时将丢弃 Alpha 通道。 -\ **Note:** Only effective on Radiance HDR (``.hdr``) and OpenEXR (``.exr``) images. +\ **注意:**\ 仅对 Radiance HDR(\ ``.hdr``\ )和 OpenEXR(\ ``.exr``\ )图像有效。 .. rst-class:: classref-item-separator @@ -107,11 +107,11 @@ Controls how VRAM compression should be performed for HDR images. :ref:`bool` **compress/high_quality** = ``false`` -If ``true``, uses BPTC compression on desktop platforms and ASTC compression on mobile platforms. When using BPTC, BC7 is used for SDR textures and BC6H is used for HDR textures. +如果为 ``true``\ ,则在桌面平台上使用 BPTC 压缩,在移动平台上使用 ASTC 压缩。使用 BPTC 时,BC7 被用于 SDR 纹理,BC6H 被用于 HDR 纹理。 -If ``false``, uses the faster but lower-quality S3TC compression on desktop platforms and ETC2 on mobile/web platforms. When using S3TC, DXT1 (BC1) is used for opaque textures and DXT5 (BC3) is used for transparent or normal map (RGTC) textures. +如果为 ``false``\ ,则在桌面平台上使用速度更快但质量较低的 S3TC 压缩,在移动/Web 平台上使用 ETC2。使用 S3TC 时,DXT1 (BC1) 被用于不透明纹理,DXT5 (BC3) 被用于透明或法线贴图(RGTC)纹理。 -BPTC and ASTC support VRAM compression for HDR textures, but S3TC and ETC2 do not (see :ref:`compress/hdr_compression`). +BPTC 和 ASTC 支持 HDR 纹理的 VRAM 压缩,但 S3TC 和 ETC2 不支持(请参阅 :ref:`compress/hdr_compression`\ )。 .. rst-class:: classref-item-separator @@ -123,7 +123,7 @@ BPTC and ASTC support VRAM compression for HDR textures, but S3TC and ETC2 do no :ref:`float` **compress/lossy_quality** = ``0.7`` -The quality to use when using the **Lossy** compression mode. Higher values result in better quality, at the cost of larger file sizes. Lossy quality does not affect memory usage of the imported texture, only its file size on disk. +使用\ **有损**\ 压缩模式时使用的质量。值越高,质量越好,但文件大小越大。有损质量不会影响导入纹理的内存使用情况,只会影响它在磁盘上的文件大小。 .. rst-class:: classref-item-separator @@ -135,19 +135,19 @@ The quality to use when using the **Lossy** compression mode. Higher values resu :ref:`int` **compress/mode** = ``1`` -The compression mode to use. Each compression mode provides a different tradeoff: +要使用的压缩模式。每种压缩模式都提供不同的权衡: -\ **Lossless**: Original quality, high memory usage, high size on disk, fast import. +\ **无损:**\ 原始质量、高内存占用、高磁盘占用、导入速度快。 -\ **Lossy:** Reduced quality, high memory usage, low size on disk, fast import. +\ **有损:**\ 质量降低、高内存占用、低磁盘占用、导入速度快。 -\ **VRAM Compressed:** Reduced quality, low memory usage, low size on disk, slowest import. Only use for textures in 3D scenes, not for 2D elements. +\ **VRAM 压缩:**\ 质量降低、低内存占用、低磁盘占用、导入速度最慢。仅适用于 3D 场景中的纹理,不适用于 2D 元素。 -\ **VRAM Uncompressed:** Original quality, high memory usage, highest size on disk, fastest import. +\ **VRAM 未压缩:**\ 原始质量、高内存占用、最高磁盘占用、导入速度最快。 -\ **Basis Universal:** Reduced quality, low memory usage, lowest size on disk, slow import. Only use for textures in 3D scenes, not for 2D elements. +\ **Basis Universal:**\ 质量降低、低内存占用、最低磁盘占用、导入速度慢。仅适用于 3D 场景中的纹理,不适用于 2D 元素。 -See `Compress mode <../tutorials/assets_pipeline/importing_images.html#compress-mode>`__ in the manual for more details. +有关更多详细信息,请参阅手册中的 `压缩模式 <../tutorials/assets_pipeline/importing_images.html#compress-mode>`__\ 。 .. rst-class:: classref-item-separator @@ -159,15 +159,15 @@ See `Compress mode <../tutorials/assets_pipeline/importing_images.html#compress- :ref:`bool` **mipmaps/generate** = ``true`` -If ``true``, smaller versions of the texture are generated on import. For example, a 64×64 texture will generate 6 mipmaps (32×32, 16×16, 8×8, 4×4, 2×2, 1×1). This has several benefits: +如果为 ``true``\ ,则在导入时生成较小版本的纹理。例如,64×64 纹理将生成 6 个多级渐远纹理(32×32、16×16、8×8、4×4、2×2、1×1)。这样做有几个好处: -- Textures will not become grainy in the distance (in 3D), or if scaled down due to :ref:`Camera2D` zoom or :ref:`CanvasItem` scale (in 2D). +- 纹理在远处(3D 中)或由于 :ref:`Camera2D` 缩放或 :ref:`CanvasItem` 缩放(2D 中)而缩小时不会变得具有颗粒感。 -- Performance will improve if the texture is displayed in the distance, since sampling smaller versions of the original texture is faster and requires less memory bandwidth. +- 如果纹理显示在远处,性能将会提高,因为对原始纹理的较小版本进行采样速度更快并且需要更少的内存带宽。 -The downside of mipmaps is that they increase memory usage by roughly 33% (for :ref:`Texture2DArray`, :ref:`Cubemap` and :ref:`CubemapArray`) or 14% (for :ref:`Texture3D`). +多级渐远纹理的缺点是它们使内存占用增加大约 33%(对于 :ref:`Texture2DArray`\ 、\ :ref:`Cubemap` 和 :ref:`CubemapArray`\ )或 14%(对于 :ref:`Texture3D`\ )。 -It's recommended to enable mipmaps in 3D. However, in 2D, this should only be enabled if your project visibly benefits from having mipmaps enabled. If the camera never zooms out significantly, there won't be a benefit to enabling mipmaps but memory usage will increase. +建议在 3D 中启用多级渐远纹理。但是,在 2D 中,仅当你的项目明显受益于启用多级渐远纹理 时才应启用该功能。如果相机从不大幅缩小,启用多级渐远纹理不会有任何好处,但内存占用会增加。 .. rst-class:: classref-item-separator @@ -179,7 +179,7 @@ It's recommended to enable mipmaps in 3D. However, in 2D, this should only be en :ref:`int` **mipmaps/limit** = ``-1`` -Unimplemented. This currently has no effect when changed. +未实现。目前,更改后没有效果。 .. rst-class:: classref-item-separator @@ -191,12 +191,12 @@ Unimplemented. This currently has no effect when changed. :ref:`int` **slices/arrangement** = ``1`` -Controls how the cubemap's texture is internally laid out. When using high-resolution cubemaps, **2×3** and **3×2** are less prone to exceeding hardware texture size limits compared to **1×6** and **6×1**. +控制立方体贴图纹理的内部布局方式。使用高分辨率立方体贴图时,与 **1×6** 和 **6×1** 相比,\ **2×3** and **3×2** 不太容易超出硬件纹理大小限制。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceimportermp3.rst b/classes/zh_CN/class_resourceimportermp3.rst index 274bdd6b53..a9b71851a5 100644 --- a/classes/zh_CN/class_resourceimportermp3.rst +++ b/classes/zh_CN/class_resourceimportermp3.rst @@ -10,32 +10,32 @@ ResourceImporterMP3 =================== -**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -Imports a MP3 audio file for playback. +导入 MP3 音频文件进行播放。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -MP3 is a lossy audio format, with worse audio quality compared to :ref:`ResourceImporterOggVorbis` at a given bitrate. +MP3 是一种有损音频格式,在给定比特率下,与 :ref:`ResourceImporterOggVorbis` 相比,音频质量较差。 -In most cases, it's recommended to use Ogg Vorbis over MP3. However, if you're using a MP3 sound source with no higher quality source available, then it's recommended to use the MP3 file directly to avoid double lossy compression. +在大多数情况下,建议使用 Ogg Vorbis 而不是 MP3。但是,如果你使用的 MP3 音源没有更高质量的可用源,则建议直接使用 MP3 文件以避免两次有损压缩。 -MP3 requires more CPU to decode than :ref:`ResourceImporterWAV`. If you need to play a lot of simultaneous sounds, it's recommended to use WAV for those sounds instead, especially if targeting low-end devices. +MP3 比 :ref:`ResourceImporterWAV` 需要更多的 CPU 来解码。如果你需要同时播放很多声音,建议对这些声音使用 WAV,特别是针对低端设备。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Importing audio samples <../tutorials/assets_pipeline/importing_audio_samples>` +- :doc:`导入音频样本 <../tutorials/assets_pipeline/importing_audio_samples>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ResourceImporterMP3_property_bar_beats: @@ -67,9 +67,9 @@ Property Descriptions :ref:`int` **bar_beats** = ``4`` -The number of bars within a single beat in the audio track. This is only relevant for music that wishes to make use of interactive music functionality (not implemented yet), not sound effects. +音轨中单个节拍内的小节数。这仅与希望利用交互式音乐功能(尚未实现)的音乐相关,与声音效果无关。 -A more convenient editor for :ref:`bar_beats` is provided in the **Advanced Import Settings** dialog, as it lets you preview your changes without having to reimport the audio. +\ **高级导入设置**\ 对话框中为 :ref:`bar_beats` 提供了更方便的编辑器,因为它可以让你预览更改,且无需重新导入音频。 .. rst-class:: classref-item-separator @@ -81,9 +81,9 @@ A more convenient editor for :ref:`bar_beats` **beat_count** = ``0`` -The beat count of the audio track. This is only relevant for music that wishes to make use of interactive music functionality (not implemented yet), not sound effects. +该音轨的节拍数。这仅与希望利用交互式音乐功能(尚未实现)的音乐相关,与声音效果无关。 -A more convenient editor for :ref:`beat_count` is provided in the **Advanced Import Settings** dialog, as it lets you preview your changes without having to reimport the audio. +\ **高级导入设置**\ 对话框中为 :ref:`beat_count` 提供了更方便的编辑器,因为它可以让你预览更改,且无需重新导入音频。 .. rst-class:: classref-item-separator @@ -95,9 +95,9 @@ A more convenient editor for :ref:`beat_count` **bpm** = ``0`` -The Beats Per Minute of the audio track. This should match the BPM measure that was used to compose the track. This is only relevant for music that wishes to make use of interactive music functionality (not implemented yet), not sound effects. +音轨的每分钟节拍数。这应该与用于创作曲目的 BPM 测量相匹配。这仅与希望利用交互式音乐功能(尚未实现)的音乐相关,与声音效果无关。 -A more convenient editor for :ref:`bpm` is provided in the **Advanced Import Settings** dialog, as it lets you preview your changes without having to reimport the audio. +\ **高级导入设置**\ 对话框中为 :ref:`bpm` 提供了更方便的编辑器,因为它可以让你预览更改,且无需重新导入音频。 .. rst-class:: classref-item-separator @@ -109,9 +109,9 @@ A more convenient editor for :ref:`bpm` :ref:`bool` **loop** = ``false`` -If enabled, the audio will begin playing at the beginning after playback ends by reaching the end of the audio. +如果启用,音频将在播放因到达音频末尾而结束后从头开始播放。 -\ **Note:** In :ref:`AudioStreamPlayer`, the :ref:`AudioStreamPlayer.finished` signal won't be emitted for looping audio when it reaches the end of the audio file, as the audio will keep playing indefinitely. +\ **注意:**\ 在 :ref:`AudioStreamPlayer` 中,当循环音频到达音频文件末尾时,不会发出 :ref:`AudioStreamPlayer.finished` 信号,因为音频将无限期地继续播放。 .. rst-class:: classref-item-separator @@ -123,16 +123,16 @@ If enabled, the audio will begin playing at the beginning after playback ends by :ref:`float` **loop_offset** = ``0`` -Determines where audio will start to loop after playback reaches the end of the audio. This can be used to only loop a part of the audio file, which is useful for some ambient sounds or music. The value is determined in seconds relative to the beginning of the audio. A value of ``0.0`` will loop the entire audio file. +确定播放到达音频结尾后音频将开始循环的位置。这可用于仅循环音频文件的一部分,这对于某些环境音或音乐很有用。该值以相对于音频开头的秒数确定。值为 ``0.0`` 将循环整个音频文件。 -Only has an effect if :ref:`loop` is ``true``. +仅当 :ref:`loop` 为 ``true`` 时才有效。 -A more convenient editor for :ref:`loop_offset` is provided in the **Advanced Import Settings** dialog, as it lets you preview your changes without having to reimport the audio. +\ **高级导入设置**\ 对话框中为 :ref:`loop_offset` 提供了更方便的编辑器,因为它可以让你预览更改,且无需重新导入音频。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceimporterobj.rst b/classes/zh_CN/class_resourceimporterobj.rst index a2f7acd74b..d4cc319e21 100644 --- a/classes/zh_CN/class_resourceimporterobj.rst +++ b/classes/zh_CN/class_resourceimporterobj.rst @@ -10,43 +10,45 @@ ResourceImporterOBJ =================== -**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -Imports an OBJ 3D model as a standalone :ref:`Mesh` or scene. +将 OBJ 3D 模型导入为独立 :ref:`Mesh` 或场景。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Unlike :ref:`ResourceImporterScene`, **ResourceImporterOBJ** will import a single :ref:`Mesh` resource by default instead of importing a :ref:`PackedScene`. This makes it easier to use the :ref:`Mesh` resource in nodes that expect direct :ref:`Mesh` resources, such as :ref:`GridMap`, :ref:`GPUParticles3D` or :ref:`CPUParticles3D`. Note that it is still possible to save mesh resources from 3D scenes using the **Advanced Import Settings** dialog, regardless of the source format. +与 :ref:`ResourceImporterScene` 不同,\ **ResourceImporterOBJ** 默认情况下会导入单个 :ref:`Mesh` 资源,而不是导入一个 :ref:`PackedScene`\ 。这使得在需要直接 :ref:`Mesh` 资源的节点(例如 :ref:`GridMap`\ 、\ :ref:`GPUParticles3D` 或 :ref:`CPUParticles3D`\ )中使用 :ref:`Mesh` 资源变得更加容易。请注意,无论源格式如何,仍然可以使用\ **高级导入设置**\ 对话框保存 3D 场景中的网格资源。 -See also :ref:`ResourceImporterScene`, which is used for more advanced 3D formats such as glTF. +另请参见 :ref:`ResourceImporterScene`\ ,它被用于更高级的 3D 格式,例如 glTF。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Importing 3D scenes <../tutorials/assets_pipeline/importing_scenes>` +- :doc:`导入 3D 场景 <../tutorials/assets_pipeline/importing_3d_scenes/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto - +-------------------------------+--------------------------------------------------------------------------------+----------------------+ - | :ref:`bool` | :ref:`generate_tangents` | ``true`` | - +-------------------------------+--------------------------------------------------------------------------------+----------------------+ - | :ref:`Vector3` | :ref:`offset_mesh` | ``Vector3(0, 0, 0)`` | - +-------------------------------+--------------------------------------------------------------------------------+----------------------+ - | :ref:`bool` | :ref:`optimize_mesh` | ``true`` | - +-------------------------------+--------------------------------------------------------------------------------+----------------------+ - | :ref:`Vector3` | :ref:`scale_mesh` | ``Vector3(1, 1, 1)`` | - +-------------------------------+--------------------------------------------------------------------------------+----------------------+ + +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`force_disable_mesh_compression` | ``false`` | + +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`generate_tangents` | ``true`` | + +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`offset_mesh` | ``Vector3(0, 0, 0)`` | + +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`bool` | :ref:`optimize_mesh` | ``true`` | + +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ + | :ref:`Vector3` | :ref:`scale_mesh` | ``Vector3(1, 1, 1)`` | + +-------------------------------+----------------------------------------------------------------------------------------------------------+----------------------+ .. rst-class:: classref-section-separator @@ -54,8 +56,20 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- + +.. _class_ResourceImporterOBJ_property_force_disable_mesh_compression: + +.. rst-class:: classref-property + +:ref:`bool` **force_disable_mesh_compression** = ``false`` + +如果为 ``true``\ ,则不会使用网格压缩。如果你在网格法线或 UV 中发现块状伪影,或者如果你的网格在每个方向都大于几千米,请考虑启用。 + +.. rst-class:: classref-item-separator + +---- .. _class_ResourceImporterOBJ_property_generate_tangents: @@ -63,9 +77,9 @@ Property Descriptions :ref:`bool` **generate_tangents** = ``true`` -If ``true``, generate vertex tangents using `Mikktspace `__ if the source mesh doesn't have tangent data. When possible, it's recommended to let the 3D modeling software generate tangents on export instead on relying on this option. Tangents are required for correct display of normal and height maps, along with any material/shader features that require tangents. +如果为 ``true``\ ,如果源网格没有切线数据,则使用 `Mikktspace `__ 生成顶点切线。如果可能,建议让 3D 建模软件在导出时生成切线,而不是依赖该选项。正确显示法线和高度贴图,以及任何需要切线的材质/着色器功能都需要切线。 -If you don't need material features that require tangents, disabling this can reduce output file size and speed up importing if the source 3D file doesn't contain tangents. +如果你不需要那些需要切线的材质特性,则禁用该功能可以减少输出文件大小,并在源 3D 文件不包含切线的情况下加快导入速度。 .. rst-class:: classref-item-separator @@ -77,7 +91,7 @@ If you don't need material features that require tangents, disabling this can re :ref:`Vector3` **offset_mesh** = ``Vector3(0, 0, 0)`` -Offsets the mesh's data by the specified value. This can be used to work around misaligned meshes without having to modify the source file. +将网格数据偏移指定值。这可被用于解决未对齐的网格,而无需修改源文件。 .. rst-class:: classref-item-separator @@ -89,7 +103,7 @@ Offsets the mesh's data by the specified value. This can be used to work around :ref:`bool` **optimize_mesh** = ``true`` -Unused parameter. This currently has no effect. +未使用的参数。这目前没有效果。 .. rst-class:: classref-item-separator @@ -101,12 +115,12 @@ Unused parameter. This currently has no effect. :ref:`Vector3` **scale_mesh** = ``Vector3(1, 1, 1)`` -Scales the mesh's data by the specified value. This can be used to work around misscaled meshes without having to modify the source file. +按指定值缩放网格数据。这可被用于解决缩放错误的网格,而无需修改源文件。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceimporteroggvorbis.rst b/classes/zh_CN/class_resourceimporteroggvorbis.rst index 5bd3f9b96f..164692e7cc 100644 --- a/classes/zh_CN/class_resourceimporteroggvorbis.rst +++ b/classes/zh_CN/class_resourceimporteroggvorbis.rst @@ -10,32 +10,32 @@ ResourceImporterOggVorbis ========================= -**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -Imports an Ogg Vorbis audio file for playback. +导入 Ogg Vorbis 音频文件进行播放。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Ogg Vorbis is a lossy audio format, with better audio quality compared to :ref:`ResourceImporterMP3` at a given bitrate. +Ogg Vorbis 是一种有损音频格式,在给定比特率下,与 :ref:`ResourceImporterMP3` 相比具有更好的音频质量。 -In most cases, it's recommended to use Ogg Vorbis over MP3. However, if you're using a MP3 sound source with no higher quality source available, then it's recommended to use the MP3 file directly to avoid double lossy compression. +在大多数情况下,建议使用 Ogg Vorbis 而不是 MP3。但是,如果你使用的 MP3 音源没有更高质量的可用音源,则建议直接使用 MP3 文件以避免两次有损压缩。 -Ogg Vorbis requires more CPU to decode than :ref:`ResourceImporterWAV`. If you need to play a lot of simultaneous sounds, it's recommended to use WAV for those sounds instead, especially if targeting low-end devices. +Ogg Vorbis 比 :ref:`ResourceImporterWAV` 需要更多的 CPU 来解码。如果你需要同时播放很多声音,建议对这些声音使用 WAV,特别是针对低端设备。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Importing audio samples <../tutorials/assets_pipeline/importing_audio_samples>` +- :doc:`导入音频样本 <../tutorials/assets_pipeline/importing_audio_samples>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -72,8 +72,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ResourceImporterOggVorbis_property_bar_beats: @@ -81,9 +81,9 @@ Property Descriptions :ref:`int` **bar_beats** = ``4`` -The number of bars within a single beat in the audio track. This is only relevant for music that wishes to make use of interactive music functionality (not implemented yet), not sound effects. +音轨中单个节拍内的小节数。这仅与希望利用交互式音乐功能(尚未实现)的音乐相关,与声音效果无关。 -A more convenient editor for :ref:`bar_beats` is provided in the **Advanced Import Settings** dialog, as it lets you preview your changes without having to reimport the audio. +\ **高级导入设置**\ 对话框中为 :ref:`bar_beats` 提供了更方便的编辑器,因为它可以让你预览更改,且无需重新导入音频。 .. rst-class:: classref-item-separator @@ -95,9 +95,9 @@ A more convenient editor for :ref:`bar_beats` **beat_count** = ``0`` -The beat count of the audio track. This is only relevant for music that wishes to make use of interactive music functionality (not implemented yet), not sound effects. +该音轨的节拍数。这仅与希望利用交互式音乐功能(尚未实现)的音乐相关,与声音效果无关。 -A more convenient editor for :ref:`beat_count` is provided in the **Advanced Import Settings** dialog, as it lets you preview your changes without having to reimport the audio. +\ **高级导入设置**\ 对话框中为 :ref:`beat_count` 提供了更方便的编辑器,因为它可以让你预览更改,且无需重新导入音频。 .. rst-class:: classref-item-separator @@ -109,9 +109,9 @@ A more convenient editor for :ref:`beat_count` **bpm** = ``0`` -The Beats Per Minute of the audio track. This should match the BPM measure that was used to compose the track. This is only relevant for music that wishes to make use of interactive music functionality (not implemented yet), not sound effects. +音轨的每分钟节拍数。这应该与用于创作曲目的 BPM 测量相匹配。这仅与希望利用交互式音乐功能(尚未实现)的音乐相关,与声音效果无关。 -A more convenient editor for :ref:`bpm` is provided in the **Advanced Import Settings** dialog, as it lets you preview your changes without having to reimport the audio. +\ **高级导入设置**\ 对话框中为 :ref:`bpm` 提供了更方便的编辑器,因为它可以让你预览更改,且无需重新导入音频。 .. rst-class:: classref-item-separator @@ -123,9 +123,9 @@ A more convenient editor for :ref:`bpm` **loop** = ``false`` -If enabled, the audio will begin playing at the beginning after playback ends by reaching the end of the audio. +如果启用,音频将在播放因到达音频末尾而结束后从头开始播放。 -\ **Note:** In :ref:`AudioStreamPlayer`, the :ref:`AudioStreamPlayer.finished` signal won't be emitted for looping audio when it reaches the end of the audio file, as the audio will keep playing indefinitely. +\ **注意:**\ 在 :ref:`AudioStreamPlayer` 中,当循环音频到达音频文件末尾时,不会发出 :ref:`AudioStreamPlayer.finished` 信号,因为音频将无限期地继续播放。 .. rst-class:: classref-item-separator @@ -137,11 +137,11 @@ If enabled, the audio will begin playing at the beginning after playback ends by :ref:`float` **loop_offset** = ``0`` -Determines where audio will start to loop after playback reaches the end of the audio. This can be used to only loop a part of the audio file, which is useful for some ambient sounds or music. The value is determined in seconds relative to the beginning of the audio. A value of ``0.0`` will loop the entire audio file. +确定播放到达音频结尾后音频将开始循环的位置。这可用于仅循环音频文件的一部分,这对于某些环境音或音乐很有用。该值以相对于音频开头的秒数确定。值为 ``0.0`` 将循环整个音频文件。 -Only has an effect if :ref:`loop` is ``true``. +仅当 :ref:`loop` 为 ``true`` 时才有效。 -A more convenient editor for :ref:`loop_offset` is provided in the **Advanced Import Settings** dialog, as it lets you preview your changes without having to reimport the audio. +\ **高级导入设置**\ 对话框中为 :ref:`loop_offset` 提供了更方便的编辑器,因为它可以让你预览更改,且无需重新导入音频。 .. rst-class:: classref-section-separator @@ -149,8 +149,8 @@ A more convenient editor for :ref:`loop_offset` **load_from_buffer** **(** :ref:`PackedByteArray` buffer **)** |static| -This method loads audio data from a PackedByteArray buffer into an AudioStreamOggVorbis object. +该方法将音频数据从 PackedByteArray 缓冲区加载到 AudioStreamOggVorbis 对象中。 .. rst-class:: classref-item-separator @@ -170,12 +170,12 @@ This method loads audio data from a PackedByteArray buffer into an AudioStreamOg :ref:`AudioStreamOggVorbis` **load_from_file** **(** :ref:`String` path **)** |static| -This method loads audio data from a file into an AudioStreamOggVorbis object. The file path is provided as a string. +该方法将音频数据从文件加载到 AudioStreamOggVorbis 对象中。文件路径以字符串形式提供。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceimporterscene.rst b/classes/zh_CN/class_resourceimporterscene.rst index 378bbbe539..360c94700b 100644 --- a/classes/zh_CN/class_resourceimporterscene.rst +++ b/classes/zh_CN/class_resourceimporterscene.rst @@ -10,32 +10,32 @@ ResourceImporterScene ===================== -**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -Imports a glTF, FBX, Collada or Blender 3D scene. +导入 glTF、FBX、Collada 或 Blender 3D 场景。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -See also :ref:`ResourceImporterOBJ`, which is used for OBJ models that can be imported as a standalone :ref:`Mesh` or a scene. +另请参见 :ref:`ResourceImporterOBJ`\ ,它被用于可作为独立 :ref:`Mesh` 或场景导入的 OBJ 模型。 -Additional options (such as extracting individual meshes or materials to files) are available in the **Advanced Import Settings** dialog. This dialog can be accessed by double-clicking a 3D scene in the FileSystem dock or by selecting a 3D scene in the FileSystem dock, going to the Import dock and choosing **Advanced**. +\ **高级导入设置** 对话框中提供了其他选项(例如将单个网格或材质提取到文件)。可以通过双击文件系统停靠面板中的 3D 场景或通过选择文件系统停靠面板中的 3D 场景,转至导入停靠面板并选择\ **高级**\ 来访问该对话框。 -\ **Note:** **ResourceImporterScene** is *not* used for :ref:`PackedScene`\ s, such as ``.tscn`` and ``.scn`` files. +\ **注意:**\ **ResourceImporterScene** *未*\ 被用于 :ref:`PackedScene`\ ,例如 ``.tscn`` 和 ``.scn`` 文件 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Importing 3D scenes <../tutorials/assets_pipeline/importing_scenes>` +- :doc:`导入 3D 场景 <../tutorials/assets_pipeline/importing_3d_scenes/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -57,6 +57,8 @@ Properties +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`meshes/ensure_tangents` | ``true`` | +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`meshes/force_disable_compression` | ``false`` | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`meshes/generate_lods` | ``true`` | +-------------------------------------+------------------------------------------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`meshes/light_baking` | ``1`` | @@ -80,8 +82,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ResourceImporterScene_property__subresources: @@ -89,7 +91,7 @@ Property Descriptions :ref:`Dictionary` **_subresources** = ``{}`` -Contains properties for the scene's subresources. This is an internal option which is not visible in the Import dock. +包含场景子资源的属性。这是一个内部选项,在导入停靠面板中不可见。 .. rst-class:: classref-item-separator @@ -101,7 +103,7 @@ Contains properties for the scene's subresources. This is an internal option whi :ref:`float` **animation/fps** = ``30`` -The number of frames per second to use for baking animation curves to a series of points with linear interpolation. It's recommended to configure this value to match the value you're using as a baseline in your 3D modeling software. Higher values result in more precise animation with fast movement changes, at the cost of higher file sizes and memory usage. Thanks to interpolation, there is usually not much benefit in going above 30 FPS (as the animation will still appear smooth at higher rendering framerates). +用于通过线性插值将动画曲线烘焙为一系列点的每秒帧数。建议配置该值以匹配你在 3D 建模软件中用作基线的值。较高的值会导致更精确的快速运动变化的动画,但代价是文件大小和内存占用更大。由于插值,超过 30 FPS 通常不会有太大好处(因为动画在更高的渲染帧速率下仍然会显得平滑)。 .. rst-class:: classref-item-separator @@ -113,7 +115,7 @@ The number of frames per second to use for baking animation curves to a series o :ref:`bool` **animation/import** = ``true`` -If ``true``, import animations from the 3D scene. +如果为 ``true``\ ,则从 3D 场景导入动画。 .. rst-class:: classref-item-separator @@ -125,7 +127,7 @@ If ``true``, import animations from the 3D scene. :ref:`bool` **animation/remove_immutable_tracks** = ``true`` -If ``true``, remove animation tracks that only contain default values. This can reduce output file size and memory usage with certain 3D scenes, depending on the contents of their animation tracks. +如果为 ``true``\ ,则移除仅包含默认值的动画轨道。这可以减少某些 3D 场景的输出文件大小和内存占用,具体取决于其动画轨道的内容。 .. rst-class:: classref-item-separator @@ -137,7 +139,7 @@ If ``true``, remove animation tracks that only contain default values. This can :ref:`bool` **animation/trimming** = ``false`` -If ``true``, trim the beginning and end of animations if there are no keyframe changes. This can reduce output file size and memory usage with certain 3D scenes, depending on the contents of their animation tracks. +如果为 ``true``\ ,如果没有关键帧更改,则修剪动画的开头和结尾。这可以减少某些 3D 场景的输出文件大小和内存占用,具体取决于其动画轨道的内容。 .. rst-class:: classref-item-separator @@ -149,7 +151,7 @@ If ``true``, trim the beginning and end of animations if there are no keyframe c :ref:`String` **import_script/path** = ``""`` -Path to an import script, which can run code after the import process has completed for custom processing. See `Using import scripts for automation <../tutorials/assets_pipeline/importing_scenes.html#doc-importing-3d-scenes-import-script>`__ for more information. +导入脚本的路径,该脚本可以在导入过程完成后运行代码以进行自定义处理。有关详细信息,请参阅 `使用导入脚本进行自动化 <../tutorials/assets_pipeline/importing_3d_scenes/import_configuration.html#using-import-scripts-for-automation>`__\ 。 .. rst-class:: classref-item-separator @@ -161,7 +163,7 @@ Path to an import script, which can run code after the import process has comple :ref:`bool` **meshes/create_shadow_meshes** = ``true`` -If ``true``, enables the generation of shadow meshes on import. This optimizes shadow rendering without reducing quality by welding vertices together when possible. This in turn reduces the memory bandwidth required to render shadows. Shadow mesh generation currently doesn't support using a lower detail level than the source mesh (but shadow rendering will make use of LODs when relevant). +如果为 ``true``\ ,则在导入时启用阴影网格体的生成。这可以通过在可能的情况下将顶点焊接在一起来优化阴影渲染,且不会降低质量。这反过来又减少了渲染阴影所需的内存带宽。阴影网格生成当前不支持使用比源网格更低的细节级别(但阴影渲染将在相关时使用 LOD)。 .. rst-class:: classref-item-separator @@ -173,9 +175,21 @@ If ``true``, enables the generation of shadow meshes on import. This optimizes s :ref:`bool` **meshes/ensure_tangents** = ``true`` -If ``true``, generate vertex tangents using `Mikktspace `__ if the input meshes don't have tangent data. When possible, it's recommended to let the 3D modeling software generate tangents on export instead on relying on this option. Tangents are required for correct display of normal and height maps, along with any material/shader features that require tangents. +如果为 ``true``\ ,如果输入网格没有切线数据,则使用 `Mikktspace `__ 生成顶点切线。如果可能,建议让 3D 建模软件在导出时生成切线,而不是依赖于该选项。正确显示法线和高度贴图,以及任何需要切线的材质/着色器功能都需要切线。 -If you don't need material features that require tangents, disabling this can reduce output file size and speed up importing if the source 3D file doesn't contain tangents. +如果你不需要那些需要切线的材质特性,则禁用该功能可以减少输出文件大小,并在源 3D 文件不包含切线的情况下加快导入速度。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ResourceImporterScene_property_meshes/force_disable_compression: + +.. rst-class:: classref-property + +:ref:`bool` **meshes/force_disable_compression** = ``false`` + +如果为 ``true``\ ,则不会使用网格压缩。如果你在网格法线或 UV 中发现块状伪影,或者如果你的网格在每个方向都大于几千米,请考虑启用。 .. rst-class:: classref-item-separator @@ -187,7 +201,7 @@ If you don't need material features that require tangents, disabling this can re :ref:`bool` **meshes/generate_lods** = ``true`` -If ``true``, generates lower detail variants of the mesh which will be displayed in the distance to improve rendering performance. Not all meshes benefit from LOD, especially if they are never rendered from far away. Disabling this can reduce output file size and speed up importing. See `Mesh level of detail (LOD) <../tutorials/3d/mesh_lod.html#doc-mesh-lod>`__ for more information. +如果为 ``true``\ ,则生成网格的较低细节变体,这些变体将显示在远处以提高渲染性能。并非所有网格体都受益于 LOD,特别是如果它们从未从远处渲染。禁用该功能可以减少输出文件大小并加快导入速度。有关详细信息,请参阅 `网格细节级别(LOD) <../tutorials/3d/mesh_lod.html#doc-mesh-lod>`__\ 。 .. rst-class:: classref-item-separator @@ -199,7 +213,7 @@ If ``true``, generates lower detail variants of the mesh which will be displayed :ref:`int` **meshes/light_baking** = ``1`` -Configures the meshes' :ref:`GeometryInstance3D.gi_mode` in the 3D scene. If set to **Static Lightmaps**, sets the meshes' GI mode to Static and generates UV2 on import for :ref:`LightmapGI` baking. +在 3D 场景中配置网格体的 :ref:`GeometryInstance3D.gi_mode`\ 。如果被设置为\ **静态光照贴图**\ ,则将网格体的 GI 模式设置为静态并在导入时生成 UV2 以进行 :ref:`LightmapGI` 烘焙。 .. rst-class:: classref-item-separator @@ -211,9 +225,9 @@ Configures the meshes' :ref:`GeometryInstance3D.gi_mode` **meshes/lightmap_texel_size** = ``0.2`` -Controls the size of each texel on the baked lightmap. A smaller value results in more precise lightmaps, at the cost of larger lightmap sizes and longer bake times. +控制烘焙光照贴图上每个纹素的大小。较小的值会产生更精确的光照贴图,但代价是更大的光照贴图大小和更长的烘焙时间。 -\ **Note:** Only effective if :ref:`meshes/light_baking` is set to **Static Lightmaps**. +\ **注意:**\ 仅当 :ref:`meshes/light_baking` 被设置为\ **静态光照贴图**\ 时有效。 .. rst-class:: classref-item-separator @@ -225,7 +239,7 @@ Controls the size of each texel on the baked lightmap. A smaller value results i :ref:`bool` **nodes/apply_root_scale** = ``true`` -If ``true``, :ref:`nodes/root_scale` will be applied to the descendant nodes, meshes, animations, bones, etc. This means that if you add a child node later on within the imported scene, it won't be scaled. If ``false``, :ref:`nodes/root_scale` will multiply the scale of the root node instead. +如果为 ``true``\ ,\ :ref:`nodes/root_scale` 将被应用于后代节点、网格、动画、骨骼等。这意味着,如果你稍后在导入的场景中添加子节点,它将不会被缩放。如果为 ``false``\ ,\ :ref:`nodes/root_scale` 将乘以该根节点的缩放。 .. rst-class:: classref-item-separator @@ -237,7 +251,7 @@ If ``true``, :ref:`nodes/root_scale` **nodes/root_name** = ``""`` -Override for the root node name. If empty, the root node will use what the scene specifies, or the file name if the scene does not specify a root name. +覆盖根节点名称。如果为空,则根节点将使用场景指定的内容;如果场景未指定根名称,则根节点将使用该文件名。 .. rst-class:: classref-item-separator @@ -249,7 +263,7 @@ Override for the root node name. If empty, the root node will use what the scene :ref:`float` **nodes/root_scale** = ``1.0`` -The uniform scale to use for the scene root. The default value of ``1.0`` will not perform any rescaling. See :ref:`nodes/apply_root_scale` for details of how this scale is applied. +用于场景根的统一缩放。默认值 ``1.0`` 不会执行任何重新缩放。有关如何应用该缩放的详细信息,请参阅 :ref:`nodes/apply_root_scale`\ 。 .. rst-class:: classref-item-separator @@ -261,7 +275,7 @@ The uniform scale to use for the scene root. The default value of ``1.0`` will n :ref:`String` **nodes/root_type** = ``""`` -Override for the root node type. If empty, the root node will use what the scene specifies, or :ref:`Node3D` if the scene does not specify a root type. Using a node type that inherits from :ref:`Node3D` is recommended. Otherwise, you'll lose the ability to position the node directly in the 3D editor. +覆盖该根节点类型。如果为空,则根节点将使用场景指定的内容,如果场景未指定根类型,则根节点将使用 :ref:`Node3D`\ 。建议使用继承自 :ref:`Node3D` 的节点类型。否则,你将无法直接在 3D 编辑器中定位节点。 .. rst-class:: classref-item-separator @@ -273,20 +287,20 @@ Override for the root node type. If empty, the root node will use what the scene :ref:`bool` **skins/use_named_skins** = ``true`` -If checked, use named :ref:`Skin`\ s for animation. The :ref:`MeshInstance3D` node contains 3 properties of relevance here: a skeleton :ref:`NodePath` pointing to the :ref:`Skeleton3D` node (usually ``..``), a mesh, and a skin: +如果勾选,则为动画使用命名的 :ref:`Skin`\ 。\ :ref:`MeshInstance3D` 节点包含 3 个相关属性:指向 :ref:`Skeleton3D` 节点的骨架 :ref:`NodePath`\ (通常为 ``..``\ )、网格、和皮肤: -- The :ref:`Skeleton3D` node contains a list of bones with names, their pose and rest, a name and a parent bone. +- :ref:`Skeleton3D` 节点包含骨骼列表,其中包含名称、姿势和休息、名称和父骨骼。 -- The mesh is all of the raw vertex data needed to display a mesh. In terms of the mesh, it knows how vertices are weight-painted and uses some internal numbering often imported from 3D modeling software. +- 网格是显示网格所需的所有原始顶点数据。就网格而言,它知道如何对顶点进行权重绘制,并使用通常从 3D 建模软件导入的某些内部编号。 -- The skin contains the information necessary to bind this mesh onto this Skeleton3D. For every one of the internal bone IDs chosen by the 3D modeling software, it contains two things. Firstly, a matrix known as the Bind Pose Matrix, Inverse Bind Matrix, or IBM for short. Secondly, the :ref:`Skin` contains each bone's name (if :ref:`skins/use_named_skins` is ``true``), or the bone's index within the :ref:`Skeleton3D` list (if :ref:`skins/use_named_skins` is ``false``). +- 皮肤包含将该网格绑定到该 Skeleton3D 上所必需的信息。对于 3D 建模软件选择的每一个内部骨骼 ID,它都包含两件事。首先是一个名为绑定姿势矩阵、逆绑定矩阵、或简称为 IBM 的矩阵。其次,该 :ref:`Skin` 包含每个骨骼的名称(如果 :ref:`skins/use_named_skins` 为 ``true``\ ),或者骨骼在 :ref:`Skeleton3D` 列表中的索引(如果 :ref:`skins/use_named_skins` 为 ``false``\ )。 -Together, this information is enough to tell Godot how to use the bone poses in the :ref:`Skeleton3D` node to render the mesh from each :ref:`MeshInstance3D`. Note that each :ref:`MeshInstance3D` may share binds, as is common in models exported from Blender, or each :ref:`MeshInstance3D` may use a separate :ref:`Skin` object, as is common in models exported from other tools such as Maya. +总之,这些信息足以告诉 Godot 如何使用 :ref:`Skeleton3D` 节点中的骨骼姿势来渲染每个 :ref:`MeshInstance3D` 的网格。请注意,每个 :ref:`MeshInstance3D` 可以共享绑定,这在从 Blender 导出的模型中很常见;或者每个 :ref:`MeshInstance3D` 可以使用单独的 :ref:`Skin` 对象,这在从其他工具(例如 Maya)导出的模型中很常见。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceimportershaderfile.rst b/classes/zh_CN/class_resourceimportershaderfile.rst index 23329719d5..8b1e1aefe6 100644 --- a/classes/zh_CN/class_resourceimportershaderfile.rst +++ b/classes/zh_CN/class_resourceimportershaderfile.rst @@ -10,21 +10,21 @@ ResourceImporterShaderFile ========================== -**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -Imports native GLSL shaders (not Godot shaders) as a :ref:`RDShaderFile`. +将原生 GLSL 着色器(不是 Godot 着色器)导入为 :ref:`RDShaderFile`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This imports native GLSL shaders as :ref:`RDShaderFile` resources, for use with low-level :ref:`RenderingDevice` operations. This importer does *not* handle ``.gdshader`` files. +这会将原生 GLSL 着色器导入为 :ref:`RDShaderFile` 资源,以与低级 :ref:`RenderingDevice` 操作一起使用。该导入器\ *不*\ 处理 ``.gdshader`` 文件。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceimportertexture.rst b/classes/zh_CN/class_resourceimportertexture.rst index 81309af6b6..db927f14ca 100644 --- a/classes/zh_CN/class_resourceimportertexture.rst +++ b/classes/zh_CN/class_resourceimportertexture.rst @@ -10,28 +10,28 @@ ResourceImporterTexture ======================= -**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -Imports an image for use in 2D or 3D rendering. +导入图像以用于 2D 或 3D 渲染。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This importer imports :ref:`CompressedTexture2D` resources. If you need to process the image in scripts in a more convenient way, use :ref:`ResourceImporterImage` instead. See also :ref:`ResourceImporterLayeredTexture`. +该导入器导入 :ref:`CompressedTexture2D` 资源。如果你需要以更方便的方式处理脚本中的图像,请改用 :ref:`ResourceImporterImage`\ 。另见 :ref:`ResourceImporterLayeredTexture`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`导入图像 <../tutorials/assets_pipeline/importing_images>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -84,8 +84,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ResourceImporterTexture_property_compress/channel_pack: @@ -93,11 +93,11 @@ Property Descriptions :ref:`int` **compress/channel_pack** = ``0`` -Controls how color channels should be used in the imported texture. +控制在导入的纹理中应如何使用颜色通道。 -\ **sRGB Friendly:** Prevents the RG color format from being used, as it does not support sRGB color. +\ **sRGB 友好:**\ 阻止使用 RG 颜色格式,因为它不支持 sRGB 颜色。 -\ **Optimized:** Allows the RG color format to be used if the texture does not use the blue channel. This reduces memory usage if the texture's blue channel can be discarded (all pixels must have a blue value of ``0``). +\ **优化:**\ 如果纹理不使用蓝色通道,则允许使用 RG 颜色格式。如果可以丢弃纹理的蓝色通道(所有像素的蓝色值必须为 ``0``\ ),则可以减少内存占用。 .. rst-class:: classref-item-separator @@ -109,15 +109,15 @@ Controls how color channels should be used in the imported texture. :ref:`int` **compress/hdr_compression** = ``1`` -Controls how VRAM compression should be performed for HDR images. +控制如何对 HDR 图像执行 VRAM 压缩。 -\ **Disabled:** Never use VRAM compression for HDR textures, regardless of whether they're opaque or transparent. Instead, the texture is converted to RGBE9995 (9-bits per channel + 5-bit exponent = 32 bits per pixel) to reduce memory usage compared to a half-float or single-precision float image format. +\ **禁用:**\ 永远不要对 HDR 纹理使用 VRAM 压缩,无论它们是否透明。相反,该纹理会被转换为 RGBE9995(每通道 9 位 + 5 位指数 = 每像素 32 位),与半浮点或单精度浮点图像格式相比,会减少内存使用量。 -\ **Opaque Only:** Only uses VRAM compression for opaque HDR textures. This is due to a limitation of HDR formats, as there is no VRAM-compressed HDR format that supports transparency at the same time. +\ **仅不透明:**\ 仅对不透明 HDR 纹理使用 VRAM 压缩。这是由于 HDR 格式的限制,因为没有支持 VRAM 压缩且同时支持透明度的 HDR 格式。 -\ **Always:** Force VRAM compression even for HDR textures with an alpha channel. To perform this, the alpha channel is discarded on import. +\ **始终:**\ 强制 VRAM 压缩,即使对于具有 Alpha 通道的 HDR 纹理也是如此。为此,在导入时将丢弃 Alpha 通道。 -\ **Note:** Only effective on Radiance HDR (``.hdr``) and OpenEXR (``.exr``) images. +\ **注意:**\ 仅对 Radiance HDR(\ ``.hdr``\ )和 OpenEXR(\ ``.exr``\ )图像有效。 .. rst-class:: classref-item-separator @@ -129,11 +129,11 @@ Controls how VRAM compression should be performed for HDR images. :ref:`bool` **compress/high_quality** = ``false`` -If ``true``, uses BPTC compression on desktop platforms and ASTC compression on mobile platforms. When using BPTC, BC7 is used for SDR textures and BC6H is used for HDR textures. +如果为 ``true``\ ,则在桌面平台上使用 BPTC 压缩,在移动平台上使用 ASTC 压缩。使用 BPTC 时,BC7 被用于 SDR 纹理,BC6H 被用于 HDR 纹理。 -If ``false``, uses the faster but lower-quality S3TC compression on desktop platforms and ETC2 on mobile/web platforms. When using S3TC, DXT1 (BC1) is used for opaque textures and DXT5 (BC3) is used for transparent or normal map (RGTC) textures. +如果为 ``false``\ ,则在桌面平台上使用速度更快但质量较低的 S3TC 压缩,在移动/Web 平台上使用 ETC2。使用 S3TC 时,DXT1 (BC1) 被用于不透明纹理,DXT5 (BC3) 被用于透明或法线贴图(RGTC)纹理。 -BPTC and ASTC support VRAM compression for HDR textures, but S3TC and ETC2 do not (see :ref:`compress/hdr_compression`). +BPTC 和 ASTC 支持 HDR 纹理的 VRAM 压缩,但 S3TC 和 ETC2 不支持(请参阅 :ref:`compress/hdr_compression`\ )。 .. rst-class:: classref-item-separator @@ -145,7 +145,7 @@ BPTC and ASTC support VRAM compression for HDR textures, but S3TC and ETC2 do no :ref:`float` **compress/lossy_quality** = ``0.7`` -The quality to use when using the **Lossy** compression mode. Higher values result in better quality, at the cost of larger file sizes. Lossy quality does not affect memory usage of the imported texture, only its file size on disk. +使用\ **有损**\ 压缩模式时使用的质量。值越高,质量越好,但文件大小越大。有损质量不会影响导入纹理的内存使用情况,只会影响它在磁盘上的文件大小。 .. rst-class:: classref-item-separator @@ -157,19 +157,19 @@ The quality to use when using the **Lossy** compression mode. Higher values resu :ref:`int` **compress/mode** = ``0`` -The compression mode to use. Each compression mode provides a different tradeoff: +要使用的压缩模式。每种压缩模式都提供不同的权衡: -\ **Lossless**: Original quality, high memory usage, high size on disk, fast import. +\ **无损:**\ 原始质量、高内存占用、高磁盘占用、导入速度快。 -\ **Lossy:** Reduced quality, high memory usage, low size on disk, fast import. +\ **有损:**\ 质量降低、高内存占用、低磁盘占用、导入速度快。 -\ **VRAM Compressed:** Reduced quality, low memory usage, low size on disk, slowest import. Only use for textures in 3D scenes, not for 2D elements. +\ **VRAM 压缩:**\ 质量降低、低内存占用、低磁盘占用、导入速度最慢。仅适用于 3D 场景中的纹理,不适用于 2D 元素。 -\ **VRAM Uncompressed:** Original quality, high memory usage, highest size on disk, fastest import. +\ **VRAM 未压缩:**\ 原始质量、高内存占用、最高磁盘占用、导入速度最快。 -\ **Basis Universal:** Reduced quality, low memory usage, lowest size on disk, slow import. Only use for textures in 3D scenes, not for 2D elements. +\ **Basis Universal:**\ 质量降低、低内存占用、最低磁盘占用、导入速度慢。仅适用于 3D 场景中的纹理,不适用于 2D 元素。 -See `Compress mode <../tutorials/assets_pipeline/importing_images.html#compress-mode>`__ in the manual for more details. +有关更多详细信息,请参阅手册中的 `压缩模式 <../tutorials/assets_pipeline/importing_images.html#compress-mode>`__\ 。 .. rst-class:: classref-item-separator @@ -181,9 +181,9 @@ See `Compress mode <../tutorials/assets_pipeline/importing_images.html#compress- :ref:`int` **compress/normal_map** = ``0`` -When using a texture as normal map, only the red and green channels are required. Given regular texture compression algorithms produce artifacts that don't look that nice in normal maps, the RGTC compression format is the best fit for this data. Forcing this option to Enable will make Godot import the image as RGTC compressed. By default, it's set to Detect. This means that if the texture is ever detected to be used as a normal map, it will be changed to Enable and reimported automatically. +当使用纹理作为法线贴图时,仅需要红色和绿色通道。鉴于常规纹理压缩算法会产生在法线贴图中看起来不太好的伪像,因此 RGTC 压缩格式最适合该数据。 强制该选项启用将使 Godot 以 RGTC 压缩形式导入图像。默认情况下,它被设置为“检测”。这意味着,如果纹理被检测到用作法线贴图,它将被更改为“启用”并自动重新导入。 -Note that RGTC compression affects the resulting normal map image. You will have to adjust custom shaders that use the normal map's blue channel to take this into account. Built-in material shaders already ignore the blue channel in a normal map (regardless of the actual normal map's contents). +请注意,RGTC 压缩会影响生成的法线贴图图像。你必须调整使用法线贴图的蓝色通道的自定义着色器才能考虑到这一点。内置材质着色器已经忽略法线贴图中的蓝色通道(无论实际法线贴图的内容如何)。 .. rst-class:: classref-item-separator @@ -195,9 +195,9 @@ Note that RGTC compression affects the resulting normal map image. You will have :ref:`int` **detect_3d/compress_to** = ``1`` -This changes the :ref:`compress/mode` option that is used when a texture is detected as being used in 3D. +这会更改检测到纹理在 3D 中使用时使用的 :ref:`compress/mode` 选项。 -Changing this import option only has an effect if a texture is detected as being used in 3D. Changing this to **Disabled** then reimporting will not change the existing compress mode on a texture (if it's detected to be used in 3D), but choosing **VRAM Compressed** or **Basis Universal** will. +仅当检测到纹理正在 3D 中使用时,更改该导入选项才会生效。将其更改为\ **禁用**\ ,然后重新导入不会更改纹理上的已有压缩模式(如果被检测到在 3D 中使用),但选择 **VRAM 压缩**\ 或 **Basis Universal** 却会。 .. rst-class:: classref-item-separator @@ -209,9 +209,9 @@ Changing this import option only has an effect if a texture is detected as being :ref:`bool` **editor/convert_colors_with_editor_theme** = ``false`` -If ``true``, converts the imported image's colors to match :ref:`EditorSettings.interface/theme/icon_and_font_color`. This assumes the image uses the exact same colors as :doc:`Godot's own color palette for editor icons <../contributing/development/editor/creating_icons>`, with the source file designed for a dark editor theme. This should be enabled for editor plugin icons and custom class icons, but should be left disabled otherwise. +如果为 ``true``\ ,则转换导入图像的颜色以匹配 :ref:`EditorSettings.interface/theme/icon_and_font_color`\ 。这假设该图像使用与 :doc:`Godot 自己的编辑器图标调色板 <../contributing/development/editor/creating_icons>`\ 完全相同的颜色,源文件是为深色编辑器主题设计的。应该为编辑器插件图标和自定义类图标启用该功能,否则应保持禁用状态。 -\ **Note:** Only available for SVG images. +\ **注意:**\ 仅适用于 SVG 图像。 .. rst-class:: classref-item-separator @@ -223,9 +223,9 @@ If ``true``, converts the imported image's colors to match :ref:`EditorSettings. :ref:`bool` **editor/scale_with_editor_scale** = ``false`` -If ``true``, scales the imported image to match :ref:`EditorSettings.interface/editor/custom_display_scale`. This should be enabled for editor plugin icons and custom class icons, but should be left disabled otherwise. +如果为 ``true``\ ,则缩放导入的图像以匹配 :ref:`EditorSettings.interface/editor/custom_display_scale`\ 。应该为编辑器插件图标和自定义类图标启用该功能,否则应保持禁用状态。 -\ **Note:** Only available for SVG images. +\ **注意:**\ 仅适用于 SVG 图像。 .. rst-class:: classref-item-separator @@ -237,15 +237,15 @@ If ``true``, scales the imported image to match :ref:`EditorSettings.interface/e :ref:`bool` **mipmaps/generate** = ``false`` -If ``true``, smaller versions of the texture are generated on import. For example, a 64×64 texture will generate 6 mipmaps (32×32, 16×16, 8×8, 4×4, 2×2, 1×1). This has several benefits: +如果为 ``true``\ ,则在导入时生成较小版本的纹理。例如,64×64 纹理将生成 6 个多级渐远纹理(32×32、16×16、8×8、4×4、2×2、1×1)。这样做有几个好处: -- Textures will not become grainy in the distance (in 3D), or if scaled down due to :ref:`Camera2D` zoom or :ref:`CanvasItem` scale (in 2D). +- 纹理在远处(在 3D 中)或由于 :ref:`Camera2D` 缩放或 :ref:`CanvasItem` 缩放(在 2D 中)而缩小时不会变得具有颗粒感。 -- Performance will improve if the texture is displayed in the distance, since sampling smaller versions of the original texture is faster and requires less memory bandwidth. +- 如果纹理显示在远处,性能将会提高,因为对原始纹理的较小版本进行采样速度更快并且需要更少的内存带宽。 -The downside of mipmaps is that they increase memory usage by roughly 33%. +多级渐远纹理的缺点是它们会增加大约 33% 的内存占用。 -It's recommended to enable mipmaps in 3D. However, in 2D, this should only be enabled if your project visibly benefits from having mipmaps enabled. If the camera never zooms out significantly, there won't be a benefit to enabling mipmaps but memory usage will increase. +建议在 3D 中启用多级渐远纹理。但是,在 2D 中,仅当你的项目明显受益于启用多级渐远纹理时才应启用该功能。如果相机从不大幅缩小,启用多级渐远纹理不会有任何好处,但内存占用会增加。 .. rst-class:: classref-item-separator @@ -257,7 +257,7 @@ It's recommended to enable mipmaps in 3D. However, in 2D, this should only be en :ref:`int` **mipmaps/limit** = ``-1`` -Unimplemented. This currently has no effect when changed. +未实现。目前,更改后没有效果。 .. rst-class:: classref-item-separator @@ -269,9 +269,9 @@ Unimplemented. This currently has no effect when changed. :ref:`bool` **process/fix_alpha_border** = ``true`` -If ``true``, puts pixels of the same surrounding color in transition from transparent to opaque areas. For textures displayed with bilinear filtering, this helps mitigate the outline effect when exporting images from an image editor. +如果为 ``true``\ ,则将相同周围颜色的像素置于从透明区域到不透明区域的过渡中。对于使用双线性过滤显示的纹理,这有助于减轻从图像编辑器导出图像时的轮廓效果。 -It's recommended to leave this enabled (as it is by default), unless this causes issues for a particular image. +建议启用该功能(默认情况下),除非这会导致特定图像出现问题。 .. rst-class:: classref-item-separator @@ -283,9 +283,9 @@ It's recommended to leave this enabled (as it is by default), unless this causes :ref:`bool` **process/hdr_as_srgb** = ``false`` -Some HDR images you can find online may be broken and contain sRGB color data (instead of linear color data). It is advised not to use those files. If you absolutely have to, enabling :ref:`process/hdr_as_srgb` will make them look correct. +你在网上可以找到的一些 HDR 图像可能已损坏并包含 sRGB 颜色数据(而不是线性颜色数据)。建议不要使用这些文件。 如果你一定要这样做,启用 :ref:`process/hdr_as_srgb` 将使它们看起来正确。 -\ **Warning:** Enabling :ref:`process/hdr_as_srgb` on well-formatted HDR images will cause the resulting image to look too dark, so leave this on ``false`` if unsure. +\ **警告:**\ 在格式良好的 HDR 图像上启用 :ref:`process/hdr_as_srgb` 将导致生成的图像看起来太暗,因此如果不确定,请将其保留为 ``false``\ 。 .. rst-class:: classref-item-separator @@ -297,11 +297,11 @@ Some HDR images you can find online may be broken and contain sRGB color data (i :ref:`bool` **process/hdr_clamp_exposure** = ``false`` -If ``true``, clamps exposure in the imported high dynamic range images using a smart clamping formula (without introducing *visible* clipping). +如果为 ``true``\ ,则使用智能钳制公式钳制导入的高动态范围图像中的曝光(而不引入\ *可见的*\ 裁剪)。 -Some HDR panorama images you can find online may contain extremely bright pixels, due to being taken from real life sources without any clipping. +你在网上可以找到的一些 HDR 全景图像可能包含非常明亮的像素,因为这些图像取自现实生活来源,没有任何裁剪。 -While these HDR panorama images are accurate to real life, this can cause the radiance map generated by Godot to contain sparkles when used as a background sky. This can be seen in material reflections (even on rough materials in extreme cases). Enabling :ref:`process/hdr_clamp_exposure` can resolve this. +虽然这些 HDR 全景图像准确反映现实生活,但这可能会导致 Godot 生成的辐射图在用作背景天空时包含闪光。这可以在材质反射中看到(即使在极端情况下的粗糙材质上)。启用 :ref:`process/hdr_clamp_exposure` 可以解决该问题。 .. rst-class:: classref-item-separator @@ -313,9 +313,9 @@ While these HDR panorama images are accurate to real life, this can cause the ra :ref:`bool` **process/normal_map_invert_y** = ``false`` -If ``true``, convert the normal map from Y- (DirectX-style) to Y+ (OpenGL-style) by inverting its green color channel. This is the normal map convention expected by Godot. +如果为 ``true``\ ,则通过反转其绿色通道将法线贴图从 Y-(DirectX 风格)转换为 Y+(OpenGL 风格)。这是 Godot 所期望的法线贴图约定。 -More information about normal maps (including a coordinate order table for popular engines) can be found `here `__. +有关法线贴图(包括流行引擎的坐标顺序表)的更多信息,可以在\ `这里 `__\ 找到。 .. rst-class:: classref-item-separator @@ -327,11 +327,11 @@ More information about normal maps (including a coordinate order table for popul :ref:`bool` **process/premult_alpha** = ``false`` -An alternative to fixing darkened borders with :ref:`process/fix_alpha_border` is to use premultiplied alpha. By enabling this option, the texture will be converted to this format. A premultiplied alpha texture requires specific materials to be displayed correctly: +使用 :ref:`process/fix_alpha_border` 修复黑色边框的另一种方法是使用预乘 Alpha。通过启用该选项,纹理将被转换为该格式。预乘 Alpha 纹理需要特定材质才能正确显示: -- In 2D, a :ref:`CanvasItemMaterial` will need to be created and configured to use the :ref:`CanvasItemMaterial.BLEND_MODE_PREMULT_ALPHA` blend mode on :ref:`CanvasItem`\ s that use this texture. +- 在 2D 中,需要创建并配置 :ref:`CanvasItemMaterial`\ ,以便在使用该纹理的 :ref:`CanvasItem` 上使用 :ref:`CanvasItemMaterial.BLEND_MODE_PREMULT_ALPHA` 混合模式。 -- In 3D, there is no support for premultiplied alpha blend mode yet, so this option is only suited for 2D. +- 在 3D 中,尚不支持预乘 Alpha 混合模式,因此该选项仅适用于 2D。 .. rst-class:: classref-item-separator @@ -343,9 +343,9 @@ An alternative to fixing darkened borders with :ref:`process/fix_alpha_border` **process/size_limit** = ``0`` -If set to a value greater than ``0``, the size of the texture is limited on import to a value smaller than or equal to the value specified here. For non-square textures, the size limit affects the longer dimension, with the shorter dimension scaled to preserve aspect ratio. Resizing is performed using cubic interpolation. +如果被设置为大于 ``0`` 的值,则导入时纹理的大小将被限制为小于或等于此处指定的值。对于非方形纹理,大小限制会影响较长的尺寸,而较短的尺寸会被缩放以保持纵横比。调整大小是使用三次插值来执行的。 -This can be used to reduce memory usage without affecting the source images, or avoid issues with textures not displaying on mobile/web platforms (as these usually can't display textures larger than 4096×4096). +这可被用于减少内存占用而不影响源图像,或避免纹理在移动/Web 平台上不显示的问题(因为这些平台通常无法显示大于 4096×4096 的纹理)。 .. rst-class:: classref-item-separator @@ -357,7 +357,7 @@ This can be used to reduce memory usage without affecting the source images, or :ref:`int` **roughness/mode** = ``0`` -The color channel to consider as a roughness map in this texture. Only effective if Roughness > Src Normal is not empty. +将该纹理视为粗糙度贴图的颜色通道。仅当粗糙度 > Src Normal 不为空时才有效。 .. rst-class:: classref-item-separator @@ -369,9 +369,9 @@ The color channel to consider as a roughness map in this texture. Only effective :ref:`String` **roughness/src_normal** = ``""`` -The path to the texture to consider as a normal map for roughness filtering on import. Specifying this can help decrease specular aliasing slightly in 3D. +纹理的路径被视为导入时粗糙度过滤的法线贴图。指定该项有助于稍微减少 3D 中的镜面锯齿。 -Roughness filtering on import is only used in 3D rendering, not 2D. +导入时的粗糙度过滤仅被用于 3D 渲染,不适用于 2D。 .. rst-class:: classref-item-separator @@ -383,14 +383,14 @@ Roughness filtering on import is only used in 3D rendering, not 2D. :ref:`float` **svg/scale** = ``1.0`` -The scale the SVG should be rendered at, with ``1.0`` being the original design size. Higher values result in a larger image. Note that unlike font oversampling, this affects the size the SVG is rendered at in 2D. See also :ref:`editor/scale_with_editor_scale`. +SVG 应渲染的比例,\ ``1.0`` 是原始设计尺寸。值越高,图像越大。请注意,与字体过采样不同,这会影响 SVG 在 2D 中渲染的大小。另请参阅 :ref:`editor/scale_with_editor_scale`\ 。 -\ **Note:** Only available for SVG images. +\ **注意:**\ 仅适用于 SVG 图像。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceimportertextureatlas.rst b/classes/zh_CN/class_resourceimportertextureatlas.rst index f2f3e73a33..f3874565be 100644 --- a/classes/zh_CN/class_resourceimportertextureatlas.rst +++ b/classes/zh_CN/class_resourceimportertextureatlas.rst @@ -10,23 +10,23 @@ ResourceImporterTextureAtlas ============================ -**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -Imports a collection of textures from a PNG image into an optimized :ref:`AtlasTexture` for 2D rendering. +将 PNG 图像中的纹理集合导入到优化的 :ref:`AtlasTexture` 中以进行 2D 渲染。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This imports a collection of textures from a PNG image into an :ref:`AtlasTexture` or 2D :ref:`ArrayMesh`. This can be used to save memory when importing 2D animations from spritesheets. Texture atlases are only supported in 2D rendering, not 3D. See also :ref:`ResourceImporterTexture` and :ref:`ResourceImporterLayeredTexture`. +这会将 PNG 图像中的纹理集合导入到 :ref:`AtlasTexture` 或 2D :ref:`ArrayMesh` 中。从精灵表导入 2D 动画时,这可被用于节省内存。纹理图集仅支持在 2D 中渲染,不支持 3D。另请参见 :ref:`ResourceImporterTexture` 和 :ref:`ResourceImporterLayeredTexture`\ 。 -\ **Note:** **ResourceImporterTextureAtlas** does not handle importing :ref:`TileSetAtlasSource`, which is created using the :ref:`TileSet` editor instead. +\ **注意:**\ **ResourceImporterTextureAtlas** 不处理导入 :ref:`TileSetAtlasSource`\ ,它是使用 :ref:`TileSet` 编辑器创建的。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ResourceImporterTextureAtlas_property_atlas_file: @@ -56,7 +56,7 @@ Property Descriptions :ref:`String` **atlas_file** = ``""`` -Path to the atlas spritesheet. This *must* be set to valid path to a PNG image. Otherwise, the atlas will fail to import. +图集精灵表的路径。该属性\ *必须*\ 被设置为 PNG 图像的有效路径。否则,图集将无法导入。 .. rst-class:: classref-item-separator @@ -68,9 +68,9 @@ Path to the atlas spritesheet. This *must* be set to valid path to a PNG image. :ref:`bool` **crop_to_region** = ``false`` -If ``true``, discards empty areas from the atlas. This only affects final sprite positioning, not storage. See also :ref:`trim_alpha_border_from_region`. +如果为 ``true``\ ,则丢弃图集中的空白区域。这仅影响最终的精灵定位,而不影响存储。另请参见 :ref:`trim_alpha_border_from_region`\ 。 -\ **Note:** Only effective if :ref:`import_mode` is **Region**. +\ **注意:**\ 仅当 :ref:`import_mode` 为\ **区块**\ 时有效。 .. rst-class:: classref-item-separator @@ -82,9 +82,9 @@ If ``true``, discards empty areas from the atlas. This only affects final sprite :ref:`int` **import_mode** = ``0`` -**Region:** Imports the atlas in an :ref:`AtlasTexture` resource, which is rendered as a rectangle. This is fast to render, but transparent areas still have to be rendered if they can't be trimmed effectively by :ref:`trim_alpha_border_from_region`. This can reduce performance when rendering large sprites on screen. +**区块:**\ 将图集导入到 :ref:`AtlasTexture` 资源中,该资源被渲染为矩形。这渲染速度很快,但如果 :ref:`trim_alpha_border_from_region` 无法有效修剪透明区域,则仍然必须渲染透明区域。 在屏幕上渲染大型精灵时,这会降低性能。 -\ **Mesh:** Imports the atlas as an :ref:`ArrayMesh` resource, keeping the original bitmap visible (but rendered as a polygon). This can be used to reduce fill rate when rendering large transparent sprites, at the cost of slower rendering if there are little to no transparent areas in the sprite. +\ **网格:**\ 将图集导入为 :ref:`ArrayMesh` 资源,保持原始位图可见(但被渲染为多边形)。这可被用于在渲染大型透明精灵时降低填充率,但代价是如果精灵中几乎没有透明区域,则渲染速度会变慢。 .. rst-class:: classref-item-separator @@ -96,14 +96,14 @@ If ``true``, discards empty areas from the atlas. This only affects final sprite :ref:`bool` **trim_alpha_border_from_region** = ``true`` -If ``true``, trims the region to exclude fully transparent pixels using a clipping rectangle (which is never rotated). This can be used to save memory. See also :ref:`trim_alpha_border_from_region`. +如果为 ``true``\ ,则使用裁剪矩形(从不旋转)修剪区块以排除完全透明的像素。这可以被用来节省内存。另请参见 :ref:`crop_to_region`\ 。 -\ **Note:** Only effective if :ref:`import_mode` is **Region**. +\ **注意:**\ 仅当 :ref:`import_mode` 为\ **区块**\ 时有效。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceimporterwav.rst b/classes/zh_CN/class_resourceimporterwav.rst index bab6f682e2..62fcce632f 100644 --- a/classes/zh_CN/class_resourceimporterwav.rst +++ b/classes/zh_CN/class_resourceimporterwav.rst @@ -10,28 +10,28 @@ ResourceImporterWAV =================== -**Inherits:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ResourceImporter` **<** :ref:`RefCounted` **<** :ref:`Object` -Imports a WAV audio file for playback. +导入 WAV 音频文件,用于播放。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -WAV is an uncompressed format, which can provide higher quality compared to Ogg Vorbis and MP3. It also has the lowest CPU cost to decode. This means high numbers of WAV sounds can be played at the same time, even on low-end deviceS. +WAV 是未经压缩的格式,能够提供比 Ogg Vorbis 和 MP3 更高的质量。解压时的 CPU 开销也最低。因此,即便在低端设备上,也能够同时播放大量的 WAV 声音。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Importing audio samples <../tutorials/assets_pipeline/importing_audio_samples>` +- :doc:`导入音频样本 <../tutorials/assets_pipeline/importing_audio_samples>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ResourceImporterWAV_property_compress/mode: @@ -73,11 +73,11 @@ Property Descriptions :ref:`int` **compress/mode** = ``0`` -The compression mode to use on import. +导入时使用的压缩模式。 -\ **Disabled:** Imports audio data without any compression. This results in the highest possible quality. +\ **Disabled:**\ 导入音频数据,不进行压缩。得到的质量最高。 -\ **RAM (Ima-ADPCM):** Performs fast lossy compression on import. Low CPU cost, but quality is noticeably decreased compared to Ogg Vorbis or even MP3. +\ **RAM (Ima-ADPCM):**\ 导入时进行快速有损压缩。CPU 开销较低,但质量比 Ogg Vorbis 甚至是 MP3 都显著更低。 .. rst-class:: classref-item-separator @@ -89,7 +89,7 @@ The compression mode to use on import. :ref:`int` **edit/loop_begin** = ``0`` -The begin loop point to use when :ref:`edit/loop_mode` is **Forward**, **Ping-Pong** or **Backward**. This is set in seconds after the beginning of the audio file. +循环起始点,\ :ref:`edit/loop_mode` 为 **Forward**\ 、\ **Ping-Pong**\ 、\ **Backward** 时使用。设置的是音频文件开始之后的秒数。 .. rst-class:: classref-item-separator @@ -101,7 +101,7 @@ The begin loop point to use when :ref:`edit/loop_mode` **edit/loop_end** = ``-1`` -The end loop point to use when :ref:`edit/loop_mode` is **Forward**, **Ping-Pong** or **Backward**. This is set in seconds after the beginning of the audio file. A value of ``-1`` uses the end of the audio file as the end loop point. +循环结束点,\ :ref:`edit/loop_mode` 为 **Forward**\ 、\ **Ping-Pong**\ 、\ **Backward** 时使用。设置的是音频文件开始之后的秒数。\ ``-1`` 表示使用音频文件的末尾作为循环结束点。 .. rst-class:: classref-item-separator @@ -113,17 +113,17 @@ The end loop point to use when :ref:`edit/loop_mode` **edit/loop_mode** = ``0`` -Controls how audio should loop. This is automatically read from the WAV metadata on import. +控制音频如何循环。导入时会自动从 WAV 元数据读取。 -\ **Disabled:** Don't loop audio, even if metadata indicates the file should be played back looping. +\ **Disabled:**\ 不循环,即便元数据显示该文件应该在播放时循环。 -\ **Forward:** Standard audio looping. +\ **Forward:**\ 标准音频循环。 -\ **Ping-Pong:** Play audio forward until it's done playing, then play it backward and repeat. This is similar to mirrored texture repeat, but for audio. +\ **Ping-Pong:**\ 正向播放音频,播放完以后再反向播放,再不断重复。原理类似于纹理的镜像重复。 -\ **Backward:** Play audio in reverse and loop back to the end when done playing. +\ **Backward:**\ 逆向播放音频,播放完以后再从末尾开始循环播放。 -\ **Note:** In :ref:`AudioStreamPlayer`, the :ref:`AudioStreamPlayer.finished` signal won't be emitted for looping audio when it reaches the end of the audio file, as the audio will keep playing indefinitely. +\ **注意:**\ 在 :ref:`AudioStreamPlayer` 中,循环音频到达音频文件末尾时不会发出 :ref:`AudioStreamPlayer.finished` 信号,因为音频会无限循环播放。 .. rst-class:: classref-item-separator @@ -135,7 +135,7 @@ Controls how audio should loop. This is automatically read from the WAV metadata :ref:`bool` **edit/normalize** = ``false`` -If ``true``, normalize the audio volume so that its peak volume is equal to 0 dB. When enabled, normalization will make audio sound louder depending on its original peak volume. +如果为 ``true``\ ,则会将音频音量进行归一化,让最高音量等于 0 dB。启用后,音频听起来会更响,具体取决于原始的最高音量。 .. rst-class:: classref-item-separator @@ -147,7 +147,7 @@ If ``true``, normalize the audio volume so that its peak volume is equal to 0 dB :ref:`bool` **edit/trim** = ``false`` -If ``true``, automatically trim the beginning and end of the audio if it's lower than -50 dB after normalization (see :ref:`edit/normalize`). This prevents having files with silence at the beginning or end, which increases their size unnecessarily and adds latency to the moment they are played back. A fade-in/fade-out period of 500 samples is also used during trimming to avoid audible pops. +如果为 ``true``\ ,则会自动修剪掉音频开头和结尾处归一化后低于 -50 dB 的部分(见 :ref:`edit/normalize`\ )。这样就能够避免出现文件开头和结尾出现空白的情况,这种情况会占用不必要的文件大小,同时也会在播放时导致延迟。修剪时还会使用 500 个采样进行淡入/淡出,避免产生爆音。 .. rst-class:: classref-item-separator @@ -159,9 +159,9 @@ If ``true``, automatically trim the beginning and end of the audio if it's lower :ref:`bool` **force/8_bit** = ``false`` -If ``true``, forces the imported audio to use 8-bit quantization if the source file is 16-bit or higher. +如果为 ``true``\ ,则会在源文件至少为 16 位时,强制让导入的音频使用 8 位量化。 -Enabling this is generally not recommended, as 8-bit quantization decreases audio quality significantly. If you need smaller file sizes, consider using Ogg Vorbis or MP3 audio instead. +通常不建议启用,因为 8 位量化会显著降低音质。如果你需要让文件大小更小,请考虑改用 Ogg Vorbis 或 MP3 音频。 .. rst-class:: classref-item-separator @@ -173,9 +173,9 @@ Enabling this is generally not recommended, as 8-bit quantization decreases audi :ref:`bool` **force/max_rate** = ``false`` -If set to a value greater than ``0``, forces the audio's sample rate to be reduced to a value lower than or equal to the value specified in :ref:`force/max_rate_hz`. +如果设成比 ``0`` 大的值,则会强制让音频的采样率降低至小于等于 :ref:`force/max_rate_hz` 的值。 -This can decrease file size noticeably on certain sounds, without impacting quality depending on the actual sound's contents. See `Best practices <../tutorials/assets_pipeline/importing_audio_samples.html#doc-importing-audio-samples-best-practices>`__ for more information. +可以让部分声音在不影响音质的同时降低文件大小,具体取决于声音的内容。详见\ `《最佳实践》 <../tutorials/assets_pipeline/importing_audio_samples.html#doc-importing-audio-samples-best-practices>`__\ 。 .. rst-class:: classref-item-separator @@ -187,7 +187,7 @@ This can decrease file size noticeably on certain sounds, without impacting qual :ref:`float` **force/max_rate_hz** = ``44100`` -The frequency to limit the imported audio sample to (in Hz). Only effective if :ref:`force/max_rate` is ``true``. +导入音频采样的频率限制(单位为赫兹)。仅当 :ref:`force/max_rate` 为 ``true`` 时有效。 .. rst-class:: classref-item-separator @@ -199,12 +199,12 @@ The frequency to limit the imported audio sample to (in Hz). Only effective if : :ref:`bool` **force/mono** = ``false`` -If ``true``, forces the imported audio to be mono if the source file is stereo. This decreases the file size by 50% by merging the two channels into one. +如果为 ``true``\ ,则会在源文件为立体声时,强制让导入的音频使用单声道。将两个声道合并能够将文件大小降低 50%。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceloader.rst b/classes/zh_CN/class_resourceloader.rst index ea7267f3f2..70794eeda7 100644 --- a/classes/zh_CN/class_resourceloader.rst +++ b/classes/zh_CN/class_resourceloader.rst @@ -10,14 +10,14 @@ ResourceLoader ============== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 用于加载资源文件的单例。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于从文件系统加载资源文件的单例。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `操作系统测试演示 `__ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -72,8 +72,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_ResourceLoader_ThreadLoadStatus: @@ -153,8 +153,8 @@ enum **CacheMode**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ResourceLoader_method_add_resource_format_loader: @@ -162,9 +162,9 @@ Method Descriptions void **add_resource_format_loader** **(** :ref:`ResourceFormatLoader` format_loader, :ref:`bool` at_front=false **)** -注册一个新的\ :ref:`ResourceFormatLoader`\ 。ResourceLoader将会按照\ :ref:`load`\ 中的描述使用ResourceFormatLoader。 +注册一个新的 :ref:`ResourceFormatLoader`\ 。ResourceLoader 将会按照 :ref:`load` 中的描述使用 ResourceFormatLoader。 -对于用GDScript编写的ResourceFormatLoader,此方法将隐式执行(有关详细信息,请参见\ :ref:`ResourceFormatLoader`\ )。 +对于用 GDScript 编写的 ResourceFormatLoader,此方法将隐式执行(详见 :ref:`ResourceFormatLoader`\ )。 .. rst-class:: classref-item-separator @@ -254,7 +254,7 @@ void **add_resource_format_loader** **(** :ref:`ResourceFormatLoader` 应处理的 :ref:`Resource` 类型。任何继承自 :ref:`Resource` 的东西都可以用作类型提示,例如 :ref:`Image`\ 。 -\ ``cache_mode`` 属性定义在加载资源时是否以及如何使用或更新缓存。有关详细信息,请参见 :ref:`CacheMode`\ 。 +\ ``cache_mode`` 属性定义在加载资源时是否以及如何使用或更新缓存。详情见 :ref:`CacheMode`\ 。 如果没有 :ref:`ResourceFormatLoader` 可以处理该文件,则返回空资源。 @@ -286,7 +286,7 @@ GDScript 具有一个简化的 :ref:`@GDScript.load :ref:`ThreadLoadStatus` **load_threaded_get_status** **(** :ref:`String` path, :ref:`Array` progress=[] **)** -返回使用 :ref:`load_threaded_request` 在 ``path`` 处启动的线程加载操作的状态。有关可能的返回值,请参见 :ref:`ThreadLoadStatus`\ 。 +返回使用 :ref:`load_threaded_request` 在 ``path`` 处启动的线程加载操作的状态。可能的返回值见 :ref:`ThreadLoadStatus`\ 。 可以通过 ``progress`` 可选地传递一个数组变量,并返回一个包含线程加载完成百分比的单元素的数组。 @@ -302,7 +302,7 @@ GDScript 具有一个简化的 :ref:`@GDScript.load 使用线程加载资源。如果 ``use_sub_threads`` 为 ``true``\ ,将使用多个线程来加载资源,这会使加载更快,但可能会影响主线程(从而导致游戏降速)。 -\ ``cache_mode`` 属性定义在加载资源时是否以及如何使用或更新缓存。有关详细信息,请参见 :ref:`CacheMode`\ 。 +\ ``cache_mode`` 属性定义在加载资源时是否以及如何使用或更新缓存。详情见 :ref:`CacheMode`\ 。 .. rst-class:: classref-item-separator @@ -328,10 +328,10 @@ void **set_abort_on_missing_resources** **(** :ref:`bool` abort **)* 更改缺少子资源时的行为。默认行为是中止加载。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourcepreloader.rst b/classes/zh_CN/class_resourcepreloader.rst index ec2039dbf9..c1e89a2a88 100644 --- a/classes/zh_CN/class_resourcepreloader.rst +++ b/classes/zh_CN/class_resourcepreloader.rst @@ -10,14 +10,14 @@ ResourcePreloader ================= -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` 用于预加载场景子资源的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个节点可以预加载场景中的子资源,这样场景加载完成时,所有的资源就都处于就绪可用状态,可以从预加载器获取。选中该节点后,可以使用 ResourcePreloader 选项卡来添加资源。 @@ -25,8 +25,8 @@ GDScript 提供了简化的 :ref:`@GDScript.preload` name, :ref:`S 将预加载器中的资源从 ``name`` 重命名为 ``newname``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourcesaver.rst b/classes/zh_CN/class_resourcesaver.rst index db05b3ada4..102837b431 100644 --- a/classes/zh_CN/class_resourcesaver.rst +++ b/classes/zh_CN/class_resourcesaver.rst @@ -10,14 +10,14 @@ ResourceSaver ============= -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 用于将 :ref:`Resource` 保存到文件系统的单例。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于将资源类型保存到文件系统的单例。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_ResourceSaver_SaverFlags: @@ -126,8 +126,8 @@ flags **SaverFlags**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ResourceSaver_method_add_resource_format_saver: @@ -137,7 +137,7 @@ void **add_resource_format_saver** **(** :ref:`ResourceFormatSaver`\ 。 ResourceSaver 将使用 ResourceFormatSaver,如 :ref:`save` 中所述。 -对于用 GDScript 编写的 ResourceFormatSaver,此方法将隐式执行(有关详细信息,请参见 :ref:`ResourceFormatSaver`\ )。 +对于用 GDScript 编写的 ResourceFormatSaver,此方法将隐式执行(详情见 :ref:`ResourceFormatSaver`\ )。 .. rst-class:: classref-item-separator @@ -179,10 +179,12 @@ void **remove_resource_format_saver** **(** :ref:`ResourceFormatSaver`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +\ **注意:**\ 项目正运行时,任何生成的与资源关联的 UID 都不会被保存,因为所需的代码仅在编辑器模式下执行。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_resourceuid.rst b/classes/zh_CN/class_resourceuid.rst index 78f7bab411..41ea9b93fe 100644 --- a/classes/zh_CN/class_resourceuid.rst +++ b/classes/zh_CN/class_resourceuid.rst @@ -10,14 +10,14 @@ ResourceUID =========== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 管理项目中所有资源的唯一标识符的单例。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 资源 UID(Unique IDentifier,唯一标识符)可以使引擎保持资源之间引用关系的完整性,即使文件发生重命名或移动。可以使用 ``uid://`` 访问。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Methods .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_ResourceUID_constant_INVALID_ID: @@ -74,8 +74,8 @@ Constants .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ResourceUID_method_add_id: @@ -179,10 +179,10 @@ void **set_id** **(** :ref:`int` id, :ref:`String` path 从给定的 ``uid://`` 字符串中提取 UID 值。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_ribbontrailmesh.rst b/classes/zh_CN/class_ribbontrailmesh.rst index 313cc1da19..6f9e1ee382 100644 --- a/classes/zh_CN/class_ribbontrailmesh.rst +++ b/classes/zh_CN/class_ribbontrailmesh.rst @@ -10,14 +10,14 @@ RibbonTrailMesh =============== -**Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表竖直丝带形状的 :ref:`PrimitiveMesh`\ ,丝带的宽度可变。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **RibbonTrailMesh** 代表竖直条带形状的网格,条带的宽度可变。条带由若干扁平或十字形的分节构成,每一节的长度 :ref:`section_length` 和分段数 :ref:`section_segments` 都相同。条带会沿着总长度对 :ref:`curve` 进行采样,这样这条曲线就决定了条带沿长度的大小。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`3D 粒子拖尾 <../tutorials/3d/particles/trails>` @@ -34,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -60,8 +60,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_RibbonTrailMesh_Shape: @@ -91,8 +91,8 @@ enum **Shape**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RibbonTrailMesh_property_curve: @@ -192,10 +192,10 @@ Property Descriptions 条带的基础大小。通过将这个大小乘以 :ref:`curve` 上给定位置对应的值,就可以得到分节上某一段的大小。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_richtexteffect.rst b/classes/zh_CN/class_richtexteffect.rst index 411a69f017..89294c5360 100644 --- a/classes/zh_CN/class_richtexteffect.rst +++ b/classes/zh_CN/class_richtexteffect.rst @@ -10,14 +10,14 @@ RichTextEffect ============== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`RichTextLabel` 的自定义效果。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`RichTextLabel` 的自定义效果。 @@ -42,8 +42,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`RichTextLabel 中的 BBCode <../tutorials/ui/bbcode_in_richtextlabel>` @@ -51,15 +51,15 @@ Tutorials .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_process_custom_fx` **(** :ref:`CharFXTransform` char_fx **)** |virtual| |const| | - +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_process_custom_fx` **(** :ref:`CharFXTransform` char_fx **)** |virtual| |const| | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -67,10 +67,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_RichTextEffect_method__process_custom_fx: +.. _class_RichTextEffect_private_method__process_custom_fx: .. rst-class:: classref-method @@ -78,10 +78,10 @@ Method Descriptions 覆盖该方法以修改 ``char_fx`` 中的属性。如果字符可以被成功转换,则该方法必须返回 ``true``\ 。如果该方法返回 ``false``\ ,则它将跳过转换以避免显示损坏的文本。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_richtextlabel.rst b/classes/zh_CN/class_richtextlabel.rst index 241cf009f4..93a7c00f61 100644 --- a/classes/zh_CN/class_richtextlabel.rst +++ b/classes/zh_CN/class_richtextlabel.rst @@ -10,14 +10,14 @@ RichTextLabel ============= -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 用于显示文本的控件,文本中能够包含不同的字体样式、图片以及基础格式。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于显示文本的控件,文本中能够包含自定义字体、图片以及基础格式。\ **RichTextLabel** 使用内部标签栈管理这些内容。它还可以适应给定的宽度和高度。 @@ -31,8 +31,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`RichTextLabel 中的 BBCode <../tutorials/ui/bbcode_in_richtextlabel>` @@ -42,8 +42,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -102,152 +102,154 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_image` **(** :ref:`Texture2D` image, :ref:`int` width=0, :ref:`int` height=0, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`InlineAlignment` inline_align=5, :ref:`Rect2` region=Rect2(0, 0, 0, 0) **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_text` **(** :ref:`String` text **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append_text` **(** :ref:`String` bbcode **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`deselect` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_character_line` **(** :ref:`int` character **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_character_paragraph` **(** :ref:`int` character **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_content_height` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_content_width` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_line_count` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_line_offset` **(** :ref:`int` line **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PopupMenu` | :ref:`get_menu` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_paragraph_count` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_paragraph_offset` **(** :ref:`int` paragraph **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_parsed_text` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_selected_text` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_selection_from` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_selection_to` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_total_character_count` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VScrollBar` | :ref:`get_v_scroll_bar` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_visible_line_count` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_visible_paragraph_count` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`install_effect` **(** :ref:`Variant` effect **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_menu_visible` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_ready` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`menu_option` **(** :ref:`int` option **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`newline` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`parse_bbcode` **(** :ref:`String` bbcode **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`parse_expressions_for_values` **(** :ref:`PackedStringArray` expressions **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pop` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pop_all` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pop_context` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_bgcolor` **(** :ref:`Color` bgcolor **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_bold` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_bold_italics` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_cell` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_color` **(** :ref:`Color` color **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_context` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_customfx` **(** :ref:`RichTextEffect` effect, :ref:`Dictionary` env **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_dropcap` **(** :ref:`String` string, :ref:`Font` font, :ref:`int` size, :ref:`Rect2` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`Color` color=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`Color` outline_color=Color(0, 0, 0, 0) **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_fgcolor` **(** :ref:`Color` fgcolor **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_font` **(** :ref:`Font` font, :ref:`int` font_size=0 **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_font_size` **(** :ref:`int` font_size **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_hint` **(** :ref:`String` description **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_indent` **(** :ref:`int` level **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_italics` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_language` **(** :ref:`String` language **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_list` **(** :ref:`int` level, :ref:`ListType` type, :ref:`bool` capitalize, :ref:`String` bullet="•" **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_meta` **(** :ref:`Variant` data **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_mono` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_normal` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_outline_color` **(** :ref:`Color` color **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_outline_size` **(** :ref:`int` outline_size **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_paragraph` **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0, |bitfield|\<:ref:`JustificationFlag`\> justification_flags=163, :ref:`PackedFloat32Array` tab_stops=PackedFloat32Array() **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_strikethrough` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_table` **(** :ref:`int` columns, :ref:`InlineAlignment` inline_align=0, :ref:`int` align_to_row=-1 **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_underline` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`remove_paragraph` **(** :ref:`int` paragraph **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scroll_to_line` **(** :ref:`int` line **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scroll_to_paragraph` **(** :ref:`int` paragraph **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scroll_to_selection` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`select_all` **(** **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_border_color` **(** :ref:`Color` color **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_padding` **(** :ref:`Rect2` padding **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_row_background_color` **(** :ref:`Color` odd_row_bg, :ref:`Color` even_row_bg **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_size_override` **(** :ref:`Vector2` min_size, :ref:`Vector2` max_size **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_table_column_expand` **(** :ref:`int` column, :ref:`bool` expand, :ref:`int` ratio=1 **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_image` **(** :ref:`Texture2D` image, :ref:`int` width=0, :ref:`int` height=0, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`InlineAlignment` inline_align=5, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`Variant` key=null, :ref:`bool` pad=false, :ref:`String` tooltip="", :ref:`bool` size_in_percent=false **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_text` **(** :ref:`String` text **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`append_text` **(** :ref:`String` bbcode **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`deselect` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_character_line` **(** :ref:`int` character **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_character_paragraph` **(** :ref:`int` character **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_content_height` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_content_width` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_line_count` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_line_offset` **(** :ref:`int` line **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu` | :ref:`get_menu` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_paragraph_count` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_paragraph_offset` **(** :ref:`int` paragraph **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_parsed_text` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_selected_text` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_from` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_to` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_total_character_count` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VScrollBar` | :ref:`get_v_scroll_bar` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_visible_line_count` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_visible_paragraph_count` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`install_effect` **(** :ref:`Variant` effect **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_menu_visible` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_ready` **(** **)** |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`menu_option` **(** :ref:`int` option **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`newline` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`parse_bbcode` **(** :ref:`String` bbcode **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`parse_expressions_for_values` **(** :ref:`PackedStringArray` expressions **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`pop` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`pop_all` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`pop_context` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_bgcolor` **(** :ref:`Color` bgcolor **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_bold` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_bold_italics` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_cell` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_color` **(** :ref:`Color` color **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_context` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_customfx` **(** :ref:`RichTextEffect` effect, :ref:`Dictionary` env **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_dropcap` **(** :ref:`String` string, :ref:`Font` font, :ref:`int` size, :ref:`Rect2` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`Color` color=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`Color` outline_color=Color(0, 0, 0, 0) **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_fgcolor` **(** :ref:`Color` fgcolor **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_font` **(** :ref:`Font` font, :ref:`int` font_size=0 **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_font_size` **(** :ref:`int` font_size **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_hint` **(** :ref:`String` description **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_indent` **(** :ref:`int` level **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_italics` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_language` **(** :ref:`String` language **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_list` **(** :ref:`int` level, :ref:`ListType` type, :ref:`bool` capitalize, :ref:`String` bullet="•" **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_meta` **(** :ref:`Variant` data **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_mono` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_normal` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_outline_color` **(** :ref:`Color` color **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_outline_size` **(** :ref:`int` outline_size **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_paragraph` **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0, |bitfield|\<:ref:`JustificationFlag`\> justification_flags=163, :ref:`PackedFloat32Array` tab_stops=PackedFloat32Array() **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_strikethrough` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_table` **(** :ref:`int` columns, :ref:`InlineAlignment` inline_align=0, :ref:`int` align_to_row=-1 **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_underline` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`remove_paragraph` **(** :ref:`int` paragraph **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scroll_to_line` **(** :ref:`int` line **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scroll_to_paragraph` **(** :ref:`int` paragraph **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scroll_to_selection` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`select_all` **(** **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_border_color` **(** :ref:`Color` color **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_padding` **(** :ref:`Rect2` padding **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_row_background_color` **(** :ref:`Color` odd_row_bg, :ref:`Color` even_row_bg **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_size_override` **(** :ref:`Vector2` min_size, :ref:`Vector2` max_size **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_table_column_expand` **(** :ref:`int` column, :ref:`bool` expand, :ref:`int` ratio=1 **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update_image` **(** :ref:`Variant` key, |bitfield|\<:ref:`ImageUpdateMask`\> mask, :ref:`Texture2D` image, :ref:`int` width=0, :ref:`int` height=0, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`InlineAlignment` inline_align=5, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`bool` pad=false, :ref:`String` tooltip="", :ref:`bool` size_in_percent=false **)** | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -318,8 +320,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_RichTextLabel_signal_finished: @@ -339,7 +341,7 @@ Signals **meta_clicked** **(** :ref:`Variant` meta **)** -当用户点击元标记之间的内容时触发。如果元是在文本中定义的,例如\ ``[url={"data"="hi"}]hi[/url]``\ ,则该信号的参数为\ :ref:`String`\ 类型。如果需要特定类型或对象,则必须使用 :ref:`push_meta` 方法将数据手动插入标签栈。 +当用户点击元标记之间的内容时触发。如果元是在文本中定义的,例如 ``[url={"data"="hi"}]hi[/url]``\ ,则该信号的参数为 :ref:`String` 类型。如果需要特定类型或对象,则必须使用 :ref:`push_meta` 方法将数据手动插入标签栈。 .. rst-class:: classref-item-separator @@ -371,8 +373,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_RichTextLabel_ListType: @@ -446,14 +448,88 @@ enum **MenuItems**: 代表 :ref:`MenuItems` 枚举的大小。 +.. rst-class:: classref-item-separator + +---- + +.. _enum_RichTextLabel_ImageUpdateMask: + +.. rst-class:: classref-enumeration + +flags **ImageUpdateMask**: + +.. _class_RichTextLabel_constant_UPDATE_TEXTURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImageUpdateMask` **UPDATE_TEXTURE** = ``1`` + +如果设置了该位,\ :ref:`update_image` 会更改图像纹理。 + +.. _class_RichTextLabel_constant_UPDATE_SIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImageUpdateMask` **UPDATE_SIZE** = ``2`` + +如果设置了该位,\ :ref:`update_image` 会更改图像大小。 + +.. _class_RichTextLabel_constant_UPDATE_COLOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImageUpdateMask` **UPDATE_COLOR** = ``4`` + +如果设置了该位,\ :ref:`update_image` 会更改图像颜色。 + +.. _class_RichTextLabel_constant_UPDATE_ALIGNMENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImageUpdateMask` **UPDATE_ALIGNMENT** = ``8`` + +如果设置了该位,\ :ref:`update_image` 会更改图像内联对齐方式。 + +.. _class_RichTextLabel_constant_UPDATE_REGION: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImageUpdateMask` **UPDATE_REGION** = ``16`` + +如果设置了该位,\ :ref:`update_image` 会更改图像纹理区块。 + +.. _class_RichTextLabel_constant_UPDATE_PAD: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImageUpdateMask` **UPDATE_PAD** = ``32`` + +如果设置了该位,\ :ref:`update_image` 会更改图像填充。 + +.. _class_RichTextLabel_constant_UPDATE_TOOLTIP: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImageUpdateMask` **UPDATE_TOOLTIP** = ``64`` + +如果设置了该位,\ :ref:`update_image` 会更改图像工具提示。 + +.. _class_RichTextLabel_constant_UPDATE_WIDTH_IN_PERCENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ImageUpdateMask` **UPDATE_WIDTH_IN_PERCENT** = ``128`` + +如果设置了该位,\ :ref:`update_image` 会将图像宽度更改自/为百分比。 + .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RichTextLabel_property_autowrap_mode: @@ -776,9 +852,9 @@ Property Descriptions - void **set_text** **(** :ref:`String` value **)** - :ref:`String` **get_text** **(** **)** -以 BBCode 格式表示的标签的文本。当编辑时,不代表对内部标签栈所做的手动修改。在编辑时将擦除使用其他方法添加的更改。 +该标签的在 BBCode 格式中的文本。不代表对内部标签堆栈的手动修改。编辑时擦除通过其他方法所做的更改。 -\ **注意:**\ 如果 :ref:`bbcode_enabled` 是 ``true``\ ,则不建议使用 ``text += "some string"`` 这样的 ``+=`` 操作符,因为它会替换整个文本,并可能导致减速。它还将擦除使用 ``push_*`` 方法添加到堆栈中的所有 BBCode。可使用 :ref:`append_text` 来添加文本,除非你绝对需要关闭在之前的方法调用中打开的标记。 +\ **注意:**\ 如果 :ref:`bbcode_enabled` 为 ``true``\ ,则不建议将 ``+=`` 运算符与 :ref:`text` 一起使用(例如 ``text += "some string"``\ )因为它会替换整个文本并可能导致速度变慢。它还将擦除使用 ``push_*`` 方法添加到堆栈中的所有 BBCode。请改用 :ref:`append_text` 添加文本,除非你绝对需要关闭在之前的方法调用中打开的标签。 .. rst-class:: classref-item-separator @@ -875,14 +951,14 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RichTextLabel_method_add_image: .. rst-class:: classref-method -void **add_image** **(** :ref:`Texture2D` image, :ref:`int` width=0, :ref:`int` height=0, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`InlineAlignment` inline_align=5, :ref:`Rect2` region=Rect2(0, 0, 0, 0) **)** +void **add_image** **(** :ref:`Texture2D` image, :ref:`int` width=0, :ref:`int` height=0, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`InlineAlignment` inline_align=5, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`Variant` key=null, :ref:`bool` pad=false, :ref:`String` tooltip="", :ref:`bool` size_in_percent=false **)** 将图像的开始和结束标签添加到标签栈中,可选择提供 ``width`` 和 ``height`` 来调整图像大小,提供 ``color`` 来给图像混色, ``region`` 只使用图像的一部分。 @@ -890,6 +966,12 @@ void **add_image** **(** :ref:`Texture2D` image, :ref:`int` 修改图像。 + +如果设置了 ``pad``\ ,并且该图像小于 ``width`` 和 ``height`` 指定的大小,则添加图像填充以匹配大小而不是放大图像。 + +如果设置了 ``size_in_percent``\ ,则 ``width`` 和 ``height`` 值是控件宽度的百分比而不是像素。 + .. rst-class:: classref-item-separator ---- @@ -1319,7 +1401,7 @@ void **pop** **(** **)** void **pop_all** **(** **)** -Terminates all tags opened by ``push_*`` methods. +终止由 ``push_*`` 方法打开的所有标签。 .. rst-class:: classref-item-separator @@ -1331,7 +1413,7 @@ Terminates all tags opened by ``push_*`` methods. void **pop_context** **(** **)** -Terminates tags opened after the last :ref:`push_context` call (including context marker), or all tags if there's no context marker on the stack. +终止上一次 :ref:`push_context` 调用后打开的标签(包括上下文标记);或者如果堆栈上没有上下文标记,则终止所有标签。 .. rst-class:: classref-item-separator @@ -1403,7 +1485,7 @@ void **push_color** **(** :ref:`Color` color **)** void **push_context** **(** **)** -Adds a context marker to the tag stack. See :ref:`pop_context`. +将上下文标记添加到标记堆栈。请参阅 :ref:`pop_context`\ 。 .. rst-class:: classref-item-separator @@ -1427,7 +1509,7 @@ void **push_customfx** **(** :ref:`RichTextEffect` effect, void **push_dropcap** **(** :ref:`String` string, :ref:`Font` font, :ref:`int` size, :ref:`Rect2` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`Color` color=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`Color` outline_color=Color(0, 0, 0, 0) **)** -将 ``[dropcap]`` 标签添加到标签堆栈中。首字下沉(dropped capital)是一个装饰性元素,位于段落开头,比其余文本要大。 +将 ``[dropcap]`` 标签添加到标签堆栈中。首字下沉是一种装饰性元素,位于段落开头,比其余文本要大。 .. rst-class:: classref-item-separator @@ -1451,9 +1533,9 @@ void **push_fgcolor** **(** :ref:`Color` fgcolor **)** void **push_font** **(** :ref:`Font` font, :ref:`int` font_size=0 **)** -Adds a ``[font]`` tag to the tag stack. Overrides default fonts for its duration. +在标签栈中添加 ``[font]`` 标签。在其有效期内覆盖默认字体。 -Passing ``0`` to ``font_size`` will use the existing default font size. +将 ``font_size`` 设置为 ``0`` 会使用默认字体大小。 .. rst-class:: classref-item-separator @@ -1513,7 +1595,7 @@ void **push_italics** **(** **)** void **push_language** **(** :ref:`String` language **)** -Adds language code used for text shaping algorithm and Open-Type font features. +添加用于文本塑形算法和 Open-Type 字体功能的语言代码。 .. rst-class:: classref-item-separator @@ -1763,14 +1845,26 @@ void **set_table_column_expand** **(** :ref:`int` column, :ref:`bool< 如果 ``expand`` 为 ``false``\ ,则该列将不会对总比率产生影响。 +.. rst-class:: classref-item-separator + +---- + +.. _class_RichTextLabel_method_update_image: + +.. rst-class:: classref-method + +void **update_image** **(** :ref:`Variant` key, |bitfield|\<:ref:`ImageUpdateMask`\> mask, :ref:`Texture2D` image, :ref:`int` width=0, :ref:`int` height=0, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`InlineAlignment` inline_align=5, :ref:`Rect2` region=Rect2(0, 0, 0, 0), :ref:`bool` pad=false, :ref:`String` tooltip="", :ref:`bool` size_in_percent=false **)** + +使用键 ``key`` 更新已有图像。仅更新 ``mask`` 位指定的属性。请参阅 :ref:`add_image`\ 。 + .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_RichTextLabel_theme_color_default_color: @@ -1960,7 +2054,7 @@ Theme Property Descriptions :ref:`int` **text_highlight_h_padding** = ``3`` -水平边距,用于高亮及背景色框。 +由 ``[fgcolor]`` 和 ``[bgcolor]`` 标记绘制的框周围的水平填充。这不会影响文本选择的外观。 .. rst-class:: classref-item-separator @@ -1972,7 +2066,7 @@ Theme Property Descriptions :ref:`int` **text_highlight_v_padding** = ``3`` -垂直边距,用于高亮及背景色框。 +由 ``[fgcolor]`` 和 ``[bgcolor]`` 标记绘制的框周围的垂直填充。这不会影响文本选择的外观。 .. rst-class:: classref-item-separator @@ -2104,7 +2198,7 @@ Theme Property Descriptions :ref:`StyleBox` **focus** -该 **RichTextLabel** 处于聚焦状态时使用的背景。\ ``focus`` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,所以应该使用部分透明的 :ref:`StyleBox`\ ,确保基础 :ref:`StyleBox` 仍然可见。代表轮廓或下划线的 :ref:`StyleBox` 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 :ref:`StyleBoxEmpty` 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的可用性,所以出于可访问性的原因,不建议这样做。 +该 **RichTextLabel** 处于聚焦状态时使用的背景。\ :ref:`focus` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,所以应该使用部分透明的 :ref:`StyleBox`\ ,确保基础 :ref:`StyleBox` 仍然可见。代表轮廓或下划线的 :ref:`StyleBox` 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 :ref:`StyleBoxEmpty` 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的可用性,所以出于可访问性的原因,不建议这样做。 .. rst-class:: classref-item-separator @@ -2118,10 +2212,10 @@ Theme Property Descriptions **RichTextLabel** 的正常背景。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rid.rst b/classes/zh_CN/class_rid.rst index 2e012f0497..a7c53675fd 100644 --- a/classes/zh_CN/class_rid.rst +++ b/classes/zh_CN/class_rid.rst @@ -14,8 +14,8 @@ RID .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- RID :ref:`Variant` 类型用于通过其唯一 ID 访问低级资源。RID 是不透明的,这意味着它们不会自行授予对资源的访问权限。它们由低级服务类使用,例如 :ref:`DisplayServer`\ 、\ :ref:`RenderingServer`\ 、\ :ref:`TextServer` 等。 @@ -23,12 +23,12 @@ RID :ref:`Variant` 类型用于通过其唯一 ID 访问低级资 .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -41,8 +41,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -81,8 +81,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_RID_constructor_RID: @@ -108,8 +108,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_RID_method_get_id: @@ -137,8 +137,8 @@ Method Descriptions .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_RID_operator_neq_RID: @@ -208,10 +208,10 @@ Operator Descriptions 如果该 **RID** 的 ID 大于等于右侧 ``right`` 的 ID,则返回 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rigidbody2d.rst b/classes/zh_CN/class_rigidbody2d.rst index 856808c09a..fec2769e41 100644 --- a/classes/zh_CN/class_rigidbody2d.rst +++ b/classes/zh_CN/class_rigidbody2d.rst @@ -10,16 +10,16 @@ RigidBody2D =========== -**Inherits:** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`PhysicalBone2D` +**派生:** :ref:`PhysicalBone2D` 由物理仿真进行移动的 2D 物理体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **RigidBody2D** 实现了完整的 2D 物理。这个物理体无法直接控制,必须对其施加力(重力、冲量等),物理仿真将计算由此产生的移动、旋转、对碰撞的反应以及对沿路其他物理体的影响等。 @@ -29,12 +29,12 @@ Description 如果你需要覆盖默认的物理行为,你可以编写自定义的力整合函数。见 :ref:`custom_integrator`\ 。 -\ **注意:**\ 频繁修改 **RigidBody2D** 的 2D 变换或 :ref:`linear_velocity` 可能导致无法预期的行为。如果你需要直接影响物理体,请优先使用 :ref:`_integrate_forces`\ ,能够直接访问物理状态。 +\ **注意:**\ 频繁修改 **RigidBody2D** 的 2D 变换或 :ref:`linear_velocity` 可能导致无法预期的行为。如果你需要直接影响物理体,请优先使用 :ref:`_integrate_forces`\ ,能够直接访问物理状态。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `2D 物理平台跳跃演示 `__ @@ -42,8 +42,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -98,14 +98,14 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState2D` state **)** |virtual| | + | void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState2D` state **)** |virtual| | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_constant_central_force` **(** :ref:`Vector2` force **)** | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -138,8 +138,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_RigidBody2D_signal_body_entered: @@ -225,8 +225,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_RigidBody2D_FreezeMode: @@ -342,8 +342,8 @@ enum **CCDMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RigidBody2D_property_angular_damp: @@ -375,7 +375,7 @@ Property Descriptions - void **set_angular_damp_mode** **(** :ref:`DampMode` value **)** - :ref:`DampMode` **get_angular_damp_mode** **(** **)** -定义如何应用 :ref:`angular_damp`\ 。有关可能的值,请参见 :ref:`DampMode`\ 。 +定义如何应用 :ref:`angular_damp`\ 。可能的取值见 :ref:`DampMode`\ 。 .. rst-class:: classref-item-separator @@ -409,7 +409,7 @@ Property Descriptions - void **set_can_sleep** **(** :ref:`bool` value **)** - :ref:`bool` **is_able_to_sleep** **(** **)** -如果\ ``true``\ ,当未运动时,物体可以进入睡眠模式。请参见 :ref:`sleeping` 。 +如果为 ``true``\ ,则物体未运动时可以进入睡眠模式。见 :ref:`sleeping` 。 .. rst-class:: classref-item-separator @@ -445,7 +445,7 @@ Property Descriptions - void **set_center_of_mass_mode** **(** :ref:`CenterOfMassMode` value **)** - :ref:`CenterOfMassMode` **get_center_of_mass_mode** **(** **)** -定义设置物体质心的方式。请参见 :ref:`CenterOfMassMode` 以获取可能的值。 +定义设置物体质心的方式。可能的取值见 :ref:`CenterOfMassMode`\ 。 .. rst-class:: classref-item-separator @@ -464,7 +464,7 @@ Property Descriptions 在每个物理更新期间施加到物体的总恒定位置的力。 -请参见 :ref:`add_constant_force` 和 :ref:`add_constant_central_force` 。 +见 :ref:`add_constant_force` 和 :ref:`add_constant_central_force` 。 .. rst-class:: classref-item-separator @@ -483,7 +483,7 @@ Property Descriptions 在每个物理更新期间施加的物体的总恒定旋转力。 -请参见 :ref:`add_constant_torque` 。 +见 :ref:`add_constant_torque` 。 .. rst-class:: classref-item-separator @@ -538,7 +538,7 @@ Property Descriptions - void **set_use_custom_integrator** **(** :ref:`bool` value **)** - :ref:`bool` **is_using_custom_integrator** **(** **)** -如果为 ``true``\ ,则禁用该物体的内力积分。除了碰撞响应,物体只会按照 :ref:`_integrate_forces` 函数确定的方式移动。 +如果为 ``true``\ ,则禁用该物体的内力积分。除了碰撞响应,物体只会按照 :ref:`_integrate_forces` 函数确定的方式移动。 .. rst-class:: classref-item-separator @@ -659,7 +659,7 @@ Property Descriptions - void **set_linear_damp** **(** :ref:`float` value **)** - :ref:`float` **get_linear_damp** **(** **)** -阻碍物体的运动。默认情况下,物体将使用 **项目 > 项目设置 > Physics > 2d** 中的 **默认线性阻尼(Default Linear Damp)**\ 、或物体所在的 :ref:`Area2D` 设置的任何值覆盖。取决于 :ref:`linear_damp_mode`\ ,你可以将 :ref:`linear_damp` 设置为添加或替换物体的阻尼值。 +阻碍物体的运动。默认情况下,物体将使用 **项目 > 项目设置 > 物理 > 2D** 中的 **默认线性阻尼**\ 或物体所在的 :ref:`Area2D` 设置的任何值覆盖。取决于 :ref:`linear_damp_mode`\ ,你可以将 :ref:`linear_damp` 设置为添加或替换物体的阻尼值。 有关阻尼的更多详细信息,请参见 :ref:`ProjectSettings.physics/2d/default_linear_damp`\ 。 @@ -695,7 +695,7 @@ Property Descriptions - void **set_linear_velocity** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_linear_velocity** **(** **)** -该实体的线速度,单位为像素每秒。可以偶尔使用,但是\ **不要每一帧都去设置**\ ,因为物理可能在另一个线程中运行,并且以不同的间隔。使用 :ref:`_integrate_forces` 作为你的进程循环,以精确控制物体状态。 +该实体的线速度,单位为像素每秒。可以偶尔使用,但是\ **不要每一帧都去设置**\ ,因为物理可能在另一个线程中运行,并且以不同的间隔。使用 :ref:`_integrate_forces` 作为你的进程循环,以精确控制物体状态。 .. rst-class:: classref-item-separator @@ -792,16 +792,16 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_RigidBody2D_method__integrate_forces: +.. _class_RigidBody2D_private_method__integrate_forces: .. rst-class:: classref-method void **_integrate_forces** **(** :ref:`PhysicsDirectBodyState2D` state **)** |virtual| -允许你读取并安全地修改对象的模拟状态。如果你需要直接改变物体的 ``position`` 或其他物理属性,请使用它代替 :ref:`Node._physics_process`\ 。默认情况下,它是在通常的物理行为之外工作的,但是 :ref:`custom_integrator` 允许你禁用默认行为并为一个物体编写自定义的合力。 +允许你读取并安全地修改对象的模拟状态。如果你需要直接改变物体的 ``position`` 或其他物理属性,请使用它代替 :ref:`Node._physics_process`\ 。默认情况下,它是在通常的物理行为之外工作的,但是 :ref:`custom_integrator` 允许你禁用默认行为并为一个物体编写自定义的合力。 .. rst-class:: classref-item-separator @@ -957,7 +957,7 @@ void **apply_torque_impulse** **(** :ref:`float` torque **)** :ref:`int` **get_contact_count** **(** **)** |const| -返回此物体与其他物体的接触数。默认情况下,除非配置监视接触的物体(请参见 :ref:`contact_monitor`\ ),否则返回 0。 +返回此物体与其他物体的接触数。默认情况下,除非配置监视接触的物体(见 :ref:`contact_monitor`\ ),否则返回 0。 \ **注意:**\ 要获取正在碰撞的物体,请使用 :ref:`get_colliding_bodies`\ 。 @@ -973,10 +973,10 @@ void **set_axis_velocity** **(** :ref:`Vector2` axis_velocity **) 设置物体在给定轴上的速度。给定矢量轴上的速度将设置为给定向量长度。这对于跳跃行为很有用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rigidbody3d.rst b/classes/zh_CN/class_rigidbody3d.rst index 64bf1fe757..247452433c 100644 --- a/classes/zh_CN/class_rigidbody3d.rst +++ b/classes/zh_CN/class_rigidbody3d.rst @@ -10,16 +10,16 @@ RigidBody3D =========== -**Inherits:** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`VehicleBody3D` +**派生:** :ref:`VehicleBody3D` 由物理仿真进行移动的 3D 物理体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **RigidBody3D** 实现了完整的 3D 物理。这个物理体无法直接控制,必须对其施加力(重力、冲量等),物理仿真将计算由此产生的移动、旋转、对碰撞的反应以及对沿路其他物理体的影响等。 @@ -29,12 +29,12 @@ Description 如果你需要覆盖默认的物理行为,你可以编写自定义的力整合函数。见 :ref:`custom_integrator`\ 。 -\ **注意:**\ 频繁修改 **RigidBody3D** 的 3D 变换或 :ref:`linear_velocity` 可能导致无法预期的行为。如果你需要直接影响物理体,请优先使用 :ref:`_integrate_forces`\ ,能够直接访问物理状态。 +\ **注意:**\ 频繁修改 **RigidBody3D** 的 3D 变换或 :ref:`linear_velocity` 可能导致无法预期的行为。如果你需要直接影响物理体,请优先使用 :ref:`_integrate_forces`\ ,能够直接访问物理状态。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`物理介绍 <../tutorials/physics/physics_introduction>` @@ -44,8 +44,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -100,14 +100,14 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| | + | void | :ref:`_integrate_forces` **(** :ref:`PhysicsDirectBodyState3D` state **)** |virtual| | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_constant_central_force` **(** :ref:`Vector3` force **)** | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -142,8 +142,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_RigidBody3D_signal_body_entered: @@ -229,8 +229,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_RigidBody3D_FreezeMode: @@ -312,8 +312,8 @@ enum **DampMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RigidBody3D_property_angular_damp: @@ -345,7 +345,7 @@ Property Descriptions - void **set_angular_damp_mode** **(** :ref:`DampMode` value **)** - :ref:`DampMode` **get_angular_damp_mode** **(** **)** -定义如何应用 :ref:`angular_damp`\ 。有关可能的值,请参见 :ref:`DampMode`\ 。 +定义如何应用 :ref:`angular_damp`\ 。可能的取值见 :ref:`DampMode`\ 。 .. rst-class:: classref-item-separator @@ -379,7 +379,7 @@ Property Descriptions - void **set_can_sleep** **(** :ref:`bool` value **)** - :ref:`bool` **is_able_to_sleep** **(** **)** -如果\ ``true``\ ,当未运动时,物体可以进入睡眠模式。请参见 :ref:`sleeping` 。 +如果为 ``true``\ ,则物体未运动时可以进入睡眠模式。见 :ref:`sleeping` 。 .. rst-class:: classref-item-separator @@ -415,7 +415,7 @@ Property Descriptions - void **set_center_of_mass_mode** **(** :ref:`CenterOfMassMode` value **)** - :ref:`CenterOfMassMode` **get_center_of_mass_mode** **(** **)** -定义设置物体质心的方式。请参见 :ref:`CenterOfMassMode` 以获取可能的值。 +定义设置物体质心的方式。可能的取值见 :ref:`CenterOfMassMode`\ 。 .. rst-class:: classref-item-separator @@ -434,7 +434,7 @@ Property Descriptions 在每个物理更新期间施加到物体的总恒定位置的力。 -请参见 :ref:`add_constant_force` 和 :ref:`add_constant_central_force` 。 +见 :ref:`add_constant_force` 和 :ref:`add_constant_central_force` 。 .. rst-class:: classref-item-separator @@ -453,7 +453,7 @@ Property Descriptions 在每个物理更新期间施加的物体的总恒定旋转力。 -请参见 :ref:`add_constant_torque` 。 +见 :ref:`add_constant_torque` 。 .. rst-class:: classref-item-separator @@ -508,7 +508,7 @@ Property Descriptions - void **set_use_custom_integrator** **(** :ref:`bool` value **)** - :ref:`bool` **is_using_custom_integrator** **(** **)** -如果为 ``true``\ ,则该物体的内力积分将被禁用(如重力或空气摩擦)。除了碰撞响应之外,物体将仅根据 :ref:`_integrate_forces` 函数确定的方式移动(如果已定义)。 +如果为 ``true``\ ,则该物体的内力积分将被禁用(如重力或空气摩擦)。除了碰撞响应之外,物体将仅根据 :ref:`_integrate_forces` 函数确定的方式移动(如果已定义)。 .. rst-class:: classref-item-separator @@ -546,7 +546,7 @@ Property Descriptions - void **set_freeze_mode** **(** :ref:`FreezeMode` value **)** - :ref:`FreezeMode` **get_freeze_mode** **(** **)** -物体的冻结模式。可用于设置当 :ref:`freeze` 启用时,物体的行为。有关可能的值,请参见 :ref:`FreezeMode` 。 +物体的冻结模式。可用于设置启用 :ref:`freeze` 时物体的行为。可能的取值见 :ref:`FreezeMode` 。 对于始终冻结的物体,请使用 :ref:`StaticBody3D` 或 :ref:`AnimatableBody3D`\ 。 @@ -584,7 +584,7 @@ Property Descriptions 该物体的惯性力矩。与质量类似,但适用于旋转:用于确定各个轴上需要施加多少扭矩才能让该物体旋转。通常会自动根据质量和形状计算惯性力矩,但这个属性能够让你设置自定义的值。 -设置为 ``Vector3.ZERO`` 时,会自动计算惯性(默认值)。 +设置为 :ref:`Vector3.ZERO` 时,会自动计算惯性(默认值)。 \ **注意:**\ 自动计算出惯性后,这个值不会改变。请使用 :ref:`PhysicsServer3D` 获取计算出的惯性。 @@ -665,7 +665,7 @@ Property Descriptions - void **set_linear_velocity** **(** :ref:`Vector3` value **)** - :ref:`Vector3` **get_linear_velocity** **(** **)** -物体的线速度,单位为单位每秒。可以偶尔使用,但是\ **不要每一帧都设置它**\ ,因为物理可能在另一个线程中运行,并且以不同的间隔。使用 :ref:`_integrate_forces` 作为你的进程循环,以精确控制物体状态。 +物体的线速度,单位为单位每秒。可以偶尔使用,但是\ **不要每一帧都设置它**\ ,因为物理可能在另一个线程中运行,并且以不同的间隔。使用 :ref:`_integrate_forces` 作为你的进程循环,以精确控制物体状态。 .. rst-class:: classref-item-separator @@ -762,10 +762,10 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_RigidBody3D_method__integrate_forces: +.. _class_RigidBody3D_private_method__integrate_forces: .. rst-class:: classref-method @@ -927,7 +927,7 @@ void **apply_torque_impulse** **(** :ref:`Vector3` impulse **)** :ref:`int` **get_contact_count** **(** **)** |const| -返回此物体与其他物体的接触数。默认情况下,除非配置监视接触的物体(请参见 :ref:`contact_monitor`\ ),否则返回 0。 +返回此物体与其他物体的接触数。默认情况下,除非配置监视接触的物体(见 :ref:`contact_monitor`\ ),否则返回 0。 \ **注意:**\ 要获取正在碰撞的物体,请使用 :ref:`get_colliding_bodies`\ 。 @@ -955,10 +955,10 @@ void **set_axis_velocity** **(** :ref:`Vector3` axis_velocity **) 设置轴速度。给定向量轴上的速度将被设置为给定向量长度。这对跳跃行为很有用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_rootmotionview.rst b/classes/zh_CN/class_rootmotionview.rst index 12dc6180cf..aa8200151f 100644 --- a/classes/zh_CN/class_rootmotionview.rst +++ b/classes/zh_CN/class_rootmotionview.rst @@ -10,30 +10,30 @@ RootMotionView ============== -**Inherits:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -在 :ref:`AnimationTree` 中设置根运动的仅编辑器可用的辅助工具。 +仅限编辑器的帮助程序,用于在 :ref:`AnimationMixer` 中设置根运动。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -*根运动*\ (Root Motion)是一种动画技术,通过使用网格的骨架为角色提供冲量。在处理 3D 动画时,动画师通常使用根骨骼来为其余的骨骼提供动作,从而使得角色的动画能够准确地匹配地面,并实现在电影中与物体的精确交互。另请参阅 :ref:`AnimationTree`\ 。 +*根运动*\ 是指一种动画技术,通过使用网格的骨架为角色提供冲量。在处理 3D 动画时,动画师的一种流行技术是使用根骨架骨骼为骨架的其余部分提供运动。这允许以脚步实际与下面的地板匹配的方式对角色进行动画处理。它还允许在过场动画期间与对象进行精确交互。另请参阅 :ref:`AnimationMixer`\ 。 \ **注意:**\ **RootMotionView** 仅在编辑器中可见。在运行的项目中将自动隐藏。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `使用 AnimationTree - 根运动 <../tutorials/animation/animation_tree.html#root-motion>`__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_RootMotionView_property_animation_path: @@ -70,7 +70,7 @@ Property Descriptions - void **set_animation_path** **(** :ref:`NodePath` value **)** - :ref:`NodePath` **get_animation_path** **(** **)** -用作根运动的基的 :ref:`AnimationTree` 节点的路径。 +用作根运动的基的 :ref:`AnimationMixer` 节点的路径。 .. rst-class:: classref-item-separator @@ -140,10 +140,10 @@ Property Descriptions 如果为 ``true``\ ,则网格的点都将位于相同的 Y 坐标上(\ *local* Y = 0)。如果 ``false``\ ,则保留点的原始 Y 坐标。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_scenemultiplayer.rst b/classes/zh_CN/class_scenemultiplayer.rst index edda354ec3..293c430d0c 100644 --- a/classes/zh_CN/class_scenemultiplayer.rst +++ b/classes/zh_CN/class_scenemultiplayer.rst @@ -10,14 +10,14 @@ SceneMultiplayer ================ -**Inherits:** :ref:`MultiplayerAPI` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`MultiplayerAPI` **<** :ref:`RefCounted` **<** :ref:`Object` 高阶多人游戏 API 实现。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类是 :ref:`MultiplayerAPI` 的默认实现,用于在 Godot 引擎中提供多人游戏功能。 @@ -31,8 +31,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -57,8 +57,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -83,8 +83,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_SceneMultiplayer_signal_peer_authenticating: @@ -124,8 +124,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SceneMultiplayer_property_allow_object_decoding: @@ -273,8 +273,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SceneMultiplayer_method_clear: @@ -346,10 +346,10 @@ void **disconnect_peer** **(** :ref:`int` id **)** 向由 ``id`` 标识的特定对等体发送给定的原始字节 ``bytes``\ (见 :ref:`MultiplayerPeer.set_target_peer`\ )。默认 ID 为 ``0``\ ,即广播到所有对等体。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_scenereplicationconfig.rst b/classes/zh_CN/class_scenereplicationconfig.rst index f703d21261..5b3104829d 100644 --- a/classes/zh_CN/class_scenereplicationconfig.rst +++ b/classes/zh_CN/class_scenereplicationconfig.rst @@ -10,14 +10,14 @@ SceneReplicationConfig ====================== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 配置,能够让 :ref:`MultiplayerSynchronizer` 对属性进行同步。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_SceneReplicationConfig_ReplicationMode: @@ -71,7 +71,7 @@ enum **ReplicationMode**: :ref:`ReplicationMode` **REPLICATION_MODE_NEVER** = ``0`` -Do not keep the given property synchronized. +不要让给定的属性保持同步。 .. _class_SceneReplicationConfig_constant_REPLICATION_MODE_ALWAYS: @@ -79,7 +79,7 @@ Do not keep the given property synchronized. :ref:`ReplicationMode` **REPLICATION_MODE_ALWAYS** = ``1`` -Replicate the given property on process by constantly sending updates using unreliable transfer mode. +处理时复制给定的属性,会使用不可靠的传输模式持续发送更新。 .. _class_SceneReplicationConfig_constant_REPLICATION_MODE_ON_CHANGE: @@ -87,7 +87,7 @@ Replicate the given property on process by constantly sending updates using unre :ref:`ReplicationMode` **REPLICATION_MODE_ON_CHANGE** = ``2`` -Replicate the given property on process by sending updates using reliable transfer mode when its value changes. +处理时复制给定的属性,会使用可靠的传输模式在值发生变化时发送更新。 .. rst-class:: classref-section-separator @@ -95,8 +95,8 @@ Replicate the given property on process by sending updates using reliable transf .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SceneReplicationConfig_method_add_property: @@ -154,7 +154,7 @@ void **add_property** **(** :ref:`NodePath` path, :ref:`int` **property_get_replication_mode** **(** :ref:`NodePath` path **)** -Returns the replication mode for the property identified by the given ``path``. See :ref:`ReplicationMode`. +返回给定 ``path`` 标识的属性的复制模式。请参阅 :ref:`ReplicationMode`\ 。 .. rst-class:: classref-item-separator @@ -178,9 +178,9 @@ Returns the replication mode for the property identified by the given ``path``. :ref:`bool` **property_get_sync** **(** :ref:`NodePath` path **)** -Returns whether the property identified by the given ``path`` is configured to be synchronized on process. +返回属性是否配置为在处理时同步,该属性由\ ``path`` 指定。 -\ *Deprecated.* Use :ref:`property_get_replication_mode` instead. +\ *已废弃。*\ 请改用 :ref:`property_get_replication_mode`\ 。 .. rst-class:: classref-item-separator @@ -192,9 +192,9 @@ Returns whether the property identified by the given ``path`` is configured to b :ref:`bool` **property_get_watch** **(** :ref:`NodePath` path **)** -Returns whether the property identified by the given ``path`` is configured to be reliably synchronized when changes are detected on process. +返回属性是否配置为在处理中检测到变化时进行可靠同步,该属性由 ``path`` 指定。 -\ *Deprecated.* Use :ref:`property_get_replication_mode` instead. +\ *已废弃。*\ 请改用 :ref:`property_get_replication_mode`\ 。 .. rst-class:: classref-item-separator @@ -206,7 +206,7 @@ Returns whether the property identified by the given ``path`` is configured to b void **property_set_replication_mode** **(** :ref:`NodePath` path, :ref:`ReplicationMode` mode **)** -Sets the synchronization mode for the property identified by the given ``path``. See :ref:`ReplicationMode`. +为路径为 ``path`` 的属性设置同步模式。见 :ref:`ReplicationMode`\ 。 .. rst-class:: classref-item-separator @@ -218,7 +218,7 @@ Sets the synchronization mode for the property identified by the given ``path``. void **property_set_spawn** **(** :ref:`NodePath` path, :ref:`bool` enabled **)** -设置属性是否配置为在出生时同步,该属性由 ``path`` 指定。 +设置是否将路径为 ``path`` 的属性配置为在出生时同步。 .. rst-class:: classref-item-separator @@ -230,9 +230,9 @@ void **property_set_spawn** **(** :ref:`NodePath` path, :ref:`bo void **property_set_sync** **(** :ref:`NodePath` path, :ref:`bool` enabled **)** -Sets whether the property identified by the given ``path`` is configured to be synchronized on process. +设置是否将路径为 ``path`` 的属性配置为在处理时同步。 -\ *Deprecated.* Use :ref:`property_set_replication_mode` with :ref:`REPLICATION_MODE_ALWAYS` instead. +\ *已废弃。*\ 请改为使用 :ref:`REPLICATION_MODE_ALWAYS` 调用 :ref:`property_set_replication_mode`\ 。 .. rst-class:: classref-item-separator @@ -244,9 +244,9 @@ Sets whether the property identified by the given ``path`` is configured to be s void **property_set_watch** **(** :ref:`NodePath` path, :ref:`bool` enabled **)** -Sets whether the property identified by the given ``path`` is configured to be reliably synchronized when changes are detected on process. +设置是否将路径为 ``path`` 的属性配置为在处理时检测到变化时进行可靠同步。 -\ *Deprecated.* Use :ref:`property_set_replication_mode` with :ref:`REPLICATION_MODE_ON_CHANGE` instead. +\ *已废弃。*\ 请改为使用 :ref:`REPLICATION_MODE_ON_CHANGE` 调用 :ref:`property_set_replication_mode`\ 。 .. rst-class:: classref-item-separator @@ -260,10 +260,10 @@ void **remove_property** **(** :ref:`NodePath` path **)** 从配置中移除属性,该属性由 ``path`` 指定。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_scenestate.rst b/classes/zh_CN/class_scenestate.rst index 96c76f9c02..40a4d2f44a 100644 --- a/classes/zh_CN/class_scenestate.rst +++ b/classes/zh_CN/class_scenestate.rst @@ -10,14 +10,14 @@ SceneState ========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 提供对场景文件信息的访问。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 维护一个与场景相关的资源、节点、导出的和重写的属性以及内置脚本的列表。无法从 **SceneState** 修改,只能读取。可用于在不实例化 :ref:`PackedScene` 的前提下观察其中的内容。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -81,8 +81,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_SceneState_GenEditState: @@ -134,8 +134,8 @@ enum **GenEditState**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SceneState_method_get_connection_binds: @@ -393,10 +393,10 @@ Method Descriptions 如果 ``idx`` 处的节点是一个 :ref:`InstancePlaceholder`\ ,则返回 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_scenetree.rst b/classes/zh_CN/class_scenetree.rst index 23d8d77039..542c2564f2 100644 --- a/classes/zh_CN/class_scenetree.rst +++ b/classes/zh_CN/class_scenetree.rst @@ -10,14 +10,14 @@ SceneTree ========= -**Inherits:** :ref:`MainLoop` **<** :ref:`Object` +**继承:** :ref:`MainLoop` **<** :ref:`Object` 通过节点层次结构管理游戏循环。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 作为最重要的类之一,\ **SceneTree** 管理着场景中节点的层次结构以及场景本身。节点可以被添加、检索和删除。整个场景树可以被暂停,包括当前场景。场景可以被加载、切换和重新加载。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`SceneTree <../tutorials/scripting/scene_tree>` @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -66,8 +66,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -124,8 +124,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_SceneTree_signal_node_added: @@ -181,7 +181,7 @@ Signals **physics_frame** **(** **)** -在 **SceneTree** 中的每个节点上调用 :ref:`Node._physics_process` 之前立即发出。 +在 **SceneTree** 中的每个节点上调用 :ref:`Node._physics_process` 之前立即发出。 .. rst-class:: classref-item-separator @@ -193,7 +193,7 @@ Signals **process_frame** **(** **)** -在对 **SceneTree** 中的每个节点调用 :ref:`Node._process` 之前立即发出。 +在对 **SceneTree** 中的每个节点调用 :ref:`Node._process` 之前立即发出。 .. rst-class:: classref-item-separator @@ -225,8 +225,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_SceneTree_GroupCallFlags: @@ -274,8 +274,8 @@ enum **GroupCallFlags**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SceneTree_property_auto_accept_quit: @@ -307,9 +307,9 @@ Property Descriptions - void **set_current_scene** **(** :ref:`Node` value **)** - :ref:`Node` **get_current_scene** **(** **)** -Returns the root node of the currently running scene, regardless of its structure. +返回当前运行场景的根节点,无视其结构。 -\ **Warning:** Setting this directly might not work as expected, and will *not* add or remove any nodes from the tree, consider using :ref:`change_scene_to_file` or :ref:`change_scene_to_packed` instead. +\ **警告:**\ 直接设置这个属性可能无法达到预期效果,\ *不会*\ 为场景树添加或移除任何节点,请考虑改用 :ref:`change_scene_to_file` 或 :ref:`change_scene_to_packed`\ 。 .. rst-class:: classref-item-separator @@ -423,7 +423,7 @@ Returns the root node of the currently running scene, regardless of its structur - 2D 和 3D 物理将停止,包括信号和碰撞检测。 -- 节点不再调用 :ref:`Node._process`\ 、\ :ref:`Node._physics_process` 和 :ref:`Node._input`\ 。 +- 节点不再调用 :ref:`Node._process`\ 、\ :ref:`Node._physics_process` 和 :ref:`Node._input`\ 。 .. rst-class:: classref-item-separator @@ -466,8 +466,8 @@ Returns the root node of the currently running scene, regardless of its structur .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SceneTree_method_call_group: @@ -508,11 +508,11 @@ void **call_group_flags** **(** :ref:`int` flags, :ref:`StringName` **change_scene_to_file** **(** :ref:`String` path **)** -Changes the running scene to the one at the given ``path``, after loading it into a :ref:`PackedScene` and creating a new instance. +将位于给定路径 ``path`` 的场景加载进一个 :ref:`PackedScene` 并新建其实例,然后将正在运行的场景修改为这个场景。 -Returns :ref:`@GlobalScope.OK` on success, :ref:`@GlobalScope.ERR_CANT_OPEN` if the ``path`` cannot be loaded into a :ref:`PackedScene`, or :ref:`@GlobalScope.ERR_CANT_CREATE` if that scene cannot be instantiated. +成功时返回 :ref:`@GlobalScope.OK`\ ,如果 ``path`` 不能被加载到一个 :ref:`PackedScene` 中,则返回 :ref:`@GlobalScope.ERR_CANT_OPEN`\ ;如果该场景无法被实例化,则返回 :ref:`@GlobalScope.ERR_CANT_CREATE`\ 。 -\ **Note:** The new scene node is added to the tree at the end of the frame. This ensures that both scenes aren't running at the same time, while still freeing the previous scene in a safe way similar to :ref:`Node.queue_free`. As such, you won't be able to access the loaded scene immediately after the :ref:`change_scene_to_file` call. +\ **注意:**\ 新的场景节点是在该帧的末尾添加的。这确保了两个场景永远不会同时加载,如果场景太大或在内存受限的环境中运行,这会耗尽系统资源。因此,无法在 :ref:`change_scene_to_file` 调用后,立即访问到被加载的场景。 .. rst-class:: classref-item-separator @@ -524,11 +524,11 @@ Returns :ref:`@GlobalScope.OK` on success, :ref: :ref:`Error` **change_scene_to_packed** **(** :ref:`PackedScene` packed_scene **)** -Changes the running scene to a new instance of the given :ref:`PackedScene` (which must be valid). +将正在运行的场景改变为给定 :ref:`PackedScene` (必须有效)的一个新实例。 -Returns :ref:`@GlobalScope.OK` on success, :ref:`@GlobalScope.ERR_CANT_CREATE` if the scene cannot be instantiated, or :ref:`@GlobalScope.ERR_INVALID_PARAMETER` if the scene is invalid. +成功时返回 :ref:`@GlobalScope.OK`\ ,场景无法实例化时返回 :ref:`@GlobalScope.ERR_CANT_CREATE`\ ,场景无效时返回 :ref:`@GlobalScope.ERR_INVALID_PARAMETER`\ 。 -\ **Note:** The new scene node is added to the tree at the end of the frame. You won't be able to access it immediately after the :ref:`change_scene_to_packed` call. +\ **注意:**\ 新的场景节点会在当前帧的末尾添加到场景树中。无法在调用 :ref:`change_scene_to_packed` 后立即访问到它。 .. rst-class:: classref-item-separator @@ -573,7 +573,7 @@ Returns :ref:`@GlobalScope.OK` on success, :ref: 计时器将在其时间结束后被自动释放。 -\ **注意:**\ 计时器是在当前帧所有节点之后处理的,即节点的 :ref:`Node._process` 方法比计时器先调用(\ ``process_in_physics`` 为 ``true`` 时为 :ref:`Node._physics_process`\ )。 +\ **注意:**\ 计时器是在当前帧所有节点之后处理的,即节点的 :ref:`Node._process` 方法比计时器先调用(\ ``process_in_physics`` 为 ``true`` 时为 :ref:`Node._physics_process`\ )。 .. rst-class:: classref-item-separator @@ -585,9 +585,9 @@ Returns :ref:`@GlobalScope.OK` on success, :ref: :ref:`Tween` **create_tween** **(** **)** -Creates and returns a new :ref:`Tween`. The Tween will start automatically on the next process frame or physics frame (depending on :ref:`TweenProcessMode`). +创建并返回新的 :ref:`Tween`\ 。该 Tween 会在下一个处理帧或物理帧中自动开始(取决于 :ref:`TweenProcessMode`\ )。 -\ **Note:** When creating a :ref:`Tween` using this method, the :ref:`Tween` will not be tied to the :ref:`Node` that called it. It will continue to animate even if the :ref:`Node` is freed, but it will automatically finish if there's nothing left to animate. If you want the :ref:`Tween` to be automatically killed when the :ref:`Node` is freed, use :ref:`Node.create_tween` or :ref:`Tween.bind_node`. +\ **注意:**\ 使用这个方法创建 :ref:`Tween` 时,\ :ref:`Tween` 不会与调用的 :ref:`Node` 绑定。即便在该 :ref:`Node` 释放后也仍然会继续进行动画,但是在已经没有任何可以动画的东西时会自动结束。如果你想要让 :ref:`Tween` 在该 :ref:`Node` 释放时自动销毁,请使用 :ref:`Node.create_tween` 或 :ref:`Tween.bind_node`\ 。 .. rst-class:: classref-item-separator @@ -623,9 +623,7 @@ Creates and returns a new :ref:`Tween`. The Tween will start automa :ref:`MultiplayerAPI` **get_multiplayer** **(** :ref:`NodePath` for_path=NodePath("") **)** |const| -返回给定路径所配置的 :ref:`MultiplayerAPI`\ ,如果 ``for_path`` 为空则返回默认版本。 - -\ **注意:**\ 一个子路径只能配置一个 :ref:`MultiplayerAPI`\ 。如果先为 ``"/root/Foo"`` 进行了配置,再针对 ``"/root/Foo/Bar"`` 调用这个方法,则无论是否对该路径进行了配置,都会返回为 ``"/root/Foo"`` 配置的版本。 +搜索为给定路径配置的 :ref:`MultiplayerAPI`\ ,如果不存在,则会搜索父路径,直到找到为止。如果路径为空,或者没有找到,则返回默认路径。参见 :ref:`set_multiplayer`\ 。 .. rst-class:: classref-item-separator @@ -673,9 +671,9 @@ Creates and returns a new :ref:`Tween`. The Tween will start automa :ref:`bool` **has_group** **(** :ref:`StringName` name **)** |const| -Returns ``true`` if the given group exists. +如果存在给定的分组,则返回 ``true``\ 。 -A group exists if any :ref:`Node` in the tree belongs to it (see :ref:`Node.add_to_group`). Groups without nodes are removed automatically. +场景中存在属于某个分组的 :ref:`Node` 时,该分组才存在(见 :ref:`Node.add_to_group`\ )。不含任何节点的分组会被自动移除。 .. rst-class:: classref-item-separator @@ -789,7 +787,7 @@ void **set_multiplayer** **(** :ref:`MultiplayerAPI` multi 用给定的 ``root_path`` 设置自定义的 :ref:`MultiplayerAPI`\ (同时控制相对的子路径),如果 ``root_path`` 为空,则会覆盖默认值。 -\ **注意:**\ 一个子路径只能配置一个 :ref:`MultiplayerAPI`\ 。如果先为 ``"/root/Foo"`` 进行了配置,再针对 ``"/root/Foo/Bar"`` 设置就会被忽略。见 :ref:`get_multiplayer`\ 。 +\ **注意:**\ :ref:`MultiplayerAPI` 不能为包含 ``root_path`` 的子路径配置,嵌套的自定义多人游戏是不被允许的。例如,如果为 ``"/root/Foo"`` 配置了一项,则为 ``"/root/Foo/Bar"`` 设置一项将导致错误。 .. rst-class:: classref-item-separator @@ -803,10 +801,10 @@ void **unload_current_scene** **(** **)** 如果当前场景已加载,调用此方法将进行卸载。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_scenetreetimer.rst b/classes/zh_CN/class_scenetreetimer.rst index 9130dab9f5..e9b87922c7 100644 --- a/classes/zh_CN/class_scenetreetimer.rst +++ b/classes/zh_CN/class_scenetreetimer.rst @@ -10,14 +10,14 @@ SceneTreeTimer ============== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 一次性定时器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 由场景树管理的一次性计时器,会在完成时发出 :ref:`timeout`\ 。另见 :ref:`SceneTree.create_timer`\ 。 @@ -46,12 +46,12 @@ Description 达到时间后,会释放对该计时器的引用。如果要保留该计时器,你可以保持对它的引用。见 :ref:`RefCounted`\ 。 -\ **注意:**\ 对计时器的处理发生在当前帧的所有节点节后,即节点的 :ref:`Node._process` 方法是在计时器之前调用的(如果 :ref:`SceneTree.create_timer` 的 ``process_in_physics`` 为 ``true``\ 则为 :ref:`Node._physics_process`\ )。 +\ **注意:**\ 对计时器的处理发生在当前帧的所有节点节后,即节点的 :ref:`Node._process` 方法是在计时器之前调用的(如果 :ref:`SceneTree.create_timer` 的 ``process_in_physics`` 为 ``true``\ 则为 :ref:`Node._physics_process`\ )。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -66,8 +66,8 @@ Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_SceneTreeTimer_signal_timeout: @@ -83,8 +83,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SceneTreeTimer_property_time_left: @@ -99,10 +99,10 @@ Property Descriptions 剩余时间(单位为秒)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_script.rst b/classes/zh_CN/class_script.rst index a3e988a013..50313a4498 100644 --- a/classes/zh_CN/class_script.rst +++ b/classes/zh_CN/class_script.rst @@ -10,16 +10,16 @@ Script ====== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`CSharpScript`, :ref:`GDScript`, :ref:`ScriptExtension` +**派生:** :ref:`CSharpScript`, :ref:`GDScript`, :ref:`ScriptExtension` 作为资源存储的类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 作为资源存储的类。脚本可以扩展所有以它为实例的对象的功能。 @@ -29,15 +29,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`脚本文档索引 <../tutorials/scripting/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -77,6 +77,8 @@ Methods +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`instance_has` **(** :ref:`Object` base_object **)** |const| | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_abstract` **(** **)** |const| | + +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_tool` **(** **)** |const| | +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`reload` **(** :ref:`bool` keep_state=false **)** | @@ -88,8 +90,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Script_property_source_code: @@ -110,8 +112,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Script_method_can_instantiate: @@ -245,6 +247,18 @@ Method Descriptions ---- +.. _class_Script_method_is_abstract: + +.. rst-class:: classref-method + +:ref:`bool` **is_abstract** **(** **)** |const| + +如果脚本是抽象脚本,则返回 ``true``\ 。抽象脚本没有构造函数,无法被实例化。 + +.. rst-class:: classref-item-separator + +---- + .. _class_Script_method_is_tool: .. rst-class:: classref-method @@ -265,10 +279,10 @@ Method Descriptions 重新加载脚本的类的实现。返回一个错误代码。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_scriptcreatedialog.rst b/classes/zh_CN/class_scriptcreatedialog.rst index 6ea6e8cd83..1c58e33117 100644 --- a/classes/zh_CN/class_scriptcreatedialog.rst +++ b/classes/zh_CN/class_scriptcreatedialog.rst @@ -10,14 +10,14 @@ ScriptCreateDialog ================== -**Inherits:** :ref:`ConfirmationDialog` **<** :ref:`AcceptDialog` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`ConfirmationDialog` **<** :ref:`AcceptDialog` **<** :ref:`Window` **<** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` Godot 编辑器用于创建新 :ref:`Script` 文件的弹出对话框。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **ScriptCreateDialog** 会根据给定的模板为给定的脚本语言创建脚本文件。标准用法是在调用任何 :ref:`Window.popup` 方法之前,先配置其字段。 @@ -46,8 +46,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -62,8 +62,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -78,8 +78,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_ScriptCreateDialog_signal_script_created: @@ -95,8 +95,8 @@ Signals .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ScriptCreateDialog_method_config: @@ -106,10 +106,10 @@ void **config** **(** :ref:`String` inherits, :ref:`String` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`PanelContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` Godot 编辑器的脚本编辑器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- Godot 编辑器的脚本编辑器。 @@ -25,8 +25,8 @@ Godot 编辑器的脚本编辑器。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_ScriptEditor_signal_editor_script_changed: @@ -84,8 +84,8 @@ Signals .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ScriptEditor_method_get_current_editor: @@ -183,10 +183,10 @@ void **unregister_syntax_highlighter** **(** :ref:`EditorSyntaxHighlighter`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_scripteditorbase.rst b/classes/zh_CN/class_scripteditorbase.rst index 0b702e6bb0..8f89daa0d2 100644 --- a/classes/zh_CN/class_scripteditorbase.rst +++ b/classes/zh_CN/class_scripteditorbase.rst @@ -10,21 +10,21 @@ ScriptEditorBase ================ -**Inherits:** :ref:`VBoxContainer` **<** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`VBoxContainer` **<** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 用于在 :ref:`ScriptEditor` 中编辑脚本的基础编辑器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于在 :ref:`ScriptEditor` 中编辑脚本的基础编辑器。不包含文档项目。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_ScriptEditorBase_signal_edited_script_changed: @@ -154,8 +154,8 @@ Signals .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ScriptEditorBase_method_add_syntax_highlighter: @@ -177,10 +177,10 @@ void **add_syntax_highlighter** **(** :ref:`EditorSyntaxHighlighter`\ 。文本脚本对应 :ref:`CodeEdit`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_scriptextension.rst b/classes/zh_CN/class_scriptextension.rst index 4c2a826c2b..efd6af8421 100644 --- a/classes/zh_CN/class_scriptextension.rst +++ b/classes/zh_CN/class_scriptextension.rst @@ -10,87 +10,91 @@ ScriptExtension =============== -**Inherits:** :ref:`Script` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Script` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_can_instantiate` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_editor_can_reload_from_file` **(** **)** |virtual| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Script` | :ref:`_get_base_script` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_class_icon_path` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_constants` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_documentation` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`_get_global_name` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`_get_instance_base_type` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ScriptLanguage` | :ref:`_get_language` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_member_line` **(** :ref:`StringName` member **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName[]` | :ref:`_get_members` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_method_info` **(** :ref:`StringName` method **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_property_default_value` **(** :ref:`StringName` property **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_rpc_config` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_script_method_list` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_script_property_list` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_script_signal_list` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_source_code` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_method` **(** :ref:`StringName` method **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_property_default_value` **(** :ref:`StringName` property **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_script_signal` **(** :ref:`StringName` signal **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_source_code` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_inherits_script` **(** :ref:`Script` script **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void* | :ref:`_instance_create` **(** :ref:`Object` for_object **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_instance_has` **(** :ref:`Object` object **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_placeholder_fallback_enabled` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_tool` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_valid` **(** **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_placeholder_erased` **(** void* placeholder **)** |virtual| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void* | :ref:`_placeholder_instance_create` **(** :ref:`Object` for_object **)** |virtual| |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_reload` **(** :ref:`bool` keep_state **)** |virtual| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_source_code` **(** :ref:`String` code **)** |virtual| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_update_exports` **(** **)** |virtual| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_instantiate` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_editor_can_reload_from_file` **(** **)** |virtual| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Script` | :ref:`_get_base_script` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_class_icon_path` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_constants` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_documentation` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`_get_global_name` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`_get_instance_base_type` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptLanguage` | :ref:`_get_language` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_member_line` **(** :ref:`StringName` member **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName[]` | :ref:`_get_members` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_method_info` **(** :ref:`StringName` method **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_property_default_value` **(** :ref:`StringName` property **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_rpc_config` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_script_method_list` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_script_property_list` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_script_signal_list` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_source_code` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_method` **(** :ref:`StringName` method **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_property_default_value` **(** :ref:`StringName` property **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_script_signal` **(** :ref:`StringName` signal **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_source_code` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_static_method` **(** :ref:`StringName` method **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_inherits_script` **(** :ref:`Script` script **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void* | :ref:`_instance_create` **(** :ref:`Object` for_object **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_instance_has` **(** :ref:`Object` object **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_abstract` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_placeholder_fallback_enabled` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_tool` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_valid` **(** **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_placeholder_erased` **(** void* placeholder **)** |virtual| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void* | :ref:`_placeholder_instance_create` **(** :ref:`Object` for_object **)** |virtual| |const| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_reload` **(** :ref:`bool` keep_state **)** |virtual| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_source_code` **(** :ref:`String` code **)** |virtual| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_update_exports` **(** **)** |virtual| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -98,10 +102,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_ScriptExtension_method__can_instantiate: +.. _class_ScriptExtension_private_method__can_instantiate: .. rst-class:: classref-method @@ -109,13 +113,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__editor_can_reload_from_file: +.. _class_ScriptExtension_private_method__editor_can_reload_from_file: .. rst-class:: classref-method @@ -123,13 +127,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__get_base_script: +.. _class_ScriptExtension_private_method__get_base_script: .. rst-class:: classref-method @@ -137,13 +141,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__get_class_icon_path: +.. _class_ScriptExtension_private_method__get_class_icon_path: .. rst-class:: classref-method @@ -151,13 +155,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__get_constants: +.. _class_ScriptExtension_private_method__get_constants: .. rst-class:: classref-method @@ -165,13 +169,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__get_documentation: +.. _class_ScriptExtension_private_method__get_documentation: .. rst-class:: classref-method @@ -179,13 +183,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__get_global_name: +.. _class_ScriptExtension_private_method__get_global_name: .. rst-class:: classref-method @@ -193,13 +197,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__get_instance_base_type: +.. _class_ScriptExtension_private_method__get_instance_base_type: .. rst-class:: classref-method @@ -207,13 +211,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__get_language: +.. _class_ScriptExtension_private_method__get_language: .. rst-class:: classref-method @@ -221,13 +225,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__get_member_line: +.. _class_ScriptExtension_private_method__get_member_line: .. rst-class:: classref-method @@ -235,13 +239,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__get_members: +.. _class_ScriptExtension_private_method__get_members: .. rst-class:: classref-method @@ -249,13 +253,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__get_method_info: +.. _class_ScriptExtension_private_method__get_method_info: .. rst-class:: classref-method @@ -263,13 +267,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__get_property_default_value: +.. _class_ScriptExtension_private_method__get_property_default_value: .. rst-class:: classref-method @@ -277,13 +281,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__get_rpc_config: +.. _class_ScriptExtension_private_method__get_rpc_config: .. rst-class:: classref-method @@ -291,13 +295,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__get_script_method_list: +.. _class_ScriptExtension_private_method__get_script_method_list: .. rst-class:: classref-method @@ -305,13 +309,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__get_script_property_list: +.. _class_ScriptExtension_private_method__get_script_property_list: .. rst-class:: classref-method @@ -319,13 +323,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__get_script_signal_list: +.. _class_ScriptExtension_private_method__get_script_signal_list: .. rst-class:: classref-method @@ -333,13 +337,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__get_source_code: +.. _class_ScriptExtension_private_method__get_source_code: .. rst-class:: classref-method @@ -347,13 +351,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__has_method: +.. _class_ScriptExtension_private_method__has_method: .. rst-class:: classref-method @@ -361,13 +365,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__has_property_default_value: +.. _class_ScriptExtension_private_method__has_property_default_value: .. rst-class:: classref-method @@ -375,13 +379,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__has_script_signal: +.. _class_ScriptExtension_private_method__has_script_signal: .. rst-class:: classref-method @@ -389,13 +393,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__has_source_code: +.. _class_ScriptExtension_private_method__has_source_code: .. rst-class:: classref-method @@ -403,13 +407,27 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__inherits_script: +.. _class_ScriptExtension_private_method__has_static_method: + +.. rst-class:: classref-method + +:ref:`bool` **_has_static_method** **(** :ref:`StringName` method **)** |virtual| |const| + +.. container:: contribute + + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptExtension_private_method__inherits_script: .. rst-class:: classref-method @@ -417,13 +435,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__instance_create: +.. _class_ScriptExtension_private_method__instance_create: .. rst-class:: classref-method @@ -431,13 +449,13 @@ void* **_instance_create** **(** :ref:`Object` for_object **)** |v .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__instance_has: +.. _class_ScriptExtension_private_method__instance_has: .. rst-class:: classref-method @@ -445,13 +463,25 @@ void* **_instance_create** **(** :ref:`Object` for_object **)** |v .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__is_placeholder_fallback_enabled: +.. _class_ScriptExtension_private_method__is_abstract: + +.. rst-class:: classref-method + +:ref:`bool` **_is_abstract** **(** **)** |virtual| |const| + +如果脚本是抽象脚本,则返回 ``true``\ 。抽象脚本没有构造函数,无法被实例化。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptExtension_private_method__is_placeholder_fallback_enabled: .. rst-class:: classref-method @@ -459,13 +489,13 @@ void* **_instance_create** **(** :ref:`Object` for_object **)** |v .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__is_tool: +.. _class_ScriptExtension_private_method__is_tool: .. rst-class:: classref-method @@ -473,13 +503,13 @@ void* **_instance_create** **(** :ref:`Object` for_object **)** |v .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__is_valid: +.. _class_ScriptExtension_private_method__is_valid: .. rst-class:: classref-method @@ -487,13 +517,13 @@ void* **_instance_create** **(** :ref:`Object` for_object **)** |v .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__placeholder_erased: +.. _class_ScriptExtension_private_method__placeholder_erased: .. rst-class:: classref-method @@ -501,13 +531,13 @@ void **_placeholder_erased** **(** void* placeholder **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__placeholder_instance_create: +.. _class_ScriptExtension_private_method__placeholder_instance_create: .. rst-class:: classref-method @@ -515,13 +545,13 @@ void* **_placeholder_instance_create** **(** :ref:`Object` for_obj .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__reload: +.. _class_ScriptExtension_private_method__reload: .. rst-class:: classref-method @@ -529,13 +559,13 @@ void* **_placeholder_instance_create** **(** :ref:`Object` for_obj .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__set_source_code: +.. _class_ScriptExtension_private_method__set_source_code: .. rst-class:: classref-method @@ -543,13 +573,13 @@ void **_set_source_code** **(** :ref:`String` code **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptExtension_method__update_exports: +.. _class_ScriptExtension_private_method__update_exports: .. rst-class:: classref-method @@ -557,12 +587,12 @@ void **_update_exports** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_scriptlanguage.rst b/classes/zh_CN/class_scriptlanguage.rst index ba55ef0bf3..b40c024106 100644 --- a/classes/zh_CN/class_scriptlanguage.rst +++ b/classes/zh_CN/class_scriptlanguage.rst @@ -10,18 +10,18 @@ ScriptLanguage ============== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` -**Inherited By:** :ref:`ScriptLanguageExtension` +**派生:** :ref:`ScriptLanguageExtension` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_scriptlanguageextension.rst b/classes/zh_CN/class_scriptlanguageextension.rst index e189db4dd4..1f6b7f7e23 100644 --- a/classes/zh_CN/class_scriptlanguageextension.rst +++ b/classes/zh_CN/class_scriptlanguageextension.rst @@ -10,129 +10,131 @@ ScriptLanguageExtension ======================= -**Inherits:** :ref:`ScriptLanguage` **<** :ref:`Object` +**继承:** :ref:`ScriptLanguage` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_global_constant` **(** :ref:`StringName` name, :ref:`Variant` value **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_add_named_global_constant` **(** :ref:`StringName` name, :ref:`Variant` value **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_auto_indent_code` **(** :ref:`String` code, :ref:`int` from_line, :ref:`int` to_line **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_can_inherit_from_file` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_complete_code` **(** :ref:`String` code, :ref:`String` path, :ref:`Object` owner **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`_create_script` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_debug_get_current_stack_info` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_debug_get_error` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_debug_get_globals` **(** :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_debug_get_stack_level_count` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_debug_get_stack_level_function` **(** :ref:`int` level **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void* | :ref:`_debug_get_stack_level_instance` **(** :ref:`int` level **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_debug_get_stack_level_line` **(** :ref:`int` level **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_debug_get_stack_level_locals` **(** :ref:`int` level, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_debug_get_stack_level_members` **(** :ref:`int` level, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_debug_parse_stack_level_expression` **(** :ref:`int` level, :ref:`String` expression, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_find_function` **(** :ref:`String` class_name, :ref:`String` function_name **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_finish` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_frame` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_built_in_templates` **(** :ref:`StringName` object **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_comment_delimiters` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_extension` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_global_class_name` **(** :ref:`String` path **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_public_annotations` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_public_constants` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary[]` | :ref:`_get_public_functions` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_reserved_words` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_string_delimiters` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_type` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_handles_global_class_type` **(** :ref:`String` type **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_named_classes` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_init` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_control_flow_keyword` **(** :ref:`String` keyword **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_using_templates` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_lookup_code` **(** :ref:`String` code, :ref:`String` symbol, :ref:`String` path, :ref:`Object` owner **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_make_function` **(** :ref:`String` class_name, :ref:`String` function_name, :ref:`PackedStringArray` function_args **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Script` | :ref:`_make_template` **(** :ref:`String` template, :ref:`String` class_name, :ref:`String` base_class_name **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_open_in_external_editor` **(** :ref:`Script` script, :ref:`int` line, :ref:`int` column **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_overrides_external_editor` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_profiling_get_accumulated_data` **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_profiling_get_frame_data` **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_profiling_start` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_profiling_stop` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_reload_all_scripts` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_reload_tool_script` **(** :ref:`Script` script, :ref:`bool` soft_reload **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_remove_named_global_constant` **(** :ref:`StringName` name **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_supports_builtin_mode` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_supports_documentation` **(** **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_thread_enter` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_thread_exit` **(** **)** |virtual| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_validate` **(** :ref:`String` script, :ref:`String` path, :ref:`bool` validate_functions, :ref:`bool` validate_errors, :ref:`bool` validate_warnings, :ref:`bool` validate_safe_lines **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_validate_path` **(** :ref:`String` path **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_global_constant` **(** :ref:`StringName` name, :ref:`Variant` value **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_add_named_global_constant` **(** :ref:`StringName` name, :ref:`Variant` value **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_auto_indent_code` **(** :ref:`String` code, :ref:`int` from_line, :ref:`int` to_line **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_can_inherit_from_file` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_complete_code` **(** :ref:`String` code, :ref:`String` path, :ref:`Object` owner **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`_create_script` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_debug_get_current_stack_info` **(** **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_debug_get_error` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_debug_get_globals` **(** :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_debug_get_stack_level_count` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_debug_get_stack_level_function` **(** :ref:`int` level **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void* | :ref:`_debug_get_stack_level_instance` **(** :ref:`int` level **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_debug_get_stack_level_line` **(** :ref:`int` level **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_debug_get_stack_level_locals` **(** :ref:`int` level, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_debug_get_stack_level_members` **(** :ref:`int` level, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_debug_parse_stack_level_expression` **(** :ref:`int` level, :ref:`String` expression, :ref:`int` max_subitems, :ref:`int` max_depth **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_find_function` **(** :ref:`String` class_name, :ref:`String` function_name **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_finish` **(** **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_frame` **(** **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_built_in_templates` **(** :ref:`StringName` object **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_comment_delimiters` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_doc_comment_delimiters` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_extension` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_global_class_name` **(** :ref:`String` path **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_public_annotations` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_public_constants` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary[]` | :ref:`_get_public_functions` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_reserved_words` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_string_delimiters` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_type` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handles_global_class_type` **(** :ref:`String` type **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_named_classes` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_init` **(** **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_control_flow_keyword` **(** :ref:`String` keyword **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_using_templates` **(** **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_lookup_code` **(** :ref:`String` code, :ref:`String` symbol, :ref:`String` path, :ref:`Object` owner **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_make_function` **(** :ref:`String` class_name, :ref:`String` function_name, :ref:`PackedStringArray` function_args **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Script` | :ref:`_make_template` **(** :ref:`String` template, :ref:`String` class_name, :ref:`String` base_class_name **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_open_in_external_editor` **(** :ref:`Script` script, :ref:`int` line, :ref:`int` column **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_overrides_external_editor` **(** **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_profiling_get_accumulated_data` **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_profiling_get_frame_data` **(** ScriptLanguageExtensionProfilingInfo* info_array, :ref:`int` info_max **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_profiling_start` **(** **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_profiling_stop` **(** **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_reload_all_scripts` **(** **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_reload_tool_script` **(** :ref:`Script` script, :ref:`bool` soft_reload **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_remove_named_global_constant` **(** :ref:`StringName` name **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_supports_builtin_mode` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_supports_documentation` **(** **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_thread_enter` **(** **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_thread_exit` **(** **)** |virtual| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_validate` **(** :ref:`String` script, :ref:`String` path, :ref:`bool` validate_functions, :ref:`bool` validate_errors, :ref:`bool` validate_warnings, :ref:`bool` validate_safe_lines **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_validate_path` **(** :ref:`String` path **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -140,8 +142,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_ScriptLanguageExtension_LookupResultType: @@ -375,10 +377,10 @@ enum **CodeCompletionKind**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_ScriptLanguageExtension_method__add_global_constant: +.. _class_ScriptLanguageExtension_private_method__add_global_constant: .. rst-class:: classref-method @@ -386,13 +388,13 @@ void **_add_global_constant** **(** :ref:`StringName` name, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__add_named_global_constant: +.. _class_ScriptLanguageExtension_private_method__add_named_global_constant: .. rst-class:: classref-method @@ -400,13 +402,13 @@ void **_add_named_global_constant** **(** :ref:`StringName` na .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__auto_indent_code: +.. _class_ScriptLanguageExtension_private_method__auto_indent_code: .. rst-class:: classref-method @@ -414,13 +416,13 @@ void **_add_named_global_constant** **(** :ref:`StringName` na .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__can_inherit_from_file: +.. _class_ScriptLanguageExtension_private_method__can_inherit_from_file: .. rst-class:: classref-method @@ -428,13 +430,13 @@ void **_add_named_global_constant** **(** :ref:`StringName` na .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__complete_code: +.. _class_ScriptLanguageExtension_private_method__complete_code: .. rst-class:: classref-method @@ -442,13 +444,13 @@ void **_add_named_global_constant** **(** :ref:`StringName` na .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__create_script: +.. _class_ScriptLanguageExtension_private_method__create_script: .. rst-class:: classref-method @@ -456,13 +458,13 @@ void **_add_named_global_constant** **(** :ref:`StringName` na .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__debug_get_current_stack_info: +.. _class_ScriptLanguageExtension_private_method__debug_get_current_stack_info: .. rst-class:: classref-method @@ -470,13 +472,13 @@ void **_add_named_global_constant** **(** :ref:`StringName` na .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__debug_get_error: +.. _class_ScriptLanguageExtension_private_method__debug_get_error: .. rst-class:: classref-method @@ -484,13 +486,13 @@ void **_add_named_global_constant** **(** :ref:`StringName` na .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__debug_get_globals: +.. _class_ScriptLanguageExtension_private_method__debug_get_globals: .. rst-class:: classref-method @@ -498,13 +500,13 @@ void **_add_named_global_constant** **(** :ref:`StringName` na .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__debug_get_stack_level_count: +.. _class_ScriptLanguageExtension_private_method__debug_get_stack_level_count: .. rst-class:: classref-method @@ -512,13 +514,13 @@ void **_add_named_global_constant** **(** :ref:`StringName` na .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__debug_get_stack_level_function: +.. _class_ScriptLanguageExtension_private_method__debug_get_stack_level_function: .. rst-class:: classref-method @@ -526,13 +528,13 @@ void **_add_named_global_constant** **(** :ref:`StringName` na .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__debug_get_stack_level_instance: +.. _class_ScriptLanguageExtension_private_method__debug_get_stack_level_instance: .. rst-class:: classref-method @@ -540,13 +542,13 @@ void* **_debug_get_stack_level_instance** **(** :ref:`int` level **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__debug_get_stack_level_line: +.. _class_ScriptLanguageExtension_private_method__debug_get_stack_level_line: .. rst-class:: classref-method @@ -554,13 +556,13 @@ void* **_debug_get_stack_level_instance** **(** :ref:`int` level **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__debug_get_stack_level_locals: +.. _class_ScriptLanguageExtension_private_method__debug_get_stack_level_locals: .. rst-class:: classref-method @@ -568,13 +570,13 @@ void* **_debug_get_stack_level_instance** **(** :ref:`int` level **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__debug_get_stack_level_members: +.. _class_ScriptLanguageExtension_private_method__debug_get_stack_level_members: .. rst-class:: classref-method @@ -582,13 +584,13 @@ void* **_debug_get_stack_level_instance** **(** :ref:`int` level **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__debug_parse_stack_level_expression: +.. _class_ScriptLanguageExtension_private_method__debug_parse_stack_level_expression: .. rst-class:: classref-method @@ -596,13 +598,13 @@ void* **_debug_get_stack_level_instance** **(** :ref:`int` level **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__find_function: +.. _class_ScriptLanguageExtension_private_method__find_function: .. rst-class:: classref-method @@ -610,13 +612,13 @@ void* **_debug_get_stack_level_instance** **(** :ref:`int` level **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__finish: +.. _class_ScriptLanguageExtension_private_method__finish: .. rst-class:: classref-method @@ -624,13 +626,13 @@ void **_finish** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__frame: +.. _class_ScriptLanguageExtension_private_method__frame: .. rst-class:: classref-method @@ -638,13 +640,13 @@ void **_frame** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__get_built_in_templates: +.. _class_ScriptLanguageExtension_private_method__get_built_in_templates: .. rst-class:: classref-method @@ -652,13 +654,13 @@ void **_frame** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__get_comment_delimiters: +.. _class_ScriptLanguageExtension_private_method__get_comment_delimiters: .. rst-class:: classref-method @@ -666,13 +668,27 @@ void **_frame** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__get_extension: +.. _class_ScriptLanguageExtension_private_method__get_doc_comment_delimiters: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_doc_comment_delimiters** **(** **)** |virtual| |const| + +.. container:: contribute + + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScriptLanguageExtension_private_method__get_extension: .. rst-class:: classref-method @@ -680,13 +696,13 @@ void **_frame** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__get_global_class_name: +.. _class_ScriptLanguageExtension_private_method__get_global_class_name: .. rst-class:: classref-method @@ -694,13 +710,13 @@ void **_frame** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__get_name: +.. _class_ScriptLanguageExtension_private_method__get_name: .. rst-class:: classref-method @@ -708,13 +724,13 @@ void **_frame** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__get_public_annotations: +.. _class_ScriptLanguageExtension_private_method__get_public_annotations: .. rst-class:: classref-method @@ -722,13 +738,13 @@ void **_frame** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__get_public_constants: +.. _class_ScriptLanguageExtension_private_method__get_public_constants: .. rst-class:: classref-method @@ -736,13 +752,13 @@ void **_frame** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__get_public_functions: +.. _class_ScriptLanguageExtension_private_method__get_public_functions: .. rst-class:: classref-method @@ -750,13 +766,13 @@ void **_frame** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__get_recognized_extensions: +.. _class_ScriptLanguageExtension_private_method__get_recognized_extensions: .. rst-class:: classref-method @@ -764,13 +780,13 @@ void **_frame** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__get_reserved_words: +.. _class_ScriptLanguageExtension_private_method__get_reserved_words: .. rst-class:: classref-method @@ -778,13 +794,13 @@ void **_frame** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__get_string_delimiters: +.. _class_ScriptLanguageExtension_private_method__get_string_delimiters: .. rst-class:: classref-method @@ -792,13 +808,13 @@ void **_frame** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__get_type: +.. _class_ScriptLanguageExtension_private_method__get_type: .. rst-class:: classref-method @@ -806,13 +822,13 @@ void **_frame** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__handles_global_class_type: +.. _class_ScriptLanguageExtension_private_method__handles_global_class_type: .. rst-class:: classref-method @@ -820,27 +836,25 @@ void **_frame** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__has_named_classes: +.. _class_ScriptLanguageExtension_private_method__has_named_classes: .. rst-class:: classref-method :ref:`bool` **_has_named_classes** **(** **)** |virtual| |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +*已废弃。*\ 引擎不会调用这个方法。 .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__init: +.. _class_ScriptLanguageExtension_private_method__init: .. rst-class:: classref-method @@ -848,13 +862,13 @@ void **_init** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__is_control_flow_keyword: +.. _class_ScriptLanguageExtension_private_method__is_control_flow_keyword: .. rst-class:: classref-method @@ -862,13 +876,13 @@ void **_init** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__is_using_templates: +.. _class_ScriptLanguageExtension_private_method__is_using_templates: .. rst-class:: classref-method @@ -876,13 +890,13 @@ void **_init** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__lookup_code: +.. _class_ScriptLanguageExtension_private_method__lookup_code: .. rst-class:: classref-method @@ -890,13 +904,13 @@ void **_init** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__make_function: +.. _class_ScriptLanguageExtension_private_method__make_function: .. rst-class:: classref-method @@ -904,13 +918,13 @@ void **_init** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__make_template: +.. _class_ScriptLanguageExtension_private_method__make_template: .. rst-class:: classref-method @@ -918,13 +932,13 @@ void **_init** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__open_in_external_editor: +.. _class_ScriptLanguageExtension_private_method__open_in_external_editor: .. rst-class:: classref-method @@ -932,13 +946,13 @@ void **_init** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__overrides_external_editor: +.. _class_ScriptLanguageExtension_private_method__overrides_external_editor: .. rst-class:: classref-method @@ -946,13 +960,13 @@ void **_init** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__profiling_get_accumulated_data: +.. _class_ScriptLanguageExtension_private_method__profiling_get_accumulated_data: .. rst-class:: classref-method @@ -960,13 +974,13 @@ void **_init** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__profiling_get_frame_data: +.. _class_ScriptLanguageExtension_private_method__profiling_get_frame_data: .. rst-class:: classref-method @@ -974,13 +988,13 @@ void **_init** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__profiling_start: +.. _class_ScriptLanguageExtension_private_method__profiling_start: .. rst-class:: classref-method @@ -988,13 +1002,13 @@ void **_profiling_start** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__profiling_stop: +.. _class_ScriptLanguageExtension_private_method__profiling_stop: .. rst-class:: classref-method @@ -1002,13 +1016,13 @@ void **_profiling_stop** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__reload_all_scripts: +.. _class_ScriptLanguageExtension_private_method__reload_all_scripts: .. rst-class:: classref-method @@ -1016,13 +1030,13 @@ void **_reload_all_scripts** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__reload_tool_script: +.. _class_ScriptLanguageExtension_private_method__reload_tool_script: .. rst-class:: classref-method @@ -1030,13 +1044,13 @@ void **_reload_tool_script** **(** :ref:`Script` script, :ref:`boo .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__remove_named_global_constant: +.. _class_ScriptLanguageExtension_private_method__remove_named_global_constant: .. rst-class:: classref-method @@ -1044,13 +1058,13 @@ void **_remove_named_global_constant** **(** :ref:`StringName` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__supports_builtin_mode: +.. _class_ScriptLanguageExtension_private_method__supports_builtin_mode: .. rst-class:: classref-method @@ -1058,13 +1072,13 @@ void **_remove_named_global_constant** **(** :ref:`StringName` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__supports_documentation: +.. _class_ScriptLanguageExtension_private_method__supports_documentation: .. rst-class:: classref-method @@ -1072,13 +1086,13 @@ void **_remove_named_global_constant** **(** :ref:`StringName` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__thread_enter: +.. _class_ScriptLanguageExtension_private_method__thread_enter: .. rst-class:: classref-method @@ -1086,13 +1100,13 @@ void **_thread_enter** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__thread_exit: +.. _class_ScriptLanguageExtension_private_method__thread_exit: .. rst-class:: classref-method @@ -1100,13 +1114,13 @@ void **_thread_exit** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__validate: +.. _class_ScriptLanguageExtension_private_method__validate: .. rst-class:: classref-method @@ -1114,13 +1128,13 @@ void **_thread_exit** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_ScriptLanguageExtension_method__validate_path: +.. _class_ScriptLanguageExtension_private_method__validate_path: .. rst-class:: classref-method @@ -1128,12 +1142,12 @@ void **_thread_exit** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_scrollbar.rst b/classes/zh_CN/class_scrollbar.rst index 0794b13dca..a590f19dbf 100644 --- a/classes/zh_CN/class_scrollbar.rst +++ b/classes/zh_CN/class_scrollbar.rst @@ -10,23 +10,23 @@ ScrollBar ========= -**Inherits:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`HScrollBar`, :ref:`VScrollBar` +**派生:** :ref:`HScrollBar`, :ref:`VScrollBar` 滚动条的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 滚动条的抽象基类,通常用于对超出控件可视区域的内容进行导航。滚动条是基于 :ref:`Range` 的控件。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -37,14 +37,46 @@ Properties | :ref:`float` | step | ``0.0`` (overrides :ref:`Range`) | +---------------------------+----------------------------------------------------------+-------------------------------------------------------------+ +.. rst-class:: classref-reftable-group + +主题属性 +-------- + +.. table:: + :widths: auto + + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`decrement` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`decrement_highlight` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`decrement_pressed` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`increment` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`increment_highlight` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`increment_pressed` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`grabber` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`grabber_highlight` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`grabber_pressed` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`scroll` | + +-----------------------------------+----------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`scroll_focus` | + +-----------------------------------+----------------------------------------------------------------------------+ + .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_ScrollBar_signal_scrolling: @@ -60,8 +92,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ScrollBar_property_custom_step: @@ -76,10 +108,147 @@ Property Descriptions 覆盖 在按下增和减按钮时或在 **ScrollBar** 已获得焦点且使用箭头键时 的步长。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +主题属性说明 +------------ + +.. _class_ScrollBar_theme_icon_decrement: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **decrement** + +用作向左/向上滚动 **ScrollBar** 的按钮的图标。使用 :ref:`custom_step` 属性支持自定义步长。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_icon_decrement_highlight: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **decrement_highlight** + +当鼠标指针悬停在递减按钮上时显示。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_icon_decrement_pressed: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **decrement_pressed** + +在按下递减按钮时显示。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_icon_increment: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **increment** + +用作向右/向下滚动 **ScrollBar** 的按钮的图标。使用 :ref:`custom_step` 属性支持自定义步长。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_icon_increment_highlight: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **increment_highlight** + +当鼠标指针悬停在增量按钮上时显示。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_icon_increment_pressed: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **increment_pressed** + +在按下增量按钮时显示。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_style_grabber: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **grabber** + +用作拖动条的纹理,表示当前的可拖动元素。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_style_grabber_highlight: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **grabber_highlight** + +当鼠标悬停在拖动条上时使用。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_style_grabber_pressed: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **grabber_pressed** + +在拖动条被拖动时使用。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_style_scroll: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **scroll** + +用作此 **ScrollBar** 的背景。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_ScrollBar_theme_style_scroll_focus: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **scroll_focus** + +当 **ScrollBar** 具有 GUI 焦点时用作背景。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_scrollcontainer.rst b/classes/zh_CN/class_scrollcontainer.rst index c2eab1a88f..3de4759c83 100644 --- a/classes/zh_CN/class_scrollcontainer.rst +++ b/classes/zh_CN/class_scrollcontainer.rst @@ -10,30 +10,30 @@ ScrollContainer =============== -**Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`EditorInspector` +**派生:** :ref:`EditorInspector` 需要时能够为子控件提供滚动条的容器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于在需要时为子控件提供滚动条的容器。滚动条会自动绘制在右侧(垂直滚动条)或底部(水平滚动条),拖动滚动条能够移动 ScrollContainer 中的可见 Control(及其子项)。滚动条会根据该 Control 的 :ref:`Control.custom_minimum_size` 相对于 ScrollContainer 的大小自动调整抓取器的大小。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -60,8 +60,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -76,8 +76,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -92,8 +92,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_ScrollContainer_signal_scroll_ended: @@ -101,9 +101,9 @@ Signals **scroll_ended** **(** **)** -Emitted when scrolling stops when dragging the scrollable area *with a touch event*. This signal is *not* emitted when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events. +当\ *通过触摸事件*\ 拖动可滚动区域而导致滚动停止时发出。当通过拖动滚动条滚动、使用鼠标滚轮滚动、或使用键盘/游戏手柄事件滚动时,\ *不*\ 会发出该信号。 -\ **Note:** This signal is only emitted on Android or iOS, or on desktop/web platforms when :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse` is enabled. +\ **注意:**\ 该信号仅在 Android 或 iOS 上,或在启用 :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse` 时的桌面/Web 平台上发出。 .. rst-class:: classref-item-separator @@ -115,9 +115,9 @@ Emitted when scrolling stops when dragging the scrollable area *with a touch eve **scroll_started** **(** **)** -Emitted when scrolling starts when dragging the scrollable area w\ *ith a touch event*. This signal is *not* emitted when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events. +当\ *通过触摸事件*\ 拖动可滚动区域而导致滚动开始时发出。当通过拖动滚动条滚动、使用鼠标滚轮滚动、或使用键盘/游戏手柄事件滚动时,\ *不*\ 会发出该信号。 -\ **Note:** This signal is only emitted on Android or iOS, or on desktop/web platforms when :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse` is enabled. +\ **注意:**\ 该信号仅在 Android 或 iOS 上,或在启用 :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse` 时的桌面/Web 平台上发出。 .. rst-class:: classref-section-separator @@ -125,8 +125,8 @@ Emitted when scrolling starts when dragging the scrollable area w\ *ith a touch .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_ScrollContainer_ScrollMode: @@ -172,8 +172,8 @@ enum **ScrollMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ScrollContainer_property_follow_focus: @@ -237,9 +237,9 @@ Property Descriptions - void **set_h_scroll** **(** :ref:`int` value **)** - :ref:`int` **get_h_scroll** **(** **)** -The current horizontal scroll value. +当前的水平滚动值。 -\ **Note:** If you are setting this value in the :ref:`Node._ready` function or earlier, it needs to be wrapped with :ref:`Object.set_deferred`, since scroll bar's :ref:`Range.max_value` is not initialized yet. +\ **注意:**\ 如果在 :ref:`Node._ready` 函数或更早的函数中设置该值,则需要用 :ref:`Object.set_deferred` 包装,因为滚动条的 :ref:`Range.max_value` 此时尚未初始化。 :: @@ -327,8 +327,8 @@ The current horizontal scroll value. .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ScrollContainer_method_ensure_control_visible: @@ -380,8 +380,8 @@ void **ensure_control_visible** **(** :ref:`Control` control **)* .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_ScrollContainer_theme_style_panel: @@ -391,10 +391,10 @@ Theme Property Descriptions **ScrollContainer** 的背景 :ref:`StyleBox`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_segmentshape2d.rst b/classes/zh_CN/class_segmentshape2d.rst index a6ad96c045..35bc8e496b 100644 --- a/classes/zh_CN/class_segmentshape2d.rst +++ b/classes/zh_CN/class_segmentshape2d.rst @@ -10,21 +10,21 @@ SegmentShape2D ============== -**Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 2D 线段形状,旨在用于物理学。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 2D 线段形状,旨在用于物理学。通常用于为 :ref:`CollisionShape2D` 提供形状。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SegmentShape2D_property_a: @@ -74,10 +74,10 @@ Property Descriptions 该段的第二个点的位置。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_semaphore.rst b/classes/zh_CN/class_semaphore.rst index 9e90227036..f6d2f4c20b 100644 --- a/classes/zh_CN/class_semaphore.rst +++ b/classes/zh_CN/class_semaphore.rst @@ -10,14 +10,14 @@ Semaphore ========= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 同步机制,用于控制对 :ref:`Thread` 之间共享资源的访问。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 同步机制,用于控制对 :ref:`Thread` 之间共享资源的访问。创建时初始化为零。二元版本见 :ref:`Mutex`\ 。 @@ -31,8 +31,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用多线程 <../tutorials/performance/using_multiple_threads>` @@ -40,8 +40,8 @@ Tutorials .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -60,8 +60,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Semaphore_method_post: @@ -95,10 +95,10 @@ void **wait** **(** **)** 等待该 **Semaphore**\ ,如果它的值为零,则阻塞到变为非零为止。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_separationrayshape2d.rst b/classes/zh_CN/class_separationrayshape2d.rst index 6542b71246..06393d606d 100644 --- a/classes/zh_CN/class_separationrayshape2d.rst +++ b/classes/zh_CN/class_separationrayshape2d.rst @@ -10,21 +10,21 @@ SeparationRayShape2D ==================== -**Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于物理碰撞的 2D 射线形状,会尝试将自己与其他碰撞体分开。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -2D 射线形状,旨在用于物理。通常用来为 :ref:`CollisionShape2D` 提供形状。\ **SeparationRayShape2D** 与某个对象发生碰撞时,会尝试将其端点移动至碰撞点,将自己与该对象分离。示例用法是充当从天上落下的长矛。 +2D 射线形状,旨在用于物理。通常用来为 :ref:`CollisionShape2D` 提供形状。\ **SeparationRayShape2D** 与某个对象发生碰撞时,会尝试将其端点移动至碰撞点,来将自己与该对象分离。例如,角色旁边的 **SeparationRayShape2D** 可以让角色在接触楼梯时立即向上移动。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SeparationRayShape2D_property_length: @@ -76,10 +76,10 @@ Property Descriptions 如果为 ``true``\ ,则该形状可以返回正确的法线,并在任何方向上分离,允许在斜坡上滑动。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_separationrayshape3d.rst b/classes/zh_CN/class_separationrayshape3d.rst index 7065d46f41..3ea42de0fa 100644 --- a/classes/zh_CN/class_separationrayshape3d.rst +++ b/classes/zh_CN/class_separationrayshape3d.rst @@ -10,21 +10,21 @@ SeparationRayShape3D ==================== -**Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于物理碰撞的 3D 射线形状,会尝试将自己与其他碰撞体分开。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A 3D ray shape, intended for use in physics. Usually used to provide a shape for a :ref:`CollisionShape3D`. When a **SeparationRayShape3D** collides with an object, it tries to separate itself from it by moving its endpoint to the collision point. It can for example be used for spears falling from the sky. +3D 射线形状,旨在用于物理。通常用来为 :ref:`CollisionShape3D` 提供形状。\ **SeparationRayShape3D** 与某个对象发生碰撞时,会尝试将其端点移动至碰撞点,来将自己与该对象分离。例如,角色旁边的 **SeparationRayShape3D** 可以让角色在接触楼梯时立即向上移动。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SeparationRayShape3D_property_length: @@ -76,10 +76,10 @@ Property Descriptions 如果为 ``true``\ ,则该形状可以返回正确的法线,并在任何方向上分离,允许在斜坡上滑动。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_separator.rst b/classes/zh_CN/class_separator.rst index c37bb6a58e..c72b48105e 100644 --- a/classes/zh_CN/class_separator.rst +++ b/classes/zh_CN/class_separator.rst @@ -10,23 +10,66 @@ Separator ========= -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`HSeparator`, :ref:`VSeparator` +**派生:** :ref:`HSeparator`, :ref:`VSeparator` 分隔线的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 分隔线的抽象基类,用于分隔其他控件。\ **Separator** 只提供视觉上的分隔,通常用 :ref:`StyleBoxLine` 绘制。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. rst-class:: classref-reftable-group + +主题属性 +-------- + +.. table:: + :widths: auto + + +---------------------------------+--------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`separation` | ``0`` | + +---------------------------------+--------------------------------------------------------------+-------+ + | :ref:`StyleBox` | :ref:`separator` | | + +---------------------------------+--------------------------------------------------------------+-------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +主题属性说明 +------------ + +.. _class_Separator_theme_constant_separation: + +.. rst-class:: classref-themeproperty + +:ref:`int` **separation** = ``0`` + +分隔器所覆盖区域的大小。其作用类似于最小宽度/高度。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_Separator_theme_style_separator: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **separator** + +分隔线的样式。与 :ref:`StyleBoxLine` 一起使用效果最好(请记住为 :ref:`VSeparator` 启用 :ref:`StyleBoxLine.vertical`\ )。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_shader.rst b/classes/zh_CN/class_shader.rst index 2c17591bdf..9ce1f770de 100644 --- a/classes/zh_CN/class_shader.rst +++ b/classes/zh_CN/class_shader.rst @@ -10,16 +10,16 @@ Shader ====== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShader` +**派生:** :ref:`VisualShader` 用 Godot 着色语言实现的着色器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用 Godot 着色语言实现的自定义着色器程序,使用 ``.gdshader`` 扩展名保存。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`着色器文档索引 <../tutorials/shaders/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +46,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -68,8 +68,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Shader_Mode: @@ -123,8 +123,8 @@ enum **Mode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Shader_property_code: @@ -145,8 +145,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Shader_method_get_default_texture_parameter: @@ -202,10 +202,10 @@ void **set_default_texture_parameter** **(** :ref:`StringName` \ **注意:**\ 如果使用采样器数组,则使用 ``index`` 访问指定的纹理。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_shaderglobalsoverride.rst b/classes/zh_CN/class_shaderglobalsoverride.rst index 65b949c331..567bd6aac6 100644 --- a/classes/zh_CN/class_shaderglobalsoverride.rst +++ b/classes/zh_CN/class_shaderglobalsoverride.rst @@ -10,14 +10,14 @@ ShaderGlobalsOverride ===================== -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` -A node used to override global shader parameters' values in a scene. +在场景中覆盖全局着色器参数取值的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 就像 :ref:`WorldEnvironment` 能够在加载指定场景时覆盖环境一样,\ **ShaderGlobalsOverride** 能够临时覆盖全局着色器参数。移除该节点后,就会恢复项目范围的全局着色器参数。详情见 :ref:`RenderingServer` 的 ``global_shader_parameter_*`` 方法。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Shading language <../tutorials/shaders/shader_reference/shading_language>` +- :doc:`着色语言 <../tutorials/shaders/shader_reference/shading_language>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_shaderinclude.rst b/classes/zh_CN/class_shaderinclude.rst index 76e2d4e4df..c2f2cdf2f4 100644 --- a/classes/zh_CN/class_shaderinclude.rst +++ b/classes/zh_CN/class_shaderinclude.rst @@ -10,28 +10,28 @@ ShaderInclude ============= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 着色器代码片段,能够在 :ref:`Shader` 中使用 ``#include`` 引入。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 着色器头文件,保存时使用 ``.gdshaderinc`` 扩展名。这个类能够用于定义自定义着色器代码片段,在 :ref:`Shader` 中可以使用预处理器指令 ``#include`` 加上文件路径引入(例如 ``#include "res://shader_lib.gdshaderinc"``\ )。代码片段本身不必是有效的着色器。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`着色器预处理器 <../tutorials/shaders/shader_reference/shader_preprocessor>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +46,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ShaderInclude_property_code: @@ -62,10 +62,10 @@ Property Descriptions 返回着色器头文件的代码。返回的文本是用户所编写的内容,不是内部使用的完整生成的代码。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_shadermaterial.rst b/classes/zh_CN/class_shadermaterial.rst index 07aa5e5554..a79b9ea263 100644 --- a/classes/zh_CN/class_shadermaterial.rst +++ b/classes/zh_CN/class_shadermaterial.rst @@ -10,32 +10,32 @@ ShaderMaterial ============== -**Inherits:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A material defined by a custom :ref:`Shader` program and the values of its shader parameters. +由自定义 :ref:`Shader` 程序定义的材质及其着色器参数的值。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A material that uses a custom :ref:`Shader` program to render visual items (canvas items, meshes, skies, fog), or to process particles. Compared to other materials, **ShaderMaterial** gives deeper control over the generated shader code. For more information, see the shaders documentation index below. +使用自定义 :ref:`Shader` 程序来渲染可见项目(画布项目、网格、天空、雾)或处理粒子的材质。与其他材质相比,\ **ShaderMaterial** 可以更深入地控制生成的着色器代码。有关更多信息,请参阅下面的着色器文档索引。 -Multiple **ShaderMaterial**\ s can use the same shader and configure different values for the shader uniforms. +多个 **ShaderMaterial** 可以使用相同的着色器并为着色器 uniform 配置不同的值。 -\ **Note:** For performance reasons, the :ref:`Resource.changed` signal is only emitted when the :ref:`Resource.resource_name` changes. Only in editor, it is also emitted for :ref:`shader` changes. +\ **注意:**\ 出于性能原因,仅当 :ref:`Resource.resource_name` 更改时才会发出 :ref:`Resource.changed` 信号。仅在编辑器中,它也会针对 :ref:`shader` 更改而发出。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`着色器文档索引 <../tutorials/shaders/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +46,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ShaderMaterial_property_shader: @@ -86,8 +86,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ShaderMaterial_method_get_shader_parameter: @@ -113,10 +113,10 @@ void **set_shader_parameter** **(** :ref:`StringName` param, : \ **注意:**\ 对着色器 uniform 的修改会在使用这个 **ShaderMaterial** 的所有实例上生效。要防止这种行为,请通过 :ref:`GeometryInstance3D.set_instance_shader_parameter` 使用单实例 uniform,或者使用 :ref:`Resource.duplicate` 制作该 **ShaderMaterial** 的副本。单实例 uniform 可以更好地复用着色器,因此速度也更快,所以应该尽可能优先使用,而不是制作 **ShaderMaterial** 的副本。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_shape2d.rst b/classes/zh_CN/class_shape2d.rst index 147c0e426d..503aff3c83 100644 --- a/classes/zh_CN/class_shape2d.rst +++ b/classes/zh_CN/class_shape2d.rst @@ -10,16 +10,16 @@ Shape2D ======= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`CapsuleShape2D`, :ref:`CircleShape2D`, :ref:`ConcavePolygonShape2D`, :ref:`ConvexPolygonShape2D`, :ref:`RectangleShape2D`, :ref:`SegmentShape2D`, :ref:`SeparationRayShape2D`, :ref:`WorldBoundaryShape2D` +**派生:** :ref:`CapsuleShape2D`, :ref:`CircleShape2D`, :ref:`ConcavePolygonShape2D`, :ref:`ConvexPolygonShape2D`, :ref:`RectangleShape2D`, :ref:`SegmentShape2D`, :ref:`SeparationRayShape2D`, :ref:`WorldBoundaryShape2D` 用于物理碰撞的 2D 形状的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 所有 2D 形状的抽象基类,针对物理使用设计。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`物理介绍 <../tutorials/physics/physics_introduction>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +46,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -72,8 +72,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Shape2D_property_custom_solver_bias: @@ -96,8 +96,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Shape2D_method_collide: @@ -183,10 +183,10 @@ void **draw** **(** :ref:`RID` canvas_item, :ref:`Color` 返回代表形状边界的 :ref:`Rect2`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_shape3d.rst b/classes/zh_CN/class_shape3d.rst index a34283e3ad..acb5a9a9a2 100644 --- a/classes/zh_CN/class_shape3d.rst +++ b/classes/zh_CN/class_shape3d.rst @@ -10,16 +10,16 @@ Shape3D ======= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`BoxShape3D`, :ref:`CapsuleShape3D`, :ref:`ConcavePolygonShape3D`, :ref:`ConvexPolygonShape3D`, :ref:`CylinderShape3D`, :ref:`HeightMapShape3D`, :ref:`SeparationRayShape3D`, :ref:`SphereShape3D`, :ref:`WorldBoundaryShape3D` +**派生:** :ref:`BoxShape3D`, :ref:`CapsuleShape3D`, :ref:`ConcavePolygonShape3D`, :ref:`ConvexPolygonShape3D`, :ref:`CylinderShape3D`, :ref:`HeightMapShape3D`, :ref:`SeparationRayShape3D`, :ref:`SphereShape3D`, :ref:`WorldBoundaryShape3D` 用于物理碰撞的 3D 形状的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 所有 3D 形状的抽象基类,针对物理使用设计。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`物理介绍 <../tutorials/physics/physics_introduction>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Shape3D_property_custom_solver_bias: @@ -107,8 +107,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Shape3D_method_get_debug_mesh: @@ -118,10 +118,10 @@ Method Descriptions 返回用于绘制此 **Shape3D** 的调试碰撞的 :ref:`ArrayMesh`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_shapecast2d.rst b/classes/zh_CN/class_shapecast2d.rst index 365ad39e4c..4f6e11d27a 100644 --- a/classes/zh_CN/class_shapecast2d.rst +++ b/classes/zh_CN/class_shapecast2d.rst @@ -10,14 +10,14 @@ ShapeCast2D =========== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 2D 形状,会扫描空间中某个区域,用于检测 :ref:`CollisionObject2D`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 形状投射会将其 :ref:`shape` 沿着 :ref:`target_position` 确定的投射方向进行扫描,能够检测到碰撞对象。类似于 :ref:`RayCast2D`\ ,但是能够扫描空间中的一个区域,而不仅仅是一条直线。\ **ShapeCast2D** 能够检测到多个碰撞对象。可用于实现较宽的激光射线,或者将简单的形状吸附到地面。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -57,8 +57,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -105,8 +105,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ShapeCast2D_property_collide_with_areas: @@ -275,8 +275,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ShapeCast2D_method_add_exception: @@ -320,9 +320,9 @@ void **clear_exceptions** **(** **)** void **force_shapecast_update** **(** **)** -更新形状的碰撞信息。使用此方法会立即更新碰撞信息,不会等待到下一次 ``_physics_process`` 调用,例如,如果形状或其父级已更改状态。 +立即更新形状的碰撞信息,不等待下一次的 ``_physics_process`` 调用。例如,请在形状或其父级更改状态后使用该方法。 -\ **注意:**\ 此函数不需要 ``enabled == true`` 也能正常工作。 +\ **注意:**\ 不需要 ``enabled == true`` 即可生效。 .. rst-class:: classref-item-separator @@ -482,10 +482,10 @@ void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref 根据 ``value``\ ,启用或禁用 :ref:`collision_mask` 中指定的层,给定的 ``layer_number`` 应在 1 和 32 之间。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_shapecast3d.rst b/classes/zh_CN/class_shapecast3d.rst index 83c278a79c..6726f511b4 100644 --- a/classes/zh_CN/class_shapecast3d.rst +++ b/classes/zh_CN/class_shapecast3d.rst @@ -10,14 +10,14 @@ ShapeCast3D =========== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 3D 形状,会扫描空间中某个区域,用于检测 :ref:`CollisionObject3D`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 形状投射会将其 :ref:`shape` 沿着 :ref:`target_position` 确定的投射方向进行扫描,能够检测到碰撞对象。类似于 :ref:`RayCast3D`\ ,但是能够扫描空间中的一个区域,而不仅仅是一条直线。\ **ShapeCast3D** 能够检测到多个碰撞对象。可用于实现较宽的激光射线,或者将简单的形状吸附到地面。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -59,8 +59,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -109,8 +109,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ShapeCast3D_property_collide_with_areas: @@ -298,8 +298,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ShapeCast3D_method_add_exception: @@ -343,9 +343,9 @@ void **clear_exceptions** **(** **)** void **force_shapecast_update** **(** **)** -更新形状的碰撞信息。使用此方法会立即更新碰撞信息,不会等待到下一次 ``_physics_process`` 调用,例如,如果形状或其父级已更改状态。 +立即更新形状的碰撞信息,不等待下一次的 ``_physics_process`` 调用。例如,请在形状或其父级更改状态后使用该方法。 -\ **注意:**\ 此函数不需要 ``enabled == true`` 也能正常工作。 +\ **注意:**\ 不需要 ``enabled == true`` 即可生效。 .. rst-class:: classref-item-separator @@ -503,7 +503,7 @@ void **remove_exception_rid** **(** :ref:`RID` rid **)** void **resource_changed** **(** :ref:`Resource` resource **)** -*Obsoleted.* Use :ref:`Resource.changed` instead. +*已废弃 * 请改用 :ref:`Resource.changed` 。 .. rst-class:: classref-item-separator @@ -517,10 +517,10 @@ void **set_collision_mask_value** **(** :ref:`int` layer_number, :ref 根据 ``value``\ ,启用或禁用 :ref:`collision_mask` 中指定的层,给定的 ``layer_number`` 应在 1 和 32 之间。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_shortcut.rst b/classes/zh_CN/class_shortcut.rst index 9528a70fe7..0efccbec02 100644 --- a/classes/zh_CN/class_shortcut.rst +++ b/classes/zh_CN/class_shortcut.rst @@ -10,14 +10,14 @@ Shortcut ======== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于绑定输入的快捷键。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 快捷键通常用于通过 :ref:`InputEvent` 与 :ref:`Control` 元素进行交互(也叫热键)。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -37,8 +37,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -57,8 +57,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Shortcut_property_events: @@ -81,8 +81,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Shortcut_method_get_as_text: @@ -116,10 +116,10 @@ Method Descriptions 返回 :ref:`events` 中是否有等于 ``event`` 的 :ref:`InputEvent`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_signal.rst b/classes/zh_CN/class_signal.rst index b6542a21d3..1e66beac94 100644 --- a/classes/zh_CN/class_signal.rst +++ b/classes/zh_CN/class_signal.rst @@ -14,8 +14,8 @@ Signal .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 信号 **Signal** 是内置的 :ref:`Variant` 类型,代表 :ref:`Object` 实例的某个信息。信号和所有 :ref:`Variant` 类型一样,可以在变量中存储、传递给函数。信号能够让所有连接的 :ref:`Callable`\ (及相应扩展对象)监听事件并作出反应,不必直接互相引用。这样就能让代码更灵活、更易于管理。 @@ -46,12 +46,12 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用信号 <../getting_started/step_by_step/signals>` @@ -59,8 +59,8 @@ Tutorials .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -75,8 +75,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -103,8 +103,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -121,8 +121,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_Signal_constructor_Signal: @@ -158,8 +158,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Signal_method_connect: @@ -287,8 +287,8 @@ void **emit** **(** ... **)** |vararg| |const| .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Signal_operator_neq_Signal: @@ -310,10 +310,10 @@ Operator Descriptions 如果信号的对象和名称相同,则返回 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_skeleton2d.rst b/classes/zh_CN/class_skeleton2d.rst index 30ec11ccab..55ec678afc 100644 --- a/classes/zh_CN/class_skeleton2d.rst +++ b/classes/zh_CN/class_skeleton2d.rst @@ -10,14 +10,14 @@ Skeleton2D ========== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` :ref:`Bone2D` 层级结构的父节点,用于创建 2D 骨骼动画。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **Skeleton2D** 是 :ref:`Bone2D` 节点层级结构的父节点,持有对每个 :ref:`Bone2D` 的放松姿势的引用,充当其骨骼的单一访问点。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`2D 骨架 <../tutorials/animation/2d_skeletons>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -62,8 +62,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Skeleton2D_signal_bone_setup_changed: @@ -79,8 +79,8 @@ Signals .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Skeleton2D_method_execute_modifications: @@ -178,10 +178,10 @@ void **set_modification_stack** **(** :ref:`SkeletonModificationStack2D`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_skeleton3d.rst b/classes/zh_CN/class_skeleton3d.rst index fd80f8f6c1..1753e6f7c9 100644 --- a/classes/zh_CN/class_skeleton3d.rst +++ b/classes/zh_CN/class_skeleton3d.rst @@ -10,14 +10,14 @@ Skeleton3D ========== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 包含骨骼层级结构的节点,用于创建 3D 骨骼动画。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **Skeleton3D** 提供了管理骨骼层级结构的接口,包括姿势、放松姿势和动画(见 :ref:`Animation`\ )。它还可以使用布娃娃物理。 @@ -25,12 +25,12 @@ Description 请注意,下文的“全局姿势”是指骨骼相对于骨架的整体变换,因此并不是骨骼的实际全局/世界变换。 -要设置不同类型的反向运动学,请考虑使用 :ref:`SkeletonIK3D`\ ,或者添加一个子节点并在 :ref:`Node._process` 中实现自定义 IK。 +要设置不同类型的反向运动学,请考虑使用 :ref:`SkeletonIK3D`\ ,或者添加一个子节点并在 :ref:`Node._process` 中实现自定义 IK。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 逆运动学演示 `__ @@ -38,8 +38,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -148,8 +148,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Skeleton3D_signal_bone_enabled_changed: @@ -159,7 +159,7 @@ Signals .. container:: contribute - There is currently no description for this signal. Please help us by :ref:`contributing one `! + 目前没有这个信号的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -185,7 +185,7 @@ Signals .. container:: contribute - There is currently no description for this signal. Please help us by :ref:`contributing one `! + 目前没有这个信号的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -199,7 +199,7 @@ Signals .. container:: contribute - There is currently no description for this signal. Please help us by :ref:`contributing one `! + 目前没有这个信号的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-section-separator @@ -207,8 +207,8 @@ Signals .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Skeleton3D_constant_NOTIFICATION_UPDATE_SKELETON: @@ -224,8 +224,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Skeleton3D_property_animate_physical_bones: @@ -240,7 +240,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -278,7 +278,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-section-separator @@ -286,8 +286,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Skeleton3D_method_add_bone: @@ -333,7 +333,7 @@ void **clear_bones_global_pose_override** **(** **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -493,9 +493,7 @@ void **force_update_bone_child_transform** **(** :ref:`int` bone_idx :ref:`Vector3` **get_bone_pose_position** **(** :ref:`int` bone_idx **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +返回骨骼在 ``bone_idx``\ 处的姿势位置。返回的 :ref:`Vector3` 位于 **Skeleton3D** 节点的局部坐标空间中。 .. rst-class:: classref-item-separator @@ -507,9 +505,7 @@ void **force_update_bone_child_transform** **(** :ref:`int` bone_idx :ref:`Quaternion` **get_bone_pose_rotation** **(** :ref:`int` bone_idx **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +返回 ``bone_idx`` 处骨骼的姿势旋转。返回的 :ref:`Quaternion` 是局部于该骨骼的,且相对于任何父骨骼的旋转。 .. rst-class:: classref-item-separator @@ -521,9 +517,7 @@ void **force_update_bone_child_transform** **(** :ref:`int` bone_idx :ref:`Vector3` **get_bone_pose_scale** **(** :ref:`int` bone_idx **)** |const| -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +返回 ``bone_idx`` 处骨骼的姿态缩放。 .. rst-class:: classref-item-separator @@ -719,7 +713,7 @@ void **set_bone_name** **(** :ref:`int` bone_idx, :ref:`String`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -745,9 +739,7 @@ void **set_bone_parent** **(** :ref:`int` bone_idx, :ref:`int` bone_idx, :ref:`Vector3` position **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +将 ``bone_idx`` 处的骨骼姿势位置设置为 ``position``\ 。\ ``position`` 是一个 :ref:`Vector3`\ ,描述局部于 **Skeleton3D** 节点的位置。 .. rst-class:: classref-item-separator @@ -759,9 +751,7 @@ void **set_bone_pose_position** **(** :ref:`int` bone_idx, :ref:`Vect void **set_bone_pose_rotation** **(** :ref:`int` bone_idx, :ref:`Quaternion` rotation **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +将 ``bone_idx`` 处骨骼的姿势旋转设置为 ``rotation``\ 。\ ``rotation`` 是一个 :ref:`Quaternion`\ ,描述该骨骼局部坐标空间中相对于任何父骨骼的旋转的旋转。 .. rst-class:: classref-item-separator @@ -773,9 +763,7 @@ void **set_bone_pose_rotation** **(** :ref:`int` bone_idx, :ref:`Quat void **set_bone_pose_scale** **(** :ref:`int` bone_idx, :ref:`Vector3` scale **)** -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +将 ``bone_idx`` 处骨骼的姿势缩放设置为 ``scale``\ 。 .. rst-class:: classref-item-separator @@ -801,10 +789,10 @@ void **unparent_bone_and_rest** **(** :ref:`int` bone_idx **)** 让位于 ``bone_idx`` 的骨骼不再有父级,并将其放松位置设置为之前父级放松时的位置。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_skeletonik3d.rst b/classes/zh_CN/class_skeletonik3d.rst index 4c6f693a94..5ea3878b35 100644 --- a/classes/zh_CN/class_skeletonik3d.rst +++ b/classes/zh_CN/class_skeletonik3d.rst @@ -10,14 +10,14 @@ SkeletonIK3D ============ -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` 可以将 :ref:`Skeleton3D` 骨骼链中的所有骨骼进行旋转,从而将末端骨骼放置在正确的 3D 位置的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- SkeletonIK3D 可以将 :ref:`Skeleton3D` 骨骼链中的所有骨骼进行旋转,从而将末端骨骼放置在正确的 3D 位置。游戏中 IK 的典型场景是将角色的脚放在地面上,或者将角色的手放在当前持有的物体上。SkeletonIK 在内部使用 FabrikInverseKinematic 来解决骨骼链,并将结果应用于 :ref:`Skeleton3D` ``bones_global_pose_override`` 属性中所有受影响的骨骼链。如果完全应用,这将覆盖任何来自 :ref:`Animation` 的骨骼变换或用户设置的骨骼自定义姿势。应用量可以用 :ref:`interpolation` 属性来控制。 @@ -45,15 +45,15 @@ SkeletonIK3D 可以将 :ref:`Skeleton3D` 骨骼链中的所有 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 逆运动学演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -82,8 +82,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -104,8 +104,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SkeletonIK3D_property_interpolation: @@ -279,8 +279,8 @@ IK 链的目标节点 :ref:`NodePath`\ 。如果有的话,将 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SkeletonIK3D_method_get_parent_skeleton: @@ -326,10 +326,10 @@ void **stop** **(** **)** 停止将 IK 效果应用到每帧的 :ref:`Skeleton3D` 骨骼,并调用 :ref:`Skeleton3D.clear_bones_global_pose_override` 来移除所有骨骼上的现有覆盖。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_skeletonmodification2d.rst b/classes/zh_CN/class_skeletonmodification2d.rst index 4438de9be2..7823f5557e 100644 --- a/classes/zh_CN/class_skeletonmodification2d.rst +++ b/classes/zh_CN/class_skeletonmodification2d.rst @@ -10,16 +10,16 @@ SkeletonModification2D ====================== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`SkeletonModification2DCCDIK`, :ref:`SkeletonModification2DFABRIK`, :ref:`SkeletonModification2DJiggle`, :ref:`SkeletonModification2DLookAt`, :ref:`SkeletonModification2DPhysicalBones`, :ref:`SkeletonModification2DStackHolder`, :ref:`SkeletonModification2DTwoBoneIK` +**派生:** :ref:`SkeletonModification2DCCDIK`, :ref:`SkeletonModification2DFABRIK`, :ref:`SkeletonModification2DJiggle`, :ref:`SkeletonModification2DLookAt`, :ref:`SkeletonModification2DPhysicalBones`, :ref:`SkeletonModification2DStackHolder`, :ref:`SkeletonModification2DTwoBoneIK` 对 :ref:`Skeleton2D` 中的 :ref:`Bone2D` 进行操作的资源的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该资源提供了一个可以扩展的接口,因此在 :ref:`Skeleton2D` 中的 :ref:`Bone2D` 节点上运行的代码可以被混合并匹配在一起,以创建复杂的交互。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,18 +41,18 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw_editor_gizmo` **(** **)** |virtual| | + | void | :ref:`_draw_editor_gizmo` **(** **)** |virtual| | +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_execute` **(** :ref:`float` delta **)** |virtual| | + | void | :ref:`_execute` **(** :ref:`float` delta **)** |virtual| | +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_setup_modification` **(** :ref:`SkeletonModificationStack2D` modification_stack **)** |virtual| | + | void | :ref:`_setup_modification` **(** :ref:`SkeletonModificationStack2D` modification_stack **)** |virtual| | +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`clamp_angle` **(** :ref:`float` angle, :ref:`float` min, :ref:`float` max, :ref:`bool` invert **)** | +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -73,8 +73,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SkeletonModification2D_property_enabled: @@ -87,7 +87,7 @@ Property Descriptions - void **set_enabled** **(** :ref:`bool` value **)** - :ref:`bool` **get_enabled** **(** **)** -如果为 ``true``\ ,则该修改器的 :ref:`_execute` 函数将被该 :ref:`SkeletonModificationStack2D` 调用。 +如果为 ``true``\ ,则该修改器的 :ref:`_execute` 函数将被该 :ref:`SkeletonModificationStack2D` 调用。 .. rst-class:: classref-item-separator @@ -112,10 +112,10 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_SkeletonModification2D_method__draw_editor_gizmo: +.. _class_SkeletonModification2D_private_method__draw_editor_gizmo: .. rst-class:: classref-method @@ -129,7 +129,7 @@ void **_draw_editor_gizmo** **(** **)** |virtual| ---- -.. _class_SkeletonModification2D_method__execute: +.. _class_SkeletonModification2D_private_method__execute: .. rst-class:: classref-method @@ -141,7 +141,7 @@ void **_execute** **(** :ref:`float` delta **)** |virtual| ---- -.. _class_SkeletonModification2D_method__setup_modification: +.. _class_SkeletonModification2D_private_method__setup_modification: .. rst-class:: classref-method @@ -171,7 +171,7 @@ void **_setup_modification** **(** :ref:`SkeletonModificationStack2D` **get_editor_draw_gizmo** **(** **)** |const| -返回这个修改器是否会在 Godot 编辑器中调用 :ref:`_draw_editor_gizmo` 绘制针对修改器的小工具。 +返回这个修改器是否会在 Godot 编辑器中调用 :ref:`_draw_editor_gizmo` 绘制针对修改器的小工具。 .. rst-class:: classref-item-separator @@ -207,7 +207,7 @@ void **_setup_modification** **(** :ref:`SkeletonModificationStack2D` draw_gizmo **)** -设置这个修改器是否会在 Godot 编辑器中调用 :ref:`_draw_editor_gizmo` 绘制针对修改器的小工具。 +设置这个修改器是否会在 Godot 编辑器中调用 :ref:`_draw_editor_gizmo` 绘制针对修改器的小工具。 .. rst-class:: classref-item-separator @@ -221,10 +221,10 @@ void **set_is_setup** **(** :ref:`bool` is_setup **)** 允许你手动设置该修改器的安装状态。这个函数应很少使用,因为该修改器所绑定的 :ref:`SkeletonModificationStack2D` 应该对该修改器进行安装。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_skeletonmodification2dccdik.rst b/classes/zh_CN/class_skeletonmodification2dccdik.rst index 81bafff6b3..56e3903cc0 100644 --- a/classes/zh_CN/class_skeletonmodification2dccdik.rst +++ b/classes/zh_CN/class_skeletonmodification2dccdik.rst @@ -10,14 +10,14 @@ SkeletonModification2DCCDIK =========================== -**Inherits:** :ref:`SkeletonModification2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`SkeletonModification2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 使用 CCDIK 操纵一系列骨骼到达某个 2D 目标的修改器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这种 :ref:`SkeletonModification2D` 使用的是名为循环坐标下降逆向运动学(Cyclic Coordinate Descent Inverse Kinematics)的算法,即 CCDIK,能够对 :ref:`Skeleton2D` 中的一条骨骼链进行操作,从而抵达指定的目标。 @@ -29,8 +29,8 @@ CCDIK 还完全支持角度约束,能够对求解过程进行更多控制。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -87,8 +87,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SkeletonModification2DCCDIK_property_ccdik_data_chain_length: @@ -143,8 +143,8 @@ CCDIK 修改中 CCDIK 关节的数量。 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SkeletonModification2DCCDIK_method_get_ccdik_joint_bone2d_node: @@ -312,10 +312,10 @@ void **set_ccdik_joint_rotate_from_joint** **(** :ref:`int` joint_idx 设置位于 ``joint_idx`` 的关节是设为从关节旋转,\ ``true``\ ,还是从尖端旋转,\ ``false``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_skeletonmodification2dfabrik.rst b/classes/zh_CN/class_skeletonmodification2dfabrik.rst index 13adc20caf..7236da93e0 100644 --- a/classes/zh_CN/class_skeletonmodification2dfabrik.rst +++ b/classes/zh_CN/class_skeletonmodification2dfabrik.rst @@ -10,14 +10,14 @@ SkeletonModification2DFABRIK ============================ -**Inherits:** :ref:`SkeletonModification2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`SkeletonModification2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 使用 FABRIK 操纵一系列 :ref:`Bone2D` 到达某个目标的修改器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这种 :ref:`SkeletonModification2D` 使用的是名为前后延伸反向运动学(Forward And Backward Reaching Inverse Kinematics)的算法,即 FABRIK,能够对一条骨骼链进行旋转,从而抵达目标。 @@ -31,8 +31,8 @@ FABRIK 需要先拿到一系列骨骼的位置和长度,这组骨骼通常称 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -75,8 +75,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SkeletonModification2DFABRIK_property_fabrik_data_chain_length: @@ -114,8 +114,8 @@ FABRIK 修改器的目标节点的 NodePath。FABRIK 链会尝试将骨骼链转 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SkeletonModification2DFABRIK_method_get_fabrik_joint_bone2d_node: @@ -211,10 +211,10 @@ void **set_fabrik_joint_use_target_rotation** **(** :ref:`int` joint_ \ **注意:**\ 这个选项仅适用于链中的末端/最终关节。对于所有其他节点,这个选项将被忽略。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_skeletonmodification2djiggle.rst b/classes/zh_CN/class_skeletonmodification2djiggle.rst index 0db24f3434..b10d91c1de 100644 --- a/classes/zh_CN/class_skeletonmodification2djiggle.rst +++ b/classes/zh_CN/class_skeletonmodification2djiggle.rst @@ -10,14 +10,14 @@ SkeletonModification2DJiggle ============================ -**Inherits:** :ref:`SkeletonModification2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`SkeletonModification2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 让 :ref:`Bone2D` 节点在朝某个目标移动的过程中产生摇晃的修改器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这种修改器会将一系列的骨骼朝某个目标移动,这些骨骼通常称作骨骼链。这种修改器的特点在于,它会为骨骼链中的每一个骨骼计算速度和加速度,并使用输入值运行一段非常轻量级的类物理计算。这样这些骨骼就能够越过目标并来回“摇晃”(Jiggle)。根据配置的不同,可以得到类似弹簧的摇晃,也可以得到类似布料的摇晃。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -51,8 +51,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -105,8 +105,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SkeletonModification2DJiggle_property_damping: @@ -229,8 +229,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SkeletonModification2DJiggle_method_get_collision_mask: @@ -468,10 +468,10 @@ void **set_use_colliders** **(** :ref:`bool` use_colliders **)** 如果为 ``true``\ ,则 Jiggle 修改器将考虑碰撞器,防止它们进入这些碰撞对象。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_skeletonmodification2dlookat.rst b/classes/zh_CN/class_skeletonmodification2dlookat.rst index 43afab4350..c70c3a07cc 100644 --- a/classes/zh_CN/class_skeletonmodification2dlookat.rst +++ b/classes/zh_CN/class_skeletonmodification2dlookat.rst @@ -10,21 +10,21 @@ SkeletonModification2DLookAt ============================ -**Inherits:** :ref:`SkeletonModification2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`SkeletonModification2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 对 :ref:`Bone2D` 节点进行旋转,让它看向某个目标的修改器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这种 :ref:`SkeletonModification2D` 会对骨骼进行旋转,让它看向某个目标。适合让角色的头部看向玩家、让炮塔看向目标以及其他需要让骨骼朝某个东西快速旋转的情况。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -73,8 +73,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SkeletonModification2DLookAt_property_bone2d_node: @@ -129,8 +129,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SkeletonModification2DLookAt_method_get_additional_rotation: @@ -250,10 +250,10 @@ void **set_enable_constraint** **(** :ref:`bool` enable_constraint * 设置此修改器是否使用约束。为 ``true`` 时,会在求解 LookAt 修改器时应用约束。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_skeletonmodification2dphysicalbones.rst b/classes/zh_CN/class_skeletonmodification2dphysicalbones.rst index 6ddd19e672..656fbdb72a 100644 --- a/classes/zh_CN/class_skeletonmodification2dphysicalbones.rst +++ b/classes/zh_CN/class_skeletonmodification2dphysicalbones.rst @@ -10,14 +10,14 @@ SkeletonModification2DPhysicalBones =================================== -**Inherits:** :ref:`SkeletonModification2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`SkeletonModification2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 将 :ref:`PhysicalBone2D` 节点的变换应用到 :ref:`Bone2D` 节点的修改器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该修改采用 :ref:`PhysicalBone2D` 节点的变换并将它们应用于 :ref:`Bone2D` 节点。由于链接的 :ref:`PhysicalBone2D` 节点,这允许 :ref:`Bone2D` 节点对物理做出反应。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -37,8 +37,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -61,8 +61,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SkeletonModification2DPhysicalBones_property_physical_bone_chain_length: @@ -83,8 +83,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SkeletonModification2DPhysicalBones_method_fetch_physical_bones: @@ -148,10 +148,10 @@ void **stop_simulation** **(** :ref:`StringName[]` bones=[] ** 还可以把骨骼名称数组传给这个函数,会导致只有这些名称的 :ref:`PhysicalBone2D` 节点停止模拟。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_skeletonmodification2dstackholder.rst b/classes/zh_CN/class_skeletonmodification2dstackholder.rst index 229d6ece4b..79faace1e7 100644 --- a/classes/zh_CN/class_skeletonmodification2dstackholder.rst +++ b/classes/zh_CN/class_skeletonmodification2dstackholder.rst @@ -10,14 +10,14 @@ SkeletonModification2DStackHolder ================================= -**Inherits:** :ref:`SkeletonModification2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`SkeletonModification2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 存放并执行 :ref:`SkeletonModificationStack2D` 的修改器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这种 :ref:`SkeletonModification2D` 可以存放对 :ref:`SkeletonModificationStack2D` 的引用,让你能够对单个 :ref:`Skeleton2D` 使用多个修改器栈。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SkeletonModification2DStackHolder_method_get_held_modification_stack: @@ -66,10 +66,10 @@ void **set_held_modification_stack** **(** :ref:`SkeletonModificationStack2D`\ 。这个修改器栈会在该修改器执行时执行。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_skeletonmodification2dtwoboneik.rst b/classes/zh_CN/class_skeletonmodification2dtwoboneik.rst index 0307073fb2..86ae82b836 100644 --- a/classes/zh_CN/class_skeletonmodification2dtwoboneik.rst +++ b/classes/zh_CN/class_skeletonmodification2dtwoboneik.rst @@ -10,14 +10,14 @@ SkeletonModification2DTwoBoneIK =============================== -**Inherits:** :ref:`SkeletonModification2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`SkeletonModification2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 这种修改器会让两个骨骼按照余弦定理进行旋转,最终抵达目标。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这种 :ref:`SkeletonModification2D` 所使用的算法一般称之为 TwoBoneIK。这种算法的原理是利用余弦定理和骨骼的长度来推算骨骼当前的旋转量和构成三角形所需的旋转量,三角形由第一根骨骼、第二根骨骼以及目标构成。因为这种算法的原理是构成三角形,所以仅能对两根骨骼进行操作。 @@ -25,8 +25,8 @@ TwoBoneIK 适用于手臂、腿部,其实任何能够用两根骨头弯向某 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -73,8 +73,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SkeletonModification2DTwoBoneIK_property_flip_bend_direction: @@ -146,8 +146,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SkeletonModification2DTwoBoneIK_method_get_joint_one_bone2d_node: @@ -241,10 +241,10 @@ void **set_joint_two_bone_idx** **(** :ref:`int` bone_idx **)** 设置 TwoBoneIK 修改器中作为第二个骨骼的 :ref:`Bone2D` 节点的索引。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_skeletonmodificationstack2d.rst b/classes/zh_CN/class_skeletonmodificationstack2d.rst index ad046b35b4..057302b14f 100644 --- a/classes/zh_CN/class_skeletonmodificationstack2d.rst +++ b/classes/zh_CN/class_skeletonmodificationstack2d.rst @@ -10,14 +10,14 @@ SkeletonModificationStack2D =========================== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 存放 :ref:`SkeletonModification2D` 栈的资源。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该资源由 Skeleton 使用,并持有一个 :ref:`SkeletonModification2D` 堆栈。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -75,8 +75,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SkeletonModificationStack2D_property_enabled: @@ -131,8 +131,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SkeletonModificationStack2D_method_add_modification: @@ -240,10 +240,10 @@ void **setup** **(** **)** 设置该修改堆栈以便它可以执行。该函数应由 :ref:`Skeleton2D` 调用,除非知道自己在做什么,否则不应被手动调用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_skeletonprofile.rst b/classes/zh_CN/class_skeletonprofile.rst index 8fa25765e4..9829d077e8 100644 --- a/classes/zh_CN/class_skeletonprofile.rst +++ b/classes/zh_CN/class_skeletonprofile.rst @@ -10,16 +10,16 @@ SkeletonProfile =============== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`SkeletonProfileHumanoid` +**派生:** :ref:`SkeletonProfileHumanoid` 用作重定向目标的虚拟骨架的配置文件的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个资源在 :ref:`EditorScenePostImport` 中使用。一些参数是指 :ref:`Skeleton3D`\ 、\ :ref:`Skin`\ 、\ :ref:`Animation` 中的骨骼,还有一些节点是根据 **SkeletonProfile** 中的参数改写的。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`重定向 3D 骨架 <../tutorials/assets_pipeline/retargeting_3d_skeletons>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -104,8 +104,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_SkeletonProfile_signal_profile_updated: @@ -123,8 +123,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_SkeletonProfile_TailDirection: @@ -162,8 +162,8 @@ enum **TailDirection**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SkeletonProfile_property_bone_size: @@ -239,8 +239,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SkeletonProfile_method_find_bone: @@ -476,10 +476,10 @@ void **set_texture** **(** :ref:`int` group_idx, :ref:`Texture2D` 编辑器中绘制组的背景图像。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_skeletonprofilehumanoid.rst b/classes/zh_CN/class_skeletonprofilehumanoid.rst index f47793a56a..476c9364e0 100644 --- a/classes/zh_CN/class_skeletonprofilehumanoid.rst +++ b/classes/zh_CN/class_skeletonprofilehumanoid.rst @@ -10,28 +10,28 @@ SkeletonProfileHumanoid ======================= -**Inherits:** :ref:`SkeletonProfile` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`SkeletonProfile` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 人形 :ref:`SkeletonProfile` 预设。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 针对人体优化的 :ref:`SkeletonProfile` 预设。存在的意义是进行标准化,所以所有参数都是只读的。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`重定向 3D 骨架 <../tutorials/assets_pipeline/retargeting_3d_skeletons>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,10 +46,10 @@ Properties | :ref:`StringName` | scale_base_bone | ``&"Hips"`` (overrides :ref:`SkeletonProfile`) | +-------------------------------------+-----------------+------------------------------------------------------------------------------------------------+ -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_skin.rst b/classes/zh_CN/class_skin.rst index 298fa7e6b0..f5aea7b81c 100644 --- a/classes/zh_CN/class_skin.rst +++ b/classes/zh_CN/class_skin.rst @@ -10,16 +10,16 @@ Skin ==== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Skin_method_add_bind: @@ -65,7 +65,7 @@ void **add_bind** **(** :ref:`int` bone, :ref:`Transform3D`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -79,7 +79,7 @@ void **add_named_bind** **(** :ref:`String` name, :ref:`Transform3 .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -93,7 +93,7 @@ void **clear_binds** **(** **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -107,7 +107,7 @@ void **clear_binds** **(** **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -121,7 +121,7 @@ void **clear_binds** **(** **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -135,7 +135,7 @@ void **clear_binds** **(** **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -149,7 +149,7 @@ void **clear_binds** **(** **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -163,7 +163,7 @@ void **set_bind_bone** **(** :ref:`int` bind_index, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -177,7 +177,7 @@ void **set_bind_count** **(** :ref:`int` bind_count **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -191,7 +191,7 @@ void **set_bind_name** **(** :ref:`int` bind_index, :ref:`StringName< .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -205,12 +205,12 @@ void **set_bind_pose** **(** :ref:`int` bind_index, :ref:`Transform3D .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_skinreference.rst b/classes/zh_CN/class_skinreference.rst index d6b8440abe..aa6d3a038c 100644 --- a/classes/zh_CN/class_skinreference.rst +++ b/classes/zh_CN/class_skinreference.rst @@ -10,16 +10,16 @@ SkinReference ============= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -36,8 +36,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SkinReference_method_get_skeleton: @@ -47,7 +47,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -61,12 +61,12 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_sky.rst b/classes/zh_CN/class_sky.rst index 39d0c960c4..c213e84d27 100644 --- a/classes/zh_CN/class_sky.rst +++ b/classes/zh_CN/class_sky.rst @@ -10,21 +10,21 @@ Sky === -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Defines a 3D environment's background by using a :ref:`Material`. +使用 :ref:`Material` 定义 3D 环境的背景。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -The **Sky** class uses a :ref:`Material` to render a 3D environment's background and the light it emits by updating the reflection/radiance cubemaps. +**Sky** 类使用 :ref:`Material` 来渲染 3D 环境的背景及其通过更新反射/辐射立方体贴图发出的光。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Sky_RadianceSize: @@ -166,8 +166,8 @@ enum **ProcessMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Sky_property_process_mode: @@ -220,10 +220,10 @@ Property Descriptions 用于绘制该背景的 :ref:`Material`\ 。可以是 :ref:`PanoramaSkyMaterial`\ 、\ :ref:`ProceduralSkyMaterial`\ 、\ :ref:`PhysicalSkyMaterial`\ ,如果你想使用自定义着色器也可以是 :ref:`ShaderMaterial`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_slider.rst b/classes/zh_CN/class_slider.rst index d798db3ed5..bbd8c6e9a7 100644 --- a/classes/zh_CN/class_slider.rst +++ b/classes/zh_CN/class_slider.rst @@ -10,23 +10,23 @@ Slider ====== -**Inherits:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`HSlider`, :ref:`VSlider` +**派生:** :ref:`HSlider`, :ref:`VSlider` 滑块的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 滑块的抽象基类,通过将抓取器(滑块)沿水平轴或垂直轴移动类调整取值。滑块是基于 :ref:`Range` 的控件。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,14 +45,42 @@ Properties | :ref:`bool` | :ref:`ticks_on_borders` | ``false`` | +------------------------------------------+-----------------------------------------------------------------+---------------------------------------------------------------------+ +.. rst-class:: classref-reftable-group + +主题属性 +-------- + +.. table:: + :widths: auto + + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`center_grabber` | ``0`` | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`grabber_offset` | ``0`` | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`grabber` | | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`grabber_disabled` | | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`grabber_highlight` | | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`Texture2D` | :ref:`tick` | | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`StyleBox` | :ref:`grabber_area` | | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`StyleBox` | :ref:`grabber_area_highlight` | | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + | :ref:`StyleBox` | :ref:`slider` | | + +-----------------------------------+--------------------------------------------------------------------------------+-------+ + .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Slider_signal_drag_ended: @@ -80,8 +108,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Slider_property_editable: @@ -147,10 +175,123 @@ Property Descriptions 如果为 ``true``\ ,则滑动条将显示最小值和最大值的刻度。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +主题属性说明 +------------ + +.. _class_Slider_theme_constant_center_grabber: + +.. rst-class:: classref-themeproperty + +:ref:`int` **center_grabber** = ``0`` + +布尔常量。如果为 ``1``\ ,则会忽略抓取器纹理的大小,根据其中心位置将其缩放到滚动条的边界。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_Slider_theme_constant_grabber_offset: + +.. rst-class:: classref-themeproperty + +:ref:`int` **grabber_offset** = ``0`` + +抓取器的垂直或水平偏移量。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_Slider_theme_icon_grabber: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **grabber** + +用作拖动条的纹理(可拖动的元素)。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_Slider_theme_icon_grabber_disabled: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **grabber_disabled** + +抓取器禁用时的材质。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_Slider_theme_icon_grabber_highlight: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **grabber_highlight** + +抓取器获得焦点时的材质。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_Slider_theme_icon_tick: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **tick** + +刻度的纹理。当 :ref:`tick_count` 大于 0 时可见。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_Slider_theme_style_grabber_area: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **grabber_area** + +抓取器左侧或底部区域的背景。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_Slider_theme_style_grabber_area_highlight: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **grabber_area_highlight** + +抓取器被悬停或聚焦时,显示的左侧或底部区域的背景。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_Slider_theme_style_slider: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **slider** + +整个滑动条的背景。影响 :ref:`grabber_area` 的高度或宽度。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_sliderjoint3d.rst b/classes/zh_CN/class_sliderjoint3d.rst index bc2e246021..cd220d1c7b 100644 --- a/classes/zh_CN/class_sliderjoint3d.rst +++ b/classes/zh_CN/class_sliderjoint3d.rst @@ -10,21 +10,21 @@ SliderJoint3D ============= -**Inherits:** :ref:`Joint3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Joint3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 一种物理关节,能够将 3D 物理体的移动限制在相对于另一个物理体的某个轴上。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 一种物理关节,能够将 3D 物理体的移动限制在相对于另一个物理体的某个轴上。例如物体 A 是代表活塞基底的 :ref:`StaticBody3D`\ ,而物体 B 是代表活塞头的 :ref:`RigidBody3D`\ ,能够上下移动。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -77,8 +77,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -95,8 +95,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_SliderJoint3D_Param: @@ -294,8 +294,8 @@ enum **Param**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SliderJoint3D_property_angular_limit/damping: @@ -679,8 +679,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SliderJoint3D_method_get_param: @@ -690,7 +690,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -704,12 +704,12 @@ void **set_param** **(** :ref:`Param` param, :ref:`flo .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_softbody3d.rst b/classes/zh_CN/class_softbody3d.rst index 63bacf746f..4342db018a 100644 --- a/classes/zh_CN/class_softbody3d.rst +++ b/classes/zh_CN/class_softbody3d.rst @@ -10,14 +10,14 @@ SoftBody3D ========== -**Inherits:** :ref:`MeshInstance3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`MeshInstance3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 可形变的 3D 物理网格。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 可形变的 3D 物理网格。用于创建弹性或可形变的对象,例如布料、橡胶或其他柔性材质。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`SoftBody <../tutorials/physics/soft_body>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -100,8 +100,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_SoftBody3D_DisableMode: @@ -133,8 +133,8 @@ enum **DisableMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SoftBody3D_property_collision_layer: @@ -187,7 +187,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -223,7 +223,7 @@ Property Descriptions .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -240,7 +240,7 @@ Property Descriptions - void **set_linear_stiffness** **(** :ref:`float` value **)** - :ref:`float` **get_linear_stiffness** **(** **)** -Higher values will result in a stiffer body, while lower values will increase the body's ability to bend. The value can be between ``0.0`` and ``1.0`` (inclusive). +值越大得到的物体约坚硬,较低的值会提高物体的弯曲能力。取值范围为 ``0.0`` 到 ``1.0`` 之间(含端点)。 .. rst-class:: classref-item-separator @@ -276,7 +276,7 @@ Higher values will result in a stiffer body, while lower values will increase th .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -335,8 +335,8 @@ Higher values will result in a stiffer body, while lower values will increase th .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SoftBody3D_method_add_collision_exception_with: @@ -394,7 +394,7 @@ void **add_collision_exception_with** **(** :ref:`Node` body **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -468,10 +468,10 @@ void **set_point_pinned** **(** :ref:`int` point_index, :ref:`bool`\ ,该固定顶点将被附加到该节点。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_spheremesh.rst b/classes/zh_CN/class_spheremesh.rst index ce456c9ff6..85f67a847a 100644 --- a/classes/zh_CN/class_spheremesh.rst +++ b/classes/zh_CN/class_spheremesh.rst @@ -10,21 +10,21 @@ SphereMesh ========== -**Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 表示球形 :ref:`PrimitiveMesh` 的类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 表示球形 :ref:`PrimitiveMesh` 的类。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SphereMesh_property_height: @@ -133,10 +133,10 @@ Property Descriptions 沿着球体高度的段数。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_sphereoccluder3d.rst b/classes/zh_CN/class_sphereoccluder3d.rst index 1028c86168..82ce76726f 100644 --- a/classes/zh_CN/class_sphereoccluder3d.rst +++ b/classes/zh_CN/class_sphereoccluder3d.rst @@ -10,14 +10,14 @@ SphereOccluder3D ================ -**Inherits:** :ref:`Occluder3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Occluder3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在 :ref:`OccluderInstance3D` 中进行遮挡剔除的球体形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **SphereOccluder3D** 存储的是球体形状,可供引擎的遮挡剔除系统使用。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Occlusion culling <../tutorials/3d/occlusion_culling>` +- :doc:`遮挡剔除 <../tutorials/3d/occlusion_culling>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SphereOccluder3D_property_radius: @@ -64,10 +64,10 @@ Property Descriptions 球体半径,使用 3D 单位。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_sphereshape3d.rst b/classes/zh_CN/class_sphereshape3d.rst index 0f853f10c9..4e0d6c2e8c 100644 --- a/classes/zh_CN/class_sphereshape3d.rst +++ b/classes/zh_CN/class_sphereshape3d.rst @@ -10,14 +10,14 @@ SphereShape3D ============= -**Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 3D 球体形状,旨在用于物理学。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 3D 球体形状,旨在用于物理学。通常用于为 :ref:`CollisionShape3D` 提供形状。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 物理测试演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SphereShape3D_property_radius: @@ -64,10 +64,10 @@ Property Descriptions 球体的半径。形状的直径是半径的两倍。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_spinbox.rst b/classes/zh_CN/class_spinbox.rst index 1f104c960e..4a2ddc6d03 100644 --- a/classes/zh_CN/class_spinbox.rst +++ b/classes/zh_CN/class_spinbox.rst @@ -10,14 +10,14 @@ SpinBox ======= -**Inherits:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 数字的输入字段。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **SpinBox** 是一种用于输入数值的文本字段,允许输入整数和浮点数。 @@ -48,14 +48,16 @@ Description \ **SpinBox** 的更多选项见 :ref:`Range` 类。 +\ **注意:**\ **SpinBox** 的上下文菜单被禁用时,右键单击微调框的下半部分可以将取值设置最小值,右键单击上半部分可以将取值设置最大值。 + \ **注意:**\ **SpinBox** 依赖底层的 :ref:`LineEdit` 节点。要为 **SpinBox** 的背景设置主题,请为 :ref:`LineEdit` 添加主题项目并进行自定义。 \ **注意:**\ 如果你想要为底层的 :ref:`LineEdit` 实现拖放,可以对 :ref:`get_line_edit` 所返回的节点使用 :ref:`Control.set_drag_forwarding`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -82,8 +84,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -96,8 +98,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -112,8 +114,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SpinBox_property_alignment: @@ -143,7 +145,7 @@ Property Descriptions - void **set_custom_arrow_step** **(** :ref:`float` value **)** - :ref:`float` **get_custom_arrow_step** **(** **)** -如果不是 ``0``\ ,则在与 **SpinBox** 的箭头按钮交互时,\ ``value`` 将始终四舍五入为 ``custom_arrow_step`` 的倍数。 +如果不是 ``0``\ ,则在与 **SpinBox** 的箭头按钮交互时,\ :ref:`Range.value` 将始终四舍五入为 :ref:`custom_arrow_step` 的倍数。 .. rst-class:: classref-item-separator @@ -177,7 +179,7 @@ Property Descriptions - void **set_prefix** **(** :ref:`String` value **)** - :ref:`String` **get_prefix** **(** **)** -在 **SpinBox** 的数值前添加指定的 ``prefix`` 字符串。 +在 **SpinBox** 的数值前添加指定的前缀字符串。 .. rst-class:: classref-item-separator @@ -211,7 +213,7 @@ Property Descriptions - void **set_suffix** **(** :ref:`String` value **)** - :ref:`String` **get_suffix** **(** **)** -在 **SpinBox** 的数值后添加指定的 ``suffix`` 字符串。 +在 **SpinBox** 的数值后添加指定的后缀字符串。 .. rst-class:: classref-item-separator @@ -236,8 +238,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SpinBox_method_apply: @@ -267,8 +269,8 @@ void **apply** **(** **)** .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_SpinBox_theme_icon_updown: @@ -278,10 +280,10 @@ Theme Property Descriptions 为该 **SpinBox** 的上下箭头设置自定义的 :ref:`Texture2D`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_splitcontainer.rst b/classes/zh_CN/class_splitcontainer.rst index 01d98a11e3..272dc1cd11 100644 --- a/classes/zh_CN/class_splitcontainer.rst +++ b/classes/zh_CN/class_splitcontainer.rst @@ -10,30 +10,30 @@ SplitContainer ============== -**Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`HSplitContainer`, :ref:`VSplitContainer` +**派生:** :ref:`HSplitContainer`, :ref:`VSplitContainer` 将两个子控件垂直或水平分隔的容器,提供了用于调整分隔比例的抓取器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 仅接受两个子控件的容器,会将它们垂直或水平排列,在中间创建一个分隔条。分隔条可以拖拽,从而改变两个控件的大小关系。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -62,8 +62,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -75,6 +75,8 @@ Theme Properties +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ | :ref:`int` | :ref:`separation` | ``12`` | +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ + | :ref:`Texture2D` | :ref:`grabber` | | + +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ | :ref:`Texture2D` | :ref:`h_grabber` | | +-----------------------------------+-------------------------------------------------------------------------------------------+--------+ | :ref:`Texture2D` | :ref:`v_grabber` | | @@ -86,8 +88,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_SplitContainer_signal_dragged: @@ -103,8 +105,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_SplitContainer_DraggerVisibility: @@ -142,8 +144,8 @@ enum **DraggerVisibility**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SplitContainer_property_collapsed: @@ -217,8 +219,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SplitContainer_method_clamp_split_offset: @@ -234,8 +236,8 @@ void **clamp_split_offset** **(** **)** .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_SplitContainer_theme_constant_autohide: @@ -273,6 +275,18 @@ Theme Property Descriptions ---- +.. _class_SplitContainer_theme_icon_grabber: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **grabber** + +在中间区域绘制的抓取图标。 + +.. rst-class:: classref-item-separator + +---- + .. _class_SplitContainer_theme_icon_h_grabber: .. rst-class:: classref-themeproperty @@ -293,10 +307,10 @@ Theme Property Descriptions :ref:`vertical` 为 ``true`` 时绘制在中间区域的抓取器图标。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_spotlight3d.rst b/classes/zh_CN/class_spotlight3d.rst index 83fe2df639..de8500248f 100644 --- a/classes/zh_CN/class_spotlight3d.rst +++ b/classes/zh_CN/class_spotlight3d.rst @@ -10,14 +10,14 @@ SpotLight3D =========== -**Inherits:** :ref:`Light3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Light3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 聚光灯,如反射器聚光灯或灯笼。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 聚光灯是一种 :ref:`Light3D` 节点,向指定的方向发出圆锥形的灯光。光线会随距离增大而衰减。衰减可以通过修改 :ref:`Light3D` 的能量、半径、衰减参数进行控制。 @@ -27,19 +27,19 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`3D 灯光与阴影 <../tutorials/3d/lights_and_shadows>` -- :doc:`Faking global illumination <../tutorials/3d/global_illumination/faking_global_illumination>` +- :doc:`伪造全局光照 <../tutorials/3d/global_illumination/faking_global_illumination>` - `第三人称射击演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SpotLight3D_property_spot_angle: @@ -137,10 +137,10 @@ Property Descriptions \ **注意:**\ :ref:`spot_angle` 不受 :ref:`Node3D.scale` 的影响(无论是该灯光的缩放还是其父节点的缩放)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_springarm3d.rst b/classes/zh_CN/class_springarm3d.rst index b0d71e81f6..a5857a7a48 100644 --- a/classes/zh_CN/class_springarm3d.rst +++ b/classes/zh_CN/class_springarm3d.rst @@ -10,21 +10,21 @@ SpringArm3D =========== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 能够动态地将子节点朝碰撞点移动的 3D 射线投射。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**SpringArm3D** casts a ray or a shape along its Z axis and moves all its direct children to the collision point, with an optional margin. This is useful for 3rd person cameras that move closer to the player when inside a tight space (you may need to exclude the player's collider from the **SpringArm3D**'s collision check). +**SpringArm3D** 会朝它的 Z 轴投射射线或形状,并将所有直接子节点朝碰撞点移动,可以保留一定的边距。可用于第三人称相机,让其在狭窄空间中朝玩家移动(你可能需要在 **SpringArm3D** 的碰撞检查中排除玩家的碰撞体)。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -63,8 +63,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SpringArm3D_property_collision_mask: @@ -144,8 +144,8 @@ SpringArm3D 的最大范围。这用作内部使用的射线和形状投射的 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SpringArm3D_method_add_excluded_object: @@ -191,10 +191,10 @@ void **clear_excluded_objects** **(** **)** 从碰撞检测排除 :ref:`PhysicsBody3D` 对象的列表中移除给定的 :ref:`RID`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_sprite2d.rst b/classes/zh_CN/class_sprite2d.rst index 169201f537..6beaae82e3 100644 --- a/classes/zh_CN/class_sprite2d.rst +++ b/classes/zh_CN/class_sprite2d.rst @@ -10,28 +10,28 @@ Sprite2D ======== -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 通用精灵节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 显示 2D 纹理的节点。显示的纹理可以是较大图集纹理中的某个区域,也可以是精灵表动画中的某一帧。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `实例化演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -82,8 +82,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Sprite2D_signal_frame_changed: @@ -111,8 +111,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Sprite2D_property_centered: @@ -320,8 +320,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Sprite2D_method_get_rect: @@ -375,10 +375,10 @@ Method Descriptions \ **注意:**\ 如果精灵的纹理为 ``null`` 或者给定的位置无效,它也会返回 ``false``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_sprite3d.rst b/classes/zh_CN/class_sprite3d.rst index 8609582fee..2c15c44b37 100644 --- a/classes/zh_CN/class_sprite3d.rst +++ b/classes/zh_CN/class_sprite3d.rst @@ -10,21 +10,21 @@ Sprite3D ======== -**Inherits:** :ref:`SpriteBase3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`SpriteBase3D` **<** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 3D 世界中的 2D 精灵节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 在 3D 环境中显示 2D 纹理的节点。显示的纹理可以是来自较大图集纹理的区域,也可以是来自精灵表动画的帧。另见 :ref:`SpriteBase3D`\ ,定义有公告板模式等属性。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -51,8 +51,8 @@ Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Sprite3D_signal_frame_changed: @@ -80,8 +80,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Sprite3D_property_frame: @@ -198,10 +198,10 @@ Property Descriptions 精灵表中的行数。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_spritebase3d.rst b/classes/zh_CN/class_spritebase3d.rst index 3e04c480f3..b1601a288f 100644 --- a/classes/zh_CN/class_spritebase3d.rst +++ b/classes/zh_CN/class_spritebase3d.rst @@ -10,23 +10,23 @@ SpriteBase3D ============ -**Inherits:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`GeometryInstance3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AnimatedSprite3D`, :ref:`Sprite3D` +**派生:** :ref:`AnimatedSprite3D`, :ref:`Sprite3D` 3D 环境中的 2D 精灵节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 在 3D 环境中显示 2D 纹理信息的节点。另请参阅 :ref:`Sprite3D`\ ,其中定义了许多其他属性。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -75,8 +75,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -97,8 +97,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_SpriteBase3D_DrawFlags: @@ -202,8 +202,8 @@ enum **AlphaCutMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SpriteBase3D_property_alpha_antialiasing_edge: @@ -553,8 +553,8 @@ Vector3.Axis **axis** = ``2`` .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SpriteBase3D_method_generate_triangle_mesh: @@ -600,10 +600,10 @@ void **set_draw_flag** **(** :ref:`DrawFlags` flag, 如果 ``true``\ ,则指定的标志将被启用。标志列表见 :ref:`DrawFlags`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_spriteframes.rst b/classes/zh_CN/class_spriteframes.rst index 46625ca9ad..41468e7053 100644 --- a/classes/zh_CN/class_spriteframes.rst +++ b/classes/zh_CN/class_spriteframes.rst @@ -10,21 +10,21 @@ SpriteFrames ============ -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 精灵帧库,用于 AnimatedSprite2D 和 AnimatedSprite3D。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`AnimatedSprite2D` 和 :ref:`AnimatedSprite3D` 节点的精灵帧库。包含帧和用于播放的动画信息。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -71,8 +71,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SpriteFrames_method_add_animation: @@ -280,10 +280,10 @@ void **set_frame** **(** :ref:`StringName` anim, :ref:`int` **<** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`BaseMaterial3D` **<** :ref:`Material` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A PBR (Physically Based Rendering) material to be used on 3D objects. +用于 3D 对象的 PBR(基于物理的渲染)材质。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **StandardMaterial3D** 的属性继承自 :ref:`BaseMaterial3D`\ 。\ **StandardMaterial3D** 为环境光遮蔽、粗糙度和金属性贴图使用单独的纹理。要为所有 3 个纹理使用一个 ORM 贴图,请使用 :ref:`ORMMaterial3D` 代替。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`标准 3D 材质与 ORM 3D 材质 <../tutorials/3d/standard_material_3d>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_staticbody2d.rst b/classes/zh_CN/class_staticbody2d.rst index 736009e748..def120eec4 100644 --- a/classes/zh_CN/class_staticbody2d.rst +++ b/classes/zh_CN/class_staticbody2d.rst @@ -10,27 +10,27 @@ StaticBody2D ============ -**Inherits:** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`PhysicsBody2D` **<** :ref:`CollisionObject2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AnimatableBody2D` +**派生:** :ref:`AnimatableBody2D` 无法被外力移动的 2D 物理物体。手动移动时不会影响路径上的其他物体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A static 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to :ref:`AnimationPlayer.ANIMATION_PROCESS_PHYSICS`), and :ref:`RemoteTransform2D`. +静态 2D 物理体。无法因外力或接触而移动,但可以通过代码、\ :ref:`AnimationMixer`\ (\ :ref:`AnimationMixer.callback_mode_process` 设为 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS`\ )、\ :ref:`RemoteTransform2D` 等方法手动移动。 -When **StaticBody2D** is moved, it is teleported to its new position without affecting other physics bodies in its path. If this is not desired, use :ref:`AnimatableBody2D` instead. +\ **StaticBody2D** 发生移动时,是传送到新位置上的,不会影响路径上的其他物理体。如果不想要这样的行为,请改用 :ref:`AnimatableBody2D`\ 。 -\ **StaticBody2D** is useful for completely static objects like floors and walls, as well as moving surfaces like conveyor belts and circular revolving platforms (by using :ref:`constant_linear_velocity` and :ref:`constant_angular_velocity`). +\ **StaticBody2D** 常用于完全静态的地板、墙壁等对象,也可以用于传送带、圆形回转平台等移动的表面(使用 :ref:`constant_linear_velocity` 和 :ref:`constant_angular_velocity`\ )。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_StaticBody2D_property_constant_angular_velocity: @@ -101,10 +101,10 @@ Property Descriptions 如果为该属性指定了一种材质,则将使用该材质代替任何其他物理材质,例如继承的材质。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_staticbody3d.rst b/classes/zh_CN/class_staticbody3d.rst index f176d5a817..d53af396ea 100644 --- a/classes/zh_CN/class_staticbody3d.rst +++ b/classes/zh_CN/class_staticbody3d.rst @@ -10,27 +10,27 @@ StaticBody3D ============ -**Inherits:** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AnimatableBody3D` +**派生:** :ref:`AnimatableBody3D` 无法被外力移动的 3D 物理物体。手动移动时不会影响路径上的其他物体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A static 3D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, :ref:`AnimationPlayer`\ s (with :ref:`AnimationPlayer.playback_process_mode` set to :ref:`AnimationPlayer.ANIMATION_PROCESS_PHYSICS`), and :ref:`RemoteTransform3D`. +静态 3D 物理体。无法因外力或接触而移动,但可以通过代码、\ :ref:`AnimationMixer`\ (\ :ref:`AnimationMixer.callback_mode_process` 设为 :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS`\ )、\ :ref:`RemoteTransform3D` 等方法手动移动。 -When **StaticBody3D** is moved, it is teleported to its new position without affecting other physics bodies in its path. If this is not desired, use :ref:`AnimatableBody3D` instead. +\ **StaticBody3D** 发生移动时,是传送到新位置上的,不会影响路径上的其他物理体。如果不想要这样的行为,请改用 :ref:`AnimatableBody3D`\ 。 -\ **StaticBody3D** is useful for completely static objects like floors and walls, as well as moving surfaces like conveyor belts and circular revolving platforms (by using :ref:`constant_linear_velocity` and :ref:`constant_angular_velocity`). +\ **StaticBody3D** 常用于完全静态的地板、墙壁等对象,也可以用于传送带、圆形回转平台等移动的表面(使用 :ref:`constant_linear_velocity` 和 :ref:`constant_angular_velocity`\ )。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 物理测试演示 `__ @@ -40,8 +40,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -60,8 +60,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_StaticBody3D_property_constant_angular_velocity: @@ -112,10 +112,10 @@ Property Descriptions 如果为该属性指定了一种材质,则将使用该材质代替任何其他物理材质,例如继承的材质。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_streampeer.rst b/classes/zh_CN/class_streampeer.rst index fc0f4ea47c..cba1668aca 100644 --- a/classes/zh_CN/class_streampeer.rst +++ b/classes/zh_CN/class_streampeer.rst @@ -10,16 +10,16 @@ StreamPeer ========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`StreamPeerBuffer`, :ref:`StreamPeerExtension`, :ref:`StreamPeerGZIP`, :ref:`StreamPeerTCP`, :ref:`StreamPeerTLS` +**派生:** :ref:`StreamPeerBuffer`, :ref:`StreamPeerExtension`, :ref:`StreamPeerGZIP`, :ref:`StreamPeerTCP`, :ref:`StreamPeerTLS` 与流交互的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- StreamPeer 是一种抽象基类,常用于流式协议(例如 TCP)。它提供了通过流发送数据的 API,将数据作为原始数据或字符串处理。 @@ -27,8 +27,8 @@ StreamPeer 是一种抽象基类,常用于流式协议(例如 TCP)。它 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -115,8 +115,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_StreamPeer_property_big_endian: @@ -137,8 +137,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_StreamPeer_method_get_8: @@ -544,10 +544,10 @@ void **put_var** **(** :ref:`Variant` value, :ref:`bool` 方法相同。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_streampeerbuffer.rst b/classes/zh_CN/class_streampeerbuffer.rst index f0b9eb9fdd..c84c2aa152 100644 --- a/classes/zh_CN/class_streampeerbuffer.rst +++ b/classes/zh_CN/class_streampeerbuffer.rst @@ -10,14 +10,14 @@ StreamPeerBuffer ================ -**Inherits:** :ref:`StreamPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`StreamPeer` **<** :ref:`RefCounted` **<** :ref:`Object` 用于处理二进制数据流的流对等体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 使用字节数组作为流的数据缓冲区流对等体。该对象可用于处理来自网络会话的二进制数据。要处理保存在文件中的二进制数据,可以直接使用 :ref:`FileAccess`\ 。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -37,8 +37,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -63,8 +63,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_StreamPeerBuffer_property_data_array: @@ -85,8 +85,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_StreamPeerBuffer_method_clear: @@ -156,10 +156,10 @@ void **seek** **(** :ref:`int` position **)** 将指针移动到指定的位置。\ ``position`` 必须是 :ref:`data_array` 的有效索引。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_streampeerextension.rst b/classes/zh_CN/class_streampeerextension.rst index 615c113b65..2da59564de 100644 --- a/classes/zh_CN/class_streampeerextension.rst +++ b/classes/zh_CN/class_streampeerextension.rst @@ -10,31 +10,31 @@ StreamPeerExtension =================== -**Inherits:** :ref:`StreamPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`StreamPeer` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_available_bytes` **(** **)** |virtual| |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_get_data` **(** uint8_t* r_buffer, :ref:`int` r_bytes, int32_t* r_received **)** |virtual| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_get_partial_data` **(** uint8_t* r_buffer, :ref:`int` r_bytes, int32_t* r_received **)** |virtual| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_put_data` **(** const uint8_t* p_data, :ref:`int` p_bytes, int32_t* r_sent **)** |virtual| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_put_partial_data` **(** const uint8_t* p_data, :ref:`int` p_bytes, int32_t* r_sent **)** |virtual| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_available_bytes` **(** **)** |virtual| |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_get_data` **(** uint8_t* r_buffer, :ref:`int` r_bytes, int32_t* r_received **)** |virtual| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_get_partial_data` **(** uint8_t* r_buffer, :ref:`int` r_bytes, int32_t* r_received **)** |virtual| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_put_data` **(** const uint8_t* p_data, :ref:`int` p_bytes, int32_t* r_sent **)** |virtual| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_put_partial_data` **(** const uint8_t* p_data, :ref:`int` p_bytes, int32_t* r_sent **)** |virtual| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -42,10 +42,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_StreamPeerExtension_method__get_available_bytes: +.. _class_StreamPeerExtension_private_method__get_available_bytes: .. rst-class:: classref-method @@ -53,13 +53,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_StreamPeerExtension_method__get_data: +.. _class_StreamPeerExtension_private_method__get_data: .. rst-class:: classref-method @@ -67,13 +67,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_StreamPeerExtension_method__get_partial_data: +.. _class_StreamPeerExtension_private_method__get_partial_data: .. rst-class:: classref-method @@ -81,13 +81,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_StreamPeerExtension_method__put_data: +.. _class_StreamPeerExtension_private_method__put_data: .. rst-class:: classref-method @@ -95,13 +95,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_StreamPeerExtension_method__put_partial_data: +.. _class_StreamPeerExtension_private_method__put_partial_data: .. rst-class:: classref-method @@ -109,12 +109,12 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_streampeergzip.rst b/classes/zh_CN/class_streampeergzip.rst index 0ed0c9c6a8..ee9d30c8f0 100644 --- a/classes/zh_CN/class_streampeergzip.rst +++ b/classes/zh_CN/class_streampeergzip.rst @@ -10,14 +10,14 @@ StreamPeerGZIP ============== -**Inherits:** :ref:`StreamPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`StreamPeer` **<** :ref:`RefCounted` **<** :ref:`Object` 能够处理 GZIP 和 deflate 压缩/解压缩的流对等体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类能够使用 GZIP/deflate 对数据进行流式压缩或解压缩。压缩或解压缩经过网络发送的文件时尤其有用,不必事先分配内存。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_StreamPeerGZIP_method_clear: @@ -94,10 +94,10 @@ void **clear** **(** **)** 开始解压模式的流,缓冲区大小为 ``buffer_size``\ ,如果 ``use_deflate`` 为 ``true`` 则使用 deflate 而不是 GZIP。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_streampeertcp.rst b/classes/zh_CN/class_streampeertcp.rst index 395164ce88..6e95bc286a 100644 --- a/classes/zh_CN/class_streampeertcp.rst +++ b/classes/zh_CN/class_streampeertcp.rst @@ -10,14 +10,14 @@ StreamPeerTCP ============= -**Inherits:** :ref:`StreamPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`StreamPeer` **<** :ref:`RefCounted` **<** :ref:`Object` 处理 TCP 连接的流对等体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 处理 TCP 连接的流对等体。该对象可用于连接 TCP 服务器,也可以由 TCP 服务器返回。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -57,8 +57,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_StreamPeerTCP_Status: @@ -104,8 +104,8 @@ enum **Status**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_StreamPeerTCP_method_bind: @@ -215,10 +215,10 @@ void **set_no_delay** **(** :ref:`bool` enabled **)** \ **注意:**\ 对于发送大数据包或需要传输大量数据的应用程序,建议将本属性保持禁用,因为启用本属性会减少总体可用带宽。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_streampeertls.rst b/classes/zh_CN/class_streampeertls.rst index 56e1d67c1b..d1e3c3b773 100644 --- a/classes/zh_CN/class_streampeertls.rst +++ b/classes/zh_CN/class_streampeertls.rst @@ -10,14 +10,14 @@ StreamPeerTLS ============= -**Inherits:** :ref:`StreamPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`StreamPeer` **<** :ref:`RefCounted` **<** :ref:`Object` 处理 TLS 连接的流对等体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 处理 TLS 连接的流对等体。此对象可用于连接到 TLS 服务器或接受单个 TLS 客户端连接。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`TLS 证书 <../tutorials/networking/ssl_certificates>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_StreamPeerTLS_Status: @@ -113,8 +113,8 @@ enum **Status**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_StreamPeerTLS_method_accept_stream: @@ -184,10 +184,10 @@ void **poll** **(** **)** 轮询连接以检查传入的字节。在 :ref:`StreamPeer.get_available_bytes` 之前调用它以使其正常工作。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_string.rst b/classes/zh_CN/class_string.rst index efad08b68a..daf7b160dd 100644 --- a/classes/zh_CN/class_string.rst +++ b/classes/zh_CN/class_string.rst @@ -14,8 +14,8 @@ String .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这是内置的字符串 Variant 类型(GDScript 使用的就是这个类型)。字符串中可以包含任意数量的 Unicode 字符,暴露的方法可用于字符串的操作和生成。字符串有引用计数,使用写时复制技术(每次对字符串的修改都会返回新的 **String**\ ),所以传递字符串的资源损耗很小。 @@ -25,19 +25,19 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`GDScript 格式字符串 <../tutorials/scripting/gdscript/gdscript_format_string>` .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -54,8 +54,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -272,8 +272,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -310,8 +310,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_String_constructor_String: @@ -357,8 +357,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_String_method_begins_with: @@ -1470,7 +1470,7 @@ Method Descriptions :ref:`String` **reverse** **(** **)** |const| -Returns the copy of this string in reverse order. +返回将这个字符串逆序后的副本。 .. rst-class:: classref-item-separator @@ -1770,7 +1770,7 @@ Returns the copy of this string in reverse order. :ref:`PackedByteArray` **to_ascii_buffer** **(** **)** |const| -将该字符串转换为 `ASCII `__/Latin-1 编码的 :ref:`PackedByteArray`\ 。这个方法比 :ref:`to_utf8_buffer` 稍快,但会把不支持的字符都替换为空格。 +将该字符串转换为 `ASCII `__/Latin-1 编码的 :ref:`PackedByteArray`\ 。这个方法比 :ref:`to_utf8_buffer` 稍快,但会把不支持的字符都替换为空格。这是 :ref:`PackedByteArray.get_string_from_ascii` 的逆运算。 .. rst-class:: classref-item-separator @@ -1881,7 +1881,7 @@ Returns the copy of this string in reverse order. :ref:`PackedByteArray` **to_utf8_buffer** **(** **)** |const| -将该字符串转换为 `UTF-8 `__ 编码的 :ref:`PackedByteArray`\ 。这个方法比 :ref:`to_ascii_buffer` 稍慢,但支持所有 UTF-8 字符。大多数情况下请优先使用这个方法。 +将该字符串转换为 `UTF-8 `__ 编码的 :ref:`PackedByteArray`\ 。这个方法比 :ref:`to_ascii_buffer` 稍慢,但支持所有 UTF-8 字符。大多数情况下请优先使用这个方法。这是 :ref:`PackedByteArray.get_string_from_utf8` 的逆运算。 .. rst-class:: classref-item-separator @@ -1893,7 +1893,7 @@ Returns the copy of this string in reverse order. :ref:`PackedByteArray` **to_utf16_buffer** **(** **)** |const| -将该字符串转换为 `UTF-16 `__ 编码的 :ref:`PackedByteArray`\ 。 +将该字符串转换为 `UTF-16 `__ 编码的 :ref:`PackedByteArray`\ 。这是 :ref:`PackedByteArray.get_string_from_utf16` 的逆运算。 .. rst-class:: classref-item-separator @@ -1905,7 +1905,7 @@ Returns the copy of this string in reverse order. :ref:`PackedByteArray` **to_utf32_buffer** **(** **)** |const| -将该字符串转换为 `UTF-32 `__ 编码的 :ref:`PackedByteArray`\ 。 +将该字符串转换为 `UTF-32 `__ 编码的 :ref:`PackedByteArray`\ 。这是 :ref:`PackedByteArray.get_string_from_utf32` 的逆运算。 .. rst-class:: classref-item-separator @@ -1917,7 +1917,7 @@ Returns the copy of this string in reverse order. :ref:`PackedByteArray` **to_wchar_buffer** **(** **)** |const| -将该字符串转换为 `宽字符 `__\ (\ ``wchat_t``\ ,Windows 上为 UTF-16,其他平台上为 UTF-32)编码的 :ref:`PackedByteArray`\ 。 +将该字符串转换为 `宽字符 `__\ (\ ``wchat_t``\ ,Windows 上为 UTF-16,其他平台上为 UTF-32)编码的 :ref:`PackedByteArray`\ 。这是 :ref:`PackedByteArray.get_string_from_wchar` 的逆运算。 .. rst-class:: classref-item-separator @@ -2067,8 +2067,8 @@ Returns the copy of this string in reverse order. .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_String_operator_neq_String: @@ -2223,10 +2223,10 @@ Operator Descriptions 返回只包含索引为 ``index`` 的字符的新 **String**\ 。索引从 ``0`` 开始。如果 ``index`` 大于等于 ``0``\ ,则字符是从该字符串的开头开始获取的。如果 ``index`` 为负,则从末尾开始获取。越界访问字符串会导致运行时错误,从编辑器中运行时会将项目暂停。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_stringname.rst b/classes/zh_CN/class_stringname.rst index 7bedd094ca..ef8361cd86 100644 --- a/classes/zh_CN/class_stringname.rst +++ b/classes/zh_CN/class_stringname.rst @@ -14,8 +14,8 @@ StringName .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **StringName** 是不可变的字符串,用于唯一名称的通用表示(也叫“字符串内嵌”)。值相同的两个 **StringName** 是同一个对象。进行比较时比普通 :ref:`String` 要快很多。 @@ -29,8 +29,8 @@ Description .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -45,8 +45,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -251,8 +251,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -287,8 +287,8 @@ Operators .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_StringName_constructor_StringName: @@ -324,8 +324,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_StringName_method_begins_with: @@ -1309,7 +1309,7 @@ Method Descriptions :ref:`String` **reverse** **(** **)** |const| -Returns the copy of this string in reverse order. +返回将这个字符串逆序后的副本。 .. rst-class:: classref-item-separator @@ -1906,8 +1906,8 @@ Returns the copy of this string in reverse order. .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_StringName_operator_neq_String: @@ -2041,10 +2041,10 @@ Operator Descriptions 如果左侧的 **StringName** 的指针比 ``right`` 靠后或相同,则返回 ``true``\ 。注意,这与 `Unicode 顺序 `__\ 是不同的。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_stylebox.rst b/classes/zh_CN/class_stylebox.rst index e5f4d849db..0c6812677f 100644 --- a/classes/zh_CN/class_stylebox.rst +++ b/classes/zh_CN/class_stylebox.rst @@ -10,16 +10,16 @@ StyleBox ======== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`StyleBoxEmpty`, :ref:`StyleBoxFlat`, :ref:`StyleBoxLine`, :ref:`StyleBoxTexture` +**派生:** :ref:`StyleBoxEmpty`, :ref:`StyleBoxFlat`, :ref:`StyleBoxLine`, :ref:`StyleBoxTexture` 用于为 UI 元素定义风格化方框的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 样式盒 **StyleBox** 是一个为 UI 元素定义风格化方框的抽象基类。常用于面板、按钮、\ :ref:`LineEdit` 的背景、\ :ref:`Tree` 的背景等,也用于针对指针信号检查透明掩码。如果 **StyleBox** 是某个控件的掩码,而掩码检查失败,则点击和运动信号会穿透这个控件进入下方控件。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,39 +45,39 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw` **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect **)** |virtual| |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2` | :ref:`_get_draw_rect` **(** :ref:`Rect2` rect **)** |virtual| |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_minimum_size` **(** **)** |virtual| |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_test_mask` **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** |virtual| |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw` **(** :ref:`RID` canvas_item, :ref:`Rect2` rect **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_content_margin` **(** :ref:`Side` margin **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CanvasItem` | :ref:`get_current_item_drawn` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_margin` **(** :ref:`Side` margin **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_minimum_size` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_offset` **(** **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_content_margin` **(** :ref:`Side` margin, :ref:`float` offset **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_content_margin_all` **(** :ref:`float` offset **)** | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`test_mask` **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_draw` **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect **)** |virtual| |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`_get_draw_rect` **(** :ref:`Rect2` rect **)** |virtual| |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_minimum_size` **(** **)** |virtual| |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_test_mask` **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** |virtual| |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw` **(** :ref:`RID` canvas_item, :ref:`Rect2` rect **)** |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_content_margin` **(** :ref:`Side` margin **)** |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CanvasItem` | :ref:`get_current_item_drawn` **(** **)** |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_margin` **(** :ref:`Side` margin **)** |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_minimum_size` **(** **)** |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_offset` **(** **)** |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_content_margin` **(** :ref:`Side` margin, :ref:`float` offset **)** | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_content_margin_all` **(** :ref:`float` offset **)** | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`test_mask` **(** :ref:`Vector2` point, :ref:`Rect2` rect **)** |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -85,8 +85,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_StyleBox_property_content_margin_bottom: @@ -99,13 +99,13 @@ Property Descriptions - void **set_content_margin** **(** :ref:`Side` margin, :ref:`float` offset **)** - :ref:`float` **get_content_margin** **(** :ref:`Side` margin **)** |const| -The bottom margin for the contents of this style box. Increasing this value reduces the space available to the contents from the bottom. +该样式盒内容的底边距。增加该值会从底部减少内容的可用空间。 -If this value is negative, it is ignored and a child-specific margin is used instead. For example, for :ref:`StyleBoxFlat`, the border thickness (if any) is used instead. +如果该值为负,则忽略该值并使用特定于子项的边距。例如,对于 :ref:`StyleBoxFlat`\ ,(如果有厚度的话)将使用边框厚度。 -It is up to the code using this style box to decide what these contents are: for example, a :ref:`Button` respects this content margin for the textual contents of the button. +内容是什么由使用该样式盒的代码决定:例如,\ :ref:`Button` 会为其文本内容设置该内容边距。 -\ :ref:`get_margin` should be used to fetch this value as consumer instead of reading these properties directly. This is because it correctly respects negative values and the fallback mentioned above. +应使用 :ref:`get_margin` 作为消费者获取该值,而不是直接读取这些属性。这是因为它能够正确地尊重负值和上面提到的后备值。 .. rst-class:: classref-item-separator @@ -122,9 +122,9 @@ It is up to the code using this style box to decide what these contents are: for - void **set_content_margin** **(** :ref:`Side` margin, :ref:`float` offset **)** - :ref:`float` **get_content_margin** **(** :ref:`Side` margin **)** |const| -The left margin for the contents of this style box. Increasing this value reduces the space available to the contents from the left. +该样式盒内容的左边距。增加该值会从左侧减少内容的可用空间。 -Refer to :ref:`content_margin_bottom` for extra considerations. +额外的注意事项请参阅 :ref:`content_margin_bottom`\ 。 .. rst-class:: classref-item-separator @@ -170,10 +170,10 @@ Refer to :ref:`content_margin_bottom` to_canvas_item, :ref:`Rect2`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_StyleBox_method__get_draw_rect: +.. _class_StyleBox_private_method__get_draw_rect: .. rst-class:: classref-method @@ -195,13 +195,13 @@ void **_draw** **(** :ref:`RID` to_canvas_item, :ref:`Rect2`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_StyleBox_method__get_minimum_size: +.. _class_StyleBox_private_method__get_minimum_size: .. rst-class:: classref-method @@ -213,7 +213,7 @@ void **_draw** **(** :ref:`RID` to_canvas_item, :ref:`Rect2` to_canvas_item, :ref:`Rect2`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -259,7 +259,7 @@ void **draw** **(** :ref:`RID` canvas_item, :ref:`Rect2` :ref:`CanvasItem` **get_current_item_drawn** **(** **)** |const| -返回此时处理其 :ref:`CanvasItem.NOTIFICATION_DRAW` 或 :ref:`CanvasItem._draw` 回调的 :ref:`CanvasItem`\ 。 +返回此时处理其 :ref:`CanvasItem.NOTIFICATION_DRAW` 或 :ref:`CanvasItem._draw` 回调的 :ref:`CanvasItem`\ 。 .. rst-class:: classref-item-separator @@ -335,10 +335,10 @@ void **set_content_margin_all** **(** :ref:`float` offset **)** 测试矩形中的一个位置,返回它是否通过掩码测试。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_styleboxempty.rst b/classes/zh_CN/class_styleboxempty.rst index 1d7b5a820a..dc11d087fd 100644 --- a/classes/zh_CN/class_styleboxempty.rst +++ b/classes/zh_CN/class_styleboxempty.rst @@ -10,21 +10,21 @@ StyleBoxEmpty ============= -**Inherits:** :ref:`StyleBox` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`StyleBox` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 空的 :ref:`StyleBox`\ (什么都不显示)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 空的 :ref:`StyleBox`\ ,可以用来代替默认样式,什么都不显示(例如能够“禁用”\ ``focus`` 样式)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_styleboxflat.rst b/classes/zh_CN/class_styleboxflat.rst index 007fe3f5bb..10a0a5720e 100644 --- a/classes/zh_CN/class_styleboxflat.rst +++ b/classes/zh_CN/class_styleboxflat.rst @@ -10,14 +10,14 @@ StyleBoxFlat ============ -**Inherits:** :ref:`StyleBox` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`StyleBox` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 不使用纹理的自定义 :ref:`StyleBox`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 通过配置这个样式盒的各种属性,你可以不使用纹理实现许多常见外观,包括可选的圆角边框、抗锯齿、阴影、偏斜等。 @@ -40,8 +40,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -96,8 +96,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -130,8 +130,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_StyleBoxFlat_property_anti_aliasing: @@ -544,8 +544,8 @@ StyleBox的背景颜色。 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_StyleBoxFlat_method_get_border_width: @@ -663,10 +663,10 @@ void **set_expand_margin_all** **(** :ref:`float` size **)** 将所有边的扩展边距都设置为 ``size`` 像素。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_styleboxline.rst b/classes/zh_CN/class_styleboxline.rst index 048e5370dc..72ec968542 100644 --- a/classes/zh_CN/class_styleboxline.rst +++ b/classes/zh_CN/class_styleboxline.rst @@ -10,21 +10,21 @@ StyleBoxLine ============ -**Inherits:** :ref:`StyleBox` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`StyleBox` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 显示一条线的 :ref:`StyleBox`\ ,可以给定颜色和粗细。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 显示一条线的 :ref:`StyleBox`\ ,可以给定颜色和粗细。可以是横线也可以是竖线。可用作分隔符。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_StyleBoxLine_property_color: @@ -131,10 +131,10 @@ Property Descriptions 如果为 ``true``\ ,则该线将是垂直的。如果 ``false``\ ,该线将是水平的。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_styleboxtexture.rst b/classes/zh_CN/class_styleboxtexture.rst index 54cb9fbbeb..17e534fc98 100644 --- a/classes/zh_CN/class_styleboxtexture.rst +++ b/classes/zh_CN/class_styleboxtexture.rst @@ -10,21 +10,21 @@ StyleBoxTexture =============== -**Inherits:** :ref:`StyleBox` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`StyleBox` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 基于纹理的九宫格 :ref:`StyleBox`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 基于纹理的九宫格 :ref:`StyleBox`\ ,类似于 :ref:`NinePatchRect`\ 。这种样式盒对纹理执行 3×3 缩放,只有中心单元格会被完全拉伸。这样就能够为不同大小的样式盒设计带边框的样式。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -61,8 +61,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -87,8 +87,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_StyleBoxTexture_AxisStretchMode: @@ -126,8 +126,8 @@ enum **AxisStretchMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_StyleBoxTexture_property_axis_stretch_horizontal: @@ -389,8 +389,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_StyleBoxTexture_method_get_expand_margin: @@ -460,10 +460,10 @@ void **set_texture_margin_all** **(** :ref:`float` size **)** 将所有边的边距都设置为 ``size`` 像素。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_subviewport.rst b/classes/zh_CN/class_subviewport.rst index ffdf44297d..a23c25ed6a 100644 --- a/classes/zh_CN/class_subviewport.rst +++ b/classes/zh_CN/class_subviewport.rst @@ -10,14 +10,14 @@ SubViewport =========== -**Inherits:** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` 游戏世界的界面,不会创建窗口,也不会直接绘制到屏幕上。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **SubViewport** 会将场景中的一个矩形区域分离出来,能够独立显示。例如,可以用于在 3D 世界中显示 UI。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用视口 <../tutorials/rendering/viewports>` @@ -46,8 +46,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -70,8 +70,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_SubViewport_ClearMode: @@ -159,8 +159,8 @@ enum **UpdateMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SubViewport_property_render_target_clear_mode: @@ -247,10 +247,10 @@ Property Descriptions 如果为 ``true``\ ,则 2D 尺寸覆盖也会影响拉伸。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_subviewportcontainer.rst b/classes/zh_CN/class_subviewportcontainer.rst index 92e31d4e83..7f1b033ea4 100644 --- a/classes/zh_CN/class_subviewportcontainer.rst +++ b/classes/zh_CN/class_subviewportcontainer.rst @@ -10,14 +10,14 @@ SubViewportContainer ==================== -**Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 用于显示 :ref:`SubViewport` 内容的容器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 显示其 :ref:`SubViewport` 子节点内容的容器。除非启用 :ref:`stretch`\ ,否则会使用 :ref:`SubViewport` 的大小作为最小尺寸。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,14 +41,26 @@ Properties | :ref:`int` | :ref:`stretch_shrink` | ``1`` | +------------------------------------------+---------------------------------------------------------------------------+---------------------------------------------------------------------+ +.. rst-class:: classref-reftable-group + +方法 +---- + +.. table:: + :widths: auto + + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_propagate_input_event` **(** :ref:`InputEvent` event **)** |virtual| |const| | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SubViewportContainer_property_stretch: @@ -86,10 +98,27 @@ Property Descriptions \ **注意:**\ :ref:`stretch` 必须为 ``true``\ ,才能使此属性生效。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +方法说明 +-------- + +.. _class_SubViewportContainer_private_method__propagate_input_event: + +.. rst-class:: classref-method + +:ref:`bool` **_propagate_input_event** **(** :ref:`InputEvent` event **)** |virtual| |const| + +由用户实现的虚方法。如果它返回 ``true``\ ,则 ``event`` 将被传播到 :ref:`SubViewport` 子级。如果返回 ``false``\ ,则传播不会发生。如果未实现该功能,则所有事件都会被传播到子视口。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_surfacetool.rst b/classes/zh_CN/class_surfacetool.rst index 7ef3692501..87dd163c1b 100644 --- a/classes/zh_CN/class_surfacetool.rst +++ b/classes/zh_CN/class_surfacetool.rst @@ -10,14 +10,14 @@ SurfaceTool =========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 创建几何图形的辅助工具。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **SurfaceTool** 可用于通过指定单独的顶点属性来构造 :ref:`Mesh`\ 。可以用来从脚本中构建 :ref:`Mesh`\ 。除索引外的所有属性都需要在调用 :ref:`add_vertex` 之前添加。例如,要添加顶点颜色和 UV: @@ -54,17 +54,17 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Using the SurfaceTool <../tutorials/3d/procedural_geometry/surfacetool>` +- :doc:`使用 SurfaceTool <../tutorials/3d/procedural_geometry/surfacetool>` - `3D 体素演示 `__ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -141,8 +141,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_SurfaceTool_CustomFormat: @@ -254,8 +254,8 @@ enum **SkinWeightCount**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_SurfaceTool_method_add_index: @@ -663,10 +663,10 @@ void **set_weights** **(** :ref:`PackedFloat32Array` w 指定用于\ *下一个*\ 顶点的权重值。\ ``weights`` 必须包含 4 个值。如果每个顶点都需要设置该信息,且为第一个顶点提交失败,则可能根本不会使用该信息。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_syntaxhighlighter.rst b/classes/zh_CN/class_syntaxhighlighter.rst index bdac614794..e6bda16d23 100644 --- a/classes/zh_CN/class_syntaxhighlighter.rst +++ b/classes/zh_CN/class_syntaxhighlighter.rst @@ -10,16 +10,16 @@ SyntaxHighlighter ================= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`CodeHighlighter`, :ref:`EditorSyntaxHighlighter` +**派生:** :ref:`CodeHighlighter`, :ref:`EditorSyntaxHighlighter` 语法高亮器的基类。可以向 :ref:`TextEdit` 提供语法高亮数据。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 语法高亮器的基类。向 :ref:`TextEdit` 提供语法高亮数据。关联的 :ref:`TextEdit` 节点会根据需要调用 **SyntaxHighlighter**\ 。 @@ -27,27 +27,27 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_clear_highlighting_cache` **(** **)** |virtual| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_line_syntax_highlighting` **(** :ref:`int` line **)** |virtual| |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_update_cache` **(** **)** |virtual| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear_highlighting_cache` **(** **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_line_syntax_highlighting` **(** :ref:`int` line **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TextEdit` | :ref:`get_text_edit` **(** **)** |const| | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`update_cache` **(** **)** | - +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_clear_highlighting_cache` **(** **)** |virtual| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_line_syntax_highlighting` **(** :ref:`int` line **)** |virtual| |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_update_cache` **(** **)** |virtual| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear_highlighting_cache` **(** **)** | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_line_syntax_highlighting` **(** :ref:`int` line **)** | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TextEdit` | :ref:`get_text_edit` **(** **)** |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`update_cache` **(** **)** | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -55,10 +55,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_SyntaxHighlighter_method__clear_highlighting_cache: +.. _class_SyntaxHighlighter_private_method__clear_highlighting_cache: .. rst-class:: classref-method @@ -70,7 +70,7 @@ void **_clear_highlighting_cache** **(** **)** |virtual| ---- -.. _class_SyntaxHighlighter_method__get_line_syntax_highlighting: +.. _class_SyntaxHighlighter_private_method__get_line_syntax_highlighting: .. rst-class:: classref-method @@ -84,7 +84,7 @@ void **_clear_highlighting_cache** **(** **)** |virtual| ---- -.. _class_SyntaxHighlighter_method__update_cache: +.. _class_SyntaxHighlighter_private_method__update_cache: .. rst-class:: classref-method @@ -104,7 +104,7 @@ void **clear_highlighting_cache** **(** **)** 清空所有缓存的语法高亮数据。 -然后调用可覆盖的 :ref:`_clear_highlighting_cache` 方法。 +然后调用可覆盖的 :ref:`_clear_highlighting_cache` 方法。 .. rst-class:: classref-item-separator @@ -116,7 +116,7 @@ void **clear_highlighting_cache** **(** **)** :ref:`Dictionary` **get_line_syntax_highlighting** **(** :ref:`int` line **)** -返回某一行的语法高亮数据。如果尚未缓存该行,则会调用 :ref:`_get_line_syntax_highlighting` 来计算相关数据。 +返回某一行的语法高亮数据。如果尚未缓存该行,则会调用 :ref:`_get_line_syntax_highlighting` 来计算相关数据。 返回的 :ref:`Dictionary` 是将列号映射到另一个 :ref:`Dictionary`\ 。列号代表区域的开始位置,当前区域在遇到其他区域或行尾时结束。嵌套的 :ref:`Dictionary` 中包含该区域的数据,目前仅支持“color”字段。 @@ -157,14 +157,14 @@ void **clear_highlighting_cache** **(** **)** void **update_cache** **(** **)** -清除然后更新 **SyntaxHighlighter** 缓存。为一个回调覆盖 :ref:`_update_cache`\ 。 +清除然后更新 **SyntaxHighlighter** 缓存。为一个回调覆盖 :ref:`_update_cache`\ 。 \ **注意:**\ 当关联的 :ref:`TextEdit` 节点更新它自己的缓存时,该函数会被自动调用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_systemfont.rst b/classes/zh_CN/class_systemfont.rst index 0434a6e490..d7cd2dc361 100644 --- a/classes/zh_CN/class_systemfont.rst +++ b/classes/zh_CN/class_systemfont.rst @@ -10,14 +10,14 @@ SystemFont ========== -**Inherits:** :ref:`Font` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Font` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 从系统字体加载的字体。如果未在宿主操作系统上实现,则回退到默认主题字体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **SystemFont** 会从系统字体中加载一个字体,该字体是名称能与 :ref:`font_names` 匹配的第一个字体。 @@ -31,8 +31,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -73,8 +73,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_SystemFont_property_allow_system_fallback: @@ -310,10 +310,10 @@ Property Descriptions 字体字形的次像素定位模式。次像素定位为较小的字体提供了更清晰的文本和更好的字偶距,但会牺牲内存占用和字体栅格化速度。使用 :ref:`TextServer.SUBPIXEL_POSITIONING_AUTO` 可以根据字体大小自动启用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_tabbar.rst b/classes/zh_CN/class_tabbar.rst index fa23014dd3..01a8d74eb0 100644 --- a/classes/zh_CN/class_tabbar.rst +++ b/classes/zh_CN/class_tabbar.rst @@ -10,53 +10,55 @@ TabBar ====== -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 提供水平选项卡栏的控件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 提供水平选项卡栏的控件。类似于 :ref:`TabContainer`\ ,但只负责绘制选项卡,不与子节点互动。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`clip_tabs` | ``true`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`current_tab` | ``0`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`drag_to_rearrange_enabled` | ``false`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`max_tab_width` | ``0`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`scroll_to_selected` | ``true`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`scrolling_enabled` | ``true`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`select_with_rmb` | ``false`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`AlignmentMode` | :ref:`tab_alignment` | ``0`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`CloseButtonDisplayPolicy` | :ref:`tab_close_display_policy` | ``0`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`tab_count` | ``0`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`tabs_rearrange_group` | ``-1`` | - +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+-----------+ + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`clip_tabs` | ``true`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`int` | :ref:`current_tab` | ``0`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`drag_to_rearrange_enabled` | ``false`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`int` | :ref:`max_tab_width` | ``0`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`scroll_to_selected` | ``true`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`scrolling_enabled` | ``true`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`select_with_rmb` | ``false`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`AlignmentMode` | :ref:`tab_alignment` | ``0`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`CloseButtonDisplayPolicy` | :ref:`tab_close_display_policy` | ``0`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`int` | :ref:`tab_count` | ``0`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`int` | :ref:`tabs_rearrange_group` | ``-1`` | + +-----------------------------------------------------------------------+-----------------------------------------------------------------------------------+---------------------------------------------------------------------+ .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -100,6 +102,10 @@ Methods +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`remove_tab` **(** :ref:`int` tab_idx **)** | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`select_next_available` **(** **)** | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`select_previous_available` **(** **)** | + +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_button_icon` **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** | +--------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_disabled` **(** :ref:`int` tab_idx, :ref:`bool` disabled **)** | @@ -121,8 +127,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -168,6 +174,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`tab_disabled` | | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`tab_focus` | | + +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`tab_hovered` | | +-----------------------------------+------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`tab_selected` | | @@ -181,8 +189,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_TabBar_signal_active_tab_rearranged: @@ -289,7 +297,7 @@ Signals **tab_selected** **(** :ref:`int` tab **)** -通过点击或脚本选中某个选项卡时发出,即便该选项卡本来就是当前选项卡。 +通过点击、定向输入、或脚本选中某个选项卡时发出,即便该选项卡本来就是当前选项卡。 .. rst-class:: classref-section-separator @@ -297,8 +305,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_TabBar_AlignmentMode: @@ -386,8 +394,8 @@ enum **CloseButtonDisplayPolicy**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TabBar_property_clip_tabs: @@ -580,8 +588,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TabBar_method_add_tab: @@ -811,6 +819,30 @@ void **remove_tab** **(** :ref:`int` tab_idx **)** ---- +.. _class_TabBar_method_select_next_available: + +.. rst-class:: classref-method + +:ref:`bool` **select_next_available** **(** **)** + +选择索引大于当前所选选项卡索引的第一个可用选项卡。如果选项卡选择发生改变,则返回 ``true``\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_TabBar_method_select_previous_available: + +.. rst-class:: classref-method + +:ref:`bool` **select_previous_available** **(** **)** + +选择索引低于当前所选选项卡索引的第一个可用选项卡。如果选项卡选择发生改变,则返回 ``true``\ 。 + +.. rst-class:: classref-item-separator + +---- + .. _class_TabBar_method_set_tab_button_icon: .. rst-class:: classref-method @@ -921,8 +953,8 @@ void **set_tab_title** **(** :ref:`int` tab_idx, :ref:`String` **tab_focus** + +该 **TabBar** 处于聚焦状态时使用的 :ref:`StyleBox`\ 。\ :ref:`tab_focus` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,所以应该使用部分透明的 :ref:`StyleBox`\ ,确保基础 :ref:`StyleBox` 仍然可见。代表轮廓或下划线的 :ref:`StyleBox` 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 :ref:`StyleBoxEmpty` 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的可用性,所以出于可访问性的原因,不建议这样做。 + +.. rst-class:: classref-item-separator + +---- + .. _class_TabBar_theme_style_tab_hovered: .. rst-class:: classref-themeproperty :ref:`StyleBox` **tab_hovered** -当前悬停的选项卡的样式。不会应用于选中的选项卡。 +当前悬停选项卡的样式。不适用于选择的选项卡。 + +\ **注意:**\ 该样式将以至少与 :ref:`tab_unselected` 相同的宽度绘制。 .. rst-class:: classref-item-separator @@ -1198,10 +1244,10 @@ Theme Property Descriptions 其他未被选中的选项卡的样式。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_tabcontainer.rst b/classes/zh_CN/class_tabcontainer.rst index a6776fabdb..ff6107ccab 100644 --- a/classes/zh_CN/class_tabcontainer.rst +++ b/classes/zh_CN/class_tabcontainer.rst @@ -10,14 +10,14 @@ TabContainer ============ -**Inherits:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 会为每个子控件创建一个选项卡的容器,只会显示活动选项卡对应的控件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 以选项卡视图排列子控件,为每个子控件创建一个选项卡。活动选项卡对应的控件可见,其他子控件都会被隐藏。非控件子节点会被忽略。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,6 +49,8 @@ Properties +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`AlignmentMode` | :ref:`tab_alignment` | ``0`` | +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`FocusMode` | :ref:`tab_focus_mode` | ``2`` | + +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`tabs_rearrange_group` | ``-1`` | +-------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`tabs_visible` | ``true`` | @@ -58,8 +60,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -71,6 +73,8 @@ Methods +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_previous_tab` **(** **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TabBar` | :ref:`get_tab_bar` **(** **)** |const| | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`get_tab_button_icon` **(** :ref:`int` tab_idx **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Control` | :ref:`get_tab_control` **(** :ref:`int` tab_idx **)** |const| | @@ -91,6 +95,10 @@ Methods +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_tab_hidden` **(** :ref:`int` tab_idx **)** |const| | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`select_next_available` **(** **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`select_previous_available` **(** **)** | + +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_popup` **(** :ref:`Node` popup **)** | +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_tab_button_icon` **(** :ref:`int` tab_idx, :ref:`Texture2D` icon **)** | @@ -108,8 +116,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -157,6 +165,8 @@ Theme Properties +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`tab_disabled` | | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`StyleBox` | :ref:`tab_focus` | | + +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`tab_hovered` | | +-----------------------------------+------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`StyleBox` | :ref:`tab_selected` | | @@ -172,8 +182,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_TabContainer_signal_active_tab_rearranged: @@ -253,7 +263,7 @@ Signals **tab_selected** **(** :ref:`int` tab **)** -选择选项卡时发出,即使它是当前选项卡。 +通过点击、定向输入、或脚本选中某个选项卡时发出,即便该选项卡本来就是当前选项卡。 .. rst-class:: classref-section-separator @@ -261,8 +271,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TabContainer_property_all_tabs_in_front: @@ -349,6 +359,23 @@ Property Descriptions ---- +.. _class_TabContainer_property_tab_focus_mode: + +.. rst-class:: classref-property + +:ref:`FocusMode` **tab_focus_mode** = ``2`` + +.. rst-class:: classref-property-setget + +- void **set_tab_focus_mode** **(** :ref:`FocusMode` value **)** +- :ref:`FocusMode` **get_tab_focus_mode** **(** **)** + +内部 :ref:`TabBar` 节点的焦点访问模式。 + +.. rst-class:: classref-item-separator + +---- + .. _class_TabContainer_property_tabs_rearrange_group: .. rst-class:: classref-property @@ -404,8 +431,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TabContainer_method_get_current_tab_control: @@ -445,6 +472,20 @@ Method Descriptions ---- +.. _class_TabContainer_method_get_tab_bar: + +.. rst-class:: classref-method + +:ref:`TabBar` **get_tab_bar** **(** **)** |const| + +返回这个容器中包含的 :ref:`TabBar`\ 。 + +\ **警告:**\ 这是一个必需的内部节点,对其进行移除和释放或者编辑其中的选项卡可能会导致崩溃。如果你想编辑选项卡,请使用 **TabContainer** 提供的方法。 + +.. rst-class:: classref-item-separator + +---- + .. _class_TabContainer_method_get_tab_button_icon: .. rst-class:: classref-method @@ -565,6 +606,30 @@ Method Descriptions ---- +.. _class_TabContainer_method_select_next_available: + +.. rst-class:: classref-method + +:ref:`bool` **select_next_available** **(** **)** + +选择索引大于当前所选选项卡索引的第一个可用选项卡。如果选项卡选择发生改变,则返回 ``true``\ 。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_TabContainer_method_select_previous_available: + +.. rst-class:: classref-method + +:ref:`bool` **select_previous_available** **(** **)** + +选择索引低于当前所选选项卡索引的第一个可用选项卡。如果选项卡选择发生改变,则返回 ``true``\ 。 + +.. rst-class:: classref-item-separator + +---- + .. _class_TabContainer_method_set_popup: .. rst-class:: classref-method @@ -651,8 +716,8 @@ void **set_tab_title** **(** :ref:`int` tab_idx, :ref:`String` **tab_focus** + +该 :ref:`TabBar` 处于聚焦状态时使用的 :ref:`StyleBox`\ 。\ :ref:`tab_focus` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,所以应该使用部分透明的 :ref:`StyleBox`\ ,确保基础 :ref:`StyleBox` 仍然可见。代表轮廓或下划线的 :ref:`StyleBox` 可以很好地实现这个目的。要禁用聚焦的视觉效果,请指定 :ref:`StyleBoxEmpty` 资源。请注意,禁用聚焦的视觉效果会影响使用键盘/手柄进行导航的可用性,所以出于可访问性的原因,不建议这样做。 + +.. rst-class:: classref-item-separator + +---- + .. _class_TabContainer_theme_style_tab_hovered: .. rst-class:: classref-themeproperty @@ -918,6 +995,8 @@ Theme Property Descriptions 当前悬停的选项卡的样式。 +\ **注意:**\ 该样式将至少以与 :ref:`tab_unselected` 相同的宽度绘制。 + .. rst-class:: classref-item-separator ---- @@ -954,10 +1033,10 @@ Theme Property Descriptions :ref:`TabBar` 区域的背景填充样式。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_tcpserver.rst b/classes/zh_CN/class_tcpserver.rst index 3bdf6a691c..b0b9071d9a 100644 --- a/classes/zh_CN/class_tcpserver.rst +++ b/classes/zh_CN/class_tcpserver.rst @@ -10,14 +10,14 @@ TCPServer ========= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` TCP 服务器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- TCP 服务器。监听端口上的连接,并在获得传入连接时返回 :ref:`StreamPeerTCP`\ 。 @@ -25,8 +25,8 @@ TCP 服务器。监听端口上的连接,并在获得传入连接时返回 :re .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -51,8 +51,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TCPServer_method_get_local_port: @@ -128,10 +128,10 @@ void **stop** **(** **)** 如果连接可用,则返回带有该连接的 StreamPeerTCP。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_textedit.rst b/classes/zh_CN/class_textedit.rst index 9da8139f59..f038af169b 100644 --- a/classes/zh_CN/class_textedit.rst +++ b/classes/zh_CN/class_textedit.rst @@ -10,16 +10,16 @@ TextEdit ======== -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`CodeEdit` +**派生:** :ref:`CodeEdit` 多行文本编辑器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 多行文本编辑器。它还有少量用于编辑代码的功能,例如语法高亮支持。更多针对编辑代码的高阶功能见 :ref:`CodeEdit`\ 。 @@ -29,8 +29,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -117,24 +117,24 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_backspace` **(** :ref:`int` caret_index **)** |virtual| | + | void | :ref:`_backspace` **(** :ref:`int` caret_index **)** |virtual| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_copy` **(** :ref:`int` caret_index **)** |virtual| | + | void | :ref:`_copy` **(** :ref:`int` caret_index **)** |virtual| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_cut` **(** :ref:`int` caret_index **)** |virtual| | + | void | :ref:`_cut` **(** :ref:`int` caret_index **)** |virtual| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_handle_unicode_input` **(** :ref:`int` unicode_char, :ref:`int` caret_index **)** |virtual| | + | void | :ref:`_handle_unicode_input` **(** :ref:`int` unicode_char, :ref:`int` caret_index **)** |virtual| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_paste` **(** :ref:`int` caret_index **)** |virtual| | + | void | :ref:`_paste` **(** :ref:`int` caret_index **)** |virtual| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_paste_primary_clipboard` **(** :ref:`int` caret_index **)** |virtual| | + | void | :ref:`_paste_primary_clipboard` **(** :ref:`int` caret_index **)** |virtual| | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`add_caret` **(** :ref:`int` line, :ref:`int` col **)** | +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -405,8 +405,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -465,8 +465,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_TextEdit_signal_caret_changed: @@ -522,9 +522,9 @@ Signals **lines_edited_from** **(** :ref:`int` from_line, :ref:`int` to_line **)** -Emitted immediately when the text changes. +文本改变时立即发出。 -When text is added ``from_line`` will be less than ``to_line``. On a remove ``to_line`` will be less than ``from_line``. +添加文本时 ``from_line`` 小于 ``to_line``\ 。移除文本时 ``to_line`` 小于 ``from_line``\ 。 .. rst-class:: classref-item-separator @@ -556,8 +556,8 @@ When text is added ``from_line`` will be less than ``to_line``. On a remove ``to .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_TextEdit_MenuItems: @@ -1031,8 +1031,8 @@ enum **GutterType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TextEdit_property_autowrap_mode: @@ -1673,10 +1673,10 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_TextEdit_method__backspace: +.. _class_TextEdit_private_method__backspace: .. rst-class:: classref-method @@ -1688,7 +1688,7 @@ void **_backspace** **(** :ref:`int` caret_index **)** |virtual| ---- -.. _class_TextEdit_method__copy: +.. _class_TextEdit_private_method__copy: .. rst-class:: classref-method @@ -1700,7 +1700,7 @@ void **_copy** **(** :ref:`int` caret_index **)** |virtual| ---- -.. _class_TextEdit_method__cut: +.. _class_TextEdit_private_method__cut: .. rst-class:: classref-method @@ -1712,7 +1712,7 @@ void **_cut** **(** :ref:`int` caret_index **)** |virtual| ---- -.. _class_TextEdit_method__handle_unicode_input: +.. _class_TextEdit_private_method__handle_unicode_input: .. rst-class:: classref-method @@ -1724,7 +1724,7 @@ void **_handle_unicode_input** **(** :ref:`int` unicode_char, :ref:`i ---- -.. _class_TextEdit_method__paste: +.. _class_TextEdit_private_method__paste: .. rst-class:: classref-method @@ -1736,7 +1736,7 @@ void **_paste** **(** :ref:`int` caret_index **)** |virtual| ---- -.. _class_TextEdit_method__paste_primary_clipboard: +.. _class_TextEdit_private_method__paste_primary_clipboard: .. rst-class:: classref-method @@ -1828,7 +1828,7 @@ void **adjust_viewport_to_caret** **(** :ref:`int` caret_index=0 **)* void **backspace** **(** :ref:`int` caret_index=-1 **)** -用户按下退格键时调用。可以用 :ref:`_backspace` 覆盖。 +用户按下退格键时调用。可以用 :ref:`_backspace` 覆盖。 .. rst-class:: classref-item-separator @@ -1888,7 +1888,7 @@ void **clear_undo_history** **(** **)** void **copy** **(** :ref:`int` caret_index=-1 **)** -复制当前选区。可以使用 :ref:`_copy` 覆盖。 +复制当前选区。可以使用 :ref:`_copy` 覆盖。 .. rst-class:: classref-item-separator @@ -1900,7 +1900,7 @@ void **copy** **(** :ref:`int` caret_index=-1 **)** void **cut** **(** :ref:`int` caret_index=-1 **)** -剪切当前选区。可以使用 :ref:`_cut` 覆盖。 +剪切当前选区。可以使用 :ref:`_cut` 覆盖。 .. rst-class:: classref-item-separator @@ -2927,7 +2927,7 @@ void **merge_overlapping_carets** **(** **)** void **paste** **(** :ref:`int` caret_index=-1 **)** -粘贴到当前位置。可以用 :ref:`_paste` 覆盖。 +粘贴到当前位置。可以用 :ref:`_paste` 覆盖。 .. rst-class:: classref-item-separator @@ -3448,8 +3448,8 @@ void **undo** **(** **)** .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_TextEdit_theme_color_background_color: @@ -3699,7 +3699,7 @@ Theme Property Descriptions :ref:`StyleBox` **focus** -设置当获得焦点时的 :ref:`StyleBox`\ 。该 ``focus`` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,因此应使用部分透明的 :ref:`StyleBox` 以确保基础 :ref:`StyleBox` 保持可见。表示轮廓或下划线的 :ref:`StyleBox` 非常适合此目的。要禁用焦点视觉效果,请指定一个 :ref:`StyleBoxEmpty` 资源。请注意,禁用焦点视觉效果会破坏键盘 / 控制器导航的可用性,出于可访问性原因,不建议这样做。 +设置当获得焦点时的 :ref:`StyleBox`\ 。该 :ref:`focus` :ref:`StyleBox` 显示在基础 :ref:`StyleBox` *之上*\ ,因此应使用部分透明的 :ref:`StyleBox` 以确保基础 :ref:`StyleBox` 保持可见。表示轮廓或下划线的 :ref:`StyleBox` 非常适合此目的。要禁用焦点视觉效果,请指定一个 :ref:`StyleBoxEmpty` 资源。请注意,禁用焦点视觉效果会破坏键盘 / 控制器导航的可用性,出于可访问性原因,不建议这样做。 .. rst-class:: classref-item-separator @@ -3725,10 +3725,10 @@ Theme Property Descriptions 设置这个 **TextEdit** 在禁用 :ref:`editable` 时的 :ref:`StyleBox`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_textline.rst b/classes/zh_CN/class_textline.rst index 7a1e649d76..64898936a1 100644 --- a/classes/zh_CN/class_textline.rst +++ b/classes/zh_CN/class_textline.rst @@ -10,21 +10,21 @@ TextLine ======== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 存放一行文本。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 基于 :ref:`TextServer` 的抽象,用于处理单行文本。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -99,8 +99,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TextLine_property_alignment: @@ -240,8 +240,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TextLine_method_add_object: @@ -457,10 +457,10 @@ void **tab_align** **(** :ref:`PackedFloat32Array` tab 将文本与给定的制表位对齐。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_textmesh.rst b/classes/zh_CN/class_textmesh.rst index 92559d3b15..2578ea9c79 100644 --- a/classes/zh_CN/class_textmesh.rst +++ b/classes/zh_CN/class_textmesh.rst @@ -10,14 +10,14 @@ TextMesh ======== -**Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 从文本生成 :ref:`PrimitiveMesh`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 根据文本生成 :ref:`PrimitiveMesh`\ 。 @@ -27,15 +27,15 @@ UV 布局由 4 个横条组成,从上到下依次为:正面占 40% 高度, .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`3D text <../tutorials/3d/3d_text>` +- :doc:`3D 文本 <../tutorials/3d/3d_text>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -84,8 +84,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TextMesh_property_autowrap_mode: @@ -389,10 +389,10 @@ Property Descriptions 文本宽度(单位为像素),用于填充对齐。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_textparagraph.rst b/classes/zh_CN/class_textparagraph.rst index 57670363d0..cb30f7338e 100644 --- a/classes/zh_CN/class_textparagraph.rst +++ b/classes/zh_CN/class_textparagraph.rst @@ -10,21 +10,21 @@ TextParagraph ============= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 持有一个文本段落。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 对 :ref:`TextServer` 的抽象,用于处理单个文本段落。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -133,8 +133,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TextParagraph_property_alignment: @@ -325,8 +325,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TextParagraph_method_add_object: @@ -710,10 +710,10 @@ void **tab_align** **(** :ref:`PackedFloat32Array` tab 将段落与给定的制表位对齐。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_textserver.rst b/classes/zh_CN/class_textserver.rst index 37663581a1..93d7c2a827 100644 --- a/classes/zh_CN/class_textserver.rst +++ b/classes/zh_CN/class_textserver.rst @@ -10,23 +10,23 @@ TextServer ========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`TextServerExtension` +**派生:** :ref:`TextServerExtension` 字体管理和文本渲染的服务器接口。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **TextServer** 是用于管理字体和渲染文本的 API 后端。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -34,6 +34,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`create_font` **(** **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`create_font_linked_variation` **(** :ref:`RID` font_rid **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`create_shaped_text` **(** :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`draw_hex_code_box` **(** :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |const| | @@ -66,6 +68,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`font_get_fixed_size` **(** :ref:`RID` font_rid **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FixedSizeScaleMode` | :ref:`font_get_fixed_size_scale_mode` **(** :ref:`RID` font_rid **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`font_get_generate_mipmaps` **(** :ref:`RID` font_rid **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_global_oversampling` **(** **)** |const| | @@ -192,6 +196,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_set_fixed_size` **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`font_set_fixed_size_scale_mode` **(** :ref:`RID` font_rid, :ref:`FixedSizeScaleMode` fixed_size_scale_mode **)** | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_set_force_autohinter` **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`font_set_generate_mipmaps` **(** :ref:`RID` font_rid, :ref:`bool` generate_mipmaps **)** | @@ -439,8 +445,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_TextServer_FontAntialiasing: @@ -1454,9 +1460,7 @@ URI 的 BiDi 覆盖。 :ref:`StructuredTextParser` **STRUCTURED_TEXT_LIST** = ``4`` -列表的 BiDi 覆盖。 - -结构化文本选项:列表分隔符 ``String``\ 。 +列表的 BiDi 覆盖。结构化文本选项:列表分隔符 :ref:`String`\ 。 .. _class_TextServer_constant_STRUCTURED_TEXT_GDSCRIPT: @@ -1474,14 +1478,48 @@ GDScript 的 BiDi 覆盖。 用户定义的结构化文本 BiDi 覆盖函数。 +.. rst-class:: classref-item-separator + +---- + +.. _enum_TextServer_FixedSizeScaleMode: + +.. rst-class:: classref-enumeration + +enum **FixedSizeScaleMode**: + +.. _class_TextServer_constant_FIXED_SIZE_SCALE_DISABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`FixedSizeScaleMode` **FIXED_SIZE_SCALE_DISABLE** = ``0`` + +位图字体未被缩放。 + +.. _class_TextServer_constant_FIXED_SIZE_SCALE_INTEGER_ONLY: + +.. rst-class:: classref-enumeration-constant + +:ref:`FixedSizeScaleMode` **FIXED_SIZE_SCALE_INTEGER_ONLY** = ``1`` + +位图字体被缩放至字体固定大小的最接近整数倍。这是像素艺术字体的推荐选项。 + +.. _class_TextServer_constant_FIXED_SIZE_SCALE_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`FixedSizeScaleMode` **FIXED_SIZE_SCALE_ENABLED** = ``2`` + +位图字体被缩放为任意(分数)大小。这是非像素艺术字体的推荐选项。 + .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TextServer_method_create_font: @@ -1495,6 +1533,18 @@ Method Descriptions ---- +.. _class_TextServer_method_create_font_linked_variation: + +.. rst-class:: classref-method + +:ref:`RID` **create_font_linked_variation** **(** :ref:`RID` font_rid **)** + +创建一个新的已有的字体变体,该字体重用相同的字形缓存和字体数据。要释放生成的资源,请使用 :ref:`free_rid` 方法。 + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_create_shaped_text: .. rst-class:: classref-method @@ -1703,6 +1753,18 @@ void **font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RID ---- +.. _class_TextServer_method_font_get_fixed_size_scale_mode: + +.. rst-class:: classref-method + +:ref:`FixedSizeScaleMode` **font_get_fixed_size_scale_mode** **(** :ref:`RID` font_rid **)** |const| + +返回位图字体的缩放模式。 + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_get_generate_mipmaps: .. rst-class:: classref-method @@ -1747,7 +1809,7 @@ void **font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RID :ref:`Dictionary` **font_get_glyph_contours** **(** :ref:`RID` font, :ref:`int` size, :ref:`int` index **)** |const| -将字形的轮廓线轮廓返回为具有以下内容的一个 ``Dictionary``\ : +将字形的轮廓线轮廓返回为具有以下内容的 :ref:`Dictionary`\ : \ ``points`` - :ref:`PackedVector3Array`\ ,包含轮廓点。\ ``x`` 和 ``y`` 是点坐标。\ ``z`` 是点的类型,使用 :ref:`ContourPointTag` 值。 @@ -1765,7 +1827,7 @@ void **font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RID :ref:`int` **font_get_glyph_index** **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |const| -Returns the glyph index of a ``char``, optionally modified by the ``variation_selector``. See :ref:`font_get_char_from_glyph_index`. +返回 ``char`` 的字形索引,可以选择由 ``variation_selector`` 进行修改。见 :ref:`font_get_char_from_glyph_index`\ 。 .. rst-class:: classref-item-separator @@ -2033,7 +2095,7 @@ Returns the glyph index of a ``char``, optionally modified by the ``variation_se :ref:`Vector2i[]` **font_get_size_cache_list** **(** :ref:`RID` font_rid **)** |const| -返回缓存中字体大小的列表。每个大小都是由字体大小和轮廓大小组成的 ``Vector2i``\ 。 +返回缓存中字体大小的列表。每个大小都是由字体大小和轮廓大小组成的 :ref:`Vector2i`\ 。 .. rst-class:: classref-item-separator @@ -2045,7 +2107,7 @@ Returns the glyph index of a ``char``, optionally modified by the ``variation_se :ref:`int` **font_get_spacing** **(** :ref:`RID` font_rid, :ref:`SpacingType` spacing **)** |const| -Returns the spacing for ``spacing`` (see :ref:`SpacingType`) in pixels (not relative to the font size). +返回 ``spacing``\ (见 :ref:`SpacingType`\ )的间距,单位为像素(与字体大小无关)。 .. rst-class:: classref-item-separator @@ -2475,6 +2537,18 @@ void **font_set_fixed_size** **(** :ref:`RID` font_rid, :ref:`int` font_rid, :ref:`FixedSizeScaleMode` fixed_size_scale_mode **)** + +设置位图字体缩放模式。仅当 ``fixed_size`` 大于零时才使用该属性。 + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_set_force_autohinter: .. rst-class:: classref-method @@ -2715,7 +2789,7 @@ void **font_set_script_support_override** **(** :ref:`RID` font_rid, void **font_set_spacing** **(** :ref:`RID` font_rid, :ref:`SpacingType` spacing, :ref:`int` value **)** -Sets the spacing for ``spacing`` (see :ref:`SpacingType`) to ``value`` in pixels (not relative to the font size). +将 ``spacing`` 的间距(见 :ref:`SpacingType`\ )设置为 ``value``\ ,单位为像素(与字体大小无关)。 .. rst-class:: classref-item-separator @@ -3205,7 +3279,7 @@ void **shaped_text_clear** **(** :ref:`RID` rid **)** :ref:`int` **shaped_text_closest_character_pos** **(** :ref:`RID` shaped, :ref:`int` pos **)** |const| -Returns composite character position closest to the ``pos``. +返回距离 ``pos`` 最近的组合字符位置。 .. rst-class:: classref-item-separator @@ -3279,7 +3353,7 @@ void **shaped_text_draw_outline** **(** :ref:`RID` shaped, :ref:`RID< :ref:`PackedInt32Array` **shaped_text_get_character_breaks** **(** :ref:`RID` shaped **)** |const| -Returns array of the composite character boundaries. +返回组合字符边界的数组。 .. rst-class:: classref-item-separator @@ -3631,7 +3705,7 @@ Returns array of the composite character boundaries. :ref:`bool` **shaped_text_has_visible_chars** **(** :ref:`RID` shaped **)** |const| -Returns ``true`` if text buffer contains any visible characters. +如果文本缓冲区存在可显示字符,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -3691,7 +3765,7 @@ Returns ``true`` if text buffer contains any visible characters. :ref:`int` **shaped_text_next_grapheme_pos** **(** :ref:`RID` shaped, :ref:`int` pos **)** |const| -Returns grapheme end position closest to the ``pos``. +返回距离 ``pos`` 最近的字素结束位置。 .. rst-class:: classref-item-separator @@ -3727,7 +3801,7 @@ void **shaped_text_overrun_trim_to_width** **(** :ref:`RID` shaped, : :ref:`int` **shaped_text_prev_grapheme_pos** **(** :ref:`RID` shaped, :ref:`int` pos **)** |const| -Returns grapheme start position closest to the ``pos``. +返回距离 ``pos`` 最近的字素开始位置。 .. rst-class:: classref-item-separator @@ -3905,12 +3979,12 @@ void **shaped_text_set_spacing** **(** :ref:`RID` shaped, :ref:`Spaci :ref:`PackedInt32Array` **string_get_character_breaks** **(** :ref:`String` string, :ref:`String` language="" **)** |const| -Returns array of the composite character boundaries. +返回组合字符边界的数组。 :: var ts = TextServerManager.get_primary_interface() - print(ts.string_get_word_breaks("Test ❤️‍🔥 Test")) # Prints [1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14] + print(ts.string_get_word_breaks("Test ❤️‍🔥 Test")) # 输出 [1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14] .. rst-class:: classref-item-separator @@ -3990,10 +4064,10 @@ Returns array of the composite character boundaries. 将 OpenType 标签转换为可读的特性、变体、文字或语言的名称。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_textserveradvanced.rst b/classes/zh_CN/class_textserveradvanced.rst index 81ee786e4c..b6bc8ed42e 100644 --- a/classes/zh_CN/class_textserveradvanced.rst +++ b/classes/zh_CN/class_textserveradvanced.rst @@ -10,21 +10,21 @@ TextServerAdvanced ================== -**Inherits:** :ref:`TextServerExtension` **<** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`TextServerExtension` **<** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` 高阶文本服务器,使用 HarfBuzz、ICU 和 SIL Graphite 来支持 BiDi、复杂排版和上下文 OpenType 特性。Godot 默认使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`TextServer` 的一种实现,使用 HarfBuzz、ICU 和 SIL Graphite 来支持 BiDi、复杂排版和上下文 OpenType 特性。这是 Godot 的默认主 :ref:`TextServer` 接口。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_textserverdummy.rst b/classes/zh_CN/class_textserverdummy.rst index ce0de09610..dfa6bd3610 100644 --- a/classes/zh_CN/class_textserverdummy.rst +++ b/classes/zh_CN/class_textserverdummy.rst @@ -10,14 +10,14 @@ TextServerDummy =============== -**Inherits:** :ref:`TextServerExtension` **<** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`TextServerExtension` **<** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` 虚设的文本服务器,无法渲染文本或管理字体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 虚设的 :ref:`TextServer` 接口,不做任何事情。可以在不需要渲染文本时释放内存,因为文本服务器极其消耗资源。也可以用来比较复杂 GUI 的性能,检查文本渲染带来的影响。 @@ -36,10 +36,10 @@ Description 可以使用命令行参数 ``--text-driver Dummy``\ (大小写敏感)来强制项目使用“Dummy(虚设)”\ :ref:`TextServer`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_textserverextension.rst b/classes/zh_CN/class_textserverextension.rst index b5cd36e630..85b4fc2052 100644 --- a/classes/zh_CN/class_textserverextension.rst +++ b/classes/zh_CN/class_textserverextension.rst @@ -10,434 +10,440 @@ TextServerExtension =================== -**Inherits:** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`TextServerAdvanced`, :ref:`TextServerDummy`, :ref:`TextServerFallback` +**派生:** :ref:`TextServerAdvanced`, :ref:`TextServerDummy`, :ref:`TextServerFallback` 自定义 :ref:`TextServer` 实现(插件)的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 外部的 :ref:`TextServer` 实现应该继承这个类。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_cleanup` **(** **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_create_font` **(** **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_create_shaped_text` **(** :ref:`Direction` direction, :ref:`Orientation` orientation **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw_hex_code_box` **(** :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_clear_glyphs` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_clear_kerning_map` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_clear_size_cache` **(** :ref:`RID` font_rid **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_clear_textures` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_draw_glyph` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_draw_glyph_outline` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`int` outline_size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FontAntialiasing` | :ref:`_font_get_antialiasing` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_font_get_ascent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_font_get_char_from_glyph_index` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph_index **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_font_get_descent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_font_get_embolden` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_font_get_face_count` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_font_get_face_index` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_font_get_fixed_size` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_font_get_generate_mipmaps` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_font_get_global_oversampling` **(** **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_font_get_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_font_get_glyph_contours` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` index **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_font_get_glyph_index` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`_font_get_glyph_list` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_font_get_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_font_get_glyph_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_font_get_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_font_get_glyph_texture_rid` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_font_get_glyph_texture_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2` | :ref:`_font_get_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Hinting` | :ref:`_font_get_hinting` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_font_get_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i[]` | :ref:`_font_get_kerning_list` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_font_get_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_font_get_language_support_overrides` **(** :ref:`RID` font_rid **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_font_get_msdf_pixel_range` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_font_get_msdf_size` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_font_get_name` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_font_get_opentype_feature_overrides` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_font_get_ot_name_strings` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_font_get_oversampling` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_font_get_scale` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_font_get_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_font_get_script_support_overrides` **(** :ref:`RID` font_rid **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i[]` | :ref:`_font_get_size_cache_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_font_get_spacing` **(** :ref:`RID` font_rid, :ref:`SpacingType` spacing **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_font_get_stretch` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |bitfield|\<:ref:`FontStyle`\> | :ref:`_font_get_style` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_font_get_style_name` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SubpixelPositioning` | :ref:`_font_get_subpixel_positioning` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_font_get_supported_chars` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_font_get_texture_count` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`_font_get_texture_image` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`_font_get_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`_font_get_transform` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_font_get_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_font_get_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_font_get_variation_coordinates` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_font_get_weight` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_font_has_char` **(** :ref:`RID` font_rid, :ref:`int` char **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_font_is_allow_system_fallback` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_font_is_force_autohinter` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_font_is_language_supported` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_font_is_multichannel_signed_distance_field` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_font_is_script_supported` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_remove_glyph` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_remove_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_remove_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_remove_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_remove_size_cache` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_remove_texture` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_render_glyph` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` index **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_render_range` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_allow_system_fallback` **(** :ref:`RID` font_rid, :ref:`bool` allow_system_fallback **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_antialiasing` **(** :ref:`RID` font_rid, :ref:`FontAntialiasing` antialiasing **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_ascent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` ascent **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_data` **(** :ref:`RID` font_rid, :ref:`PackedByteArray` data **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_data_ptr` **(** :ref:`RID` font_rid, const uint8_t* data_ptr, :ref:`int` data_size **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_descent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` descent **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_embolden` **(** :ref:`RID` font_rid, :ref:`float` strength **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_face_index` **(** :ref:`RID` font_rid, :ref:`int` face_index **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_fixed_size` **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_force_autohinter` **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_generate_mipmaps` **(** :ref:`RID` font_rid, :ref:`bool` generate_mipmaps **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_global_oversampling` **(** :ref:`float` oversampling **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_glyph_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_hinting` **(** :ref:`RID` font_rid, :ref:`Hinting` hinting **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language, :ref:`bool` supported **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_msdf_pixel_range` **(** :ref:`RID` font_rid, :ref:`int` msdf_pixel_range **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_msdf_size` **(** :ref:`RID` font_rid, :ref:`int` msdf_size **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_multichannel_signed_distance_field` **(** :ref:`RID` font_rid, :ref:`bool` msdf **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_name` **(** :ref:`RID` font_rid, :ref:`String` name **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_opentype_feature_overrides` **(** :ref:`RID` font_rid, :ref:`Dictionary` overrides **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_oversampling` **(** :ref:`RID` font_rid, :ref:`float` oversampling **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_scale` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` scale **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script, :ref:`bool` supported **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_spacing` **(** :ref:`RID` font_rid, :ref:`SpacingType` spacing, :ref:`int` value **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_stretch` **(** :ref:`RID` font_rid, :ref:`int` stretch **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_style` **(** :ref:`RID` font_rid, |bitfield|\<:ref:`FontStyle`\> style **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_style_name` **(** :ref:`RID` font_rid, :ref:`String` name_style **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_subpixel_positioning` **(** :ref:`RID` font_rid, :ref:`SubpixelPositioning` subpixel_positioning **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_texture_image` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_transform` **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_thickness **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_variation_coordinates` **(** :ref:`RID` font_rid, :ref:`Dictionary` variation_coordinates **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_font_set_weight` **(** :ref:`RID` font_rid, :ref:`int` weight **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_font_supported_feature_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_font_supported_variation_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_format_number` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_features` **(** **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_hex_code_box_size` **(** :ref:`int` size, :ref:`int` index **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_support_data_filename` **(** **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_support_data_info` **(** **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has` **(** :ref:`RID` rid **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_feature` **(** :ref:`Feature` feature **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_is_confusable` **(** :ref:`String` string, :ref:`PackedStringArray` dict **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_locale_right_to_left` **(** :ref:`String` locale **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_valid_identifier` **(** :ref:`String` string **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_load_support_data` **(** :ref:`String` filename **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_name_to_tag` **(** :ref:`String` name **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_parse_number` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i[]` | :ref:`_parse_structured_text` **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_percent_sign` **(** :ref:`String` language **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_save_support_data` **(** :ref:`String` filename **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_shaped_get_span_count` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_shaped_get_span_meta` **(** :ref:`RID` shaped, :ref:`int` index **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_set_span_update_font` **(** :ref:`RID` shaped, :ref:`int` index, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_shaped_text_add_object` **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align, :ref:`int` length, :ref:`float` baseline **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_shaped_text_add_string` **(** :ref:`RID` shaped, :ref:`String` text, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features, :ref:`String` language, :ref:`Variant` meta **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_clear` **(** :ref:`RID` shaped **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_shaped_text_closest_character_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_draw` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`Color` color **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_draw_outline` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`int` outline_size, :ref:`Color` color **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_shaped_text_fit_to_width` **(** :ref:`RID` shaped, :ref:`float` width, |bitfield|\<:ref:`JustificationFlag`\> justification_flags **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_shaped_text_get_ascent` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_get_carets` **(** :ref:`RID` shaped, :ref:`int` position, CaretInfo* caret **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`_shaped_text_get_character_breaks` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_shaped_text_get_custom_punctuation` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_shaped_text_get_descent` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Direction` | :ref:`_shaped_text_get_direction` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_shaped_text_get_dominant_direction_in_range` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_shaped_text_get_ellipsis_glyph_count` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | const Glyph* | :ref:`_shaped_text_get_ellipsis_glyphs` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_shaped_text_get_ellipsis_pos` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_shaped_text_get_glyph_count` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | const Glyph* | :ref:`_shaped_text_get_glyphs` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_shaped_text_get_grapheme_bounds` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Direction` | :ref:`_shaped_text_get_inferred_direction` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`_shaped_text_get_line_breaks` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` start, |bitfield|\<:ref:`LineBreakFlag`\> break_flags **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`_shaped_text_get_line_breaks_adv` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` width, :ref:`int` start, :ref:`bool` once, |bitfield|\<:ref:`LineBreakFlag`\> break_flags **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2` | :ref:`_shaped_text_get_object_rect` **(** :ref:`RID` shaped, :ref:`Variant` key **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array` | :ref:`_shaped_text_get_objects` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Orientation` | :ref:`_shaped_text_get_orientation` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_shaped_text_get_parent` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_shaped_text_get_preserve_control` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_shaped_text_get_preserve_invalid` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`_shaped_text_get_range` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`_shaped_text_get_selection` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_shaped_text_get_size` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_shaped_text_get_spacing` **(** :ref:`RID` shaped, :ref:`SpacingType` spacing **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_shaped_text_get_trim_pos` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_shaped_text_get_underline_position` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_shaped_text_get_underline_thickness` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_shaped_text_get_width` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`_shaped_text_get_word_breaks` **(** :ref:`RID` shaped, |bitfield|\<:ref:`GraphemeFlag`\> grapheme_flags **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_shaped_text_hit_test_grapheme` **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_shaped_text_hit_test_position` **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_shaped_text_is_ready` **(** :ref:`RID` shaped **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_shaped_text_next_character_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_shaped_text_next_grapheme_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_overrun_trim_to_width` **(** :ref:`RID` shaped, :ref:`float` width, |bitfield|\<:ref:`TextOverrunFlag`\> trim_flags **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_shaped_text_prev_character_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_shaped_text_prev_grapheme_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_shaped_text_resize_object` **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align, :ref:`float` baseline **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_set_bidi_override` **(** :ref:`RID` shaped, :ref:`Array` override **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_set_custom_punctuation` **(** :ref:`RID` shaped, :ref:`String` punct **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_set_direction` **(** :ref:`RID` shaped, :ref:`Direction` direction **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_set_orientation` **(** :ref:`RID` shaped, :ref:`Orientation` orientation **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_set_preserve_control` **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_set_preserve_invalid` **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_shaped_text_set_spacing` **(** :ref:`RID` shaped, :ref:`SpacingType` spacing, :ref:`int` value **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_shaped_text_shape` **(** :ref:`RID` shaped **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | const Glyph* | :ref:`_shaped_text_sort_logical` **(** :ref:`RID` shaped **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_shaped_text_substr` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` length **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_shaped_text_tab_align` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` tab_stops **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_shaped_text_update_breaks` **(** :ref:`RID` shaped **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_shaped_text_update_justification_ops` **(** :ref:`RID` shaped **)** |virtual| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_spoof_check` **(** :ref:`String` string **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`_string_get_character_breaks` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`_string_get_word_breaks` **(** :ref:`String` string, :ref:`String` language, :ref:`int` chars_per_line **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_string_to_lower` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_string_to_upper` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_strip_diacritics` **(** :ref:`String` string **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_tag_to_name` **(** :ref:`int` tag **)** |virtual| |const| | - +-----------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_cleanup` **(** **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_create_font` **(** **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_create_font_linked_variation` **(** :ref:`RID` font_rid **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_create_shaped_text` **(** :ref:`Direction` direction, :ref:`Orientation` orientation **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_draw_hex_code_box` **(** :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_clear_glyphs` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_clear_kerning_map` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_clear_size_cache` **(** :ref:`RID` font_rid **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_clear_textures` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_draw_glyph` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_draw_glyph_outline` **(** :ref:`RID` font_rid, :ref:`RID` canvas, :ref:`int` size, :ref:`int` outline_size, :ref:`Vector2` pos, :ref:`int` index, :ref:`Color` color **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FontAntialiasing` | :ref:`_font_get_antialiasing` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_font_get_ascent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_char_from_glyph_index` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph_index **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_font_get_descent` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_font_get_embolden` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_face_count` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_face_index` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_fixed_size` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FixedSizeScaleMode` | :ref:`_font_get_fixed_size_scale_mode` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_get_generate_mipmaps` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_font_get_global_oversampling` **(** **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_font_get_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_font_get_glyph_contours` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_glyph_index` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` char, :ref:`int` variation_selector **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_font_get_glyph_list` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_font_get_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_font_get_glyph_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_font_get_glyph_texture_rid` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_font_get_glyph_texture_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`_font_get_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Hinting` | :ref:`_font_get_hinting` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_font_get_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i[]` | :ref:`_font_get_kerning_list` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_get_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_font_get_language_support_overrides` **(** :ref:`RID` font_rid **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_msdf_pixel_range` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_msdf_size` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_font_get_name` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_font_get_opentype_feature_overrides` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_font_get_ot_name_strings` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_font_get_oversampling` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_font_get_scale` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_get_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_font_get_script_support_overrides` **(** :ref:`RID` font_rid **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i[]` | :ref:`_font_get_size_cache_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_spacing` **(** :ref:`RID` font_rid, :ref:`SpacingType` spacing **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_stretch` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\<:ref:`FontStyle`\> | :ref:`_font_get_style` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_font_get_style_name` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SubpixelPositioning` | :ref:`_font_get_subpixel_positioning` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_font_get_supported_chars` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_texture_count` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`_font_get_texture_image` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_font_get_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`_font_get_transform` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_font_get_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_font_get_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_font_get_variation_coordinates` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_weight` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_has_char` **(** :ref:`RID` font_rid, :ref:`int` char **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_is_allow_system_fallback` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_is_force_autohinter` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_is_language_supported` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_is_multichannel_signed_distance_field` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_font_is_script_supported` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_remove_glyph` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_remove_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_remove_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_remove_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_remove_size_cache` **(** :ref:`RID` font_rid, :ref:`Vector2i` size **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_remove_texture` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_render_glyph` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` index **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_render_range` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` start, :ref:`int` end **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_allow_system_fallback` **(** :ref:`RID` font_rid, :ref:`bool` allow_system_fallback **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_antialiasing` **(** :ref:`RID` font_rid, :ref:`FontAntialiasing` antialiasing **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_ascent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` ascent **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_data` **(** :ref:`RID` font_rid, :ref:`PackedByteArray` data **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_data_ptr` **(** :ref:`RID` font_rid, const uint8_t* data_ptr, :ref:`int` data_size **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_descent` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` descent **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_embolden` **(** :ref:`RID` font_rid, :ref:`float` strength **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_face_index` **(** :ref:`RID` font_rid, :ref:`int` face_index **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_fixed_size` **(** :ref:`RID` font_rid, :ref:`int` fixed_size **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_fixed_size_scale_mode` **(** :ref:`RID` font_rid, :ref:`FixedSizeScaleMode` fixed_size_scale_mode **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_force_autohinter` **(** :ref:`RID` font_rid, :ref:`bool` force_autohinter **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_generate_mipmaps` **(** :ref:`RID` font_rid, :ref:`bool` generate_mipmaps **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_global_oversampling` **(** :ref:`float` oversampling **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_glyph_advance` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`int` glyph, :ref:`Vector2` advance **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_glyph_offset` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` offset **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_glyph_size` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Vector2` gl_size **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_glyph_texture_idx` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`int` texture_idx **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_glyph_uv_rect` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` glyph, :ref:`Rect2` uv_rect **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_hinting` **(** :ref:`RID` font_rid, :ref:`Hinting` hinting **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_kerning` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`Vector2i` glyph_pair, :ref:`Vector2` kerning **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_language_support_override` **(** :ref:`RID` font_rid, :ref:`String` language, :ref:`bool` supported **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_msdf_pixel_range` **(** :ref:`RID` font_rid, :ref:`int` msdf_pixel_range **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_msdf_size` **(** :ref:`RID` font_rid, :ref:`int` msdf_size **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_multichannel_signed_distance_field` **(** :ref:`RID` font_rid, :ref:`bool` msdf **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_name` **(** :ref:`RID` font_rid, :ref:`String` name **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_opentype_feature_overrides` **(** :ref:`RID` font_rid, :ref:`Dictionary` overrides **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_oversampling` **(** :ref:`RID` font_rid, :ref:`float` oversampling **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_scale` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` scale **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_script_support_override` **(** :ref:`RID` font_rid, :ref:`String` script, :ref:`bool` supported **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_spacing` **(** :ref:`RID` font_rid, :ref:`SpacingType` spacing, :ref:`int` value **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_stretch` **(** :ref:`RID` font_rid, :ref:`int` stretch **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_style` **(** :ref:`RID` font_rid, |bitfield|\<:ref:`FontStyle`\> style **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_style_name` **(** :ref:`RID` font_rid, :ref:`String` name_style **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_subpixel_positioning` **(** :ref:`RID` font_rid, :ref:`SubpixelPositioning` subpixel_positioning **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_texture_image` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`Image` image **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_texture_offsets` **(** :ref:`RID` font_rid, :ref:`Vector2i` size, :ref:`int` texture_index, :ref:`PackedInt32Array` offset **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_transform` **(** :ref:`RID` font_rid, :ref:`Transform2D` transform **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_underline_position` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_position **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_underline_thickness` **(** :ref:`RID` font_rid, :ref:`int` size, :ref:`float` underline_thickness **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_variation_coordinates` **(** :ref:`RID` font_rid, :ref:`Dictionary` variation_coordinates **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_font_set_weight` **(** :ref:`RID` font_rid, :ref:`int` weight **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_font_supported_feature_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_font_supported_variation_list` **(** :ref:`RID` font_rid **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_format_number` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_free_rid` **(** :ref:`RID` rid **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_features` **(** **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_get_hex_code_box_size` **(** :ref:`int` size, :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_support_data_filename` **(** **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_support_data_info` **(** **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has` **(** :ref:`RID` rid **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_feature` **(** :ref:`Feature` feature **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_is_confusable` **(** :ref:`String` string, :ref:`PackedStringArray` dict **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_locale_right_to_left` **(** :ref:`String` locale **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_valid_identifier` **(** :ref:`String` string **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_load_support_data` **(** :ref:`String` filename **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_name_to_tag` **(** :ref:`String` name **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_parse_number` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i[]` | :ref:`_parse_structured_text` **(** :ref:`StructuredTextParser` parser_type, :ref:`Array` args, :ref:`String` text **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_percent_sign` **(** :ref:`String` language **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_save_support_data` **(** :ref:`String` filename **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_get_span_count` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_shaped_get_span_meta` **(** :ref:`RID` shaped, :ref:`int` index **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_set_span_update_font` **(** :ref:`RID` shaped, :ref:`int` index, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_add_object` **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align, :ref:`int` length, :ref:`float` baseline **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_add_string` **(** :ref:`RID` shaped, :ref:`String` text, :ref:`RID[]` fonts, :ref:`int` size, :ref:`Dictionary` opentype_features, :ref:`String` language, :ref:`Variant` meta **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_clear` **(** :ref:`RID` shaped **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_closest_character_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_draw` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`Color` color **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_draw_outline` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`int` outline_size, :ref:`Color` color **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shaped_text_fit_to_width` **(** :ref:`RID` shaped, :ref:`float` width, |bitfield|\<:ref:`JustificationFlag`\> justification_flags **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shaped_text_get_ascent` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_get_carets` **(** :ref:`RID` shaped, :ref:`int` position, CaretInfo* caret **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_shaped_text_get_character_breaks` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_shaped_text_get_custom_punctuation` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shaped_text_get_descent` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Direction` | :ref:`_shaped_text_get_direction` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_get_dominant_direction_in_range` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_get_ellipsis_glyph_count` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | const Glyph* | :ref:`_shaped_text_get_ellipsis_glyphs` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_get_ellipsis_pos` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_get_glyph_count` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | const Glyph* | :ref:`_shaped_text_get_glyphs` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_shaped_text_get_grapheme_bounds` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Direction` | :ref:`_shaped_text_get_inferred_direction` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_shaped_text_get_line_breaks` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`int` start, |bitfield|\<:ref:`LineBreakFlag`\> break_flags **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_shaped_text_get_line_breaks_adv` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` width, :ref:`int` start, :ref:`bool` once, |bitfield|\<:ref:`LineBreakFlag`\> break_flags **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`_shaped_text_get_object_rect` **(** :ref:`RID` shaped, :ref:`Variant` key **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`_shaped_text_get_objects` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Orientation` | :ref:`_shaped_text_get_orientation` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_shaped_text_get_parent` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_get_preserve_control` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_get_preserve_invalid` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`_shaped_text_get_range` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`_shaped_text_get_selection` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` end **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`_shaped_text_get_size` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_get_spacing` **(** :ref:`RID` shaped, :ref:`SpacingType` spacing **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_get_trim_pos` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shaped_text_get_underline_position` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shaped_text_get_underline_thickness` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shaped_text_get_width` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_shaped_text_get_word_breaks` **(** :ref:`RID` shaped, |bitfield|\<:ref:`GraphemeFlag`\> grapheme_flags **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_hit_test_grapheme` **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_hit_test_position` **(** :ref:`RID` shaped, :ref:`float` coord **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_is_ready` **(** :ref:`RID` shaped **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_next_character_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_next_grapheme_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_overrun_trim_to_width` **(** :ref:`RID` shaped, :ref:`float` width, |bitfield|\<:ref:`TextOverrunFlag`\> trim_flags **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_prev_character_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_shaped_text_prev_grapheme_pos` **(** :ref:`RID` shaped, :ref:`int` pos **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_resize_object` **(** :ref:`RID` shaped, :ref:`Variant` key, :ref:`Vector2` size, :ref:`InlineAlignment` inline_align, :ref:`float` baseline **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_set_bidi_override` **(** :ref:`RID` shaped, :ref:`Array` override **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_set_custom_punctuation` **(** :ref:`RID` shaped, :ref:`String` punct **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_set_direction` **(** :ref:`RID` shaped, :ref:`Direction` direction **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_set_orientation` **(** :ref:`RID` shaped, :ref:`Orientation` orientation **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_set_preserve_control` **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_set_preserve_invalid` **(** :ref:`RID` shaped, :ref:`bool` enabled **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_shaped_text_set_spacing` **(** :ref:`RID` shaped, :ref:`SpacingType` spacing, :ref:`int` value **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_shape` **(** :ref:`RID` shaped **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | const Glyph* | :ref:`_shaped_text_sort_logical` **(** :ref:`RID` shaped **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`_shaped_text_substr` **(** :ref:`RID` shaped, :ref:`int` start, :ref:`int` length **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_shaped_text_tab_align` **(** :ref:`RID` shaped, :ref:`PackedFloat32Array` tab_stops **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_update_breaks` **(** :ref:`RID` shaped **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_shaped_text_update_justification_ops` **(** :ref:`RID` shaped **)** |virtual| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_spoof_check` **(** :ref:`String` string **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_string_get_character_breaks` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`_string_get_word_breaks` **(** :ref:`String` string, :ref:`String` language, :ref:`int` chars_per_line **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_string_to_lower` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_string_to_upper` **(** :ref:`String` string, :ref:`String` language **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_strip_diacritics` **(** :ref:`String` string **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_tag_to_name` **(** :ref:`int` tag **)** |virtual| |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -445,10 +451,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_TextServerExtension_method__cleanup: +.. _class_TextServerExtension_private_method__cleanup: .. rst-class:: classref-method @@ -456,13 +462,13 @@ void **_cleanup** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__create_font: +.. _class_TextServerExtension_private_method__create_font: .. rst-class:: classref-method @@ -470,13 +476,27 @@ void **_cleanup** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__create_shaped_text: +.. _class_TextServerExtension_private_method__create_font_linked_variation: + +.. rst-class:: classref-method + +:ref:`RID` **_create_font_linked_variation** **(** :ref:`RID` font_rid **)** |virtual| + +.. container:: contribute + + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__create_shaped_text: .. rst-class:: classref-method @@ -484,13 +504,13 @@ void **_cleanup** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__draw_hex_code_box: +.. _class_TextServerExtension_private_method__draw_hex_code_box: .. rst-class:: classref-method @@ -498,13 +518,13 @@ void **_draw_hex_code_box** **(** :ref:`RID` canvas, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_clear_glyphs: +.. _class_TextServerExtension_private_method__font_clear_glyphs: .. rst-class:: classref-method @@ -512,13 +532,13 @@ void **_font_clear_glyphs** **(** :ref:`RID` font_rid, :ref:`Vector2i .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_clear_kerning_map: +.. _class_TextServerExtension_private_method__font_clear_kerning_map: .. rst-class:: classref-method @@ -526,13 +546,13 @@ void **_font_clear_kerning_map** **(** :ref:`RID` font_rid, :ref:`int .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_clear_size_cache: +.. _class_TextServerExtension_private_method__font_clear_size_cache: .. rst-class:: classref-method @@ -540,13 +560,13 @@ void **_font_clear_size_cache** **(** :ref:`RID` font_rid **)** |virt .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_clear_textures: +.. _class_TextServerExtension_private_method__font_clear_textures: .. rst-class:: classref-method @@ -554,13 +574,13 @@ void **_font_clear_textures** **(** :ref:`RID` font_rid, :ref:`Vector .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_draw_glyph: +.. _class_TextServerExtension_private_method__font_draw_glyph: .. rst-class:: classref-method @@ -568,13 +588,13 @@ void **_font_draw_glyph** **(** :ref:`RID` font_rid, :ref:`RID`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_draw_glyph_outline: +.. _class_TextServerExtension_private_method__font_draw_glyph_outline: .. rst-class:: classref-method @@ -582,13 +602,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_antialiasing: +.. _class_TextServerExtension_private_method__font_get_antialiasing: .. rst-class:: classref-method @@ -596,13 +616,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_ascent: +.. _class_TextServerExtension_private_method__font_get_ascent: .. rst-class:: classref-method @@ -610,13 +630,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_char_from_glyph_index: +.. _class_TextServerExtension_private_method__font_get_char_from_glyph_index: .. rst-class:: classref-method @@ -624,13 +644,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_descent: +.. _class_TextServerExtension_private_method__font_get_descent: .. rst-class:: classref-method @@ -638,13 +658,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_embolden: +.. _class_TextServerExtension_private_method__font_get_embolden: .. rst-class:: classref-method @@ -652,13 +672,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_face_count: +.. _class_TextServerExtension_private_method__font_get_face_count: .. rst-class:: classref-method @@ -666,13 +686,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_face_index: +.. _class_TextServerExtension_private_method__font_get_face_index: .. rst-class:: classref-method @@ -680,13 +700,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_fixed_size: +.. _class_TextServerExtension_private_method__font_get_fixed_size: .. rst-class:: classref-method @@ -694,13 +714,27 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_generate_mipmaps: +.. _class_TextServerExtension_private_method__font_get_fixed_size_scale_mode: + +.. rst-class:: classref-method + +:ref:`FixedSizeScaleMode` **_font_get_fixed_size_scale_mode** **(** :ref:`RID` font_rid **)** |virtual| |const| + +.. container:: contribute + + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_get_generate_mipmaps: .. rst-class:: classref-method @@ -708,13 +742,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_global_oversampling: +.. _class_TextServerExtension_private_method__font_get_global_oversampling: .. rst-class:: classref-method @@ -722,13 +756,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_advance: +.. _class_TextServerExtension_private_method__font_get_glyph_advance: .. rst-class:: classref-method @@ -736,13 +770,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_contours: +.. _class_TextServerExtension_private_method__font_get_glyph_contours: .. rst-class:: classref-method @@ -750,13 +784,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_index: +.. _class_TextServerExtension_private_method__font_get_glyph_index: .. rst-class:: classref-method @@ -764,13 +798,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_list: +.. _class_TextServerExtension_private_method__font_get_glyph_list: .. rst-class:: classref-method @@ -778,13 +812,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_offset: +.. _class_TextServerExtension_private_method__font_get_glyph_offset: .. rst-class:: classref-method @@ -792,13 +826,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_size: +.. _class_TextServerExtension_private_method__font_get_glyph_size: .. rst-class:: classref-method @@ -806,13 +840,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_texture_idx: +.. _class_TextServerExtension_private_method__font_get_glyph_texture_idx: .. rst-class:: classref-method @@ -820,13 +854,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_texture_rid: +.. _class_TextServerExtension_private_method__font_get_glyph_texture_rid: .. rst-class:: classref-method @@ -834,13 +868,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_texture_size: +.. _class_TextServerExtension_private_method__font_get_glyph_texture_size: .. rst-class:: classref-method @@ -848,13 +882,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_glyph_uv_rect: +.. _class_TextServerExtension_private_method__font_get_glyph_uv_rect: .. rst-class:: classref-method @@ -862,13 +896,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_hinting: +.. _class_TextServerExtension_private_method__font_get_hinting: .. rst-class:: classref-method @@ -876,13 +910,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_kerning: +.. _class_TextServerExtension_private_method__font_get_kerning: .. rst-class:: classref-method @@ -890,13 +924,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_kerning_list: +.. _class_TextServerExtension_private_method__font_get_kerning_list: .. rst-class:: classref-method @@ -904,13 +938,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_language_support_override: +.. _class_TextServerExtension_private_method__font_get_language_support_override: .. rst-class:: classref-method @@ -918,13 +952,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_language_support_overrides: +.. _class_TextServerExtension_private_method__font_get_language_support_overrides: .. rst-class:: classref-method @@ -932,13 +966,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_msdf_pixel_range: +.. _class_TextServerExtension_private_method__font_get_msdf_pixel_range: .. rst-class:: classref-method @@ -946,13 +980,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_msdf_size: +.. _class_TextServerExtension_private_method__font_get_msdf_size: .. rst-class:: classref-method @@ -960,13 +994,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_name: +.. _class_TextServerExtension_private_method__font_get_name: .. rst-class:: classref-method @@ -974,13 +1008,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_opentype_feature_overrides: +.. _class_TextServerExtension_private_method__font_get_opentype_feature_overrides: .. rst-class:: classref-method @@ -988,13 +1022,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_ot_name_strings: +.. _class_TextServerExtension_private_method__font_get_ot_name_strings: .. rst-class:: classref-method @@ -1002,13 +1036,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_oversampling: +.. _class_TextServerExtension_private_method__font_get_oversampling: .. rst-class:: classref-method @@ -1016,13 +1050,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_scale: +.. _class_TextServerExtension_private_method__font_get_scale: .. rst-class:: classref-method @@ -1030,13 +1064,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_script_support_override: +.. _class_TextServerExtension_private_method__font_get_script_support_override: .. rst-class:: classref-method @@ -1044,13 +1078,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_script_support_overrides: +.. _class_TextServerExtension_private_method__font_get_script_support_overrides: .. rst-class:: classref-method @@ -1058,13 +1092,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_size_cache_list: +.. _class_TextServerExtension_private_method__font_get_size_cache_list: .. rst-class:: classref-method @@ -1072,13 +1106,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_spacing: +.. _class_TextServerExtension_private_method__font_get_spacing: .. rst-class:: classref-method @@ -1086,13 +1120,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_stretch: +.. _class_TextServerExtension_private_method__font_get_stretch: .. rst-class:: classref-method @@ -1100,13 +1134,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_style: +.. _class_TextServerExtension_private_method__font_get_style: .. rst-class:: classref-method @@ -1114,13 +1148,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_style_name: +.. _class_TextServerExtension_private_method__font_get_style_name: .. rst-class:: classref-method @@ -1128,13 +1162,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_subpixel_positioning: +.. _class_TextServerExtension_private_method__font_get_subpixel_positioning: .. rst-class:: classref-method @@ -1142,13 +1176,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_supported_chars: +.. _class_TextServerExtension_private_method__font_get_supported_chars: .. rst-class:: classref-method @@ -1156,13 +1190,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_texture_count: +.. _class_TextServerExtension_private_method__font_get_texture_count: .. rst-class:: classref-method @@ -1170,13 +1204,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_texture_image: +.. _class_TextServerExtension_private_method__font_get_texture_image: .. rst-class:: classref-method @@ -1184,13 +1218,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_texture_offsets: +.. _class_TextServerExtension_private_method__font_get_texture_offsets: .. rst-class:: classref-method @@ -1198,13 +1232,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_transform: +.. _class_TextServerExtension_private_method__font_get_transform: .. rst-class:: classref-method @@ -1212,13 +1246,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_underline_position: +.. _class_TextServerExtension_private_method__font_get_underline_position: .. rst-class:: classref-method @@ -1226,13 +1260,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_underline_thickness: +.. _class_TextServerExtension_private_method__font_get_underline_thickness: .. rst-class:: classref-method @@ -1240,13 +1274,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_variation_coordinates: +.. _class_TextServerExtension_private_method__font_get_variation_coordinates: .. rst-class:: classref-method @@ -1254,13 +1288,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_get_weight: +.. _class_TextServerExtension_private_method__font_get_weight: .. rst-class:: classref-method @@ -1268,13 +1302,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_has_char: +.. _class_TextServerExtension_private_method__font_has_char: .. rst-class:: classref-method @@ -1282,13 +1316,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_is_allow_system_fallback: +.. _class_TextServerExtension_private_method__font_is_allow_system_fallback: .. rst-class:: classref-method @@ -1296,13 +1330,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_is_force_autohinter: +.. _class_TextServerExtension_private_method__font_is_force_autohinter: .. rst-class:: classref-method @@ -1310,13 +1344,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_is_language_supported: +.. _class_TextServerExtension_private_method__font_is_language_supported: .. rst-class:: classref-method @@ -1324,13 +1358,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_is_multichannel_signed_distance_field: +.. _class_TextServerExtension_private_method__font_is_multichannel_signed_distance_field: .. rst-class:: classref-method @@ -1338,13 +1372,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_is_script_supported: +.. _class_TextServerExtension_private_method__font_is_script_supported: .. rst-class:: classref-method @@ -1352,13 +1386,13 @@ void **_font_draw_glyph_outline** **(** :ref:`RID` font_rid, :ref:`RI .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_remove_glyph: +.. _class_TextServerExtension_private_method__font_remove_glyph: .. rst-class:: classref-method @@ -1366,13 +1400,13 @@ void **_font_remove_glyph** **(** :ref:`RID` font_rid, :ref:`Vector2i .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_remove_kerning: +.. _class_TextServerExtension_private_method__font_remove_kerning: .. rst-class:: classref-method @@ -1380,13 +1414,13 @@ void **_font_remove_kerning** **(** :ref:`RID` font_rid, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_remove_language_support_override: +.. _class_TextServerExtension_private_method__font_remove_language_support_override: .. rst-class:: classref-method @@ -1394,13 +1428,13 @@ void **_font_remove_language_support_override** **(** :ref:`RID` font .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_remove_script_support_override: +.. _class_TextServerExtension_private_method__font_remove_script_support_override: .. rst-class:: classref-method @@ -1408,13 +1442,13 @@ void **_font_remove_script_support_override** **(** :ref:`RID` font_r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_remove_size_cache: +.. _class_TextServerExtension_private_method__font_remove_size_cache: .. rst-class:: classref-method @@ -1422,13 +1456,13 @@ void **_font_remove_size_cache** **(** :ref:`RID` font_rid, :ref:`Vec .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_remove_texture: +.. _class_TextServerExtension_private_method__font_remove_texture: .. rst-class:: classref-method @@ -1436,13 +1470,13 @@ void **_font_remove_texture** **(** :ref:`RID` font_rid, :ref:`Vector .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_render_glyph: +.. _class_TextServerExtension_private_method__font_render_glyph: .. rst-class:: classref-method @@ -1450,13 +1484,13 @@ void **_font_render_glyph** **(** :ref:`RID` font_rid, :ref:`Vector2i .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_render_range: +.. _class_TextServerExtension_private_method__font_render_range: .. rst-class:: classref-method @@ -1464,13 +1498,13 @@ void **_font_render_range** **(** :ref:`RID` font_rid, :ref:`Vector2i .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_allow_system_fallback: +.. _class_TextServerExtension_private_method__font_set_allow_system_fallback: .. rst-class:: classref-method @@ -1478,13 +1512,13 @@ void **_font_set_allow_system_fallback** **(** :ref:`RID` font_rid, : .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_antialiasing: +.. _class_TextServerExtension_private_method__font_set_antialiasing: .. rst-class:: classref-method @@ -1492,13 +1526,13 @@ void **_font_set_antialiasing** **(** :ref:`RID` font_rid, :ref:`Font .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_ascent: +.. _class_TextServerExtension_private_method__font_set_ascent: .. rst-class:: classref-method @@ -1506,13 +1540,13 @@ void **_font_set_ascent** **(** :ref:`RID` font_rid, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_data: +.. _class_TextServerExtension_private_method__font_set_data: .. rst-class:: classref-method @@ -1520,13 +1554,13 @@ void **_font_set_data** **(** :ref:`RID` font_rid, :ref:`PackedByteAr .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_data_ptr: +.. _class_TextServerExtension_private_method__font_set_data_ptr: .. rst-class:: classref-method @@ -1534,13 +1568,13 @@ void **_font_set_data_ptr** **(** :ref:`RID` font_rid, const uint8_t* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_descent: +.. _class_TextServerExtension_private_method__font_set_descent: .. rst-class:: classref-method @@ -1548,13 +1582,13 @@ void **_font_set_descent** **(** :ref:`RID` font_rid, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_embolden: +.. _class_TextServerExtension_private_method__font_set_embolden: .. rst-class:: classref-method @@ -1562,13 +1596,13 @@ void **_font_set_embolden** **(** :ref:`RID` font_rid, :ref:`float`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_face_index: +.. _class_TextServerExtension_private_method__font_set_face_index: .. rst-class:: classref-method @@ -1576,13 +1610,13 @@ void **_font_set_face_index** **(** :ref:`RID` font_rid, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_fixed_size: +.. _class_TextServerExtension_private_method__font_set_fixed_size: .. rst-class:: classref-method @@ -1590,13 +1624,27 @@ void **_font_set_fixed_size** **(** :ref:`RID` font_rid, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_force_autohinter: +.. _class_TextServerExtension_private_method__font_set_fixed_size_scale_mode: + +.. rst-class:: classref-method + +void **_font_set_fixed_size_scale_mode** **(** :ref:`RID` font_rid, :ref:`FixedSizeScaleMode` fixed_size_scale_mode **)** |virtual| + +.. container:: contribute + + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_set_force_autohinter: .. rst-class:: classref-method @@ -1604,13 +1652,13 @@ void **_font_set_force_autohinter** **(** :ref:`RID` font_rid, :ref:` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_generate_mipmaps: +.. _class_TextServerExtension_private_method__font_set_generate_mipmaps: .. rst-class:: classref-method @@ -1618,13 +1666,13 @@ void **_font_set_generate_mipmaps** **(** :ref:`RID` font_rid, :ref:` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_global_oversampling: +.. _class_TextServerExtension_private_method__font_set_global_oversampling: .. rst-class:: classref-method @@ -1632,13 +1680,13 @@ void **_font_set_global_oversampling** **(** :ref:`float` oversampl .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_glyph_advance: +.. _class_TextServerExtension_private_method__font_set_glyph_advance: .. rst-class:: classref-method @@ -1646,13 +1694,13 @@ void **_font_set_glyph_advance** **(** :ref:`RID` font_rid, :ref:`int .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_glyph_offset: +.. _class_TextServerExtension_private_method__font_set_glyph_offset: .. rst-class:: classref-method @@ -1660,13 +1708,13 @@ void **_font_set_glyph_offset** **(** :ref:`RID` font_rid, :ref:`Vect .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_glyph_size: +.. _class_TextServerExtension_private_method__font_set_glyph_size: .. rst-class:: classref-method @@ -1674,13 +1722,13 @@ void **_font_set_glyph_size** **(** :ref:`RID` font_rid, :ref:`Vector .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_glyph_texture_idx: +.. _class_TextServerExtension_private_method__font_set_glyph_texture_idx: .. rst-class:: classref-method @@ -1688,13 +1736,13 @@ void **_font_set_glyph_texture_idx** **(** :ref:`RID` font_rid, :ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_glyph_uv_rect: +.. _class_TextServerExtension_private_method__font_set_glyph_uv_rect: .. rst-class:: classref-method @@ -1702,13 +1750,13 @@ void **_font_set_glyph_uv_rect** **(** :ref:`RID` font_rid, :ref:`Vec .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_hinting: +.. _class_TextServerExtension_private_method__font_set_hinting: .. rst-class:: classref-method @@ -1716,13 +1764,13 @@ void **_font_set_hinting** **(** :ref:`RID` font_rid, :ref:`Hinting`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_kerning: +.. _class_TextServerExtension_private_method__font_set_kerning: .. rst-class:: classref-method @@ -1730,13 +1778,13 @@ void **_font_set_kerning** **(** :ref:`RID` font_rid, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_language_support_override: +.. _class_TextServerExtension_private_method__font_set_language_support_override: .. rst-class:: classref-method @@ -1744,13 +1792,13 @@ void **_font_set_language_support_override** **(** :ref:`RID` font_ri .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_msdf_pixel_range: +.. _class_TextServerExtension_private_method__font_set_msdf_pixel_range: .. rst-class:: classref-method @@ -1758,13 +1806,13 @@ void **_font_set_msdf_pixel_range** **(** :ref:`RID` font_rid, :ref:` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_msdf_size: +.. _class_TextServerExtension_private_method__font_set_msdf_size: .. rst-class:: classref-method @@ -1772,13 +1820,13 @@ void **_font_set_msdf_size** **(** :ref:`RID` font_rid, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_multichannel_signed_distance_field: +.. _class_TextServerExtension_private_method__font_set_multichannel_signed_distance_field: .. rst-class:: classref-method @@ -1786,13 +1834,13 @@ void **_font_set_multichannel_signed_distance_field** **(** :ref:`RID .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_name: +.. _class_TextServerExtension_private_method__font_set_name: .. rst-class:: classref-method @@ -1800,13 +1848,13 @@ void **_font_set_name** **(** :ref:`RID` font_rid, :ref:`String`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_opentype_feature_overrides: +.. _class_TextServerExtension_private_method__font_set_opentype_feature_overrides: .. rst-class:: classref-method @@ -1814,13 +1862,13 @@ void **_font_set_opentype_feature_overrides** **(** :ref:`RID` font_r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_oversampling: +.. _class_TextServerExtension_private_method__font_set_oversampling: .. rst-class:: classref-method @@ -1828,13 +1876,13 @@ void **_font_set_oversampling** **(** :ref:`RID` font_rid, :ref:`floa .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_scale: +.. _class_TextServerExtension_private_method__font_set_scale: .. rst-class:: classref-method @@ -1842,13 +1890,13 @@ void **_font_set_scale** **(** :ref:`RID` font_rid, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_script_support_override: +.. _class_TextServerExtension_private_method__font_set_script_support_override: .. rst-class:: classref-method @@ -1856,13 +1904,13 @@ void **_font_set_script_support_override** **(** :ref:`RID` font_rid, .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_spacing: +.. _class_TextServerExtension_private_method__font_set_spacing: .. rst-class:: classref-method @@ -1870,13 +1918,13 @@ void **_font_set_spacing** **(** :ref:`RID` font_rid, :ref:`SpacingTy .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_stretch: +.. _class_TextServerExtension_private_method__font_set_stretch: .. rst-class:: classref-method @@ -1884,13 +1932,13 @@ void **_font_set_stretch** **(** :ref:`RID` font_rid, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_style: +.. _class_TextServerExtension_private_method__font_set_style: .. rst-class:: classref-method @@ -1898,13 +1946,13 @@ void **_font_set_style** **(** :ref:`RID` font_rid, |bitfield|\<:ref: .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_style_name: +.. _class_TextServerExtension_private_method__font_set_style_name: .. rst-class:: classref-method @@ -1912,13 +1960,13 @@ void **_font_set_style_name** **(** :ref:`RID` font_rid, :ref:`String .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_subpixel_positioning: +.. _class_TextServerExtension_private_method__font_set_subpixel_positioning: .. rst-class:: classref-method @@ -1926,13 +1974,13 @@ void **_font_set_subpixel_positioning** **(** :ref:`RID` font_rid, :r .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_texture_image: +.. _class_TextServerExtension_private_method__font_set_texture_image: .. rst-class:: classref-method @@ -1940,13 +1988,13 @@ void **_font_set_texture_image** **(** :ref:`RID` font_rid, :ref:`Vec .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_texture_offsets: +.. _class_TextServerExtension_private_method__font_set_texture_offsets: .. rst-class:: classref-method @@ -1954,13 +2002,13 @@ void **_font_set_texture_offsets** **(** :ref:`RID` font_rid, :ref:`V .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_transform: +.. _class_TextServerExtension_private_method__font_set_transform: .. rst-class:: classref-method @@ -1968,13 +2016,13 @@ void **_font_set_transform** **(** :ref:`RID` font_rid, :ref:`Transfo .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_underline_position: +.. _class_TextServerExtension_private_method__font_set_underline_position: .. rst-class:: classref-method @@ -1982,13 +2030,13 @@ void **_font_set_underline_position** **(** :ref:`RID` font_rid, :ref .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_underline_thickness: +.. _class_TextServerExtension_private_method__font_set_underline_thickness: .. rst-class:: classref-method @@ -1996,13 +2044,13 @@ void **_font_set_underline_thickness** **(** :ref:`RID` font_rid, :re .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_variation_coordinates: +.. _class_TextServerExtension_private_method__font_set_variation_coordinates: .. rst-class:: classref-method @@ -2010,13 +2058,13 @@ void **_font_set_variation_coordinates** **(** :ref:`RID` font_rid, : .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_set_weight: +.. _class_TextServerExtension_private_method__font_set_weight: .. rst-class:: classref-method @@ -2024,13 +2072,13 @@ void **_font_set_weight** **(** :ref:`RID` font_rid, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_supported_feature_list: +.. _class_TextServerExtension_private_method__font_supported_feature_list: .. rst-class:: classref-method @@ -2038,13 +2086,13 @@ void **_font_set_weight** **(** :ref:`RID` font_rid, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__font_supported_variation_list: +.. _class_TextServerExtension_private_method__font_supported_variation_list: .. rst-class:: classref-method @@ -2052,13 +2100,13 @@ void **_font_set_weight** **(** :ref:`RID` font_rid, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__format_number: +.. _class_TextServerExtension_private_method__format_number: .. rst-class:: classref-method @@ -2066,13 +2114,13 @@ void **_font_set_weight** **(** :ref:`RID` font_rid, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__free_rid: +.. _class_TextServerExtension_private_method__free_rid: .. rst-class:: classref-method @@ -2080,13 +2128,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__get_features: +.. _class_TextServerExtension_private_method__get_features: .. rst-class:: classref-method @@ -2094,13 +2142,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__get_hex_code_box_size: +.. _class_TextServerExtension_private_method__get_hex_code_box_size: .. rst-class:: classref-method @@ -2108,13 +2156,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__get_name: +.. _class_TextServerExtension_private_method__get_name: .. rst-class:: classref-method @@ -2122,13 +2170,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__get_support_data_filename: +.. _class_TextServerExtension_private_method__get_support_data_filename: .. rst-class:: classref-method @@ -2136,13 +2184,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__get_support_data_info: +.. _class_TextServerExtension_private_method__get_support_data_info: .. rst-class:: classref-method @@ -2150,13 +2198,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__has: +.. _class_TextServerExtension_private_method__has: .. rst-class:: classref-method @@ -2164,13 +2212,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__has_feature: +.. _class_TextServerExtension_private_method__has_feature: .. rst-class:: classref-method @@ -2178,13 +2226,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__is_confusable: +.. _class_TextServerExtension_private_method__is_confusable: .. rst-class:: classref-method @@ -2192,13 +2240,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__is_locale_right_to_left: +.. _class_TextServerExtension_private_method__is_locale_right_to_left: .. rst-class:: classref-method @@ -2206,13 +2254,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__is_valid_identifier: +.. _class_TextServerExtension_private_method__is_valid_identifier: .. rst-class:: classref-method @@ -2220,13 +2268,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__load_support_data: +.. _class_TextServerExtension_private_method__load_support_data: .. rst-class:: classref-method @@ -2234,13 +2282,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__name_to_tag: +.. _class_TextServerExtension_private_method__name_to_tag: .. rst-class:: classref-method @@ -2248,13 +2296,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__parse_number: +.. _class_TextServerExtension_private_method__parse_number: .. rst-class:: classref-method @@ -2262,13 +2310,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__parse_structured_text: +.. _class_TextServerExtension_private_method__parse_structured_text: .. rst-class:: classref-method @@ -2276,13 +2324,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__percent_sign: +.. _class_TextServerExtension_private_method__percent_sign: .. rst-class:: classref-method @@ -2290,13 +2338,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__save_support_data: +.. _class_TextServerExtension_private_method__save_support_data: .. rst-class:: classref-method @@ -2304,13 +2352,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_get_span_count: +.. _class_TextServerExtension_private_method__shaped_get_span_count: .. rst-class:: classref-method @@ -2318,13 +2366,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_get_span_meta: +.. _class_TextServerExtension_private_method__shaped_get_span_meta: .. rst-class:: classref-method @@ -2332,13 +2380,13 @@ void **_free_rid** **(** :ref:`RID` rid **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_set_span_update_font: +.. _class_TextServerExtension_private_method__shaped_set_span_update_font: .. rst-class:: classref-method @@ -2346,13 +2394,13 @@ void **_shaped_set_span_update_font** **(** :ref:`RID` shaped, :ref:` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_add_object: +.. _class_TextServerExtension_private_method__shaped_text_add_object: .. rst-class:: classref-method @@ -2360,13 +2408,13 @@ void **_shaped_set_span_update_font** **(** :ref:`RID` shaped, :ref:` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_add_string: +.. _class_TextServerExtension_private_method__shaped_text_add_string: .. rst-class:: classref-method @@ -2374,13 +2422,13 @@ void **_shaped_set_span_update_font** **(** :ref:`RID` shaped, :ref:` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_clear: +.. _class_TextServerExtension_private_method__shaped_text_clear: .. rst-class:: classref-method @@ -2388,13 +2436,13 @@ void **_shaped_text_clear** **(** :ref:`RID` shaped **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_closest_character_pos: +.. _class_TextServerExtension_private_method__shaped_text_closest_character_pos: .. rst-class:: classref-method @@ -2402,13 +2450,13 @@ void **_shaped_text_clear** **(** :ref:`RID` shaped **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_draw: +.. _class_TextServerExtension_private_method__shaped_text_draw: .. rst-class:: classref-method @@ -2416,13 +2464,13 @@ void **_shaped_text_draw** **(** :ref:`RID` shaped, :ref:`RID`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_draw_outline: +.. _class_TextServerExtension_private_method__shaped_text_draw_outline: .. rst-class:: classref-method @@ -2430,13 +2478,13 @@ void **_shaped_text_draw_outline** **(** :ref:`RID` shaped, :ref:`RID .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_fit_to_width: +.. _class_TextServerExtension_private_method__shaped_text_fit_to_width: .. rst-class:: classref-method @@ -2444,13 +2492,13 @@ void **_shaped_text_draw_outline** **(** :ref:`RID` shaped, :ref:`RID .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_ascent: +.. _class_TextServerExtension_private_method__shaped_text_get_ascent: .. rst-class:: classref-method @@ -2458,13 +2506,13 @@ void **_shaped_text_draw_outline** **(** :ref:`RID` shaped, :ref:`RID .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_carets: +.. _class_TextServerExtension_private_method__shaped_text_get_carets: .. rst-class:: classref-method @@ -2472,13 +2520,13 @@ void **_shaped_text_get_carets** **(** :ref:`RID` shaped, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_character_breaks: +.. _class_TextServerExtension_private_method__shaped_text_get_character_breaks: .. rst-class:: classref-method @@ -2486,13 +2534,13 @@ void **_shaped_text_get_carets** **(** :ref:`RID` shaped, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_custom_punctuation: +.. _class_TextServerExtension_private_method__shaped_text_get_custom_punctuation: .. rst-class:: classref-method @@ -2500,13 +2548,13 @@ void **_shaped_text_get_carets** **(** :ref:`RID` shaped, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_descent: +.. _class_TextServerExtension_private_method__shaped_text_get_descent: .. rst-class:: classref-method @@ -2514,13 +2562,13 @@ void **_shaped_text_get_carets** **(** :ref:`RID` shaped, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_direction: +.. _class_TextServerExtension_private_method__shaped_text_get_direction: .. rst-class:: classref-method @@ -2528,13 +2576,13 @@ void **_shaped_text_get_carets** **(** :ref:`RID` shaped, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_dominant_direction_in_range: +.. _class_TextServerExtension_private_method__shaped_text_get_dominant_direction_in_range: .. rst-class:: classref-method @@ -2542,13 +2590,13 @@ void **_shaped_text_get_carets** **(** :ref:`RID` shaped, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_ellipsis_glyph_count: +.. _class_TextServerExtension_private_method__shaped_text_get_ellipsis_glyph_count: .. rst-class:: classref-method @@ -2556,13 +2604,13 @@ void **_shaped_text_get_carets** **(** :ref:`RID` shaped, :ref:`int`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_ellipsis_glyphs: +.. _class_TextServerExtension_private_method__shaped_text_get_ellipsis_glyphs: .. rst-class:: classref-method @@ -2570,13 +2618,13 @@ const Glyph* **_shaped_text_get_ellipsis_glyphs** **(** :ref:`RID` sh .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_ellipsis_pos: +.. _class_TextServerExtension_private_method__shaped_text_get_ellipsis_pos: .. rst-class:: classref-method @@ -2584,13 +2632,13 @@ const Glyph* **_shaped_text_get_ellipsis_glyphs** **(** :ref:`RID` sh .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_glyph_count: +.. _class_TextServerExtension_private_method__shaped_text_get_glyph_count: .. rst-class:: classref-method @@ -2598,13 +2646,13 @@ const Glyph* **_shaped_text_get_ellipsis_glyphs** **(** :ref:`RID` sh .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_glyphs: +.. _class_TextServerExtension_private_method__shaped_text_get_glyphs: .. rst-class:: classref-method @@ -2612,13 +2660,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_grapheme_bounds: +.. _class_TextServerExtension_private_method__shaped_text_get_grapheme_bounds: .. rst-class:: classref-method @@ -2626,13 +2674,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_inferred_direction: +.. _class_TextServerExtension_private_method__shaped_text_get_inferred_direction: .. rst-class:: classref-method @@ -2640,13 +2688,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_line_breaks: +.. _class_TextServerExtension_private_method__shaped_text_get_line_breaks: .. rst-class:: classref-method @@ -2654,13 +2702,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_line_breaks_adv: +.. _class_TextServerExtension_private_method__shaped_text_get_line_breaks_adv: .. rst-class:: classref-method @@ -2668,13 +2716,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_object_rect: +.. _class_TextServerExtension_private_method__shaped_text_get_object_rect: .. rst-class:: classref-method @@ -2682,13 +2730,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_objects: +.. _class_TextServerExtension_private_method__shaped_text_get_objects: .. rst-class:: classref-method @@ -2696,13 +2744,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_orientation: +.. _class_TextServerExtension_private_method__shaped_text_get_orientation: .. rst-class:: classref-method @@ -2710,13 +2758,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_parent: +.. _class_TextServerExtension_private_method__shaped_text_get_parent: .. rst-class:: classref-method @@ -2724,13 +2772,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_preserve_control: +.. _class_TextServerExtension_private_method__shaped_text_get_preserve_control: .. rst-class:: classref-method @@ -2738,13 +2786,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_preserve_invalid: +.. _class_TextServerExtension_private_method__shaped_text_get_preserve_invalid: .. rst-class:: classref-method @@ -2752,13 +2800,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_range: +.. _class_TextServerExtension_private_method__shaped_text_get_range: .. rst-class:: classref-method @@ -2766,13 +2814,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_selection: +.. _class_TextServerExtension_private_method__shaped_text_get_selection: .. rst-class:: classref-method @@ -2780,13 +2828,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_size: +.. _class_TextServerExtension_private_method__shaped_text_get_size: .. rst-class:: classref-method @@ -2794,13 +2842,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_spacing: +.. _class_TextServerExtension_private_method__shaped_text_get_spacing: .. rst-class:: classref-method @@ -2808,13 +2856,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_trim_pos: +.. _class_TextServerExtension_private_method__shaped_text_get_trim_pos: .. rst-class:: classref-method @@ -2822,13 +2870,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_underline_position: +.. _class_TextServerExtension_private_method__shaped_text_get_underline_position: .. rst-class:: classref-method @@ -2836,13 +2884,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_underline_thickness: +.. _class_TextServerExtension_private_method__shaped_text_get_underline_thickness: .. rst-class:: classref-method @@ -2850,13 +2898,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_width: +.. _class_TextServerExtension_private_method__shaped_text_get_width: .. rst-class:: classref-method @@ -2864,13 +2912,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_get_word_breaks: +.. _class_TextServerExtension_private_method__shaped_text_get_word_breaks: .. rst-class:: classref-method @@ -2878,13 +2926,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_hit_test_grapheme: +.. _class_TextServerExtension_private_method__shaped_text_hit_test_grapheme: .. rst-class:: classref-method @@ -2892,13 +2940,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_hit_test_position: +.. _class_TextServerExtension_private_method__shaped_text_hit_test_position: .. rst-class:: classref-method @@ -2906,13 +2954,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_is_ready: +.. _class_TextServerExtension_private_method__shaped_text_is_ready: .. rst-class:: classref-method @@ -2920,13 +2968,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_next_character_pos: +.. _class_TextServerExtension_private_method__shaped_text_next_character_pos: .. rst-class:: classref-method @@ -2934,13 +2982,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_next_grapheme_pos: +.. _class_TextServerExtension_private_method__shaped_text_next_grapheme_pos: .. rst-class:: classref-method @@ -2948,13 +2996,13 @@ const Glyph* **_shaped_text_get_glyphs** **(** :ref:`RID` shaped **)* .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_overrun_trim_to_width: +.. _class_TextServerExtension_private_method__shaped_text_overrun_trim_to_width: .. rst-class:: classref-method @@ -2962,13 +3010,13 @@ void **_shaped_text_overrun_trim_to_width** **(** :ref:`RID` shaped, .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_prev_character_pos: +.. _class_TextServerExtension_private_method__shaped_text_prev_character_pos: .. rst-class:: classref-method @@ -2976,13 +3024,13 @@ void **_shaped_text_overrun_trim_to_width** **(** :ref:`RID` shaped, .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_prev_grapheme_pos: +.. _class_TextServerExtension_private_method__shaped_text_prev_grapheme_pos: .. rst-class:: classref-method @@ -2990,13 +3038,13 @@ void **_shaped_text_overrun_trim_to_width** **(** :ref:`RID` shaped, .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_resize_object: +.. _class_TextServerExtension_private_method__shaped_text_resize_object: .. rst-class:: classref-method @@ -3004,13 +3052,13 @@ void **_shaped_text_overrun_trim_to_width** **(** :ref:`RID` shaped, .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_set_bidi_override: +.. _class_TextServerExtension_private_method__shaped_text_set_bidi_override: .. rst-class:: classref-method @@ -3018,13 +3066,13 @@ void **_shaped_text_set_bidi_override** **(** :ref:`RID` shaped, :ref .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_set_custom_punctuation: +.. _class_TextServerExtension_private_method__shaped_text_set_custom_punctuation: .. rst-class:: classref-method @@ -3032,13 +3080,13 @@ void **_shaped_text_set_custom_punctuation** **(** :ref:`RID` shaped, .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_set_direction: +.. _class_TextServerExtension_private_method__shaped_text_set_direction: .. rst-class:: classref-method @@ -3046,13 +3094,13 @@ void **_shaped_text_set_direction** **(** :ref:`RID` shaped, :ref:`Di .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_set_orientation: +.. _class_TextServerExtension_private_method__shaped_text_set_orientation: .. rst-class:: classref-method @@ -3060,13 +3108,13 @@ void **_shaped_text_set_orientation** **(** :ref:`RID` shaped, :ref:` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_set_preserve_control: +.. _class_TextServerExtension_private_method__shaped_text_set_preserve_control: .. rst-class:: classref-method @@ -3074,13 +3122,13 @@ void **_shaped_text_set_preserve_control** **(** :ref:`RID` shaped, : .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_set_preserve_invalid: +.. _class_TextServerExtension_private_method__shaped_text_set_preserve_invalid: .. rst-class:: classref-method @@ -3088,13 +3136,13 @@ void **_shaped_text_set_preserve_invalid** **(** :ref:`RID` shaped, : .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_set_spacing: +.. _class_TextServerExtension_private_method__shaped_text_set_spacing: .. rst-class:: classref-method @@ -3102,13 +3150,13 @@ void **_shaped_text_set_spacing** **(** :ref:`RID` shaped, :ref:`Spac .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_shape: +.. _class_TextServerExtension_private_method__shaped_text_shape: .. rst-class:: classref-method @@ -3116,13 +3164,13 @@ void **_shaped_text_set_spacing** **(** :ref:`RID` shaped, :ref:`Spac .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_sort_logical: +.. _class_TextServerExtension_private_method__shaped_text_sort_logical: .. rst-class:: classref-method @@ -3130,13 +3178,13 @@ const Glyph* **_shaped_text_sort_logical** **(** :ref:`RID` shaped ** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_substr: +.. _class_TextServerExtension_private_method__shaped_text_substr: .. rst-class:: classref-method @@ -3144,13 +3192,13 @@ const Glyph* **_shaped_text_sort_logical** **(** :ref:`RID` shaped ** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_tab_align: +.. _class_TextServerExtension_private_method__shaped_text_tab_align: .. rst-class:: classref-method @@ -3158,13 +3206,13 @@ const Glyph* **_shaped_text_sort_logical** **(** :ref:`RID` shaped ** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_update_breaks: +.. _class_TextServerExtension_private_method__shaped_text_update_breaks: .. rst-class:: classref-method @@ -3172,13 +3220,13 @@ const Glyph* **_shaped_text_sort_logical** **(** :ref:`RID` shaped ** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__shaped_text_update_justification_ops: +.. _class_TextServerExtension_private_method__shaped_text_update_justification_ops: .. rst-class:: classref-method @@ -3186,13 +3234,13 @@ const Glyph* **_shaped_text_sort_logical** **(** :ref:`RID` shaped ** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__spoof_check: +.. _class_TextServerExtension_private_method__spoof_check: .. rst-class:: classref-method @@ -3200,13 +3248,13 @@ const Glyph* **_shaped_text_sort_logical** **(** :ref:`RID` shaped ** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__string_get_character_breaks: +.. _class_TextServerExtension_private_method__string_get_character_breaks: .. rst-class:: classref-method @@ -3214,13 +3262,13 @@ const Glyph* **_shaped_text_sort_logical** **(** :ref:`RID` shaped ** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__string_get_word_breaks: +.. _class_TextServerExtension_private_method__string_get_word_breaks: .. rst-class:: classref-method @@ -3228,13 +3276,13 @@ const Glyph* **_shaped_text_sort_logical** **(** :ref:`RID` shaped ** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__string_to_lower: +.. _class_TextServerExtension_private_method__string_to_lower: .. rst-class:: classref-method @@ -3242,13 +3290,13 @@ const Glyph* **_shaped_text_sort_logical** **(** :ref:`RID` shaped ** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__string_to_upper: +.. _class_TextServerExtension_private_method__string_to_upper: .. rst-class:: classref-method @@ -3256,13 +3304,13 @@ const Glyph* **_shaped_text_sort_logical** **(** :ref:`RID` shaped ** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__strip_diacritics: +.. _class_TextServerExtension_private_method__strip_diacritics: .. rst-class:: classref-method @@ -3270,13 +3318,13 @@ const Glyph* **_shaped_text_sort_logical** **(** :ref:`RID` shaped ** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_TextServerExtension_method__tag_to_name: +.. _class_TextServerExtension_private_method__tag_to_name: .. rst-class:: classref-method @@ -3284,12 +3332,12 @@ const Glyph* **_shaped_text_sort_logical** **(** :ref:`RID` shaped ** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_textserverfallback.rst b/classes/zh_CN/class_textserverfallback.rst index 69a98d507e..562900a64a 100644 --- a/classes/zh_CN/class_textserverfallback.rst +++ b/classes/zh_CN/class_textserverfallback.rst @@ -10,23 +10,23 @@ TextServerFallback ================== -**Inherits:** :ref:`TextServerExtension` **<** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`TextServerExtension` **<** :ref:`TextServer` **<** :ref:`RefCounted` **<** :ref:`Object` A fallback implementation of Godot's text server, without support for BiDi and complex text layout. .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- A fallback implementation of Godot's text server. This fallback is faster than :ref:`TextServerAdvanced` for processing a lot of text, but it does not support BiDi and complex text layout. \ **Note:** This text server is not part of official Godot binaries. If you want to use it, compile the engine with the option ``module_text_server_fb_enabled=yes``. -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_textservermanager.rst b/classes/zh_CN/class_textservermanager.rst index 933f0643cd..011ab1d735 100644 --- a/classes/zh_CN/class_textservermanager.rst +++ b/classes/zh_CN/class_textservermanager.rst @@ -10,14 +10,14 @@ TextServerManager ================= -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 用于管理 :ref:`TextServer` 实现的单例。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **TextServerManager** 是加载、枚举和切换 :ref:`TextServer` 的 API 后端。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_TextServerManager_signal_interface_added: @@ -84,8 +84,8 @@ Signals .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TextServerManager_method_add_interface: @@ -179,10 +179,10 @@ void **set_primary_interface** **(** :ref:`TextServer` index * 设置主 :ref:`TextServer` 接口。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_texture.rst b/classes/zh_CN/class_texture.rst index a27684ac39..6480c56d85 100644 --- a/classes/zh_CN/class_texture.rst +++ b/classes/zh_CN/class_texture.rst @@ -10,23 +10,23 @@ Texture ======= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`Texture2D`, :ref:`Texture3D`, :ref:`TextureLayered` +**派生:** :ref:`Texture2D`, :ref:`Texture3D`, :ref:`TextureLayered` 所有纹理类型的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **Texture** 是所有纹理类型的基类。常见的纹理类型有 :ref:`Texture2D` 和 :ref:`ImageTexture`\ 。另见 :ref:`Image`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_texture2d.rst b/classes/zh_CN/class_texture2d.rst index b646b4e19f..07d3306636 100644 --- a/classes/zh_CN/class_texture2d.rst +++ b/classes/zh_CN/class_texture2d.rst @@ -10,16 +10,16 @@ Texture2D ========= -**Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`AnimatedTexture`, :ref:`AtlasTexture`, :ref:`CameraTexture`, :ref:`CanvasTexture`, :ref:`CompressedTexture2D`, :ref:`CurveTexture`, :ref:`CurveXYZTexture`, :ref:`GradientTexture1D`, :ref:`GradientTexture2D`, :ref:`ImageTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture2D`, :ref:`PlaceholderTexture2D`, :ref:`PortableCompressedTexture2D`, :ref:`Texture2DRD`, :ref:`ViewportTexture` +**派生:** :ref:`AnimatedTexture`, :ref:`AtlasTexture`, :ref:`CameraTexture`, :ref:`CanvasTexture`, :ref:`CompressedTexture2D`, :ref:`CurveTexture`, :ref:`CurveXYZTexture`, :ref:`GradientTexture1D`, :ref:`GradientTexture2D`, :ref:`ImageTexture`, :ref:`MeshTexture`, :ref:`NoiseTexture2D`, :ref:`PlaceholderTexture2D`, :ref:`PortableCompressedTexture2D`, :ref:`Texture2DRD`, :ref:`ViewportTexture` 用于 2D 和 3D 的纹理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 纹理的工作原理是在视频硬件中注册图像,该图像在注册后就可以在 3D 模型、2D :ref:`Sprite2D`\ 、GUI :ref:`Control` 中使用。 @@ -31,26 +31,26 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw` **(** :ref:`RID` to_canvas_item, :ref:`Vector2` pos, :ref:`Color` modulate, :ref:`bool` transpose **)** |virtual| |const| | + | void | :ref:`_draw` **(** :ref:`RID` to_canvas_item, :ref:`Vector2` pos, :ref:`Color` modulate, :ref:`bool` transpose **)** |virtual| |const| | +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw_rect` **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate, :ref:`bool` transpose **)** |virtual| |const| | + | void | :ref:`_draw_rect` **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate, :ref:`bool` transpose **)** |virtual| |const| | +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw_rect_region` **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate, :ref:`bool` transpose, :ref:`bool` clip_uv **)** |virtual| |const| | + | void | :ref:`_draw_rect_region` **(** :ref:`RID` to_canvas_item, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate, :ref:`bool` transpose, :ref:`bool` clip_uv **)** |virtual| |const| | +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_height` **(** **)** |virtual| |const| | + | :ref:`int` | :ref:`_get_height` **(** **)** |virtual| |const| | +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_width` **(** **)** |virtual| |const| | + | :ref:`int` | :ref:`_get_width` **(** **)** |virtual| |const| | +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_alpha` **(** **)** |virtual| |const| | + | :ref:`bool` | :ref:`_has_alpha` **(** **)** |virtual| |const| | +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_pixel_opaque` **(** :ref:`int` x, :ref:`int` y **)** |virtual| |const| | + | :ref:`bool` | :ref:`_is_pixel_opaque` **(** :ref:`int` x, :ref:`int` y **)** |virtual| |const| | +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Resource` | :ref:`create_placeholder` **(** **)** |const| | +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -77,10 +77,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_Texture2D_method__draw: +.. _class_Texture2D_private_method__draw: .. rst-class:: classref-method @@ -94,7 +94,7 @@ void **_draw** **(** :ref:`RID` to_canvas_item, :ref:`Vector2` to_canvas_item, :ref:`Rect2` to_canvas_item, :ref:`Rec ---- -.. _class_Texture2D_method__get_height: +.. _class_Texture2D_private_method__get_height: .. rst-class:: classref-method @@ -134,7 +134,7 @@ void **_draw_rect_region** **(** :ref:`RID` to_canvas_item, :ref:`Rec ---- -.. _class_Texture2D_method__get_width: +.. _class_Texture2D_private_method__get_width: .. rst-class:: classref-method @@ -146,7 +146,7 @@ void **_draw_rect_region** **(** :ref:`RID` to_canvas_item, :ref:`Rec ---- -.. _class_Texture2D_method__has_alpha: +.. _class_Texture2D_private_method__has_alpha: .. rst-class:: classref-method @@ -158,7 +158,7 @@ void **_draw_rect_region** **(** :ref:`RID` to_canvas_item, :ref:`Rec ---- -.. _class_Texture2D_method__is_pixel_opaque: +.. _class_Texture2D_private_method__is_pixel_opaque: .. rst-class:: classref-method @@ -276,10 +276,10 @@ void **draw_rect_region** **(** :ref:`RID` canvas_item, :ref:`Rect2` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`ImageTextureLayered` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 由多个独立图像构成的单个纹理资源。每个图像的尺寸和 mipmap 级别数都相同。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- Texture2DArray 与 Texture3D 不同:Texture2DArray 不支持在 :ref:`Image` 之间进行三线性插值,即不会进行混合。另见 :ref:`Cubemap` 和 :ref:`CubemapArray`\ ,这些纹理数组具有针对立方体贴图设计的函数。 @@ -27,8 +27,8 @@ Texture2DArray 与 :ref:`AtlasTexture` 也不同:Texture2D .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Texture2DArray_method_create_placeholder: @@ -54,10 +54,10 @@ Method Descriptions 创建该资源的占位符版本(\ :ref:`PlaceholderTexture2DArray`\ )。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_texture2darrayrd.rst b/classes/zh_CN/class_texture2darrayrd.rst index 80b6ba9462..387fa3474a 100644 --- a/classes/zh_CN/class_texture2darrayrd.rst +++ b/classes/zh_CN/class_texture2darrayrd.rst @@ -10,21 +10,21 @@ Texture2DArrayRD ================ -**Inherits:** :ref:`TextureLayeredRD` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`TextureLayeredRD` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Texture Array for 2D that is bound to a texture created on the :ref:`RenderingDevice`. +用于 2D 的纹理数组,与 :ref:`RenderingDevice` 上创建的纹理绑定。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This texture array class allows you to use a 2D array texture created directly on the :ref:`RenderingDevice` as a texture for materials, meshes, etc. +该纹理数组类允许你使用直接在 :ref:`RenderingDevice` 上创建的 2D 数组纹理作为材质、网格等的纹理。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_texture2drd.rst b/classes/zh_CN/class_texture2drd.rst index c4246a0536..33fc2b61ed 100644 --- a/classes/zh_CN/class_texture2drd.rst +++ b/classes/zh_CN/class_texture2drd.rst @@ -10,21 +10,21 @@ Texture2DRD =========== -**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Texture for 2D that is bound to a texture created on the :ref:`RenderingDevice`. +用于 2D 的纹理,与 :ref:`RenderingDevice` 上创建的纹理绑定。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This texture class allows you to use a 2D texture created directly on the :ref:`RenderingDevice` as a texture for materials, meshes, etc. +该纹理类允许你使用直接在 :ref:`RenderingDevice` 上创建的 2D 纹理作为材质、网格等的纹理。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Texture2DRD_property_texture_rd_rid: @@ -55,12 +55,12 @@ Property Descriptions - void **set_texture_rd_rid** **(** :ref:`RID` value **)** - :ref:`RID` **get_texture_rd_rid** **(** **)** -The RID of the texture object created on the :ref:`RenderingDevice`. +:ref:`RenderingDevice` 上创建的纹理对象的 RID。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_texture3d.rst b/classes/zh_CN/class_texture3d.rst index 771314c014..e1fb561856 100644 --- a/classes/zh_CN/class_texture3d.rst +++ b/classes/zh_CN/class_texture3d.rst @@ -10,16 +10,16 @@ Texture3D ========= -**Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`CompressedTexture3D`, :ref:`ImageTexture3D`, :ref:`NoiseTexture3D`, :ref:`PlaceholderTexture3D`, :ref:`Texture3DRD` +**派生:** :ref:`CompressedTexture3D`, :ref:`ImageTexture3D`, :ref:`NoiseTexture3D`, :ref:`PlaceholderTexture3D`, :ref:`Texture3DRD` 3D 纹理的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`ImageTexture3D` 和 :ref:`CompressedTexture3D` 的基类。无法直接使用,但包含所有访问派生资源类型所需的函数。\ **Texture3D** 是所有三维纹理类型的基类。另见 :ref:`TextureLayered`\ 。 @@ -29,39 +29,39 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`Image[]` | :ref:`_get_data` **(** **)** |virtual| |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_depth` **(** **)** |virtual| |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`Format` | :ref:`_get_format` **(** **)** |virtual| |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_height` **(** **)** |virtual| |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_width` **(** **)** |virtual| |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_mipmaps` **(** **)** |virtual| |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`Resource` | :ref:`create_placeholder` **(** **)** |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`Image[]` | :ref:`get_data` **(** **)** |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_depth` **(** **)** |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`Format` | :ref:`get_format` **(** **)** |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_height` **(** **)** |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_width` **(** **)** |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | - +----------------------------------+------------------------------------------------------------------------------------------+ + +----------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`Image[]` | :ref:`_get_data` **(** **)** |virtual| |const| | + +----------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_depth` **(** **)** |virtual| |const| | + +----------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`Format` | :ref:`_get_format` **(** **)** |virtual| |const| | + +----------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_height` **(** **)** |virtual| |const| | + +----------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_width` **(** **)** |virtual| |const| | + +----------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_mipmaps` **(** **)** |virtual| |const| | + +----------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`Resource` | :ref:`create_placeholder` **(** **)** |const| | + +----------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`Image[]` | :ref:`get_data` **(** **)** |const| | + +----------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_depth` **(** **)** |const| | + +----------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`Format` | :ref:`get_format` **(** **)** |const| | + +----------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_height` **(** **)** |const| | + +----------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_width` **(** **)** |const| | + +----------------------------------+------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | + +----------------------------------+------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -69,10 +69,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_Texture3D_method__get_data: +.. _class_Texture3D_private_method__get_data: .. rst-class:: classref-method @@ -84,7 +84,7 @@ Method Descriptions ---- -.. _class_Texture3D_method__get_depth: +.. _class_Texture3D_private_method__get_depth: .. rst-class:: classref-method @@ -96,7 +96,7 @@ Method Descriptions ---- -.. _class_Texture3D_method__get_format: +.. _class_Texture3D_private_method__get_format: .. rst-class:: classref-method @@ -108,7 +108,7 @@ Method Descriptions ---- -.. _class_Texture3D_method__get_height: +.. _class_Texture3D_private_method__get_height: .. rst-class:: classref-method @@ -120,7 +120,7 @@ Method Descriptions ---- -.. _class_Texture3D_method__get_width: +.. _class_Texture3D_private_method__get_width: .. rst-class:: classref-method @@ -132,7 +132,7 @@ Method Descriptions ---- -.. _class_Texture3D_method__has_mipmaps: +.. _class_Texture3D_private_method__has_mipmaps: .. rst-class:: classref-method @@ -224,10 +224,10 @@ Method Descriptions 如果该 **Texture3D** 已生成 mipmap,则返回 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_texture3drd.rst b/classes/zh_CN/class_texture3drd.rst index 08425d55e5..aecf094e87 100644 --- a/classes/zh_CN/class_texture3drd.rst +++ b/classes/zh_CN/class_texture3drd.rst @@ -10,21 +10,21 @@ Texture3DRD =========== -**Inherits:** :ref:`Texture3D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture3D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Texture for 3D that is bound to a texture created on the :ref:`RenderingDevice`. +被绑定到在 :ref:`RenderingDevice` 上创建的纹理的 3D 的纹理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This texture class allows you to use a 3D texture created directly on the :ref:`RenderingDevice` as a texture for materials, meshes, etc. +该纹理类允许你使用直接在 :ref:`RenderingDevice` 上创建的 3D 纹理作为材质、网格等的纹理。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Texture3DRD_property_texture_rd_rid: @@ -53,12 +53,12 @@ Property Descriptions - void **set_texture_rd_rid** **(** :ref:`RID` value **)** - :ref:`RID` **get_texture_rd_rid** **(** **)** -The RID of the texture object created on the :ref:`RenderingDevice`. +:ref:`RenderingDevice` 上创建的纹理对象的 RID。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_texturebutton.rst b/classes/zh_CN/class_texturebutton.rst index 864127db51..f5d1a5cf86 100644 --- a/classes/zh_CN/class_texturebutton.rst +++ b/classes/zh_CN/class_texturebutton.rst @@ -10,14 +10,14 @@ TextureButton ============= -**Inherits:** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 基于纹理的按钮。支持按下、悬停、停用和焦点状态。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **TextureButton** 的功能与 :ref:`Button` 相同,只是它使用精灵而不是 Godot 的 :ref:`Theme` 主题资源。它的创建速度更快,但它不像更复杂的 :ref:`Control` 那样支持本地化。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 体素演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -68,8 +68,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_TextureButton_StretchMode: @@ -139,8 +139,8 @@ enum **StretchMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TextureButton_property_flip_h: @@ -308,10 +308,10 @@ Property Descriptions 如果节点有键盘焦点且玩家按下回车键,或者玩家按下 :ref:`BaseButton.shortcut` 键,则鼠标悬停在节点上时显示的纹理。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_texturecubemaparrayrd.rst b/classes/zh_CN/class_texturecubemaparrayrd.rst index f4bc4ef439..0423be5f26 100644 --- a/classes/zh_CN/class_texturecubemaparrayrd.rst +++ b/classes/zh_CN/class_texturecubemaparrayrd.rst @@ -10,21 +10,21 @@ TextureCubemapArrayRD ===================== -**Inherits:** :ref:`TextureLayeredRD` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`TextureLayeredRD` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Texture Array for Cubemaps that is bound to a texture created on the :ref:`RenderingDevice`. +立方体贴图的纹理数组,被绑定到在 :ref:`RenderingDevice` 上创建的纹理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This texture class allows you to use a cubemap array texture created directly on the :ref:`RenderingDevice` as a texture for materials, meshes, etc. +该纹理类允许你使用直接在 :ref:`RenderingDevice` 上创建的立方体贴图数组纹理作为材质、网格等的纹理。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_texturecubemaprd.rst b/classes/zh_CN/class_texturecubemaprd.rst index aae757029a..335e9ccfd7 100644 --- a/classes/zh_CN/class_texturecubemaprd.rst +++ b/classes/zh_CN/class_texturecubemaprd.rst @@ -10,21 +10,21 @@ TextureCubemapRD ================ -**Inherits:** :ref:`TextureLayeredRD` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`TextureLayeredRD` **<** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Texture for Cubemap that is bound to a texture created on the :ref:`RenderingDevice`. +被绑定到在 :ref:`RenderingDevice` 上创建的纹理的立方体贴图的纹理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This texture class allows you to use a cubemap texture created directly on the :ref:`RenderingDevice` as a texture for materials, meshes, etc. +该纹理类允许你使用直接在 :ref:`RenderingDevice` 上创建的立方体贴图纹理作为材质、网格等的纹理。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_texturelayered.rst b/classes/zh_CN/class_texturelayered.rst index 69e5035a5b..ef4546e120 100644 --- a/classes/zh_CN/class_texturelayered.rst +++ b/classes/zh_CN/class_texturelayered.rst @@ -10,16 +10,16 @@ TextureLayered ============== -**Inherits:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`CompressedTextureLayered`, :ref:`ImageTextureLayered`, :ref:`PlaceholderTextureLayered`, :ref:`TextureLayeredRD` +**派生:** :ref:`CompressedTextureLayered`, :ref:`ImageTextureLayered`, :ref:`PlaceholderTextureLayered`, :ref:`TextureLayeredRD` 包含多个 :ref:`Image` 的纹理类型的基类。每个图像的大小和格式都是一样的。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`ImageTextureLayered` 和 :ref:`CompressedTextureLayered` 的基类。不能直接使用,但包含了访问派生资源类型所需的所有函数。另见 :ref:`Texture3D`\ 。 @@ -33,41 +33,41 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Format` | :ref:`_get_format` **(** **)** |virtual| |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_height` **(** **)** |virtual| |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`_get_layer_data` **(** :ref:`int` layer_index **)** |virtual| |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_layered_type` **(** **)** |virtual| |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_layers` **(** **)** |virtual| |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_width` **(** **)** |virtual| |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_mipmaps` **(** **)** |virtual| |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Format` | :ref:`get_format` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_height` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`get_layer_data` **(** :ref:`int` layer **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LayeredType` | :ref:`get_layered_type` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_layers` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_width` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Format` | :ref:`_get_format` **(** **)** |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_height` **(** **)** |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`_get_layer_data` **(** :ref:`int` layer_index **)** |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_layered_type` **(** **)** |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_layers` **(** **)** |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_width` **(** **)** |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_has_mipmaps` **(** **)** |virtual| |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Format` | :ref:`get_format` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_height` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`get_layer_data` **(** :ref:`int` layer **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LayeredType` | :ref:`get_layered_type` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_layers` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_width` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_mipmaps` **(** **)** |const| | + +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -75,8 +75,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_TextureLayered_LayeredType: @@ -114,10 +114,10 @@ enum **LayeredType**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_TextureLayered_method__get_format: +.. _class_TextureLayered_private_method__get_format: .. rst-class:: classref-method @@ -129,7 +129,7 @@ Method Descriptions ---- -.. _class_TextureLayered_method__get_height: +.. _class_TextureLayered_private_method__get_height: .. rst-class:: classref-method @@ -141,7 +141,7 @@ Method Descriptions ---- -.. _class_TextureLayered_method__get_layer_data: +.. _class_TextureLayered_private_method__get_layer_data: .. rst-class:: classref-method @@ -153,7 +153,7 @@ Method Descriptions ---- -.. _class_TextureLayered_method__get_layered_type: +.. _class_TextureLayered_private_method__get_layered_type: .. rst-class:: classref-method @@ -165,7 +165,7 @@ Method Descriptions ---- -.. _class_TextureLayered_method__get_layers: +.. _class_TextureLayered_private_method__get_layers: .. rst-class:: classref-method @@ -177,7 +177,7 @@ Method Descriptions ---- -.. _class_TextureLayered_method__get_width: +.. _class_TextureLayered_private_method__get_width: .. rst-class:: classref-method @@ -189,7 +189,7 @@ Method Descriptions ---- -.. _class_TextureLayered_method__has_mipmaps: +.. _class_TextureLayered_private_method__has_mipmaps: .. rst-class:: classref-method @@ -281,10 +281,10 @@ Method Descriptions 如果层生成了 mipmap 则返回 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_texturelayeredrd.rst b/classes/zh_CN/class_texturelayeredrd.rst index 538432cf5f..885f646952 100644 --- a/classes/zh_CN/class_texturelayeredrd.rst +++ b/classes/zh_CN/class_texturelayeredrd.rst @@ -10,23 +10,23 @@ TextureLayeredRD ================ -**Inherits:** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`TextureLayered` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`Texture2DArrayRD`, :ref:`TextureCubemapArrayRD`, :ref:`TextureCubemapRD` +**派生:** :ref:`Texture2DArrayRD`, :ref:`TextureCubemapArrayRD`, :ref:`TextureCubemapRD` -Abstract base class for layered texture RD types. +分层纹理 RD 类型的抽象基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Base class for :ref:`Texture2DArrayRD`, :ref:`TextureCubemapRD` and :ref:`TextureCubemapArrayRD`. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. +:ref:`Texture2DArrayRD`\ 、\ :ref:`TextureCubemapRD` 和 :ref:`TextureCubemapArrayRD` 的基类。不能直接使用,但包含了访问派生资源类型所需的所有函数。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TextureLayeredRD_property_texture_rd_rid: @@ -55,12 +55,12 @@ Property Descriptions - void **set_texture_rd_rid** **(** :ref:`RID` value **)** - :ref:`RID` **get_texture_rd_rid** **(** **)** -The RID of the texture object created on the :ref:`RenderingDevice`. +:ref:`RenderingDevice` 上创建的纹理对象的 RID。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_textureprogressbar.rst b/classes/zh_CN/class_textureprogressbar.rst index e62da843bc..cb9f079313 100644 --- a/classes/zh_CN/class_textureprogressbar.rst +++ b/classes/zh_CN/class_textureprogressbar.rst @@ -10,21 +10,21 @@ TextureProgressBar ================== -**Inherits:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 基于纹理的进度条。适用于加载屏幕和生命或体力条。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- TextureProgressBar 的工作方式类似于 :ref:`ProgressBar`\ ,但最多使用 3 个纹理,不使用 Godot 的 :ref:`Theme` 资源。可用于创建水平、垂直和径向进度条。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -71,8 +71,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -89,8 +89,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_TextureProgressBar_FillMode: @@ -176,8 +176,8 @@ enum **FillMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TextureProgressBar_property_fill_mode: @@ -415,7 +415,7 @@ Property Descriptions - void **set_tint_over** **(** :ref:`Color` value **)** - :ref:`Color` **get_tint_over** **(** **)** -将条形的 ``texture_over`` 纹理的颜色相乘。其效果类似于 :ref:`CanvasItem.modulate` ,只是它只影响这个特定的纹理,而不是整个节点。 +将与该进度条的 :ref:`texture_over` 纹理的颜色相乘。其效果类似于 :ref:`CanvasItem.modulate` ,只是它只影响这个特定的纹理,而不是整个节点。 .. rst-class:: classref-item-separator @@ -432,7 +432,7 @@ Property Descriptions - void **set_tint_progress** **(** :ref:`Color` value **)** - :ref:`Color` **get_tint_progress** **(** **)** -将条形的 ``texture_progress`` 纹理的颜色相乘。 +将与该进度条的 :ref:`texture_progress` 纹理的颜色相乘。 .. rst-class:: classref-item-separator @@ -449,7 +449,7 @@ Property Descriptions - void **set_tint_under** **(** :ref:`Color` value **)** - :ref:`Color` **get_tint_under** **(** **)** -将条形的 ``texture_under`` 纹理的颜色相乘。 +将与该进度条的 :ref:`texture_under` 纹理的颜色相乘。 .. rst-class:: classref-section-separator @@ -457,8 +457,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TextureProgressBar_method_get_stretch_margin: @@ -480,10 +480,10 @@ void **set_stretch_margin** **(** :ref:`Side` margin, :r 设置给定索引的拉伸边距。见 :ref:`stretch_margin_bottom` 及相关属性。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_texturerect.rst b/classes/zh_CN/class_texturerect.rst index eb577160aa..22cfff18db 100644 --- a/classes/zh_CN/class_texturerect.rst +++ b/classes/zh_CN/class_texturerect.rst @@ -10,28 +10,28 @@ TextureRect =========== -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 显示纹理的控件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 显示纹理的控件,例如显示 GUI 中的图标。可以使用 :ref:`stretch_mode` 属性控制纹理的放置。可以在边界框中进行缩放、平铺、居中。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 体素演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_TextureRect_ExpandMode: @@ -185,8 +185,8 @@ enum **StretchMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TextureRect_property_expand_mode: @@ -271,10 +271,10 @@ Property Descriptions 该节点的 :ref:`Texture2D` 资源。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_theme.rst b/classes/zh_CN/class_theme.rst index 6fb9054767..156525d23d 100644 --- a/classes/zh_CN/class_theme.rst +++ b/classes/zh_CN/class_theme.rst @@ -10,14 +10,14 @@ Theme ===== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于样式化/皮肤化 :ref:`Control` 和 :ref:`Window` 的资源。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于样式化/皮肤化 :ref:`Control` 和 :ref:`Window` 节点的资源。控件可以使用本地的主题覆盖项进行单独的风格化(见 :ref:`Control.add_theme_color_override`\ ),而主题资源则能够存储这些设置,在所有同类型的控件之间实现共享(例如将所有 :ref:`Button` 都设置为相同的风格)。主题资源可以在整个项目上使用,但你也可以为单独的一个控件节点分支设置不同的主题资源。为某个控件节点分配的主题资源不仅会对它自己生效,也会对它的所有直接和间接子节点生效(只要控件链没有中断)。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`GUI 皮肤 <../tutorials/ui/gui_skinning>` @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -190,8 +190,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Theme_DataType: @@ -261,8 +261,8 @@ enum **DataType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Theme_property_default_base_scale: @@ -323,8 +323,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Theme_method_add_type: @@ -1158,10 +1158,10 @@ void **set_type_variation** **(** :ref:`StringName` theme_type \ **注意:**\ 仅当该主题资源被设置为项目的默认主题时才会显示建议。参见 :ref:`ProjectSettings.gui/theme/custom`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_themedb.rst b/classes/zh_CN/class_themedb.rst index 7348ef2c12..27d5d7fce5 100644 --- a/classes/zh_CN/class_themedb.rst +++ b/classes/zh_CN/class_themedb.rst @@ -10,14 +10,14 @@ ThemeDB ======= -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 用来访问引擎及项目中所使用的 :ref:`Theme` 资源静态信息的单例。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个单例可以用来访问引擎及项目中所使用的 :ref:`Theme` 资源静态信息。可以获取引擎默认的主题,也可以获取你在项目中配置的主题。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -63,8 +63,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_ThemeDB_signal_fallback_changed: @@ -80,8 +80,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ThemeDB_property_fallback_base_scale: @@ -176,8 +176,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ThemeDB_method_get_default_theme: @@ -201,10 +201,10 @@ Method Descriptions 项目主题的设置请参阅 :ref:`ProjectSettings.gui/theme/custom`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_thread.rst b/classes/zh_CN/class_thread.rst index 28fd8574bd..6a6f2fca3a 100644 --- a/classes/zh_CN/class_thread.rst +++ b/classes/zh_CN/class_thread.rst @@ -10,31 +10,31 @@ Thread ====== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 进程中的执行单元。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A unit of execution in a process. Can run methods on :ref:`Object`\ s simultaneously. The use of synchronization via :ref:`Mutex` or :ref:`Semaphore` is advised if working with shared objects. +进程中的执行单元。可以让任意 :ref:`Object` 上的任意方法同时运行。如果使用共享对象,建议通过 :ref:`Mutex` 或 :ref:`Semaphore` 进行同步。 -\ **Warning:**\ +\ **警告:**\ -To ensure proper cleanup without crashes or deadlocks, when a **Thread**'s reference count reaches zero and it is therefore destroyed, the following conditions must be met: +为了确保能够正确清理,避免崩溃和死锁,\ **Thread** 的引用计数变为零进行销毁时,必须满足以下条件: -- It must not have any :ref:`Mutex` objects locked. +- 必须没有任何上锁的 :ref:`Mutex` 对象。 -- It must not be waiting on any :ref:`Semaphore` objects. +- 必须没有在任何 :ref:`Semaphore` 对象上等待。 -- :ref:`wait_to_finish` should have been called on it. +- 必须已调用过它的 :ref:`wait_to_finish`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用多线程 <../tutorials/performance/using_multiple_threads>` @@ -44,8 +44,8 @@ Tutorials .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -70,8 +70,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Thread_Priority: @@ -109,8 +109,8 @@ enum **Priority**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Thread_method_get_id: @@ -204,10 +204,10 @@ void **set_thread_safety_checks_enabled** **(** :ref:`bool` enabled 要确定调用时是否不会阻塞调用线程,请检查 :ref:`is_alive` 是否为 ``false``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_tiledata.rst b/classes/zh_CN/class_tiledata.rst index 1b0cb638f7..3c4ce760b2 100644 --- a/classes/zh_CN/class_tiledata.rst +++ b/classes/zh_CN/class_tiledata.rst @@ -10,21 +10,21 @@ TileData ======== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` :ref:`TileSet` 中单个图块的设置。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -**TileData** 对象代表 :ref:`TileSet` 中的单个图块,通常使用图块集编辑器进行编辑,但也可以在运行时使用 :ref:`TileMap._tile_data_runtime_update` 进行修改。 +**TileData** 对象代表 :ref:`TileSet` 中的单个图块,通常使用图块集编辑器进行编辑,但也可以在运行时使用 :ref:`TileMap._tile_data_runtime_update` 进行修改。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -117,8 +117,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_TileData_signal_changed: @@ -134,8 +134,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TileData_property_flip_h: @@ -326,8 +326,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TileData_method_add_collision_polygon: @@ -613,10 +613,10 @@ void **set_terrain_peering_bit** **(** :ref:`CellNeighbor` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 基于 2D 图块的地图节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Node for 2D tile-based maps. Tilemaps use a :ref:`TileSet` which contain a list of tiles which are used to create grid-based maps. A TileMap may have several layers, layouting tiles on top of each other. +基于 2D 图块的地图节点。Tilemap(图块地图)使用 :ref:`TileSet`\ ,其中包含了图块的列表,用于创建基于栅格的地图。TileMap 可以有若干图层,可以将图块布局在彼此之上。 -For performance reasons, all TileMap updates are batched at the end of a frame. Notably, this means that scene tiles from a :ref:`TileSetScenesCollectionSource` may be initialized after their parent. +出于性能原因,所有 TileMap 更新都会在一帧结束时进行批处理。值得注意的是,这意味着 :ref:`TileSetScenesCollectionSource` 中的场景图块可能会在其父级之后初始化。 -To force an update earlier on, call :ref:`update_internals`. +要提前强制更新,请调用 :ref:`update_internals`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 Tilemap <../tutorials/2d/using_tilemaps>` @@ -46,8 +46,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -66,16 +66,16 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_tile_data_runtime_update` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`TileData` tile_data **)** |virtual| | + | void | :ref:`_tile_data_runtime_update` **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`TileData` tile_data **)** |virtual| | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_use_tile_data_runtime_update` **(** :ref:`int` layer, :ref:`Vector2i` coords **)** |virtual| | + | :ref:`bool` | :ref:`_use_tile_data_runtime_update` **(** :ref:`int` layer, :ref:`Vector2i` coords **)** |virtual| | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_layer` **(** :ref:`int` to_position **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -129,6 +129,8 @@ Methods +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_layer_enabled` **(** :ref:`int` layer **)** |const| | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_layer_navigation_enabled` **(** :ref:`int` layer **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_layer_y_sort_enabled` **(** :ref:`int` layer **)** |const| | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2i` | :ref:`local_to_map` **(** :ref:`Vector2` local_position **)** |const| | @@ -155,6 +157,8 @@ Methods +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_layer_name` **(** :ref:`int` layer, :ref:`String` name **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_layer_navigation_enabled` **(** :ref:`int` layer, :ref:`bool` enabled **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_layer_navigation_map` **(** :ref:`int` layer, :ref:`RID` map **)** | +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_layer_y_sort_enabled` **(** :ref:`int` layer, :ref:`bool` y_sort_enabled **)** | @@ -176,8 +180,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_TileMap_signal_changed: @@ -193,8 +197,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_TileMap_VisibilityMode: @@ -232,8 +236,8 @@ enum **VisibilityMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TileMap_property_collision_animatable: @@ -299,7 +303,11 @@ Property Descriptions - void **set_rendering_quadrant_size** **(** :ref:`int` value **)** - :ref:`int` **get_rendering_quadrant_size** **(** **)** -该 TileMap 的象限大小。会使用这个大小的区块对绘制进行批处理优化。 +TileMap 的象限大小。象限是在单个画布项上一起绘制的一组图块,用于优化。\ :ref:`rendering_quadrant_size` 定义的是形成象限的正方形的边长,使用地图坐标系。因此,默认象限大小将 ``16 * 16 = 256`` 个图块组合到了一起。 + +Y 排序的图层不使用象限大小,这种图层中的图块会按 Y 位置分组。 + +\ **注意:**\ 象限是根据地图坐标系创建的,“正方形”的象限在 TileMap 的局部坐标系中可能并不是正方形。 .. rst-class:: classref-item-separator @@ -324,38 +332,38 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_TileMap_method__tile_data_runtime_update: +.. _class_TileMap_private_method__tile_data_runtime_update: .. rst-class:: classref-method void **_tile_data_runtime_update** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`TileData` tile_data **)** |virtual| -Called with a TileData object about to be used internally by the TileMap, allowing its modification at runtime. +会使用 TileMap 内部即将使用的 TileData 对象来调用,从而实现运行时修改。 -This method is only called if :ref:`_use_tile_data_runtime_update` is implemented and returns ``true`` for the given tile ``coords`` and ``layer``. +这个方法被调用的前提是:实现了 :ref:`_use_tile_data_runtime_update`\ ,并且对给定的图块坐标 ``coords`` 和层 ``layer`` 返回 ``true`` 。 -\ **Warning:** The ``tile_data`` object's sub-resources are the same as the one in the TileSet. Modifying them might impact the whole TileSet. Instead, make sure to duplicate those resources. +\ **警告:**\ 该 ``tile_data`` 对象的子资源和 TileSet 中的子资源是一样的。对它们进行修改可能会影响整个 TileSet。请确保制作这些资源的副本再进行修改。 -\ **Note:** If the properties of ``tile_data`` object should change over time, use :ref:`notify_runtime_tile_data_update` to notify the TileMap it needs an update. +\ **注意:**\ 如果 ``tile_data`` 对象的属性要随时间变化,请使用 :ref:`notify_runtime_tile_data_update` 来通知该 TileMap 它需要更新。 .. rst-class:: classref-item-separator ---- -.. _class_TileMap_method__use_tile_data_runtime_update: +.. _class_TileMap_private_method__use_tile_data_runtime_update: .. rst-class:: classref-method :ref:`bool` **_use_tile_data_runtime_update** **(** :ref:`int` layer, :ref:`Vector2i` coords **)** |virtual| -Should return ``true`` if the tile at coordinates ``coords`` on layer ``layer`` requires a runtime update. +如果位于层 ``layer`` 坐标 ``coords`` 的图块需要运行时更新,则应返回 ``true``\ 。 -\ **Warning:** Make sure this function only return ``true`` when needed. Any tile processed at runtime without a need for it will imply a significant performance penalty. +\ **警告:**\ 请确保这个函数只在需要时返回 ``true``\ 。任何在没有需要的情况下在运行时处理的图块都将导致显著的性能损失。 -\ **Note:** If the result of this function should changed, use :ref:`notify_runtime_tile_data_update` to notify the TileMap it needs an update. +\ **注意:**\ 如果该函数的结果发生变化,请使用 :ref:`notify_runtime_tile_data_update` 通知 TileMap 它需要更新。 .. rst-class:: classref-item-separator @@ -391,9 +399,9 @@ void **clear** **(** **)** void **clear_layer** **(** :ref:`int` layer **)** -Clears all cells on the given layer. +清除给定图层上的所有单元格。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 .. rst-class:: classref-item-separator @@ -405,9 +413,9 @@ If ``layer`` is negative, the layers are accessed from the last one. void **erase_cell** **(** :ref:`int` layer, :ref:`Vector2i` coords **)** -Erases the cell on layer ``layer`` at coordinates ``coords``. +擦除图层 ``layer`` 上位于 ``coords`` 坐标的单元格。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 .. rst-class:: classref-item-separator @@ -431,7 +439,7 @@ void **fix_invalid_tiles** **(** **)** void **force_update** **(** :ref:`int` layer=-1 **)** -*Deprecated.* See :ref:`notify_runtime_tile_data_update` and :ref:`update_internals`. +*已废弃。*\ 见 :ref:`notify_runtime_tile_data_update` 和 :ref:`update_internals`\ 。 .. rst-class:: classref-item-separator @@ -443,9 +451,9 @@ void **force_update** **(** :ref:`int` layer=-1 **)** :ref:`int` **get_cell_alternative_tile** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| -Returns the tile alternative ID of the cell on layer ``layer`` at ``coords``. If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. +返回 ``layer`` 层中位于坐标 ``coords`` 单元格的图块备选 ID。如果 ``use_proxies`` 为 ``false``\ ,则会忽略该 :ref:`TileSet` 的图块代理,返回原始的备选标识符。见 :ref:`TileSet.map_tile_proxy`\ 。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 .. rst-class:: classref-item-separator @@ -457,9 +465,9 @@ If ``layer`` is negative, the layers are accessed from the last one. :ref:`Vector2i` **get_cell_atlas_coords** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| -Returns the tile atlas coordinates ID of the cell on layer ``layer`` at coordinates ``coords``. If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. +返回 ``layer`` 层中位于坐标 ``coords`` 单元格的图块图集坐标 ID。如果 ``use_proxies`` 为 ``false``\ ,则会忽略该 :ref:`TileSet` 的图块代理,返回原始的备选标识符。见 :ref:`TileSet.map_tile_proxy`\ 。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 .. rst-class:: classref-item-separator @@ -471,11 +479,11 @@ If ``layer`` is negative, the layers are accessed from the last one. :ref:`int` **get_cell_source_id** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| -Returns the tile source ID of the cell on layer ``layer`` at coordinates ``coords``. Returns ``-1`` if the cell does not exist. +返回 ``layer`` 层中位于坐标 ``coords`` 单元格的图块源 ID。如果该单元格不存在,则返回 ``-1``\ 。 -If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. +如果 ``use_proxies`` 为 ``false``\ ,则会忽略该 :ref:`TileSet` 的图块代理,返回原始的备选标识符。见 :ref:`TileSet.map_tile_proxy`\ 。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 .. rst-class:: classref-item-separator @@ -487,11 +495,11 @@ If ``layer`` is negative, the layers are accessed from the last one. :ref:`TileData` **get_cell_tile_data** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`bool` use_proxies=false **)** |const| -Returns the :ref:`TileData` object associated with the given cell, or ``null`` if the cell does not exist or is not a :ref:`TileSetAtlasSource`. +返回与给定单元格关联的 :ref:`TileData` 对象,如果单元格不存在或者不是 :ref:`TileSetAtlasSource` 则返回 ``null``\ 。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 -If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s tile proxies, returning the raw alternative identifier. See :ref:`TileSet.map_tile_proxy`. +如果 ``use_proxies`` 为 ``false``\ ,则会忽略 :ref:`TileSet` 的图块代理,返回原始的备选标识符。见 :ref:`TileSet.map_tile_proxy`\ 。 :: @@ -537,9 +545,9 @@ If ``use_proxies`` is ``false``, ignores the :ref:`TileSet`'s til :ref:`Color` **get_layer_modulate** **(** :ref:`int` layer **)** |const| -Returns a TileMap layer's modulate. +返回 TileMap 图层的调制颜色。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 .. rst-class:: classref-item-separator @@ -551,9 +559,9 @@ If ``layer`` is negative, the layers are accessed from the last one. :ref:`String` **get_layer_name** **(** :ref:`int` layer **)** |const| -Returns a TileMap layer's name. +返回 TileMap 图层的名称。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 .. rst-class:: classref-item-separator @@ -565,13 +573,13 @@ If ``layer`` is negative, the layers are accessed from the last one. :ref:`RID` **get_layer_navigation_map** **(** :ref:`int` layer **)** |const| -Returns the :ref:`NavigationServer2D` navigation map :ref:`RID` currently assigned to the specified TileMap ``layer``. +返回当前分配给指定 TileMap ``layer`` 的 :ref:`NavigationServer2D` 导航地图 :ref:`RID`\ 。 -By default the TileMap uses the default :ref:`World2D` navigation map for the first TileMap layer. For each additional TileMap layer a new navigation map is created for the additional layer. +默认情况下,TileMap 为第一个 TileMap 层,使用默认的 :ref:`World2D` 导航地图。对于每个附加的 TileMap 层,都会为附加层创建一个新的导航地图。 -In order to make :ref:`NavigationAgent2D` switch between TileMap layer navigation maps use :ref:`NavigationAgent2D.set_navigation_map` with the navigation map received from :ref:`get_layer_navigation_map`. +为了使 :ref:`NavigationAgent2D` 在 TileMap 层导航地图之间切换,使用 :ref:`NavigationAgent2D.set_navigation_map` 和从 :ref:`get_navigation_map` 接收的导航地图。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 .. rst-class:: classref-item-separator @@ -583,9 +591,9 @@ If ``layer`` is negative, the layers are accessed from the last one. :ref:`int` **get_layer_y_sort_origin** **(** :ref:`int` layer **)** |const| -Returns a TileMap layer's Y sort origin. +返回 TileMap 图层的 Y 排序原点。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 .. rst-class:: classref-item-separator @@ -597,9 +605,9 @@ If ``layer`` is negative, the layers are accessed from the last one. :ref:`int` **get_layer_z_index** **(** :ref:`int` layer **)** |const| -Returns a TileMap layer's Z-index value. +返回 TileMap 图层的 Z 索引值。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 .. rst-class:: classref-item-separator @@ -623,7 +631,7 @@ If ``layer`` is negative, the layers are accessed from the last one. :ref:`RID` **get_navigation_map** **(** :ref:`int` layer **)** |const| -See :ref:`get_layer_navigation_map`. +见 :ref:`get_layer_navigation_map`\ 。 .. rst-class:: classref-item-separator @@ -647,9 +655,9 @@ See :ref:`get_layer_navigation_map` **get_pattern** **(** :ref:`int` layer, :ref:`Vector2i[]` coords_array **)** -Creates a new :ref:`TileMapPattern` from the given layer and set of cells. +根据给定的图层和单元格新建 :ref:`TileMapPattern`\ 。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 .. rst-class:: classref-item-separator @@ -673,9 +681,9 @@ If ``layer`` is negative, the layers are accessed from the last one. :ref:`Vector2i[]` **get_used_cells** **(** :ref:`int` layer **)** |const| -Returns a :ref:`Vector2i` array with the positions of all cells containing a tile in the given layer. A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is ``Vector2(-1, -1)`` and its alternative identifier is -1. +返回 :ref:`Vector2i` 数组,其中存放的是给定图层中所有包含图块的单元格的位置。空单元格的源标识符等于 -1、图集坐标标识符为 ``Vector2(-1, -1)``\ 、备选标识符为 -1。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 .. rst-class:: classref-item-separator @@ -687,13 +695,13 @@ If ``layer`` is negative, the layers are accessed from the last one. :ref:`Vector2i[]` **get_used_cells_by_id** **(** :ref:`int` layer, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=-1 **)** |const| -Returns a :ref:`Vector2i` array with the positions of all cells containing a tile in the given layer. Tiles may be filtered according to their source (``source_id``), their atlas coordinates (``atlas_coords``) or alternative id (``alternative_tile``). +返回 :ref:`Vector2i` 数组,其中存放的是给定图层中所有包含图块的单元格的位置。可以根据源(\ ``source_id``\ )、图集坐标(\ ``atlas_coords``\ )、备选 ID(\ ``alternative_tile``\ )进行过滤。 -If a parameter has its value set to the default one, this parameter is not used to filter a cell. Thus, if all parameters have their respective default value, this method returns the same result as :ref:`get_used_cells`. +如果某个参数为默认值,则该参数不会用于单元格的过滤。因此,如果所有参数都使用默认值,则返回的结果与 :ref:`get_used_cells` 相同。 -A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is ``Vector2(-1, -1)`` and its alternative identifier is -1. +空单元格的源标识符等于 -1、图集坐标标识符为 ``Vector2(-1, -1)``\ 、备选标识符为 -1。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 .. rst-class:: classref-item-separator @@ -717,9 +725,21 @@ If ``layer`` is negative, the layers are accessed from the last one. :ref:`bool` **is_layer_enabled** **(** :ref:`int` layer **)** |const| -Returns if a layer is enabled. +返回某个图层是否已启用。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_TileMap_method_is_layer_navigation_enabled: + +.. rst-class:: classref-method + +:ref:`bool` **is_layer_navigation_enabled** **(** :ref:`int` layer **)** |const| + +返回是否启用图层的内置导航区块生成。 .. rst-class:: classref-item-separator @@ -731,9 +751,9 @@ If ``layer`` is negative, the layers are accessed from the last one. :ref:`bool` **is_layer_y_sort_enabled** **(** :ref:`int` layer **)** |const| -Returns if a layer Y-sorts its tiles. +返回某个图层是否会对图块进行 Y 排序。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 .. rst-class:: classref-item-separator @@ -795,13 +815,13 @@ void **move_layer** **(** :ref:`int` layer, :ref:`int` to_ void **notify_runtime_tile_data_update** **(** :ref:`int` layer=-1 **)** -Notifies the TileMap node that calls to :ref:`_use_tile_data_runtime_update` or :ref:`_tile_data_runtime_update` will lead to different results. This will thus trigger a TileMap update. +通知 TileMap 节点调用 :ref:`_use_tile_data_runtime_update` 或 :ref:`_tile_data_runtime_update` 将导致不同的结果。这将因此触发 TileMap 更新。 -If ``layer`` is provided, only notifies changes for the given layer. Providing the ``layer`` argument (when applicable) is usually preferred for performance reasons. +如果提供了 ``layer``\ ,则仅通知给定层的更改。出于性能原因,通常首选提供 ``layer`` 参数(如果适用)。 -\ **Warning:** Updating the TileMap is computationally expensive and may impact performance. Try to limit the number of calls to this function to avoid unnecessary update. +\ **警告:**\ 更新 TileMap 的计算成本很高,并且可能会影响性能。尝试限制该函数的调用次数,以避免不必要的更新。 -\ **Note:** This does not trigger a direct update of the TileMap, the update will be done at the end of the frame as usual (unless you call :ref:`update_internals`). +\ **注意:**\ 这不会触发 TileMap 的直接更新,该更新将照常在帧结束时完成(除非你调用 :ref:`update_internals`\ )。 .. rst-class:: classref-item-separator @@ -825,17 +845,17 @@ void **remove_layer** **(** :ref:`int` layer **)** void **set_cell** **(** :ref:`int` layer, :ref:`Vector2i` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=0 **)** -Sets the tile identifiers for the cell on layer ``layer`` at coordinates ``coords``. Each tile of the :ref:`TileSet` is identified using three parts: +设置位于层 ``layer`` 坐标为 ``coords`` 的单元格的图块标识符。\ :ref:`TileSet` 中的每个图块都由三部分进行标识: -- The source identifier ``source_id`` identifies a :ref:`TileSetSource` identifier. See :ref:`TileSet.set_source_id`, +- 源标识符 ``source_id`` 标识的是 :ref:`TileSetSource` 标识符。见 :ref:`TileSet.set_source_id`\ , -- The atlas coordinates identifier ``atlas_coords`` identifies a tile coordinates in the atlas (if the source is a :ref:`TileSetAtlasSource`). For :ref:`TileSetScenesCollectionSource` it should always be ``Vector2i(0, 0)``), +- 图集坐标标识符 ``atlas_coords`` 标识的是图集中的图块坐标(如果使用的是 :ref:`TileSetAtlasSource` 源)。如果使用的是 :ref:`TileSetScenesCollectionSource`\ ,应该始终为 ``Vector2i(0, 0)``\ , -- The alternative tile identifier ``alternative_tile`` identifies a tile alternative in the atlas (if the source is a :ref:`TileSetAtlasSource`), and the scene for a :ref:`TileSetScenesCollectionSource`. +- 备选图块标识符 ``alternative_tile`` 标识的是图集中的图块备选项(如果使用的是 :ref:`TileSetAtlasSource` 源),如果使用的是 :ref:`TileSetScenesCollectionSource` 则标识的是场景。 -If ``source_id`` is set to ``-1``, ``atlas_coords`` to ``Vector2i(-1, -1)`` or ``alternative_tile`` to ``-1``, the cell will be erased. An erased cell gets **all** its identifiers automatically set to their respective invalid values, namely ``-1``, ``Vector2i(-1, -1)`` and ``-1``. +如果 ``source_id`` 为 ``-1``\ 、\ ``atlas_coords`` 为 ``Vector2i(-1, -1)`` 或 ``alternative_tile`` 为 ``-1``\ ,则会擦除该单元格。擦除后的单元格中,\ **所有**\ 标识符都会自动设为对应的无效值,即 ``-1``\ 、\ ``Vector2i(-1, -1)`` 和 ``-1``\ 。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负数,则从最后一个图层开始访问。 .. rst-class:: classref-item-separator @@ -847,13 +867,13 @@ If ``layer`` is negative, the layers are accessed from the last one. void **set_cells_terrain_connect** **(** :ref:`int` layer, :ref:`Vector2i[]` cells, :ref:`int` terrain_set, :ref:`int` terrain, :ref:`bool` ignore_empty_terrains=true **)** -Update all the cells in the ``cells`` coordinates array so that they use the given ``terrain`` for the given ``terrain_set``. If an updated cell has the same terrain as one of its neighboring cells, this function tries to join the two. This function might update neighboring tiles if needed to create correct terrain transitions. +更新 ``cells`` 坐标数组中的所有单元格,以便它们将给定的 ``terrain`` 用于给定的 ``terrain_set``\ 。如果一个更新的单元格与其相邻单元格之一具有相同的地形,则该函数会尝试将两者连接起来。如果需要创建正确的地形过渡,该函数可能会更新相邻的图块。 -If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. +如果 ``ignore_empty_terrains`` 为真,则在尝试为给定地形约束找到最合适的图块时,空地形将被忽略。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 -\ **Note:** To work correctly, this method requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results. +\ **注意:**\ 要正常工作,这个方法需要 TileMap 的 TileSet 设置了具有所有必需地形组合的地形。否则,可能会产生意想不到的结果。 .. rst-class:: classref-item-separator @@ -865,13 +885,13 @@ If ``layer`` is negative, the layers are accessed from the last one. void **set_cells_terrain_path** **(** :ref:`int` layer, :ref:`Vector2i[]` path, :ref:`int` terrain_set, :ref:`int` terrain, :ref:`bool` ignore_empty_terrains=true **)** -Update all the cells in the ``path`` coordinates array so that they use the given ``terrain`` for the given ``terrain_set``. The function will also connect two successive cell in the path with the same terrain. This function might update neighboring tiles if needed to create correct terrain transitions. +更新 ``path`` 坐标数组中的所有单元格,以便它们将给定的 ``terrain`` 用于给定的 ``terrain_set``\ 。该函数还将连接路径中具有相同地形的两个连续单元格。如果需要创建正确的地形过渡,该函数可能会更新相邻的图块。 -If ``ignore_empty_terrains`` is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints. +如果 ``ignore_empty_terrains`` 为真,则在尝试为给定地形约束找到最合适的图块时将忽略空地形。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 -\ **Note:** To work correctly, this method requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results. +\ **注意:**\ 要正常工作,这个方法需要 TileMap 的 TileSet 设置了具有所有必需地形组合的地形。否则,可能会产生意想不到的结果。 .. rst-class:: classref-item-separator @@ -919,19 +939,31 @@ void **set_layer_name** **(** :ref:`int` layer, :ref:`String` layer, :ref:`bool` enabled **)** + +启用或禁用图层的内置导航区块生成。如果你需要使用 :ref:`NavigationRegion2D` 节点根据 TileMap 烘焙导航区块,请禁用此项。 + +.. rst-class:: classref-item-separator + +---- + .. _class_TileMap_method_set_layer_navigation_map: .. rst-class:: classref-method void **set_layer_navigation_map** **(** :ref:`int` layer, :ref:`RID` map **)** -Assigns a :ref:`NavigationServer2D` navigation map :ref:`RID` to the specified TileMap ``layer``. +将 :ref:`NavigationServer2D` 导航地图 :ref:`RID` 分配给指定的 TileMap ``layer``\ 。 -By default the TileMap uses the default :ref:`World2D` navigation map for the first TileMap layer. For each additional TileMap layer a new navigation map is created for the additional layer. +默认情况下,TileMap 为第一个 TileMap 层使用默认的 :ref:`World2D` 导航地图。对于每个附加的 TileMap 层,都会为附加层创建一个新的导航地图。 -In order to make :ref:`NavigationAgent2D` switch between TileMap layer navigation maps use :ref:`NavigationAgent2D.set_navigation_map` with the navigation map received from :ref:`get_layer_navigation_map`. +为了使 :ref:`NavigationAgent2D` 在 TileMap 层导航地图之间切换,使用 :ref:`NavigationAgent2D.set_navigation_map` 和从 :ref:`get_navigation_map` 接收的导航地图。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一个图层开始访问。 .. rst-class:: classref-item-separator @@ -989,7 +1021,7 @@ void **set_layer_z_index** **(** :ref:`int` layer, :ref:`int` layer, :ref:`RID` map **)** -See :ref:`set_layer_navigation_map`. +见 :ref:`set_layer_navigation_map`\ 。 .. rst-class:: classref-item-separator @@ -1001,9 +1033,9 @@ See :ref:`set_layer_navigation_map` layer, :ref:`Vector2i` position, :ref:`TileMapPattern` pattern **)** -Paste the given :ref:`TileMapPattern` at the given ``position`` and ``layer`` in the tile map. +将给定的 :ref:`TileMapPattern` 粘贴到图块地图中的 ``position`` 位置和 ``layer`` 层。 -If ``layer`` is negative, the layers are accessed from the last one. +如果 ``layer`` 为负,则从最后一层开始访问。 .. rst-class:: classref-item-separator @@ -1015,16 +1047,16 @@ If ``layer`` is negative, the layers are accessed from the last one. void **update_internals** **(** **)** -Triggers a direct update of the TileMap. Usually, calling this function is not needed, as TileMap node updates automatically when one of its properties or cells is modified. +触发 TileMap 的更新。通常不需要调用这个函数,因为 TileMap 节点的属性发生修改后会自动更新。 -However, for performance reasons, those updates are batched and delayed to the end of the frame. Calling this function will force the TileMap to update right away instead. +但是出于性能原因,会对这些更新进行分批,延迟到该帧的末尾执行。调用这个函数会强制 TileMap 立即进行更新。 -\ **Warning:** Updating the TileMap is computationally expensive and may impact performance. Try to limit the number of updates and how many tiles they impact. +\ **警告:**\ 更新 TileMap 的计算量很大,可能会影响性能。请尽量限制更新的次数和受影响的图块。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_tilemappattern.rst b/classes/zh_CN/class_tilemappattern.rst index 3df077f46e..291c7d4f8a 100644 --- a/classes/zh_CN/class_tilemappattern.rst +++ b/classes/zh_CN/class_tilemappattern.rst @@ -10,14 +10,14 @@ TileMapPattern ============== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 存放 :ref:`TileMap` 的图案,用于复制粘贴。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个资源存放的是一组单元格,能够帮助进行 :ref:`TileMap` 的批量操作。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -59,8 +59,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TileMapPattern_method_get_cell_alternative_tile: @@ -164,7 +164,7 @@ void **remove_cell** **(** :ref:`Vector2i` coords, :ref:`bool` coords, :ref:`int` source_id=-1, :ref:`Vector2i` atlas_coords=Vector2i(-1, -1), :ref:`int` alternative_tile=-1 **)** -Sets the tile identifiers for the cell at coordinates ``coords``. See :ref:`TileMap.set_cell`. +设置位于 ``coords`` 的单元格的图块标识符。见 :ref:`TileMap.set_cell`\ 。 .. rst-class:: classref-item-separator @@ -178,10 +178,10 @@ void **set_size** **(** :ref:`Vector2i` size **)** 设置图案的大小。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_tileset.rst b/classes/zh_CN/class_tileset.rst index 2ae31c85e8..ebcd5ed4bb 100644 --- a/classes/zh_CN/class_tileset.rst +++ b/classes/zh_CN/class_tileset.rst @@ -10,31 +10,31 @@ TileSet ======= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` Tilemap 的图块库。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A TileSet is a library of tiles for a :ref:`TileMap`. A TileSet handles a list of :ref:`TileSetSource`, each of them storing a set of tiles. +TileSet 是 :ref:`TileMap` 的图块库。TileSet 处理 :ref:`TileSetSource` 列表,每个表中存储一组图块。 -Tiles can either be from a :ref:`TileSetAtlasSource`, which renders tiles out of a texture with support for physics, navigation, etc., or from a :ref:`TileSetScenesCollectionSource`, which exposes scene-based tiles. +图块既可以来自 :ref:`TileSetAtlasSource`\ ,可以渲染纹理中的图块,支持物理、导航等功能,也可以来自 :ref:`TileSetScenesCollectionSource`\ ,提供基于场景的图块。 -Tiles are referenced by using three IDs: their source ID, their atlas coordinates ID, and their alternative tile ID. +图块通过使用三个 ID 来引用:源 ID、图集坐标 ID、备选图块 ID。 -A TileSet can be configured so that its tiles expose more or fewer properties. To do so, the TileSet resources use property layers, which you can add or remove depending on your needs. +TileSet 可以配置图块暴露哪些属性。为了做到这一点,TileSet 资源使用了属性层,你可以根据需要进行添加和删除。 -For example, adding a physics layer allows giving collision shapes to your tiles. Each layer has dedicated properties (physics layer and mask), so you may add several TileSet physics layers for each type of collision you need. +例如,添加物理层可以为瓷砖提供碰撞形状。不同的层都有不同的属性(物理层和遮罩),要实现不同类型的碰撞,你也可以添加多个 TileSet 物理层。 -See the functions to add new layers for more information. +更多信息请参阅添加新层的函数。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用 Tilemap <../tutorials/2d/using_tilemaps>` @@ -52,8 +52,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -72,8 +72,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -238,8 +238,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_TileSet_TileShape: @@ -543,8 +543,8 @@ enum **TerrainMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TileSet_property_tile_layout: @@ -633,8 +633,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TileSet_method_add_custom_data_layer: @@ -886,7 +886,7 @@ void **clear_tile_proxies** **(** **)** :ref:`int` **get_next_source_id** **(** **)** |const| -返回新的未使用的源 ID。这个生成的 ID 与调用 ``add_source`` 将返回的 ID 相同。 +返回新的未使用的源 ID。这个生成的 ID 与调用 :ref:`add_source` 将返回的 ID 相同。 .. rst-class:: classref-item-separator @@ -1164,11 +1164,11 @@ void **clear_tile_proxies** **(** **)** :ref:`Array` **map_tile_proxy** **(** :ref:`int` source_from, :ref:`Vector2i` coords_from, :ref:`int` alternative_from **)** |const| -According to the configured proxies, maps the provided identifiers to a new set of identifiers. The source ID, atlas coordinates ID and alternative tile ID are returned as a 3 elements Array. +根据配置的代理,将提供的标识符映射到一组新的标识符。返回的是由源 ID、图集坐标 ID 和备选图块 ID 这三个元素构成的 Array。 -This function first look for matching alternative-level proxies, then coordinates-level proxies, then source-level proxies. +这个函数首先查找匹配的备选级代理,然后是坐标级代理,然后是源级代理。 -If no proxy corresponding to provided identifiers are found, returns the same values the ones used as arguments. +如果未找到与提供的标识符对应的代理,则返回与用作参数的值相同的值。 .. rst-class:: classref-item-separator @@ -1578,10 +1578,10 @@ void **set_terrain_set_mode** **(** :ref:`int` terrain_set, :ref:`Ter 设置地形模式。每种模式决定了图块形状的哪一个位被用来匹配相邻图块的地形。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_tilesetatlassource.rst b/classes/zh_CN/class_tilesetatlassource.rst index 21f55d33ee..cdf232bbf0 100644 --- a/classes/zh_CN/class_tilesetatlassource.rst +++ b/classes/zh_CN/class_tilesetatlassource.rst @@ -10,14 +10,14 @@ TileSetAtlasSource ================== -**Inherits:** :ref:`TileSetSource` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`TileSetSource` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 以一组图块的形式向 :ref:`TileSet` 资源暴露 2D 图集纹理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 图集是在纹理上铺设的图块栅格。栅格中的每个图块都必须使用 :ref:`create_tile` 公开。然后使用它们在栅格中的坐标,对这些图块进行索引。 @@ -31,8 +31,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -51,8 +51,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -127,8 +127,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_TileSetAtlasSource_TileAnimationMode: @@ -142,7 +142,7 @@ enum **TileAnimationMode**: :ref:`TileAnimationMode` **TILE_ANIMATION_MODE_DEFAULT** = ``0`` -Tile animations start at same time, looking identical. +图块动画在相同的时间开始,外观一致。 .. _class_TileSetAtlasSource_constant_TILE_ANIMATION_MODE_RANDOM_START_TIMES: @@ -150,7 +150,7 @@ Tile animations start at same time, looking identical. :ref:`TileAnimationMode` **TILE_ANIMATION_MODE_RANDOM_START_TIMES** = ``1`` -Tile animations start at random times, looking varied. +图块动画在随机的时间开始,外观不同。 .. _class_TileSetAtlasSource_constant_TILE_ANIMATION_MODE_MAX: @@ -158,7 +158,7 @@ Tile animations start at random times, looking varied. :ref:`TileAnimationMode` **TILE_ANIMATION_MODE_MAX** = ``2`` -Represents the size of the :ref:`TileAnimationMode` enum. +代表 :ref:`TileAnimationMode` 枚举的大小。 .. rst-class:: classref-section-separator @@ -166,8 +166,8 @@ Represents the size of the :ref:`TileAnimationMode` to flip placed tiles by altering their alternative IDs. +代表单元格的水平翻转标志。应该直接对 :ref:`TileMap` 使用,修改放置图块的备选 ID,将其进行翻转。 :: var alternate_id = $TileMap.get_cell_alternative_tile(0, Vector2i(2, 2)) if not alternate_id & TileSetAtlasSource.TRANSFORM_FLIP_H: - # If tile is not already flipped, flip it. + # 如果没有翻转过就进行翻转。 $TileMap.set_cell(0, Vector2i(2, 2), source_id, atlas_coords, alternate_id | TileSetAtlasSource.TRANSFORM_FLIP_H) .. _class_TileSetAtlasSource_constant_TRANSFORM_FLIP_V: @@ -190,7 +190,7 @@ Represents cell's horizontal flip flag. Should be used directly with :ref:`TileM **TRANSFORM_FLIP_V** = ``8192`` -Represents cell's vertical flip flag. See :ref:`TRANSFORM_FLIP_H` for usage. +代表单元格的垂直翻转标志。用法见 :ref:`TRANSFORM_FLIP_H`\ 。 .. _class_TileSetAtlasSource_constant_TRANSFORM_TRANSPOSE: @@ -198,7 +198,7 @@ Represents cell's vertical flip flag. See :ref:`TRANSFORM_FLIP_H` for usage. +代表单元格的转置标志。用法见 :ref:`TRANSFORM_FLIP_H`\ 。 .. rst-class:: classref-section-separator @@ -206,8 +206,8 @@ Represents cell's transposed flag. See :ref:`TRANSFORM_FLIP_H` beforehand. +移除所有位于可用纹理区域之外的图块。这个方法会遍历所有源的图块,因此建议先使用 :ref:`has_tiles_outside_texture`\ 。 .. rst-class:: classref-item-separator @@ -345,7 +345,7 @@ void **create_tile** **(** :ref:`Vector2i` atlas_coords, :ref:`V :ref:`Vector2i` **get_atlas_grid_size** **(** **)** |const| -返回图集栅格大小,这取决于纹理中可以容纳多少个图块。因此,它取决于纹理的大小,该图集 ``margins``\ 、和该图块的 ``texture_region_size``\ 。 +返回图集栅格大小,这取决于纹理中可以容纳多少个图块。因此,它取决于 :ref:`texture` 的大小,该图集的 :ref:`margins`\ 、和该图块的 :ref:`texture_region_size`\ 。 .. rst-class:: classref-item-separator @@ -431,7 +431,7 @@ void **create_tile** **(** :ref:`Vector2i` atlas_coords, :ref:`V :ref:`TileAnimationMode` **get_tile_animation_mode** **(** :ref:`Vector2i` atlas_coords **)** |const| -Returns the :ref:`TileAnimationMode` of the tile at ``atlas_coords``. See also :ref:`set_tile_animation_mode`. +返回图集坐标为 ``atlas_coords`` 的图块的 :ref:`TileAnimationMode`\ 。另见 :ref:`set_tile_animation_mode`\ 。 .. rst-class:: classref-item-separator @@ -551,7 +551,7 @@ Returns the :ref:`TileAnimationMode` :ref:`bool` **has_tiles_outside_texture** **(** **)** |const| -Checks if the source has any tiles that don't fit the texture area (either partially or completely). +检查该源是否存在位于纹理区域之外的图块(无论是部分位于区域外还是完全位于区域外)。 .. rst-class:: classref-item-separator @@ -655,7 +655,7 @@ void **set_tile_animation_frames_count** **(** :ref:`Vector2i` a void **set_tile_animation_mode** **(** :ref:`Vector2i` atlas_coords, :ref:`TileAnimationMode` mode **)** -Sets the :ref:`TileAnimationMode` of the tile at ``atlas_coords`` to ``mode``. See also :ref:`get_tile_animation_mode`. +将图集坐标为 ``atlas_coords`` 的图块的 :ref:`TileAnimationMode` 设置为 ``mode``\ 。另见 :ref:`get_tile_animation_mode`\ 。 .. rst-class:: classref-item-separator @@ -681,10 +681,10 @@ void **set_tile_animation_speed** **(** :ref:`Vector2i` atlas_co 设置位于坐标 ``atlas_coords`` 的图块的动画速度。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_tilesetscenescollectionsource.rst b/classes/zh_CN/class_tilesetscenescollectionsource.rst index 0e0a8eec23..5f151031ed 100644 --- a/classes/zh_CN/class_tilesetscenescollectionsource.rst +++ b/classes/zh_CN/class_tilesetscenescollectionsource.rst @@ -10,14 +10,14 @@ TileSetScenesCollectionSource ============================= -**Inherits:** :ref:`TileSetSource` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`TileSetSource` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 以图块的形式向 :ref:`TileSet` 资源暴露一组场景。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 当放置在 :ref:`TileMap` 上时,来自 **TileSetScenesCollectionSource** 中的图块将在 TileMap 中的单元格位置自动实例化一个关联场景。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -61,8 +61,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TileSetScenesCollectionSource_method_create_scene_tile: @@ -194,10 +194,10 @@ void **set_scene_tile_scene** **(** :ref:`int` id, :ref:`PackedScene< 将 :ref:`PackedScene` 资源分配给 ID 为 ``id`` 的场景图块。如果该场景扩展的不是 CanvasItem 则会失败,因为将场景放置到 TileMap 上需要位置属性。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_tilesetsource.rst b/classes/zh_CN/class_tilesetsource.rst index a1b9c2f86d..411e02ff9a 100644 --- a/classes/zh_CN/class_tilesetsource.rst +++ b/classes/zh_CN/class_tilesetsource.rst @@ -10,16 +10,16 @@ TileSetSource ============= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`TileSetAtlasSource`, :ref:`TileSetScenesCollectionSource` +**派生:** :ref:`TileSetAtlasSource`, :ref:`TileSetScenesCollectionSource` 向 :ref:`TileSet` 资源暴露一组图块。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 向 :ref:`TileSet` 资源暴露一组图块。 @@ -33,8 +33,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -59,8 +59,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TileSetSource_method_get_alternative_tile_id: @@ -134,10 +134,10 @@ Method Descriptions 返回该图集中是否存在坐标 ID 为 ``atlas_coords`` 的图块。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_time.rst b/classes/zh_CN/class_time.rst index 991d32d140..e8794afa14 100644 --- a/classes/zh_CN/class_time.rst +++ b/classes/zh_CN/class_time.rst @@ -10,14 +10,14 @@ Time ==== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 用于处理时间数据的单例。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- Time 单例可以转换各种不同格式的时间,也可以从系统获取时间信息。 @@ -31,8 +31,8 @@ Time 单例可以转换各种不同格式的时间,也可以从系统获取时 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -87,8 +87,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Time_Month: @@ -264,8 +264,8 @@ enum **Weekday**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Time_method_get_date_dict_from_system: @@ -507,7 +507,11 @@ Method Descriptions :ref:`Dictionary` **get_time_zone_from_system** **(** **)** |const| -以字典的形式返回当前时区,包含的键为:\ ``bias``\ (偏置)和 ``name``\ (名称)。\ ``bias`` 的值是从 UTC 的偏移量,单位为分,因为并不是所有时区与 UTC 的时间差都是整数倍小时。 +以字典的形式返回当前时区,包含的键为:\ ``bias`` 和 ``name``\ 。 + +- ``bias`` 是相对于 UTC 的偏移量,单位为分钟,因为并不是所有时区与 UTC 的时间差都是整数倍小时。 + +- ``name`` 是时区的本地化名称,取决于当前用户的操作系统区域设置。 .. rst-class:: classref-item-separator @@ -559,10 +563,10 @@ Method Descriptions \ **注意:**\ 与其他使用整数时间戳的方法不同,这个方法返回的是 :ref:`float` 类型的时间戳,可以表示比秒更高的精度。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_timer.rst b/classes/zh_CN/class_timer.rst index 73152f4287..4bd363b6e8 100644 --- a/classes/zh_CN/class_timer.rst +++ b/classes/zh_CN/class_timer.rst @@ -10,14 +10,14 @@ Timer ===== -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` 倒数计时器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 使用指定的间隔进行倒计时,并在到达 0 时发出信号。可以设置为重复或“一次性”模式。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `2D Dodge The Creeps 演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -76,8 +76,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Timer_signal_timeout: @@ -93,8 +93,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Timer_TimerProcessCallback: @@ -124,8 +124,8 @@ enum **TimerProcessCallback**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Timer_property_autostart: @@ -236,8 +236,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Timer_method_is_stopped: @@ -273,10 +273,10 @@ void **stop** **(** **)** 停止计时器。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_tlsoptions.rst b/classes/zh_CN/class_tlsoptions.rst index 72ef066e20..5e1cf371cc 100644 --- a/classes/zh_CN/class_tlsoptions.rst +++ b/classes/zh_CN/class_tlsoptions.rst @@ -10,14 +10,14 @@ TLSOptions ========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 客户端与服务器的 TLS 配置。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- TLSOptions 是对 :ref:`StreamPeerTLS` 和 :ref:`PacketPeerDTLS` 类中配置选项的抽象。 @@ -41,8 +41,8 @@ TLSOptions 是对 :ref:`StreamPeerTLS` 和 :ref:`PacketPeer .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -61,8 +61,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TLSOptions_method_client: @@ -104,10 +104,10 @@ Method Descriptions \ **注意:**\ ``certificate`` 中应当包含签名 CA 的完整证书链(可以使用通用文本编辑器连接证书文件)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_torusmesh.rst b/classes/zh_CN/class_torusmesh.rst index edbde6e6d8..87f1bc3636 100644 --- a/classes/zh_CN/class_torusmesh.rst +++ b/classes/zh_CN/class_torusmesh.rst @@ -10,21 +10,21 @@ TorusMesh ========= -**Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 表示圆环 :ref:`PrimitiveMesh` 的类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 表示圆环 :ref:`PrimitiveMesh` 的类。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TorusMesh_property_inner_radius: @@ -112,10 +112,10 @@ Property Descriptions 构成圆环的切片数。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_touchscreenbutton.rst b/classes/zh_CN/class_touchscreenbutton.rst index 7e03c9a99d..4db957299d 100644 --- a/classes/zh_CN/class_touchscreenbutton.rst +++ b/classes/zh_CN/class_touchscreenbutton.rst @@ -10,14 +10,14 @@ TouchScreenButton ================= -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 触摸屏设备的按钮,供游戏使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- TouchScreenButton 允许你为触摸设备创建屏幕上的按钮。其为游戏使用,比如在必须触摸才能移动的设备。与 :ref:`Button` 不同,TouchScreenButton 原生支持多点触摸。几个 TouchScreenButton 可以通过触摸输入同时被按下。 @@ -27,8 +27,8 @@ TouchScreenButton 允许你为触摸设备创建屏幕上的按钮。其为游 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -55,8 +55,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -71,8 +71,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_TouchScreenButton_signal_pressed: @@ -100,8 +100,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_TouchScreenButton_VisibilityMode: @@ -131,8 +131,8 @@ enum **VisibilityMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TouchScreenButton_property_action: @@ -291,8 +291,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TouchScreenButton_method_is_pressed: @@ -302,10 +302,10 @@ Method Descriptions 如果这个按钮当前被按下,则返回 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_transform2d.rst b/classes/zh_CN/class_transform2d.rst index 5aaac1e3f6..0befb4e086 100644 --- a/classes/zh_CN/class_transform2d.rst +++ b/classes/zh_CN/class_transform2d.rst @@ -14,8 +14,8 @@ Transform2D .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于 2D 线性变换的 2×3 矩阵(2 行 3 列),可以表示平移、旋转、缩放等变换,由三个 :ref:`Vector2` 值组成:\ :ref:`x`\ 、\ :ref:`y`\ 、\ :ref:`origin`\ 。 @@ -23,12 +23,12 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`数学文档索引 <../tutorials/math/index>` @@ -40,8 +40,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -76,8 +76,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -103,6 +103,8 @@ Methods +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform2D` | :ref:`inverse` **(** **)** |const| | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_conformal` **(** **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_equal_approx` **(** :ref:`Transform2D` xform **)** |const| | +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_finite` **(** **)** |const| | @@ -126,8 +128,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -158,8 +160,8 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Transform2D_constant_IDENTITY: @@ -191,8 +193,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Transform2D_property_origin: @@ -232,8 +234,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_Transform2D_constructor_Transform2D: @@ -289,8 +291,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Transform2D_method_affine_inverse: @@ -298,7 +300,7 @@ Method Descriptions :ref:`Transform2D` **affine_inverse** **(** **)** |const| -返回该变换的逆,假设变换由旋转、缩放和平移组成。 +假设该基可逆(必须具有非零行列式),返回该变换的逆。 .. rst-class:: classref-item-separator @@ -312,7 +314,7 @@ Method Descriptions 返回经过基矩阵变换(相乘)的向量。 -该方法不考虑平移(原点向量)。 +该方法不考虑平移(\ :ref:`origin` 向量)。 .. rst-class:: classref-item-separator @@ -324,9 +326,13 @@ Method Descriptions :ref:`Vector2` **basis_xform_inv** **(** :ref:`Vector2` v **)** |const| -返回经过逆基矩阵变换(相乘)的向量。 +返回一个由逆基矩阵变换(乘以)的向量,假设该基是正交的(即旋转/反射可以,缩放/倾斜不行)。 -该方法不考虑平移(原点向量)。 +该方法不考虑翻译(\ :ref:`origin` 向量)。 + +\ ``transform.basis_xform_inv(vector)`` 性当于 ``transform.inverse().basis_xform(vector)``\ 。请参阅 :ref:`inverse`\ 。 + +对于非正交变换(例如缩放),可以使用 ``transform.affine_inverse().basis_xform(vector)`` 代替。请参阅 :ref:`affine_inverse`\ 。 .. rst-class:: classref-item-separator @@ -412,7 +418,19 @@ Method Descriptions :ref:`Transform2D` **inverse** **(** **)** |const| -返回变换的反值,假设该变换是由旋转和平移组成的(没有缩放,对有缩放的变换使用 :ref:`affine_inverse`\ )。 +返回变换的逆,假设该变换的基是正交的(即旋转/反射可以,缩放/倾斜不行)。使用 :ref:`affine_inverse` 进行非正交变换(例如缩放)。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_Transform2D_method_is_conformal: + +.. rst-class:: classref-method + +:ref:`bool` **is_conformal** **(** **)** |const| + +如果该变换的基是共形的,则返回 ``true``\ ,这意味着它保留角度和距离比率,并且只能由旋转和统一缩放组成。如果该变换的基具有不均匀的缩放或剪切/倾斜,则返回 ``false``\ 。这可被用于验证该变换是否失真,这对于物理和其他用例很重要。 .. rst-class:: classref-item-separator @@ -424,7 +442,7 @@ Method Descriptions :ref:`bool` **is_equal_approx** **(** :ref:`Transform2D` xform **)** |const| -如果该变换和 ``xform`` 近似相等,则返回 ``true``\ ,确定近似相等的方法是在每个分量上调用 ``is_equal_approx``\ 。 +如果通过在每个分量上运行 :ref:`@GlobalScope.is_equal_approx`\ ,该变换和 ``xform`` 近似相等,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -566,8 +584,8 @@ Method Descriptions .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Transform2D_operator_neq_Transform2D: @@ -637,7 +655,7 @@ Operator Descriptions :ref:`Transform2D` **operator *** **(** :ref:`float` right **)** -这个运算符对该 **Transform2D** 的所有分量进行乘运算,包括原点向量,进行统一缩放。 +该运算符将 **Transform2D** 的所有分量相乘,包括 :ref:`origin` 向量,从而对其进行统一缩放。 .. rst-class:: classref-item-separator @@ -649,7 +667,7 @@ Operator Descriptions :ref:`Transform2D` **operator *** **(** :ref:`int` right **)** -这个运算符对该 **Transform2D** 的所有分量进行乘运算,包括原点向量,进行统一缩放。 +该运算符将 **Transform2D** 的所有分量相乘,包括 :ref:`origin` 向量,从而对其进行统一缩放。 .. rst-class:: classref-item-separator @@ -675,12 +693,12 @@ Operator Descriptions :ref:`Vector2` **operator []** **(** :ref:`int` index **)** -使用其索引访问变换的分量。\ ``t[0]`` 相当于 ``t.x``\ ,\ ``t[1]`` 相当于 ``t.y``\ ,\ ``t[2]`` 相当于 ``t.origin``\ 。 +使用变换分量的索引访问变换的分量。\ ``t[0]`` 相当于 ``t.x``\ ,\ ``t[1]`` 相当于 ``t.y``\ ,\ ``t[2]`` 相当于 ``t.origin``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_transform3d.rst b/classes/zh_CN/class_transform3d.rst index 8da0ec65e5..57a7ef9192 100644 --- a/classes/zh_CN/class_transform3d.rst +++ b/classes/zh_CN/class_transform3d.rst @@ -14,8 +14,8 @@ Transform3D .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于 3D 线性变换的 3×4 矩阵(3 行 4 列),可以表示平移、旋转、缩放等变换,由 :ref:`basis`\ (前三列)和 :ref:`origin` 的 :ref:`Vector3`\ (最后一列)组成。 @@ -23,12 +23,12 @@ Description .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`数学文档索引 <../tutorials/math/index>` @@ -44,8 +44,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -78,8 +78,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -114,8 +114,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -146,8 +146,8 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Transform3D_constant_IDENTITY: @@ -187,8 +187,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Transform3D_property_basis: @@ -216,8 +216,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_Transform3D_constructor_Transform3D: @@ -273,8 +273,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Transform3D_method_affine_inverse: @@ -282,7 +282,7 @@ Method Descriptions :ref:`Transform3D` **affine_inverse** **(** **)** |const| -返回该变换的逆,假设变换由旋转、缩放和平移组成。 +假设该基可逆(必须具有非零行列式),返回该变换的逆。 .. rst-class:: classref-item-separator @@ -306,7 +306,7 @@ Method Descriptions :ref:`Transform3D` **inverse** **(** **)** |const| -返回变换的反值,假设该变换是由旋转和平移组成的(没有缩放,对有缩放的变换使用 :ref:`affine_inverse`\ )。 +返回变换的逆,假设该变换的基是正交的(即旋转/反射可以,缩放/倾斜不行)。使用 :ref:`affine_inverse` 进行非正交变换(例如缩放)。 .. rst-class:: classref-item-separator @@ -318,7 +318,7 @@ Method Descriptions :ref:`bool` **is_equal_approx** **(** :ref:`Transform3D` xform **)** |const| -如果该变换和 ``xform`` 近似相等,则返回 ``true``\ ,确定近似相等的方法是在每个分量上调用 ``is_equal_approx``\ 。 +如果通过在每个分量上运行 :ref:`@GlobalScope.is_equal_approx`\ ,该变换和 ``xform`` 近似相等,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -466,8 +466,8 @@ Method Descriptions .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Transform3D_operator_neq_Transform3D: @@ -549,7 +549,7 @@ Operator Descriptions :ref:`Transform3D` **operator *** **(** :ref:`float` right **)** -这个运算符对该 **Transform3D** 的所有分量进行乘运算,包括原点向量,进行统一缩放。 +该运算符将 **Transform3D** 的所有分量相乘,包括 :ref:`origin` 向量,从而对其进行统一缩放。 .. rst-class:: classref-item-separator @@ -561,7 +561,7 @@ Operator Descriptions :ref:`Transform3D` **operator *** **(** :ref:`int` right **)** -这个运算符对该 **Transform3D** 的所有分量进行乘运算,包括原点向量,进行统一缩放。 +该运算符将 **Transform3D** 的所有分量相乘,包括 :ref:`origin` 向量,从而对其进行统一缩放。 .. rst-class:: classref-item-separator @@ -577,10 +577,10 @@ Operator Descriptions \ **注意:**\ 由于浮点数精度误差,请考虑改用 :ref:`is_equal_approx`\ ,会更可靠。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_translation.rst b/classes/zh_CN/class_translation.rst index b0552c0f2e..4df19ca9c0 100644 --- a/classes/zh_CN/class_translation.rst +++ b/classes/zh_CN/class_translation.rst @@ -10,23 +10,23 @@ Translation =========== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`OptimizedTranslation` +**派生:** :ref:`OptimizedTranslation` 语言翻译,能够将一组字符串映射到对应的翻译。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **Translation** 是可以按需加载和卸载的资源,能够将一组字符串映射到对应的翻译。还为复数形式提供了便捷方法。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`将游戏国际化 <../tutorials/i18n/internationalizing_games>` @@ -34,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,33 +46,33 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`_get_message` **(** :ref:`StringName` src_message, :ref:`StringName` context **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`_get_plural_message` **(** :ref:`StringName` src_message, :ref:`StringName` src_plural_message, :ref:`int` n, :ref:`StringName` context **)** |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_message` **(** :ref:`StringName` src_message, :ref:`StringName` xlated_message, :ref:`StringName` context="" **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_plural_message` **(** :ref:`StringName` src_message, :ref:`PackedStringArray` xlated_messages, :ref:`StringName` context="" **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`erase_message` **(** :ref:`StringName` src_message, :ref:`StringName` context="" **)** | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_message` **(** :ref:`StringName` src_message, :ref:`StringName` context="" **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_message_count` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_message_list` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`get_plural_message` **(** :ref:`StringName` src_message, :ref:`StringName` src_plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_translated_message_list` **(** **)** |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`_get_message` **(** :ref:`StringName` src_message, :ref:`StringName` context **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`_get_plural_message` **(** :ref:`StringName` src_message, :ref:`StringName` src_plural_message, :ref:`int` n, :ref:`StringName` context **)** |virtual| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_message` **(** :ref:`StringName` src_message, :ref:`StringName` xlated_message, :ref:`StringName` context="" **)** | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_plural_message` **(** :ref:`StringName` src_message, :ref:`PackedStringArray` xlated_messages, :ref:`StringName` context="" **)** | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`erase_message` **(** :ref:`StringName` src_message, :ref:`StringName` context="" **)** | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_message` **(** :ref:`StringName` src_message, :ref:`StringName` context="" **)** |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_message_count` **(** **)** |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_message_list` **(** **)** |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`get_plural_message` **(** :ref:`StringName` src_message, :ref:`StringName` src_plural_message, :ref:`int` n, :ref:`StringName` context="" **)** |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_translated_message_list` **(** **)** |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -80,8 +80,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Translation_property_locale: @@ -102,10 +102,10 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_Translation_method__get_message: +.. _class_Translation_private_method__get_message: .. rst-class:: classref-method @@ -117,7 +117,7 @@ Method Descriptions ---- -.. _class_Translation_method__get_plural_message: +.. _class_Translation_private_method__get_plural_message: .. rst-class:: classref-method @@ -227,10 +227,10 @@ void **erase_message** **(** :ref:`StringName` src_message, :r 返回所有信息(翻译后的文本)。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_translationserver.rst b/classes/zh_CN/class_translationserver.rst index e4ae3dd462..2904ed2b50 100644 --- a/classes/zh_CN/class_translationserver.rst +++ b/classes/zh_CN/class_translationserver.rst @@ -10,21 +10,21 @@ TranslationServer ================= -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 负责语言翻译的服务器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 管理所有语言翻译的服务器。可以向其中添加翻译,也可以从中移除翻译。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`将游戏国际化 <../tutorials/i18n/internationalizing_games>` @@ -32,8 +32,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -44,8 +44,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -100,8 +100,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TranslationServer_property_pseudolocalization_enabled: @@ -122,8 +122,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TranslationServer_method_add_translation: @@ -383,10 +383,10 @@ void **set_locale** **(** :ref:`String` locale **)** 数字 ``n`` 是复数对象的数量。翻译系统会根据这个数字来针对所选语言获取正确的复数形式。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_tree.rst b/classes/zh_CN/class_tree.rst index 36425278f0..33ac90de57 100644 --- a/classes/zh_CN/class_tree.rst +++ b/classes/zh_CN/class_tree.rst @@ -10,14 +10,14 @@ Tree ==== -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 用于以层级结构显示一组内部 :ref:`TreeItem` 的控件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于以层级结构显示一组内部 :ref:`TreeItem` 的控件。树项目可以选择、展开、折叠。该树可以有多列的自定义控件,如 :ref:`LineEdit`\ 、按钮和弹出窗口。对于结构化显示和互动很有用。 @@ -58,8 +58,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -96,8 +96,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -180,8 +180,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -312,8 +312,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Tree_signal_button_clicked: @@ -477,7 +477,7 @@ Signals **multi_selected** **(** :ref:`TreeItem` item, :ref:`int` column, :ref:`bool` selected **)** -如果 ``select_mode`` 为 :ref:`SELECT_MULTI` 时,代替 ``item_selected`` 发出。 +如果 :ref:`select_mode` 被设置为 :ref:`SELECT_MULTI`\ ,则代替 :ref:`item_selected` 发出。 .. rst-class:: classref-item-separator @@ -497,8 +497,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Tree_SelectMode: @@ -582,8 +582,8 @@ enum **DropModeFlags**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Tree_property_allow_reselect: @@ -681,7 +681,7 @@ Property Descriptions - void **set_drop_mode_flags** **(** :ref:`int` value **)** - :ref:`int` **get_drop_mode_flags** **(** **)** -放置模式是标志的按位或(OR)组合。见 :ref:`DropModeFlags` 常量。放置完成后会恢复为 :ref:`DROP_MODE_DISABLED`\ 。建议在 :ref:`Control._can_drop_data` 期间设置。 +放置模式是标志的按位或(OR)组合。见 :ref:`DropModeFlags` 常量。放置完成后会恢复为 :ref:`DROP_MODE_DISABLED`\ 。建议在 :ref:`Control._can_drop_data` 期间设置。 控制的是放置区,即根据鼠标的位置决定并绘制可能的放置位置。 @@ -793,8 +793,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Tree_method_clear: @@ -1293,8 +1293,8 @@ void **set_selected** **(** :ref:`TreeItem` item, :ref:`int` **inner_item_margin_bottom** = ``0`` -The inner bottom margin of an item. +项目的底部内边距。 .. rst-class:: classref-item-separator @@ -1506,7 +1506,7 @@ The inner bottom margin of an item. :ref:`int` **inner_item_margin_left** = ``0`` -The inner left margin of an item. +项目的左侧内边距。 .. rst-class:: classref-item-separator @@ -1518,7 +1518,7 @@ The inner left margin of an item. :ref:`int` **inner_item_margin_right** = ``0`` -The inner right margin of an item. +项目的右侧内边距。 .. rst-class:: classref-item-separator @@ -1530,7 +1530,7 @@ The inner right margin of an item. :ref:`int` **inner_item_margin_top** = ``0`` -The inner top margin of an item. +项目的顶部内边距。 .. rst-class:: classref-item-separator @@ -1676,7 +1676,7 @@ The inner top margin of an item. :ref:`int` **scrollbar_margin_top** = ``-1`` -The top margin of the vertical scrollbar. When negative, uses :ref:`panel` top margin. +垂直滚动条的顶部边距。为负数时会使用 :ref:`panel` 的顶部边距。 .. rst-class:: classref-item-separator @@ -1748,7 +1748,7 @@ The top margin of the vertical scrollbar. When negative, uses :ref:`panel` **title_button_font_size** -Font size of the title button's text. +标题按钮文本的字体大小。 .. rst-class:: classref-item-separator @@ -2002,10 +2002,10 @@ Font size of the title button's text. 当标题按钮被按下时使用的 :ref:`StyleBox`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_treeitem.rst b/classes/zh_CN/class_treeitem.rst index 5285e70bb1..9f43e2d60f 100644 --- a/classes/zh_CN/class_treeitem.rst +++ b/classes/zh_CN/class_treeitem.rst @@ -10,14 +10,14 @@ TreeItem ======== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 代表 :ref:`Tree` 中某个项目的内部控件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`Tree` 控件中的单个项目。可以包含其他 **TreeItem** 作为子级,从而创建层级结构。还可以包含文本和按钮。\ **TreeItem** 不是 :ref:`Node`\ ,在 :ref:`Tree` 内部使用。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -257,8 +257,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_TreeItem_TreeCellMode: @@ -312,8 +312,8 @@ enum **TreeCellMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TreeItem_property_collapsed: @@ -387,8 +387,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_TreeItem_method_add_button: @@ -890,7 +890,7 @@ void **erase_button** **(** :ref:`int` column, :ref:`int` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -904,7 +904,7 @@ void **erase_button** **(** :ref:`int` column, :ref:`int` .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -964,7 +964,7 @@ void **erase_button** **(** :ref:`int` column, :ref:`int` :ref:`OverrunBehavior` **get_text_overrun_behavior** **(** :ref:`int` column **)** |const| -Returns the clipping behavior when the text exceeds the item's bounding rectangle in the given ``column``. By default it is :ref:`TextServer.OVERRUN_TRIM_ELLIPSIS`. +返回当给定 ``column`` 中文本超出项目的边界矩形时的裁剪行为。默认情况下它是 :ref:`TextServer.OVERRUN_TRIM_ELLIPSIS`\ 。 .. rst-class:: classref-item-separator @@ -1040,7 +1040,7 @@ Returns the clipping behavior when the text exceeds the item's bounding rectangl .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1226,7 +1226,7 @@ void **set_button_disabled** **(** :ref:`int` column, :ref:`int` column, :ref:`int` button_index, :ref:`String` tooltip **)** -Sets the tooltip text for the button at index ``button_index`` in the given ``column``. +设置给定 ``column`` 中索引 ``button_index`` 处按钮的工具提示文本。 .. rst-class:: classref-item-separator @@ -1276,7 +1276,7 @@ void **set_custom_as_button** **(** :ref:`int` column, :ref:`bool`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1514,7 +1514,7 @@ void **set_structured_text_bidi_override** **(** :ref:`int` column, : .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1528,7 +1528,7 @@ void **set_structured_text_bidi_override_options** **(** :ref:`int` c .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1588,7 +1588,7 @@ void **set_text_direction** **(** :ref:`int` column, :ref:`TextDirect void **set_text_overrun_behavior** **(** :ref:`int` column, :ref:`OverrunBehavior` overrun_behavior **)** -Sets the clipping behavior when the text exceeds the item's bounding rectangle in the given ``column``. +设置当文本超出给定 ``column`` 中项目的边界矩形时的裁剪行为。 .. rst-class:: classref-item-separator @@ -1614,12 +1614,12 @@ void **uncollapse_tree** **(** **)** .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_trianglemesh.rst b/classes/zh_CN/class_trianglemesh.rst index 2145dc0bd9..2549a0e0ca 100644 --- a/classes/zh_CN/class_trianglemesh.rst +++ b/classes/zh_CN/class_trianglemesh.rst @@ -10,21 +10,21 @@ TriangleMesh ============ -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 内部网格类型。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 内部用于碰撞计算的网格类型。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_tubetrailmesh.rst b/classes/zh_CN/class_tubetrailmesh.rst index b12d5215b5..4bdcc6ed72 100644 --- a/classes/zh_CN/class_tubetrailmesh.rst +++ b/classes/zh_CN/class_tubetrailmesh.rst @@ -10,14 +10,14 @@ TubeTrailMesh ============= -**Inherits:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PrimitiveMesh` **<** :ref:`Mesh` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表直管状的 :ref:`PrimitiveMesh`\ ,宽度可变。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **TubeTrailMesh** 代表直管状的网格,宽度可变。管身由若干圆柱形分区构成,每个分区的长度 :ref:`section_length` 和环数 :ref:`section_rings` 都是一致的。会沿着管身的总长度对 :ref:`curve` 采样,这样该曲线就确定了管子半径沿长度的变化方式。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`3D 粒子拖尾 <../tutorials/3d/particles/trails>` @@ -34,8 +34,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_TubeTrailMesh_property_cap_bottom: @@ -199,10 +199,10 @@ Property Descriptions 管身分区总数。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_tween.rst b/classes/zh_CN/class_tween.rst index 2809c34e56..44531836b0 100644 --- a/classes/zh_CN/class_tween.rst +++ b/classes/zh_CN/class_tween.rst @@ -10,22 +10,22 @@ Tween ===== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 通过脚本进行通用动画的轻量级对象,使用 :ref:`Tweener`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Tweens are mostly useful for animations requiring a numerical property to be interpolated over a range of values. The name *tween* comes from *in-betweening*, an animation technique where you specify *keyframes* and the computer interpolates the frames that appear between them. Animating something with a **Tween** is called tweening. +Tween 主要用于需要将一个数值属性插值到一系列值的动画。\ *tween* 这个名字来自 *in-betweening*\ ,这是一种动画技术,可以在其中指定 *关键帧*\ ,然后计算机会插入出现在它们之间的帧。使用 **Tween** 制作动画被称为补间动画。 -\ **Tween** is more suited than :ref:`AnimationPlayer` for animations where you don't know the final values in advance. For example, interpolating a dynamically-chosen camera zoom value is best done with a **Tween**; it would be difficult to do the same thing with an :ref:`AnimationPlayer` node. Tweens are also more light-weight than :ref:`AnimationPlayer`, so they are very much suited for simple animations or general tasks that don't require visual tweaking provided by the editor. They can be used in a fire-and-forget manner for some logic that normally would be done by code. You can e.g. make something shoot periodically by using a looped :ref:`CallbackTweener` with a delay. +\ **Tween** 比 :ref:`AnimationPlayer` 更适合事先不知道最终值的动画。例如,插入动态选择的相机缩放值最好使用 **Tween** 完成;很难使用 :ref:`AnimationPlayer` 节点做同样的事情。Tween 也比 :ref:`AnimationPlayer` 更轻量级,因此它们非常适合简单的动画,或不需要编辑器提供的视觉调整的通用任务。对于通常由代码完成的某些逻辑,它们可以以即用即弃的方式使用。例如,可以使用带延迟的循环 :ref:`CallbackTweener` 定期射击。 -A **Tween** can be created by using either :ref:`SceneTree.create_tween` or :ref:`Node.create_tween`. **Tween**\ s created manually (i.e. by using ``Tween.new()``) are invalid and can't be used for tweening values. +可以使用 :ref:`SceneTree.create_tween` 或 :ref:`Node.create_tween` 创建 **Tween**\ 。手动创建的 **Tween**\ (即使用 ``Tween.new()``\ )无效,不能用于对值进行补间。 -A tween animation is created by adding :ref:`Tweener`\ s to the **Tween** object, using :ref:`tween_property`, :ref:`tween_interval`, :ref:`tween_callback` or :ref:`tween_method`: +通过使用 :ref:`tween_property`\ 、\ :ref:`tween_interval`\ 、\ :ref:`tween_callback`\ 、或 :ref:`tween_method`\ ,可将 :ref:`Tweener` 添加到 **Tween** 对象来创建一个补间动画: .. tabs:: @@ -46,9 +46,9 @@ A tween animation is created by adding :ref:`Tweener`\ s to the * -This sequence will make the ``$Sprite`` node turn red, then shrink, before finally calling :ref:`Node.queue_free` to free the sprite. :ref:`Tweener`\ s are executed one after another by default. This behavior can be changed using :ref:`parallel` and :ref:`set_parallel`. +该序列将使 ``$Sprite`` 节点变红,然后缩小,最后调用 :ref:`Node.queue_free` 来释放该精灵。默认情况下,\ :ref:`Tweener` 一个接一个地执行。这种行为可以使用 :ref:`parallel` 和 :ref:`set_parallel` 来更改。 -When a :ref:`Tweener` is created with one of the ``tween_*`` methods, a chained method call can be used to tweak the properties of this :ref:`Tweener`. For example, if you want to set a different transition type in the above example, you can use :ref:`set_trans`: +当使用 ``tween_*`` 方法之一创建 :ref:`Tweener` 时,可以使用链式方法调用来调整该 :ref:`Tweener` 的属性。例如,如果想在上面的例子中设置一个不同的过渡类型,可以使用 :ref:`set_trans`\ : .. tabs:: @@ -69,7 +69,7 @@ When a :ref:`Tweener` is created with one of the ``tween_*`` meth -Most of the **Tween** methods can be chained this way too. In the following example the **Tween** is bound to the running script's node and a default transition is set for its :ref:`Tweener`\ s: +大多数 **Tween** 方法也可以这样链式调用。在下面的示例中,\ **Tween** 被绑定到运行脚本的节点,并为其 :ref:`Tweener` 设置了默认过渡: .. tabs:: @@ -90,7 +90,7 @@ Most of the **Tween** methods can be chained this way too. In the following exam -Another interesting use for **Tween**\ s is animating arbitrary sets of objects: +\ **Tween** 的另一个有趣用途是动画化任意对象集: .. tabs:: @@ -109,9 +109,9 @@ Another interesting use for **Tween**\ s is animating arbitrary sets of objects: -In the example above, all children of a node are moved one after another to position (0, 0). +在上面的示例中,一个节点的所有子节点都被依次移动到位置 (0, 0)。 -You should avoid using more than one **Tween** per object's property. If two or more tweens animate one property at the same time, the last one created will take priority and assign the final value. If you want to interrupt and restart an animation, consider assigning the **Tween** to a variable: +应该避免为对象的同一属性使用多个 **Tween**\ 。如果两个或多个补间同时为同一个属性设置动画,则最后创建的补间将优先使用,并分配最终值。如果要中断并重新启动动画,请考虑将 **Tween** 赋给变量: .. tabs:: @@ -121,7 +121,7 @@ You should avoid using more than one **Tween** per object's property. If two or var tween func animate(): if tween: - tween.kill() # Abort the previous animation. + tween.kill() # 终止之前的补间动画。 tween = create_tween() .. code-tab:: csharp @@ -131,24 +131,24 @@ You should avoid using more than one **Tween** per object's property. If two or public void Animate() { if (_tween != null) - _tween.Kill(); // Abort the previous animation + _tween.Kill(); // 终止之前的补间动画。 _tween = CreateTween(); } -Some :ref:`Tweener`\ s use transitions and eases. The first accepts a :ref:`TransitionType` constant, and refers to the way the timing of the animation is handled (see `easings.net `__ for some examples). The second accepts an :ref:`EaseType` constant, and controls where the ``trans_type`` is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different :ref:`TransitionType` constants with :ref:`EASE_IN_OUT`, and use the one that looks best. +一些 :ref:`Tweener` 会使用过渡和缓动。第一个接受一个 :ref:`TransitionType` 常量,指的是处理动画时间的方式(相关示例见 `easings.net `__\ )。第二个接受一个 :ref:`EaseType` 常量,并控制 ``trans_type`` 应用于插值的位置(在开头、结尾、或两者)。如果不知道该选择哪种过渡和缓动,可以尝试使用 :ref:`EASE_IN_OUT` 并配合不同 :ref:`TransitionType` 常量,并使用看起来最好的那个。 -\ `Tween easing and transition types cheatsheet `__\ +\ `补间缓动与过渡类型速查表 `__\ -\ **Note:** Tweens are not designed to be re-used and trying to do so results in an undefined behavior. Create a new Tween for each animation and every time you replay an animation from start. Keep in mind that Tweens start immediately, so only create a Tween when you want to start animating. +\ **注意:**\ Tween 并不是针对重用设计的,尝试重用会造成未定义行为。每次从头开始重新播放每个动画都请新建一个 Tween。请记住,Tween 是会立即开始的,所以请只在需要开始动画时创建 Tween。 -\ **Note:** The tween is processed after all of the nodes in the current frame, i.e. node's :ref:`Node._process` method would be called before the tween (or :ref:`Node._physics_process` depending on the value passed to :ref:`set_process_mode`). +\ **注意:**\ 该补间在当前帧中的所有节点之后进行处理,即节点的 :ref:`Node._process` 方法(或 :ref:`Node._physics_process`\ ,具体取决于传递给 :ref:`set_process_mode` 的值)会在补间之前被调用。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -209,8 +209,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Tween_signal_finished: @@ -250,8 +250,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Tween_TweenProcessMode: @@ -265,7 +265,7 @@ enum **TweenProcessMode**: :ref:`TweenProcessMode` **TWEEN_PROCESS_PHYSICS** = ``0`` -该 **Tween** 在每个物理帧之后进行更新(见 :ref:`Node._physics_process`\ )。 +该 **Tween** 在每个物理帧之后进行更新(见 :ref:`Node._physics_process`\ )。 .. _class_Tween_constant_TWEEN_PROCESS_IDLE: @@ -273,7 +273,7 @@ enum **TweenProcessMode**: :ref:`TweenProcessMode` **TWEEN_PROCESS_IDLE** = ``1`` -该 **Tween** 在每个处理帧之后进行更新(见 :ref:`Node._process`\ )。 +该 **Tween** 在每个处理帧之后进行更新(见 :ref:`Node._process`\ )。 .. rst-class:: classref-item-separator @@ -463,8 +463,8 @@ enum **EaseType**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Tween_method_bind_node: @@ -652,9 +652,9 @@ void **kill** **(** **)** void **pause** **(** **)** -Pauses the tweening. The animation can be resumed by using :ref:`play`. +暂停该补间。可以使用 :ref:`play` 恢复动画。 -\ **Note:** If a Tween is paused and not bound to any node, it will exist indefinitely until manually started or invalidated. If you lose a reference to such Tween, you can retrieve it using :ref:`SceneTree.get_processed_tweens`. +\ **注意:**\ 如果一个 Tween 被暂停并且没有被绑定到任何节点,它将无限期地存在,直到手动启动或失效。如果丢失了对这种 Tween 的引用,可以使用 :ref:`SceneTree.get_processed_tweens` 检索它。 .. rst-class:: classref-item-separator @@ -734,7 +734,7 @@ void **play** **(** **)** :ref:`Tween` **set_process_mode** **(** :ref:`TweenProcessMode` mode **)** -决定该 **Tween** 应当在处理帧(见 :ref:`Node._process`\ )还是物理帧(见 :ref:`Node._physics_process`\ )执行。 +决定该 **Tween** 应当在处理帧(见 :ref:`Node._process`\ )还是物理帧(见 :ref:`Node._physics_process`\ )执行。 默认值为 :ref:`TWEEN_PROCESS_IDLE`\ 。 @@ -774,9 +774,9 @@ void **play** **(** **)** void **stop** **(** **)** -Stops the tweening and resets the **Tween** to its initial state. This will not remove any appended :ref:`Tweener`\ s. +停止该补间并将该 **Tween** 重置为其初始状态。这不会移除任何附加的 :ref:`Tweener`\ 。 -\ **Note:** If a Tween is stopped and not bound to any node, it will exist indefinitely until manually started or invalidated. If you lose a reference to such Tween, you can retrieve it using :ref:`SceneTree.get_processed_tweens`. +\ **注意:**\ 如果一个 Tween 被停止并且没有被绑定到任何节点,它将无限期地存在,直到手动启动或失效。如果丢失了对这种 Tween 的引用,可以使用 :ref:`SceneTree.get_processed_tweens`\ 。 .. rst-class:: classref-item-separator @@ -895,9 +895,9 @@ Stops the tweening and resets the **Tween** to its initial state. This will not :ref:`MethodTweener` **tween_method** **(** :ref:`Callable` method, :ref:`Variant` from, :ref:`Variant` to, :ref:`float` duration **)** -Creates and appends a :ref:`MethodTweener`. This method is similar to a combination of :ref:`tween_callback` and :ref:`tween_property`. It calls a method over time with a tweened value provided as an argument. The value is tweened between ``from`` and ``to`` over the time specified by ``duration``, in seconds. Use :ref:`Callable.bind` to bind additional arguments for the call. You can use :ref:`MethodTweener.set_ease` and :ref:`MethodTweener.set_trans` to tweak the easing and transition of the value or :ref:`MethodTweener.set_delay` to delay the tweening. +创建并追加一个 :ref:`MethodTweener`\ 。这个方法与 :ref:`tween_callback` 和 :ref:`tween_property` 的组合类似,会使用补间后的值作为参数去持续调用某个方法。该值是从 ``from`` 到 ``to`` 进行补间的,时长为 ``duration`` 秒。请使用 :ref:`Callable.bind` 绑定额外的调用参数。你可以使用 :ref:`MethodTweener.set_ease` 和 :ref:`MethodTweener.set_trans` 来调整该值的缓动和过渡,可以使用 :ref:`MethodTweener.set_delay` 来延迟补间。 -\ **Example:** Making a 3D object look from one point to another point: +\ **示例:**\ 让 3D 对象面向另一个点: .. tabs:: @@ -905,16 +905,16 @@ Creates and appends a :ref:`MethodTweener`. This method is .. code-tab:: gdscript var tween = create_tween() - tween.tween_method(look_at.bind(Vector3.UP), Vector3(-1, 0, -1), Vector3(1, 0, -1), 1) # The look_at() method takes up vector as second argument. + tween.tween_method(look_at.bind(Vector3.UP), Vector3(-1, 0, -1), Vector3(1, 0, -1), 1) # look_at() 方法的第二个参数接受的是上向量。 .. code-tab:: csharp Tween tween = CreateTween(); - tween.TweenMethod(Callable.From((Vector3 target) => LookAt(target, Vector3.Up)), new Vector3(-1.0f, 0.0f, -1.0f), new Vector3(1.0f, 0.0f, -1.0f), 1.0f); // Use lambdas to bind additional arguments for the call. + tween.TweenMethod(Callable.From((Vector3 target) => LookAt(target, Vector3.Up)), new Vector3(-1.0f, 0.0f, -1.0f), new Vector3(1.0f, 0.0f, -1.0f), 1.0f); // 使用 lambda 为调用绑定附加参数。 -\ **Example:** Setting the text of a :ref:`Label`, using an intermediate method and after a delay: +\ **示例:**\ 在一段延迟后,使用中间方法来设置 :ref:`Label` 的文本: .. tabs:: @@ -999,10 +999,10 @@ Creates and appends a :ref:`MethodTweener`. This method is -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_tweener.rst b/classes/zh_CN/class_tweener.rst index 91cdd6e878..b0eabe20ae 100644 --- a/classes/zh_CN/class_tweener.rst +++ b/classes/zh_CN/class_tweener.rst @@ -10,16 +10,16 @@ Tweener ======= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`CallbackTweener`, :ref:`IntervalTweener`, :ref:`MethodTweener`, :ref:`PropertyTweener` +**派生:** :ref:`CallbackTweener`, :ref:`IntervalTweener`, :ref:`MethodTweener`, :ref:`PropertyTweener` :ref:`Tween` 使用的所有 Tweener(补间器)的抽象类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- Tweener 是执行特定动画化的任务的对象,例如,在给定的时间,插值一个属性或调用一个方法。\ **Tweener** 不能被手动创建,你需要使用 :ref:`Tween` 中的专用方法。 @@ -29,8 +29,8 @@ Tweener 是执行特定动画化的任务的对象,例如,在给定的时间 .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Tweener_signal_finished: @@ -40,10 +40,10 @@ Signals 当该 **Tweener** 刚刚完成其任务时触发。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_udpserver.rst b/classes/zh_CN/class_udpserver.rst index e6ac70684b..2747acd972 100644 --- a/classes/zh_CN/class_udpserver.rst +++ b/classes/zh_CN/class_udpserver.rst @@ -10,18 +10,18 @@ UDPServer ========= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 用于实现 UDP 服务器的辅助类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 简易服务器,会打开 UDP 套接字,并在收到新数据包时返回已连接的 :ref:`PacketPeerUDP`\ 。另见 :ref:`PacketPeerUDP.connect_to_host`\ 。 -服务器启动后(\ :ref:`listen`\ ),你需要调用 :ref:`poll` 按照一定的间隔轮询(例如在 :ref:`Node._process` 中)才能处理新数据包、将它们传递给合适的 :ref:`PacketPeerUDP`\ 、获取新连接。 +服务器启动后(\ :ref:`listen`\ ),你需要调用 :ref:`poll` 按照一定的间隔轮询(例如在 :ref:`Node._process` 中)才能处理新数据包、将它们传递给合适的 :ref:`PacketPeerUDP`\ 、获取新连接。 下面是简单的用法示例: @@ -151,8 +151,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -163,8 +163,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -191,8 +191,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_UDPServer_property_max_pending_connections: @@ -213,8 +213,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_UDPServer_method_get_local_port: @@ -270,7 +270,7 @@ Method Descriptions :ref:`Error` **poll** **(** **)** -定期调用这个方法,例如在\ :ref:`Node._process`\ 里面,来处理新数据包。来自已知地址及端口对的数据包,将被传递到相应的\ :ref:`PacketPeerUDP`\ ,任何从未知地址及端口对收到的数据包将被添加为一个待定连接,参阅\ :ref:`is_connection_available`, :ref:`take_connection`\ 。待定连接的最大数量通过\ :ref:`max_pending_connections`\ 定义。 +定期调用这个方法,例如在\ :ref:`Node._process`\ 里面,来处理新数据包。来自已知地址及端口对的数据包,将被传递到相应的\ :ref:`PacketPeerUDP`\ ,任何从未知地址及端口对收到的数据包将被添加为一个待定连接,参阅\ :ref:`is_connection_available`, :ref:`take_connection`\ 。待定连接的最大数量通过\ :ref:`max_pending_connections`\ 定义。 .. rst-class:: classref-item-separator @@ -296,10 +296,10 @@ void **stop** **(** **)** 返回第一个挂起的连接(连接到适当的地址及端口)。如果没有新的连接可用,将返回 ``null``\ 。另请参阅 :ref:`is_connection_available`\ 、\ :ref:`PacketPeerUDP.connect_to_host`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_undoredo.rst b/classes/zh_CN/class_undoredo.rst index 41247d289e..8d8dac67f3 100644 --- a/classes/zh_CN/class_undoredo.rst +++ b/classes/zh_CN/class_undoredo.rst @@ -10,14 +10,14 @@ UndoRedo ======== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 为实现撤销和重做操作提供高阶接口。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- UndoRedo 的原理是在“动作”中注册方法和属性的变化。你可以创建一个动作,然后提供执行(do)和撤销(undo)这个动作需要进行的函数调用和属性更改,然后提交该动作。 @@ -122,8 +122,8 @@ UndoRedo 的原理是在“动作”中注册方法和属性的变化。你可 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -178,8 +178,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_UndoRedo_signal_version_changed: @@ -195,8 +195,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_UndoRedo_MergeMode: @@ -234,8 +234,8 @@ enum **MergeMode**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_UndoRedo_method_add_do_method: @@ -511,10 +511,10 @@ void **start_force_keep_in_merge_ends** **(** **)** 撤销上一个动作。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_upnp.rst b/classes/zh_CN/class_upnp.rst index 7f5a12d727..1b31786e12 100644 --- a/classes/zh_CN/class_upnp.rst +++ b/classes/zh_CN/class_upnp.rst @@ -10,14 +10,14 @@ UPNP ==== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 通用即插即用(UPnP)功能,用于网络设备的发现、查询及端口映射。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类可用于在本地网络中发现兼容的 :ref:`UPNPDevice` 并在这些设备上执行命令,如管理端口映射(用于端口转发/NAT 穿透)和查询本地及远程网络 IP 地址。请注意,这个类的方法都是同步的,会阻塞调用线程。 @@ -87,8 +87,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -103,8 +103,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -139,8 +139,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_UPNP_UPNPResult: @@ -386,8 +386,8 @@ HTTP 错误。 .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_UPNP_property_discover_ipv6: @@ -442,8 +442,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_UPNP_method_add_device: @@ -587,10 +587,10 @@ void **set_device** **(** :ref:`int` index, :ref:`UPNPDevice` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 通用即插即用(UPnP)设备。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 通用即插即用(UPnP)设备。UPnP 发现及工具函数见 :ref:`UPNP`\ 。提供对 UPNP 控制命令的低层访问。允许管理端口映射(端口转发)和查询设备的网络信息(如本地和外部 IP 地址和状态)。请注意,这个类的方法是同步的,会阻塞调用线程。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -67,8 +67,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_UPNPDevice_IGDStatus: @@ -162,8 +162,8 @@ HTTP 错误。 .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_UPNPDevice_property_description_url: @@ -269,8 +269,8 @@ IGD 状态。见 :ref:`IGDStatus`\ 。 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_UPNPDevice_method_add_port_mapping: @@ -316,10 +316,10 @@ Method Descriptions 返回这个 **UPNPDevice** 的外部 IP 地址或空字符串。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_variant.rst b/classes/zh_CN/class_variant.rst index 14d30aa7ca..94eb52298e 100644 --- a/classes/zh_CN/class_variant.rst +++ b/classes/zh_CN/class_variant.rst @@ -14,8 +14,8 @@ Godot 中最重要的数据类型。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 在计算机编程中,Variant(变体)类是用来存储各种其他类型的类。像 PHP、 Lua、 JavaScript 和 GDScript 这样的动态编程语言喜欢用它们在后端存储变量数据。使用 Variant,属性可以自由地更改值类型。 @@ -38,7 +38,7 @@ Description var boo = "boo 是字符串!"; var ref = new RefCounted(); // var 非常适合与构造函数配合使用。 - // Godot 也提供了 Variant 类,类似于所有与 Variant 兼容类型的 union。 + // Godot 也提供了 Variant 类,类似于一个与所有 Variant 兼容类型的联合体。 Variant fooVar = 2; // fooVar 是动态类型的整数(在 Variant 类型中存储为 `long`)。 fooVar = "现在 fooVar 是字符串!"; fooVar = new RefCounted(); // fooVar 是 GodotObject。 @@ -49,7 +49,7 @@ Godot 在 Variant 中跟踪所有脚本 API 变量。你一直在无意中使用 - GDScript 会自动将数值进行包装。默认情况下会将所有数据保存在普通的 Variant 中,也可以选择对变量类型执行自定义的静态类型规则。 -- C# 是静态类型的,但是当它需要表示动态值时,就会在需要 Godot 的 Variant 类的地方使用它自己实现的 ``Variant`` 类型。\ ``Variant`` 可以用任意兼容类型隐式赋值,但反之则需要显式类型转换。 +- C# 是静态类型的,但是当它需要表示动态值时,就会在需要 Godot 的 Variant 类的地方使用它自己实现的 **Variant** 类型。C# Variant 可以用任意兼容类型隐式赋值,但反之则需要显式类型转换。 全局函数 :ref:`@GlobalScope.typeof` 返回的是枚举类型的值,表示当前变量中所存储的 Variant 类型(见 :ref:`Variant.Type`\ )。 @@ -69,7 +69,7 @@ Godot 在 Variant 中跟踪所有脚本 API 变量。你一直在无意中使用 # 要获取实际的 Object 类型名称,你需要使用 `get_class()` 方法。 print("foo is a(n) %s" % foo.get_class()) # 将类名注入格式字符串中。 # 另外请注意,目前没有比较方便的方法来获取脚本的 `class_name` 字符串。 - # 如果要获取,你可以使用 ProjectSettings.get_global_class_list。 + # 如果要获取,你可以使用 ProjectSettings.get_global_class_list()。 .. code-tab:: csharp @@ -123,19 +123,19 @@ Variant: .. note:: - There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information. + 通过 C# 使用这个 API 时有显著的不同。详见 :ref:`doc_c_sharp_differences`\ 。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`Variant 类简介 <../contributing/development/core_and_modules/variant_class>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_vboxcontainer.rst b/classes/zh_CN/class_vboxcontainer.rst index 874569ea61..e61b34015d 100644 --- a/classes/zh_CN/class_vboxcontainer.rst +++ b/classes/zh_CN/class_vboxcontainer.rst @@ -10,61 +10,32 @@ VBoxContainer ============= -**Inherits:** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`ColorPicker`, :ref:`FileSystemDock`, :ref:`ScriptEditorBase` +**派生:** :ref:`ColorPicker`, :ref:`FileSystemDock`, :ref:`ScriptEditorBase` 将子控件纵向排列的容器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`BoxContainer` 的变体,只会将子控件纵向排列。子控件的最小尺寸发生变化时会自动进行重新排列。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` - `3D 体素演示 `__ -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------+------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`separation` | ``4`` | - +-----------------------+------------------------------------------------------------------+-------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_VBoxContainer_theme_constant_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **separation** = ``4`` - -**VBoxContainer** 的元素之间的垂直空间。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_vector2.rst b/classes/zh_CN/class_vector2.rst index be7105016c..816ced012c 100644 --- a/classes/zh_CN/class_vector2.rst +++ b/classes/zh_CN/class_vector2.rst @@ -14,8 +14,8 @@ Vector2 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 包含两个元素的结构体,可用于代表 2D 坐标或任何数值的二元组。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`数学文档索引 <../tutorials/math/index>` @@ -44,8 +44,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -76,8 +76,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -170,8 +170,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -220,8 +220,8 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Vector2_constant_AXIS_X: @@ -301,8 +301,8 @@ Y 轴的枚举值。由 :ref:`max_axis_index` **angle** **(** **)** |const| -Returns this vector's angle with respect to the positive X axis, or ``(1, 0)`` vector, in radians. +返回该向量与 X 轴正方向的夹角,单位为弧度。X 轴正方向为 ``(1, 0)`` 向量。 -For example, ``Vector2.RIGHT.angle()`` will return zero, ``Vector2.DOWN.angle()`` will return ``PI / 2`` (a quarter turn, or 90 degrees), and ``Vector2(1, -1).angle()`` will return ``-PI / 4`` (a negative eighth turn, or -45 degrees). +例如,\ ``Vector2.RIGHT.angle()`` 将返回 0,\ ``Vector2.DOWN.angle()`` 将返回 ``PI / 2``\ (四分之一圈,即 90 度),\ ``Vector2(1, -1).angle()`` 将返回 ``-PI / 4``\ (负八分之一圈,即 -45 度)。 -\ `Illustration of the returned angle. `__\ +\ `返回夹角图示。 `__\ -Equivalent to the result of :ref:`@GlobalScope.atan2` when called with the vector's :ref:`y` and :ref:`x` as parameters: ``atan2(y, x)``. +相当于使用该向量的 :ref:`y` 和 :ref:`x` 作为参数对 :ref:`@GlobalScope.atan2` 进行调用的结果:\ ``atan2(y, x)``\ 。 .. rst-class:: classref-item-separator @@ -416,9 +416,9 @@ Equivalent to the result of :ref:`@GlobalScope.atan2` **angle_to** **(** :ref:`Vector2` to **)** |const| -Returns the angle to the given vector, in radians. +返回与给定向量的夹角,单位为弧度。 -\ `Illustration of the returned angle. `__ +\ `返回夹角示意图。 `__ .. rst-class:: classref-item-separator @@ -430,11 +430,11 @@ Returns the angle to the given vector, in radians. :ref:`float` **angle_to_point** **(** :ref:`Vector2` to **)** |const| -Returns the angle between the line connecting the two points and the X axis, in radians. +返回连接两点的直线与 X 轴之间的夹角,单位为弧度。 -\ ``a.angle_to_point(b)`` is equivalent of doing ``(b - a).angle()``. +\ ``a.angle_to_point(b)`` 等价于 ``(b - a).angle()``\ 。 -\ `Illustration of the returned angle. `__ +\ `返回夹角示意图。 `__ .. rst-class:: classref-item-separator @@ -548,7 +548,7 @@ Returns the angle between the line connecting the two points and the X axis, in 返回该向量和 ``b`` 之间进行三次插值 ``weight`` 处的结果,使用 ``pre_a`` 和 ``post_b`` 作为控制柄。\ ``weight`` 在 0.0 到 1.0 的范围内,代表插值的量。 -通过使用时间值,可以比 ``cubic_interpolate()`` 进行更平滑的插值。 +通过使用时间值,可以比 :ref:`cubic_interpolate` 进行更平滑的插值。 .. rst-class:: classref-item-separator @@ -926,8 +926,8 @@ Returns the angle between the line connecting the two points and the X axis, in .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Vector2_operator_neq_Vector2: @@ -951,7 +951,11 @@ Operator Descriptions :ref:`Vector2` **operator *** **(** :ref:`Transform2D` right **)** -使用给定的 :ref:`Transform2D` 变换矩阵对该 **Vector2** 进行逆变换(相乘)。 +假设该变换的基是正交的(即旋转/反射可以,缩放/倾斜不行),将 **Vector2** 逆向变换(乘以)给定的 :ref:`Transform2D` 变换矩阵。 + +\ ``vector * transform`` 相当于 ``transform.inverse() * vector``\ 。请参阅 :ref:`Transform2D.inverse`\ 。 + +对于通过仿射变换的逆进行的变换(例如缩放),可以使用 ``transform.affine_inverse() * vector`` 代替。请参阅 :ref:`Transform2D.affine_inverse`\ 。 .. rst-class:: classref-item-separator @@ -1173,10 +1177,10 @@ Operator Descriptions 返回该 **Vector2** 的负值。和写 ``Vector2(-v.x, -v.y)`` 是一样的。该操作在保持相同幅度的同时,翻转向量的方向。对于浮点数,零也有正负两种。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_vector2i.rst b/classes/zh_CN/class_vector2i.rst index 7202ecc7a3..c4b0cefe60 100644 --- a/classes/zh_CN/class_vector2i.rst +++ b/classes/zh_CN/class_vector2i.rst @@ -14,8 +14,8 @@ Vector2i .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 包含两个元素的结构体,可用于代表 2D 坐标或任何整数的二元组。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`数学文档索引 <../tutorials/math/index>` @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -50,8 +50,8 @@ Properties .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -68,8 +68,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -96,8 +96,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -148,8 +148,8 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Vector2i_constant_AXIS_X: @@ -189,7 +189,7 @@ Y 轴的枚举值。由 :ref:`max_axis_index`. +最小向量,所有分量等于 ``INT32_MIN`` 的向量。可用作 :ref:`Vector2.INF` 的负整数等价物。 .. _class_Vector2i_constant_MAX: @@ -197,7 +197,7 @@ Min vector, a vector with all components equal to ``INT32_MIN``. Can be used as **MAX** = ``Vector2i(2147483647, 2147483647)`` -Max vector, a vector with all components equal to ``INT32_MAX``. Can be used as an integer equivalent of :ref:`Vector2.INF`. +最大向量,所有分量等于 ``INT32_MAX`` 的向量。可用作 :ref:`Vector2.INF` 的整数等价物。 .. _class_Vector2i_constant_LEFT: @@ -237,8 +237,8 @@ Max vector, a vector with all components equal to ``INT32_MAX``. Can be used as .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Vector2i_property_x: @@ -266,8 +266,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_Vector2i_constructor_Vector2i: @@ -313,8 +313,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Vector2i_method_abs: @@ -428,8 +428,8 @@ Method Descriptions .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Vector2i_operator_neq_Vector2i: @@ -687,10 +687,10 @@ Operator Descriptions 返回该 **Vector2i** 的负值。和写 ``Vector2i(-v.x, -v.y)`` 是一样的。该操作在保持相同幅度的同时,翻转向量的方向。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_vector3.rst b/classes/zh_CN/class_vector3.rst index 1dfd7bc0ca..e8ad59f562 100644 --- a/classes/zh_CN/class_vector3.rst +++ b/classes/zh_CN/class_vector3.rst @@ -14,8 +14,8 @@ Vector3 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 包含三个元素的结构体,可用于代表 3D 坐标或任何数值的三元组。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`数学文档索引 <../tutorials/math/index>` @@ -44,8 +44,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -60,8 +60,8 @@ Properties .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -78,8 +78,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -172,8 +172,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -226,8 +226,8 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Vector3_constant_AXIS_X: @@ -379,8 +379,8 @@ Z 轴的枚举值。由 :ref:`max_axis_index` 进行更平滑的插值。 .. rst-class:: classref-item-separator @@ -998,8 +998,8 @@ Method Descriptions .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Vector3_operator_neq_Vector3: @@ -1023,7 +1023,11 @@ Operator Descriptions :ref:`Vector3` **operator *** **(** :ref:`Basis` right **)** -使用给定的 :ref:`Basis` 矩阵逆变换(乘)该 **Vector3**\ 。 +假设该基是正交的(即旋转/反射可以,缩放/倾斜则不然),将 **Vector3** 逆向变换(乘以)给定的 :ref:`Basis` 矩阵。 + +\ ``vector * basis`` 性当于 ``basis.transposed() * vector``\ 。请参阅 :ref:`Basis.transposed`\ 。 + +对于通过非正交的基的逆进行的变换(例如使用缩放),可以使用 ``basis.inverse() * vector`` 代替。请参阅 :ref:`Basis.inverse`\ 。 .. rst-class:: classref-item-separator @@ -1035,7 +1039,9 @@ Operator Descriptions :ref:`Vector3` **operator *** **(** :ref:`Quaternion` right **)** -使用给定的 :ref:`Quaternion` 对该 **Vector3** 进行逆变换(做乘法)。 +将 **Vector3** 与给定的 :ref:`Quaternion` 进行逆向变换(相乘)。 + +\ ``vector * quaternion`` 相当于 ``quaternion.inverse() * vector``\ 。请参阅 :ref:`Quaternion.inverse`\ 。 .. rst-class:: classref-item-separator @@ -1047,7 +1053,11 @@ Operator Descriptions :ref:`Vector3` **operator *** **(** :ref:`Transform3D` right **)** -使用给定的 :ref:`Transform3D` 变换矩阵对该 **Vector3** 进行逆变换(做乘法)。 +假设该变换的基是正交的(即旋转/反射可以,缩放/倾斜不行),将 **Vector3** 逆向变换(乘以)给定的 :ref:`Transform3D` 变换矩阵。 + +\ ``vector * transform`` 相当于 ``transform.inverse() * vector``\ 。请参阅 :ref:`Transform3D.inverse`\ 。 + +对于通过仿射变换的逆进行的变换(例如缩放),可以使用 ``transform.affine_inverse() * vector`` 代替。请参阅 :ref:`Transform3D.affine_inverse`\ 。 .. rst-class:: classref-item-separator @@ -1269,10 +1279,10 @@ Operator Descriptions 返回该 **Vector3** 的负值。和写 ``Vector3(-v.x, -v.y, -v.z)`` 是一样的。该操作在保持相同幅度的同时,翻转向量的方向。对于浮点数,零也有正负两种。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_vector3i.rst b/classes/zh_CN/class_vector3i.rst index 05ea89b62f..55744b892c 100644 --- a/classes/zh_CN/class_vector3i.rst +++ b/classes/zh_CN/class_vector3i.rst @@ -14,8 +14,8 @@ Vector3i .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 包含三个元素的结构体,可用于代表 3D 坐标或任何整数的三元组。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`数学文档索引 <../tutorials/math/index>` @@ -36,8 +36,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -70,8 +70,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -96,8 +96,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -148,8 +148,8 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Vector3i_constant_AXIS_X: @@ -197,7 +197,7 @@ Z 轴的枚举值。由 :ref:`max_axis_index`. +最小向量,所有分量等于 ``INT32_MIN`` 的向量。可用作 :ref:`Vector3.INF` 的负整数等价物。 .. _class_Vector3i_constant_MAX: @@ -205,7 +205,7 @@ Min vector, a vector with all components equal to ``INT32_MIN``. Can be used as **MAX** = ``Vector3i(2147483647, 2147483647, 2147483647)`` -Max vector, a vector with all components equal to ``INT32_MAX``. Can be used as an integer equivalent of :ref:`Vector3.INF`. +最大向量,所有分量等于 ``INT32_MAX`` 的向量。可用作 :ref:`Vector3.INF` 的整数等价物。 .. _class_Vector3i_constant_LEFT: @@ -261,8 +261,8 @@ Max vector, a vector with all components equal to ``INT32_MAX``. Can be used as .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Vector3i_property_x: @@ -302,8 +302,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_Vector3i_constructor_Vector3i: @@ -349,8 +349,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Vector3i_method_abs: @@ -452,8 +452,8 @@ Method Descriptions .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Vector3i_operator_neq_Vector3i: @@ -711,10 +711,10 @@ Operator Descriptions 返回该 **Vector3i** 的负值。和写 ``Vector3i(-v.x, -v.y, -v.z)`` 是一样的。该操作在保持相同幅度的同时,翻转向量的方向。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_vector4.rst b/classes/zh_CN/class_vector4.rst index 0f17b4c33d..88b35712ed 100644 --- a/classes/zh_CN/class_vector4.rst +++ b/classes/zh_CN/class_vector4.rst @@ -14,8 +14,8 @@ Vector4 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 包含四个元素的结构体,可用于代表 4D 坐标或任何数值的四元组。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -45,8 +45,8 @@ Properties .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -63,8 +63,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -125,8 +125,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -175,8 +175,8 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Vector4_constant_AXIS_X: @@ -240,8 +240,8 @@ W 轴的枚举值。由 :ref:`max_axis_index` 进行更平滑的插值。 .. rst-class:: classref-item-separator @@ -667,8 +667,8 @@ Method Descriptions .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Vector4_operator_neq_Vector4: @@ -692,7 +692,9 @@ Operator Descriptions :ref:`Vector4` **operator *** **(** :ref:`Projection` right **)** -使用给定的 :ref:`Projection` 矩阵对该 **Vector4** 进行逆变换(相乘)。 +通过给定 :ref:`Projection` 矩阵的转置变换(乘以)该 **Vector4**\ 。 + +对于通过投影的逆进行的变换,可以使用 ``projection.inverse() * vector`` 代替。请参阅 :ref:`Projection.inverse`\ 。 .. rst-class:: classref-item-separator @@ -922,10 +924,10 @@ Operator Descriptions 返回该 **Vector4** 的负值。和写 ``Vector4(-v.x, -v.y, -v.z, -v.w)`` 是一样的。该操作在保持相同幅度的同时,翻转向量的方向。对于浮点数,零也有正负两种。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_vector4i.rst b/classes/zh_CN/class_vector4i.rst index afb31f0c8f..0f8bbbfd37 100644 --- a/classes/zh_CN/class_vector4i.rst +++ b/classes/zh_CN/class_vector4i.rst @@ -14,8 +14,8 @@ Vector4i .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 包含四个元素的结构体,可用于代表 4D 坐标或任何整数的四元组。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-reftable-group -Constructors ------------- +构造函数 +-------- .. table:: :widths: auto @@ -61,8 +61,8 @@ Constructors .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -87,8 +87,8 @@ Methods .. rst-class:: classref-reftable-group -Operators ---------- +操作符 +------ .. table:: :widths: auto @@ -139,8 +139,8 @@ Operators .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Vector4i_constant_AXIS_X: @@ -196,7 +196,7 @@ W 轴的枚举值。由 :ref:`max_axis_index`. +最小向量,所有分量等于 ``INT32_MIN`` 的向量。可用作 :ref:`Vector4.INF` 的负整数等价物。 .. _class_Vector4i_constant_MAX: @@ -204,7 +204,7 @@ Min vector, a vector with all components equal to ``INT32_MIN``. Can be used as **MAX** = ``Vector4i(2147483647, 2147483647, 2147483647, 2147483647)`` -Max vector, a vector with all components equal to ``INT32_MAX``. Can be used as an integer equivalent of :ref:`Vector4.INF`. +最大向量,所有分量等于 ``INT32_MAX`` 的向量。可用作 :ref:`Vector4.INF` 的整数等价物。 .. rst-class:: classref-section-separator @@ -212,8 +212,8 @@ Max vector, a vector with all components equal to ``INT32_MAX``. Can be used as .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Vector4i_property_w: @@ -265,8 +265,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Constructor Descriptions ------------------------- +构造函数说明 +------------ .. _class_Vector4i_constructor_Vector4i: @@ -312,8 +312,8 @@ Constructor Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Vector4i_method_abs: @@ -415,8 +415,8 @@ Method Descriptions .. rst-class:: classref-descriptions-group -Operator Descriptions ---------------------- +操作符说明 +---------- .. _class_Vector4i_operator_neq_Vector4i: @@ -678,10 +678,10 @@ Operator Descriptions 返回该 **Vector4i** 的负值。和写 ``Vector4i(-v.x, -v.y, -v.z, -v.w)`` 是一样的。这个运算会翻转向量方向,同时保持长度不变。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_vehiclebody3d.rst b/classes/zh_CN/class_vehiclebody3d.rst index 4533ad2e71..e295b3cfef 100644 --- a/classes/zh_CN/class_vehiclebody3d.rst +++ b/classes/zh_CN/class_vehiclebody3d.rst @@ -10,14 +10,14 @@ VehicleBody3D ============= -**Inherits:** :ref:`RigidBody3D` **<** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`RigidBody3D` **<** :ref:`PhysicsBody3D` **<** :ref:`CollisionObject3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 模拟汽车行为的 3D 物理体。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该节点实现了模拟汽车所需的所有物理逻辑。它基于物理引擎中常见的射线投射的车辆系统。除了需要为车身添加一个 :ref:`CollisionShape3D` 之外,你还必须为每个车轮添加一个 :ref:`VehicleWheel3D` 节点。你还应该为车辆的 3D 模型的向这个节点添加一个 :ref:`MeshInstance3D`\ ,但该模型通常不应该包含车轮的网格。你可以使用 :ref:`brake`\ 、\ :ref:`engine_force` 和 :ref:`steering` 属性来控制车辆。不应该直接更改该节点的位置和朝向。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 货车镇演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VehicleBody3D_property_brake: @@ -112,10 +112,10 @@ Property Descriptions \ **注意:**\ 该属性在检查器中以度为单位进行编辑。在代码中,该属性以弧度单位设置。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_vehiclewheel3d.rst b/classes/zh_CN/class_vehiclewheel3d.rst index 0d4f112ed1..d3949ee446 100644 --- a/classes/zh_CN/class_vehiclewheel3d.rst +++ b/classes/zh_CN/class_vehiclewheel3d.rst @@ -10,14 +10,14 @@ VehicleWheel3D ============== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 用于 :ref:`VehicleBody3D` 的 3D 物理体,能够模拟车轮的行为。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 作为 :ref:`VehicleBody3D` 子节点使用的节点,能够模拟车辆其中一个车轮的行为。这个节点还充当了碰撞器,能够检测车轮是否与某个表面接触。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D 货车镇演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -70,8 +70,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -92,8 +92,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VehicleWheel3D_property_brake: @@ -341,8 +341,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_VehicleWheel3D_method_get_contact_body: @@ -390,10 +390,10 @@ Method Descriptions 如果轮子与表面接触,返回 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_vflowcontainer.rst b/classes/zh_CN/class_vflowcontainer.rst index bd3ba28e3a..21cd59dc41 100644 --- a/classes/zh_CN/class_vflowcontainer.rst +++ b/classes/zh_CN/class_vflowcontainer.rst @@ -10,71 +10,28 @@ VFlowContainer ============== -**Inherits:** :ref:`FlowContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`FlowContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 将子控件纵向排列并在边界处换行的容器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`FlowContainer` 的一种,只能将其子控件纵向排列并在边界处换行。类似于书本中文字在一行中写不下以后的换行方式,但是纵向。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------+-----------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`h_separation` | ``4`` | - +-----------------------+-----------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`v_separation` | ``4`` | - +-----------------------+-----------------------------------------------------------------------+-------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_VFlowContainer_theme_constant_h_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **h_separation** = ``4`` - -子节点的水平分隔量。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VFlowContainer_theme_constant_v_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **v_separation** = ``4`` - -子节点的垂直分隔量。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_videostream.rst b/classes/zh_CN/class_videostream.rst index 3f49811f9a..9b52c4a619 100644 --- a/classes/zh_CN/class_videostream.rst +++ b/classes/zh_CN/class_videostream.rst @@ -10,30 +10,32 @@ VideoStream =========== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VideoStreamTheora` +**派生:** :ref:`VideoStreamTheora` 视频流的基础资源。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 所有视频流的基础资源类型。派生自 **VideoStream** 的类都可以用作在 :ref:`VideoStreamPlayer` 中播放视频的资源类型。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Playing videos <../tutorials/animation/playing_videos>` +- :doc:`播放视频 <../tutorials/animation/playing_videos>` + +- :doc:`运行时文件加载与保存 <../tutorials/io/runtime_file_loading_and_saving>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -44,15 +46,15 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------------------------------+----------------------------------------------------------------------------------------------------+ - | :ref:`VideoStreamPlayback` | :ref:`_instantiate_playback` **(** **)** |virtual| | - +-------------------------------------------------------+----------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ + | :ref:`VideoStreamPlayback` | :ref:`_instantiate_playback` **(** **)** |virtual| | + +-------------------------------------------------------+------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -60,8 +62,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VideoStream_property_file: @@ -84,10 +86,10 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_VideoStream_method__instantiate_playback: +.. _class_VideoStream_private_method__instantiate_playback: .. rst-class:: classref-method @@ -95,10 +97,10 @@ Method Descriptions 视频开始播放时调用,用于初始化并返回 :ref:`VideoStreamPlayback` 的子类。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_videostreamplayback.rst b/classes/zh_CN/class_videostreamplayback.rst index 7e37a06fb2..c80d24fc20 100644 --- a/classes/zh_CN/class_videostreamplayback.rst +++ b/classes/zh_CN/class_videostreamplayback.rst @@ -10,51 +10,51 @@ VideoStreamPlayback =================== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`VideoStream` 使用的内部类,用于管理其在 :ref:`VideoStreamPlayer` 中的播放状态。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该类旨在被具有 :ref:`VideoStream` 自定义实现的视频解码器扩展所覆盖。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_channels` **(** **)** |virtual| |const| | + | :ref:`int` | :ref:`_get_channels` **(** **)** |virtual| |const| | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_length` **(** **)** |virtual| |const| | + | :ref:`float` | :ref:`_get_length` **(** **)** |virtual| |const| | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_mix_rate` **(** **)** |virtual| |const| | + | :ref:`int` | :ref:`_get_mix_rate` **(** **)** |virtual| |const| | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_playback_position` **(** **)** |virtual| |const| | + | :ref:`float` | :ref:`_get_playback_position` **(** **)** |virtual| |const| | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`_get_texture` **(** **)** |virtual| |const| | + | :ref:`Texture2D` | :ref:`_get_texture` **(** **)** |virtual| |const| | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_paused` **(** **)** |virtual| |const| | + | :ref:`bool` | :ref:`_is_paused` **(** **)** |virtual| |const| | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_playing` **(** **)** |virtual| |const| | + | :ref:`bool` | :ref:`_is_playing` **(** **)** |virtual| |const| | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_play` **(** **)** |virtual| | + | void | :ref:`_play` **(** **)** |virtual| | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_seek` **(** :ref:`float` time **)** |virtual| | + | void | :ref:`_seek` **(** :ref:`float` time **)** |virtual| | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_audio_track` **(** :ref:`int` idx **)** |virtual| | + | void | :ref:`_set_audio_track` **(** :ref:`int` idx **)** |virtual| | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_paused` **(** :ref:`bool` paused **)** |virtual| | + | void | :ref:`_set_paused` **(** :ref:`bool` paused **)** |virtual| | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_stop` **(** **)** |virtual| | + | void | :ref:`_stop` **(** **)** |virtual| | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_update` **(** :ref:`float` delta **)** |virtual| | + | void | :ref:`_update` **(** :ref:`float` delta **)** |virtual| | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`mix_audio` **(** :ref:`int` num_frames, :ref:`PackedFloat32Array` buffer=PackedFloat32Array(), :ref:`int` offset=0 **)** | +-----------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -65,10 +65,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_VideoStreamPlayback_method__get_channels: +.. _class_VideoStreamPlayback_private_method__get_channels: .. rst-class:: classref-method @@ -80,7 +80,7 @@ Method Descriptions ---- -.. _class_VideoStreamPlayback_method__get_length: +.. _class_VideoStreamPlayback_private_method__get_length: .. rst-class:: classref-method @@ -92,7 +92,7 @@ Method Descriptions ---- -.. _class_VideoStreamPlayback_method__get_mix_rate: +.. _class_VideoStreamPlayback_private_method__get_mix_rate: .. rst-class:: classref-method @@ -104,7 +104,7 @@ Method Descriptions ---- -.. _class_VideoStreamPlayback_method__get_playback_position: +.. _class_VideoStreamPlayback_private_method__get_playback_position: .. rst-class:: classref-method @@ -116,7 +116,7 @@ Method Descriptions ---- -.. _class_VideoStreamPlayback_method__get_texture: +.. _class_VideoStreamPlayback_private_method__get_texture: .. rst-class:: classref-method @@ -128,43 +128,43 @@ Method Descriptions ---- -.. _class_VideoStreamPlayback_method__is_paused: +.. _class_VideoStreamPlayback_private_method__is_paused: .. rst-class:: classref-method :ref:`bool` **_is_paused** **(** **)** |virtual| |const| -返回暂停状态,由 :ref:`_set_paused` 设置。 +返回暂停状态,由 :ref:`_set_paused` 设置。 .. rst-class:: classref-item-separator ---- -.. _class_VideoStreamPlayback_method__is_playing: +.. _class_VideoStreamPlayback_private_method__is_playing: .. rst-class:: classref-method :ref:`bool` **_is_playing** **(** **)** |virtual| |const| -返回由调用 :ref:`_play` 和 :ref:`_stop` 决定的播放状态。 +返回由调用 :ref:`_play` 和 :ref:`_stop` 决定的播放状态。 .. rst-class:: classref-item-separator ---- -.. _class_VideoStreamPlayback_method__play: +.. _class_VideoStreamPlayback_private_method__play: .. rst-class:: classref-method void **_play** **(** **)** |virtual| -:ref:`VideoStreamPlayer.autoplay` 或 :ref:`VideoStreamPlayer.play` 时会被调用。请注意,手动播放在这个方法被调用前也可能多次调用 :ref:`_stop`\ 。开始播放后 :ref:`_is_playing` 就应该返回 true。 +:ref:`VideoStreamPlayer.autoplay` 或 :ref:`VideoStreamPlayer.play` 时会被调用。请注意,手动播放在这个方法被调用前也可能多次调用 :ref:`_stop`\ 。开始播放后 :ref:`_is_playing` 就应该返回 true。 .. rst-class:: classref-item-separator ---- -.. _class_VideoStreamPlayback_method__seek: +.. _class_VideoStreamPlayback_private_method__seek: .. rst-class:: classref-method @@ -176,7 +176,7 @@ void **_seek** **(** :ref:`float` time **)** |virtual| ---- -.. _class_VideoStreamPlayback_method__set_audio_track: +.. _class_VideoStreamPlayback_private_method__set_audio_track: .. rst-class:: classref-method @@ -188,37 +188,37 @@ void **_set_audio_track** **(** :ref:`int` idx **)** |virtual| ---- -.. _class_VideoStreamPlayback_method__set_paused: +.. _class_VideoStreamPlayback_private_method__set_paused: .. rst-class:: classref-method void **_set_paused** **(** :ref:`bool` paused **)** |virtual| -设置视频播放的暂停状态。\ :ref:`_is_paused` 必须返回 ``paused``\ 。设置 :ref:`VideoStreamPlayer.paused` 时会被调用。 +设置视频播放的暂停状态。\ :ref:`_is_paused` 必须返回 ``paused``\ 。设置 :ref:`VideoStreamPlayer.paused` 时会被调用。 .. rst-class:: classref-item-separator ---- -.. _class_VideoStreamPlayback_method__stop: +.. _class_VideoStreamPlayback_private_method__stop: .. rst-class:: classref-method void **_stop** **(** **)** |virtual| -停止播放。可能在 :ref:`_play` 多次调用,也可能与 :ref:`VideoStreamPlayer.stop` 对应。停止后 :ref:`_is_playing` 应返回 false。 +停止播放。可能在 :ref:`_play` 多次调用,也可能与 :ref:`VideoStreamPlayer.stop` 对应。停止后 :ref:`_is_playing` 应返回 false。 .. rst-class:: classref-item-separator ---- -.. _class_VideoStreamPlayback_method__update: +.. _class_VideoStreamPlayback_private_method__update: .. rst-class:: classref-method void **_update** **(** :ref:`float` delta **)** |virtual| -将视频播放推进 ``delta`` 秒。只要 :ref:`_is_paused` 和 :ref:`_is_playing` 返回 true,就会为每一帧调用。 +将视频播放推进 ``delta`` 秒。只要 :ref:`_is_paused` 和 :ref:`_is_playing` 返回 true,就会为每一帧调用。 .. rst-class:: classref-item-separator @@ -230,12 +230,12 @@ void **_update** **(** :ref:`float` delta **)** |virtual| :ref:`int` **mix_audio** **(** :ref:`int` num_frames, :ref:`PackedFloat32Array` buffer=PackedFloat32Array(), :ref:`int` offset=0 **)** -从数组中的索引 ``offset`` 开始,从 ``buffer`` 渲染 ``num_frames`` 个音频帧(每帧 :ref:`_get_channels` 个浮点数)。返回渲染的音频帧数,如果出错则返回 -1。 +从数组中的索引 ``offset`` 开始,从 ``buffer`` 渲染 ``num_frames`` 个音频帧(每帧 :ref:`_get_channels` 个浮点数)。返回渲染的音频帧数,如果出错则返回 -1。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_videostreamplayer.rst b/classes/zh_CN/class_videostreamplayer.rst index ec2960cd60..0f0f644c84 100644 --- a/classes/zh_CN/class_videostreamplayer.rst +++ b/classes/zh_CN/class_videostreamplayer.rst @@ -10,14 +10,14 @@ VideoStreamPlayer ================= -**Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 用于播放视频的控件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于播放 :ref:`VideoStream` 资源的控件。 @@ -29,15 +29,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Playing videos <../tutorials/animation/playing_videos>` +- :doc:`播放视频 <../tutorials/animation/playing_videos>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -68,8 +68,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -94,8 +94,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_VideoStreamPlayer_signal_finished: @@ -111,8 +111,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VideoStreamPlayer_property_audio_track: @@ -210,7 +210,7 @@ Property Descriptions - void **set_loop** **(** :ref:`bool` value **)** - :ref:`bool` **has_loop** **(** **)** -If ``true``, the video restarts when it reaches its end. +如果为 ``true``\ ,该视频将在到达末尾时重新开始。 .. rst-class:: classref-item-separator @@ -305,8 +305,8 @@ If ``true``, the video restarts when it reaches its end. .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_VideoStreamPlayer_method_get_stream_length: @@ -314,9 +314,9 @@ Method Descriptions :ref:`float` **get_stream_length** **(** **)** |const| -The length of the current stream, in seconds. +当前流的长度,单位:秒。 -\ **Note:** For :ref:`VideoStreamTheora` streams (the built-in format supported by Godot), this value will always be zero, as getting the stream length is not implemented yet. The feature may be supported by video formats implemented by a GDExtension add-on. +\ **注意:**\ 对于 :ref:`VideoStreamTheora` 流(Godot 支持的内置格式),该值将始终为零,因为获取流长度尚未实现。GDExtension 插件实现的视频格式可能会支持该功能。 .. rst-class:: classref-item-separator @@ -382,10 +382,10 @@ void **stop** **(** **)** \ **注意:**\ 虽然视频流位置将被设置为 0,但视频流的第一帧不会成为当前帧。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_videostreamtheora.rst b/classes/zh_CN/class_videostreamtheora.rst index 1815514177..a210b22043 100644 --- a/classes/zh_CN/class_videostreamtheora.rst +++ b/classes/zh_CN/class_videostreamtheora.rst @@ -10,23 +10,23 @@ VideoStreamTheora ================= -**Inherits:** :ref:`VideoStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VideoStream` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`VideoStream` Ogg Theora 视频的资源。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`VideoStream` 资源处理带有 ``.ogv`` 扩展名的 `Ogg Theora `__ 视频格式。Theora 编解码器在 CPU 上进行解码。 \ **注意:**\ 虽然 Ogg Theora 视频也可以具有一个 ``.ogg`` 扩展名,但必须将该扩展名重命名为 ``.ogv``\ ,才能在 Godot 中使用这些视频。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_viewport.rst b/classes/zh_CN/class_viewport.rst index f235ed9f21..efeba8340d 100644 --- a/classes/zh_CN/class_viewport.rst +++ b/classes/zh_CN/class_viewport.rst @@ -10,16 +10,16 @@ Viewport ======== -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`SubViewport`, :ref:`Window` +**派生:** :ref:`SubViewport`, :ref:`Window` 视口的抽象基类。对绘图以及与游戏世界的交互进行了封装。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- Viewport(视口)会在屏幕中创建不同的视图,或是在其他视口中创建子视图。视口上会显示 2D 子节点,也会渲染 Camera3D 3D 子节点。 @@ -33,8 +33,8 @@ Viewport(视口)会在屏幕中创建不同的视图,或是在其他视口 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用视口 <../tutorials/rendering/viewports>` @@ -54,8 +54,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -152,8 +152,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -222,8 +222,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Viewport_signal_gui_focus_changed: @@ -251,8 +251,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Viewport_PositionalShadowAtlasQuadrantSubdiv: @@ -350,11 +350,19 @@ enum **Scaling3DMode**: 对该视口的 3D 缓冲区使用 AMD FidelityFX 超分辨率 1.0 升采样技术。缩放的程度可以使用 :ref:`scaling_3d_scale` 设置。小于 ``1.0`` 的值会使用 FSR 进行放大。不支持大于 ``1.0`` 的值,会改用双线性降采样。值为 ``1.0`` 时禁用缩放。 +.. _class_Viewport_constant_SCALING_3D_MODE_FSR2: + +.. rst-class:: classref-enumeration-constant + +:ref:`Scaling3DMode` **SCALING_3D_MODE_FSR2** = ``2`` + +对视口的 3D 缓冲区使用 AMD FidelityFX 超分辨率 2.2 放大。可以使用 :ref:`scaling_3d_scale` 设置缩放量。小于 ``1.0`` 的值将导致使用 FSR2 放大视口。不支持大于 ``1.0`` 的值,将改用双线性降采样。\ ``1.0`` 的值将使用原生分辨率下的 FSR2 作为 TAA 解决方案。 + .. _class_Viewport_constant_SCALING_3D_MODE_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Scaling3DMode` **SCALING_3D_MODE_MAX** = ``2`` +:ref:`Scaling3DMode` **SCALING_3D_MODE_MAX** = ``3`` 代表 :ref:`Scaling3DMode` 枚举的大小。 @@ -736,6 +744,14 @@ enum **DebugDraw**: +.. _class_Viewport_constant_DEBUG_DRAW_INTERNAL_BUFFER: + +.. rst-class:: classref-enumeration-constant + +:ref:`DebugDraw` **DEBUG_DRAW_INTERNAL_BUFFER** = ``26`` + +在应用后处理之前绘制场景的内部分辨率缓冲区。 + .. rst-class:: classref-item-separator ---- @@ -968,8 +984,8 @@ VRS 纹理由主 :ref:`XRInterface` 提供。 .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Viewport_property_audio_listener_enable_2d: @@ -1298,9 +1314,9 @@ Property Descriptions - void **set_physics_object_picking** **(** :ref:`bool` value **)** - :ref:`bool` **get_physics_object_picking** **(** **)** -If ``true``, the objects rendered by viewport become subjects of mouse picking process. +如果为 ``true``\ ,则视口中渲染的对象会成为鼠标拾取过程中的候选。 -\ **Note:** The number of simultaneously pickable objects is limited to 64 and they are selected in a non-deterministic order, which can be different in each picking process. +\ **注意:**\ 同时能够被拾取的对象最多只有 64 个,选择的顺序是不确定的,每次拾取可能都不相同。 .. rst-class:: classref-item-separator @@ -1317,11 +1333,11 @@ If ``true``, the objects rendered by viewport become subjects of mouse picking p - void **set_physics_object_picking_sort** **(** :ref:`bool` value **)** - :ref:`bool` **get_physics_object_picking_sort** **(** **)** -If ``true``, objects receive mouse picking events sorted primarily by their :ref:`CanvasItem.z_index` and secondarily by their position in the scene tree. If ``false``, the order is undetermined. +如果为 ``true``\ ,则对象会按照固定的顺序接收鼠标拾取事件,首先会按各自的 :ref:`CanvasItem.z_index` 排序,然后按它们在场景树中的位置排序。如果为 ``false``\ ,则顺序不确定。 -\ **Note:** This setting is disabled by default because of its potential expensive computational cost. +\ **注意:**\ 默认情况下禁用此设置,因为它可能会产生昂贵的计算成本。 -\ **Note:** Sorting happens after selecting the pickable objects. Because of the limitation of 64 simultaneously pickable objects, it is not guaranteed that the object with the highest :ref:`CanvasItem.z_index` receives the picking event. +\ **注意:**\ 排序发生在选择可拾取对象之后。因为同时能够被拾取的对象最多只有 64 个,所以无法保证 :ref:`CanvasItem.z_index` 最大的对象能够接收到拾取事件。 .. rst-class:: classref-item-separator @@ -1501,7 +1517,7 @@ If ``true``, objects receive mouse picking events sorted primarily by their :ref .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1520,7 +1536,7 @@ If ``true``, objects receive mouse picking events sorted primarily by their :ref .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1539,7 +1555,7 @@ If ``true``, objects receive mouse picking events sorted primarily by their :ref .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1558,7 +1574,7 @@ If ``true``, objects receive mouse picking events sorted primarily by their :ref .. container:: contribute - There is currently no description for this property. Please help us by :ref:`contributing one `! + 目前没有这个属性的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -1575,13 +1591,13 @@ If ``true``, objects receive mouse picking events sorted primarily by their :ref - void **set_texture_mipmap_bias** **(** :ref:`float` value **)** - :ref:`float` **get_texture_mipmap_bias** **(** **)** -Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). +通过从更低或更高的 mipmap 中读取数据影响最终纹理的锐度(也叫“纹理 LOD 偏置”)。负值会让 mipmap 纹理更锐利,但从较远处观察时颗粒更明显,而正值会让 mipmap 纹理更模糊(即便凑近看也一样)。 -Enabling temporal antialiasing (:ref:`use_taa`) will automatically apply a ``-0.5`` offset to this value, while enabling FXAA (:ref:`screen_space_aa`) will automatically apply a ``-0.25`` offset to this value. If both TAA and FXAA are enabled at the same time, an offset of ``-0.75`` is applied to this value. +启用时间抗锯齿(\ :ref:`use_taa`\ )会对这个值应用 ``-0.5`` 的偏移量,而启用 FXAA(\ :ref:`screen_space_aa`\ )则会对这个值应用 ``-0.25`` 的偏移量。如果同时启用 TAA 和 FXAA,则会对这个值应用 ``-0.75`` 的偏移量。 -\ **Note:** If :ref:`scaling_3d_scale` is lower than ``1.0`` (exclusive), :ref:`texture_mipmap_bias` is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is ``log2(scaling_3d_scale) + mipmap_bias``. +\ **注意:**\ 如果 :ref:`scaling_3d_scale` 比 ``1.0`` 小(包含),则会使用 :ref:`texture_mipmap_bias` 自动调整 mipmap 偏置,内部会根据缩放系数进行计算。公式为 ``log2(scaling_3d_scale) + mipmap_bias``\ 。 -To control this property on the root viewport, set the :ref:`ProjectSettings.rendering/textures/default_filters/texture_mipmap_bias` project setting. +要在根视口上控制这个属性,请使用项目设置 :ref:`ProjectSettings.rendering/textures/default_filters/texture_mipmap_bias`\ 。 .. rst-class:: classref-item-separator @@ -1634,9 +1650,9 @@ To control this property on the root viewport, set the :ref:`ProjectSettings.ren - void **set_use_hdr_2d** **(** :ref:`bool` value **)** - :ref:`bool` **is_using_hdr_2d** **(** **)** -If ``true``, 2D rendering will use an high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be a ``RGBA16`` framebuffer, while when using the Mobile renderer it will be a ``RGB10_A2`` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the ``0-1`` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. +如果为 ``true``\ ,则 2D 渲染会使用高动态范围格式的帧缓冲,与 3D 帧缓冲的位深度一致。使用 Forward+ 渲染器时为 ``RGBA16`` 帧缓冲,而使用 Mobile 渲染器时为 ``RGB10_A2`` 帧缓冲。另外,2D 渲染是发生在线性色彩空间的,会在传输至屏幕前转换至 sRGB 空间(如果 Viewport 与屏幕进行了关联)。这意味着在实际情况下,Viewport 的最终效果不会被限制在 ``0-1`` 的范围内,无需色彩空间调整就能够用于 3D 渲染。这样 2D 渲染就能够利用到需要高动态范围的效果(例如 2D 辉光),并且能够大幅提升需要大量细节内容的效果。 -\ **Note:** This setting will have no effect when using the GL Compatibility renderer as the GL Compatibility renderer always renders in low dynamic range for performance reasons. +\ **注意:**\ 使用 GL Compatibility 渲染器时无效,因为 GL Compatibility 渲染器出于性能的原因始终使用低动态范围。 .. rst-class:: classref-item-separator @@ -1653,11 +1669,11 @@ If ``true``, 2D rendering will use an high dynamic range (HDR) format framebuffe - void **set_use_occlusion_culling** **(** :ref:`bool` value **)** - :ref:`bool` **is_using_occlusion_culling** **(** **)** -If ``true``, :ref:`OccluderInstance3D` nodes will be usable for occlusion culling in 3D for this viewport. For the root viewport, :ref:`ProjectSettings.rendering/occlusion_culling/use_occlusion_culling` must be set to ``true`` instead. +如果为 ``true``\ ,\ :ref:`OccluderInstance3D` 节点将被用于该视口中的 3D 遮挡剔除。对于根视口,\ :ref:`ProjectSettings.rendering/occlusion_culling/use_occlusion_culling` 必须改为被设置为 ``true``\ 。 -\ **Note:** Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it, and think whether your scene can actually benefit from occlusion culling. Large, open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges (:ref:`GeometryInstance3D.visibility_range_begin` and :ref:`GeometryInstance3D.visibility_range_end`) compared to occlusion culling. +\ **注意:**\ 启用遮挡剔除会消耗一定的 CPU。仅当确实打算使用遮挡剔除时才启用它,并考虑场景是否真的可以从遮挡剔除中受益。具有很少或没有对象阻挡视图的大型开放场景,通常不会从遮挡剔除中受益更多。与遮挡剔除相比,大型开放场景通常从网格 LOD 和可见性范围(\ :ref:`GeometryInstance3D.visibility_range_begin` 和 :ref:`GeometryInstance3D.visibility_range_end`\ )中受益更多。 -\ **Note:** Due to memory constraints, occlusion culling is not supported by default in Web export templates. It can be enabled by compiling custom Web export templates with ``module_raycast_enabled=yes``. +\ **注意:**\ 由于内存限制,Web 导出模板中默认不支持遮挡剔除。编译自定义 Web 导出模板时使用 ``module_raycast_enabled=yes`` 可以启用。 .. rst-class:: classref-item-separator @@ -1784,8 +1800,8 @@ If ``true``, :ref:`OccluderInstance3D` nodes will be u .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_Viewport_method_find_world_2d: @@ -1853,9 +1869,9 @@ Method Descriptions :ref:`Window[]` **get_embedded_subwindows** **(** **)** |const| -Returns a list of the visible embedded :ref:`Window`\ s inside the viewport. +返回该视口内可见的嵌入 :ref:`Window` 的列表。 -\ **Note:** :ref:`Window`\ s inside other viewports will not be listed. +\ **注意:**\ 其他视口内的 :ref:`Window` 不会被列出。 .. rst-class:: classref-item-separator @@ -1929,7 +1945,7 @@ Returns a list of the visible embedded :ref:`Window`\ s inside the 返回该视口的纹理 -\ **注意:**\ 保存当前纹理时(例如保存到文件中),如果时机过早则可能是全黑或过时的图片,尤其是在 :ref:`Node._ready` 等函数中使用时。要确保获得正确的纹理,你可以等待 :ref:`RenderingServer.frame_post_draw` 信号。 +\ **注意:**\ 保存当前纹理时(例如保存到文件中),如果时机过早则可能是全黑或过时的图片,尤其是在 :ref:`Node._ready` 等函数中使用时。要确保获得正确的纹理,你可以等待 :ref:`RenderingServer.frame_post_draw` 信号。 :: @@ -1971,7 +1987,7 @@ Returns a list of the visible embedded :ref:`Window`\ s inside the :ref:`Variant` **gui_get_drag_data** **(** **)** |const| -返回 GUI 的拖动数据,该数据先前由 :ref:`Control._get_drag_data` 返回。 +返回 GUI 的拖动数据,该数据先前由 :ref:`Control._get_drag_data` 返回。 .. rst-class:: classref-item-separator @@ -2035,7 +2051,7 @@ void **gui_release_focus** **(** **)** 返回当前的 :ref:`InputEvent` 是否已被处理。在 :ref:`InputEvent` 生命周期中调用 :ref:`set_input_as_handled` 前,输入事件都处于未处理状态。 -通常作为 :ref:`Node._input`\ 、\ :ref:`Control._gui_input` 等输入处理方法以及对应的信号处理函数的一部分来实现。 +通常作为 :ref:`Node._input`\ 、\ :ref:`Control._gui_input` 等输入处理方法以及对应的信号处理函数的一部分来实现。 如果 :ref:`handle_input_locally` 为 ``false``\ ,则这个方法会尝试查找第一个本地处理输入的父级视口,并返回该视口的 :ref:`is_input_handled`\ 。 @@ -2049,27 +2065,27 @@ void **gui_release_focus** **(** **)** void **push_input** **(** :ref:`InputEvent` event, :ref:`bool` in_local_coords=false **)** -Triggers the given ``event`` in this **Viewport**. This can be used to pass an :ref:`InputEvent` between viewports, or to locally apply inputs that were sent over the network or saved to a file. +在该 **Viewport** 中触发给定的 ``event`` 事件。可用于在不同视口之间传递 :ref:`InputEvent`\ ,或者在本地应用通过网络传输或保存在文件中的事件。 -If ``in_local_coords`` is ``false``, the event's position is in the embedder's coordinates and will be converted to viewport coordinates. If ``in_local_coords`` is ``true``, the event's position is in viewport coordinates. +如果 ``in_local_coords`` 为 ``false``\ ,则该事件中的位置使用的是嵌入器坐标系,会被转换至视口坐标系。如果 ``in_local_coords`` 为 ``true``\ ,则该事件的位置使用的是视口坐标系。 -While this method serves a similar purpose as :ref:`Input.parse_input_event`, it does not remap the specified ``event`` based on project settings like :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse`. +虽然这个方法的用途和 :ref:`Input.parse_input_event` 类似,但不会根据 :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse` 等项目设置对指定的 ``event`` 进行重映射。 -Calling this method will propagate calls to child nodes for following methods in the given order: +调用这个方法会将调用传播至子节点,按照以下顺序调用: -- :ref:`Node._input`\ +- :ref:`Node._input`\ -- :ref:`Control._gui_input` for :ref:`Control` nodes +- :ref:`Control._gui_input` 仅用于 :ref:`Control` 节点 -- :ref:`Node._shortcut_input`\ +- :ref:`Node._shortcut_input`\ -- :ref:`Node._unhandled_key_input`\ +- :ref:`Node._unhandled_key_input`\ -- :ref:`Node._unhandled_input`\ +- :ref:`Node._unhandled_input`\ -If an earlier method marks the input as handled via :ref:`set_input_as_handled`, any later method in this list will not be called. +如果某个方法使用 :ref:`set_input_as_handled` 将输入标记为已处理,则列表中的后续方法均不会被调用。 -If none of the methods handle the event and :ref:`physics_object_picking` is ``true``, the event is used for physics object picking. +如果没有任何方法处理该事件,并且 :ref:`physics_object_picking` 为 ``true``\ ,则该事件将用于物理对象的拾取。 .. rst-class:: classref-item-separator @@ -2093,27 +2109,27 @@ void **push_text_input** **(** :ref:`String` text **)** void **push_unhandled_input** **(** :ref:`InputEvent` event, :ref:`bool` in_local_coords=false **)** -Triggers the given :ref:`InputEvent` in this **Viewport**. This can be used to pass input events between viewports, or to locally apply inputs that were sent over the network or saved to a file. +在该 **Viewport** 中触发给定的 ``event`` 事件。可用于在不同视口之间传递 :ref:`InputEvent`\ ,或者在本地应用通过网络传输或保存在文件中的事件。 -If ``in_local_coords`` is ``false``, the event's position is in the embedder's coordinates and will be converted to viewport coordinates. If ``in_local_coords`` is ``true``, the event's position is in viewport coordinates. +如果 ``in_local_coords`` 为 ``false``\ ,则该事件中的位置使用的是嵌入器坐标系,会被转换至视口坐标系。如果 ``in_local_coords`` 为 ``true``\ ,则该事件的位置使用的是视口坐标系。 -While this method serves a similar purpose as :ref:`Input.parse_input_event`, it does not remap the specified ``event`` based on project settings like :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse`. +虽然这个方法的用途和 :ref:`Input.parse_input_event` 类似,但不会根据 :ref:`ProjectSettings.input_devices/pointing/emulate_touch_from_mouse` 等项目设置对指定的 ``event`` 进行重映射。 -Calling this method will propagate calls to child nodes for following methods in the given order: +调用这个方法会将调用传播至子节点,按照以下顺序调用: -- :ref:`Node._shortcut_input`\ +- :ref:`Node._shortcut_input`\ -- :ref:`Node._unhandled_key_input`\ +- :ref:`Node._unhandled_key_input`\ -- :ref:`Node._unhandled_input`\ +- :ref:`Node._unhandled_input`\ -If an earlier method marks the input as handled via :ref:`set_input_as_handled`, any later method in this list will not be called. +如果某个方法使用 :ref:`set_input_as_handled` 将输入标记为已处理,则列表中的后续方法均不会被调用。 -If none of the methods handle the event and :ref:`physics_object_picking` is ``true``, the event is used for physics object picking. +如果上述方法均未处理事件,并且 :ref:`physics_object_picking` 为 ``true``\ ,则该事件将用于物理对象的拾取。 -\ **Note:** This method doesn't propagate input events to embedded :ref:`Window`\ s or :ref:`SubViewport`\ s. +\ **注意:**\ 这个方法不会将输入事件传播至嵌入的 :ref:`Window` 和 :ref:`SubViewport`\ 。 -\ *Deprecated.* Use :ref:`push_input` instead. +\ *已弃用。*\ 请改用 :ref:`push_input`\ 。 .. rst-class:: classref-item-separator @@ -2179,10 +2195,10 @@ void **warp_mouse** **(** :ref:`Vector2` position **)** \ **注意:**\ :ref:`warp_mouse` 仅支持 Windows、macOS 和 Linux。它对 Android、iOS 和 Web 没有影响。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_viewporttexture.rst b/classes/zh_CN/class_viewporttexture.rst index bdb282d704..d1e367036c 100644 --- a/classes/zh_CN/class_viewporttexture.rst +++ b/classes/zh_CN/class_viewporttexture.rst @@ -10,25 +10,25 @@ ViewportTexture =============== -**Inherits:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Texture2D` **<** :ref:`Texture` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 以动态纹理的形式提供 :ref:`Viewport` 的内容。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Provides the content of a :ref:`Viewport` as a dynamic :ref:`Texture2D`. This can be used to mix controls, 2D game objects, and 3D game objects in the same scene. +以动态 :ref:`Texture2D` 的形式提供 :ref:`Viewport` 的内容。可用于在同一场景中混合控件、2D 游戏对象和 3D 游戏对象。 -To create a **ViewportTexture** in code, use the :ref:`Viewport.get_texture` method on the target viewport. +要在代码中创建 **ViewportTexture**\ ,请在目标视口上使用 :ref:`Viewport.get_texture` 方法。 -\ **Note:** A **ViewportTexture** is always local to its scene (see :ref:`Resource.resource_local_to_scene`). If the scene root is not ready, it may return incorrect data (see :ref:`Node.ready`). +\ **注意:**\ **ViewportTexture** 始终是局部于其场景的(请参阅 :ref:`Resource.resource_local_to_scene`\ )。如果该场景根没有准备好,它可能会返回不正确的数据(参见 :ref:`Node.ready`\ )。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `3D GUI 演示 `__ @@ -40,8 +40,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_ViewportTexture_property_viewport_path: @@ -74,10 +74,10 @@ Property Descriptions \ **注意:**\ 在编辑器中,目标视口或其祖级节点发生重命名或移动时会自动更新这个路径。在运行时,该路径可能无法自动更新,因为无法确定场景的根节点。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visibleonscreenenabler2d.rst b/classes/zh_CN/class_visibleonscreenenabler2d.rst index 4063dc3bb7..9f7eac1c00 100644 --- a/classes/zh_CN/class_visibleonscreenenabler2d.rst +++ b/classes/zh_CN/class_visibleonscreenenabler2d.rst @@ -10,21 +10,25 @@ VisibleOnScreenEnabler2D ======================== -**Inherits:** :ref:`VisibleOnScreenNotifier2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`VisibleOnScreenNotifier2D` **<** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -某个节点在屏幕上不可见时自动禁用该节点。 +二维空间的矩形区块,当在屏幕上可见时,启用目标节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -VisibleOnScreenEnabler2D 检测它何时在屏幕上可见(就像 :ref:`VisibleOnScreenNotifier2D` 一样)并自动启用或禁用目标节点。当 **VisibleOnScreenEnabler2D** 在屏幕上不可见时(包括当 :ref:`CanvasItem.visible` 为 ``false`` 时),目标节点会被禁用;当该启动节点可见时,目标节点会被启用。禁用是通过更改 :ref:`Node.process_mode` 来实现的。 +**VisibleOnScreenEnabler2D** 包含 2D 空间的矩形区块和目标节点。当该区块的任何部分在屏幕上可见时,目标节点将自动启用(通过其 :ref:`Node.process_mode` 属性),否则将自动禁用。例如,这可以被用于仅在玩家接近敌人时激活敌人。 + +如果你只想在该区块在屏幕上可见时收到通知,请参阅 :ref:`VisibleOnScreenNotifier2D`\ 。 + +\ **注意:**\ **VisibleOnScreenEnabler2D** 使用渲染剔除代码来确定它在屏幕上是否可见,因此除非 :ref:`CanvasItem.visible` 被设置为 ``true``\ ,否则它不会起作用。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +45,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisibleOnScreenEnabler2D_EnableMode: @@ -80,8 +84,8 @@ enum **EnableMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisibleOnScreenEnabler2D_property_enable_mode: @@ -94,7 +98,7 @@ Property Descriptions - void **set_enable_mode** **(** :ref:`EnableMode` value **)** - :ref:`EnableMode` **get_enable_mode** **(** **)** -确定节点的启用方式。与 :ref:`ProcessMode` 对应。被禁用的节点使用 :ref:`Node.PROCESS_MODE_DISABLED`\ 。 +确定如何启用目标节点。对应于 :ref:`ProcessMode`\ 。当该节点被禁用时,它始终使用 :ref:`Node.PROCESS_MODE_DISABLED`\ 。 .. rst-class:: classref-item-separator @@ -111,12 +115,12 @@ Property Descriptions - void **set_enable_node_path** **(** :ref:`NodePath` value **)** - :ref:`NodePath` **get_enable_node_path** **(** **)** -目标节点的路径,相对于 **VisibleOnScreenEnabler2D**\ 。目标节点会被缓存;只有在设置这个属性时(\ **VisibleOnScreenEnabler2D** 位于场景树中),以及 **VisibleOnScreenEnabler2D** 进入场景树时会进行赋值。如果路径无效,则不会发生任何事情。 +目标节点的路径,相对于 **VisibleOnScreenEnabler2D**\ 。目标节点会被缓存;只有在设置这个属性时(\ **VisibleOnScreenEnabler2D** 位于场景树中),以及 **VisibleOnScreenEnabler2D** 进入场景树时会进行赋值。如果路径无效,在编辑器中将打印一条错误,并且不会影响任何节点。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visibleonscreenenabler3d.rst b/classes/zh_CN/class_visibleonscreenenabler3d.rst index 1fd243bfef..3daa50f870 100644 --- a/classes/zh_CN/class_visibleonscreenenabler3d.rst +++ b/classes/zh_CN/class_visibleonscreenenabler3d.rst @@ -10,27 +10,25 @@ VisibleOnScreenEnabler3D ======================== -**Inherits:** :ref:`VisibleOnScreenNotifier3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`VisibleOnScreenNotifier3D` **<** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -只在大约可见时启用某些节点。 +3D 空间的盒形区块,当在屏幕上可见时,启用目标节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -VisibleOnScreenEnabler3D 会禁用不可见的 :ref:`RigidBody3D` 和 :ref:`AnimationPlayer` 节点。它只会影响与 VisibleOnScreenEnabler3D 本身相同场景中的其他节点。 +**VisibleOnScreenEnabler3D** 包含 3D 空间的盒形区块和目标节点。当该区域的任何部分在屏幕上可见时,目标节点将自动启用(通过其 :ref:`Node.process_mode` 属性),否则将自动禁用。例如,这可以被用于仅在玩家接近敌人时激活敌人。 -如果你只是想接收通知,请使用 :ref:`VisibleOnScreenNotifier3D` 代替。 +如果你只想在该区块在屏幕上可见时收到通知,请参阅 :ref:`VisibleOnScreenNotifier3D`\ 。 -\ **注意:**\ VisibleOnScreenEnabler3D 由于性能原因使用了一个近似的启发式方法。它不会考虑墙和其他遮挡物。启发式方法属于实现细节,在未来的版本中可能会改变。如果你需要精确的可见性检查,请使用其他方法,例如添加一个 :ref:`Area3D` 节点作为 :ref:`Camera3D` 节点的子节点和/或 :ref:`Vector3.dot`\ 。 - -\ **注意:**\ VisibleOnScreenEnabler3D 不会影响场景初始化后添加的节点。 +\ **注意:**\ **VisibleOnScreenEnabler3D** 使用近似启发式,不考虑墙壁和其他遮挡,除非使用遮挡剔除。除非将 :ref:`Node3D.visible` 设置为 ``true``\ ,否则它也不会起作用。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +45,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisibleOnScreenEnabler3D_EnableMode: @@ -62,7 +60,7 @@ enum **EnableMode**: :ref:`EnableMode` **ENABLE_MODE_INHERIT** = ``0`` - +对应 :ref:`Node.PROCESS_MODE_INHERIT`\ 。 .. _class_VisibleOnScreenEnabler3D_constant_ENABLE_MODE_ALWAYS: @@ -70,7 +68,7 @@ enum **EnableMode**: :ref:`EnableMode` **ENABLE_MODE_ALWAYS** = ``1`` - +对应 :ref:`Node.PROCESS_MODE_ALWAYS`\ 。 .. _class_VisibleOnScreenEnabler3D_constant_ENABLE_MODE_WHEN_PAUSED: @@ -78,7 +76,7 @@ enum **EnableMode**: :ref:`EnableMode` **ENABLE_MODE_WHEN_PAUSED** = ``2`` - +对应 :ref:`Node.PROCESS_MODE_WHEN_PAUSED`\ 。 .. rst-class:: classref-section-separator @@ -86,8 +84,8 @@ enum **EnableMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisibleOnScreenEnabler3D_property_enable_mode: @@ -100,9 +98,7 @@ Property Descriptions - void **set_enable_mode** **(** :ref:`EnableMode` value **)** - :ref:`EnableMode` **get_enable_mode** **(** **)** -.. container:: contribute - - There is currently no description for this property. Please help us by :ref:`contributing one `! +确定如何启用目标节点。对应于 :ref:`ProcessMode`\ 。当该节点被禁用时,它始终使用 :ref:`Node.PROCESS_MODE_DISABLED`\ 。 .. rst-class:: classref-item-separator @@ -119,14 +115,12 @@ Property Descriptions - void **set_enable_node_path** **(** :ref:`NodePath` value **)** - :ref:`NodePath` **get_enable_node_path** **(** **)** -.. container:: contribute +目标节点的路径,相对于 **VisibleOnScreenEnabler3D**\ 。目标节点会被缓存;只有在设置这个属性时(\ **VisibleOnScreenEnabler3D** 位于场景树中),以及 **VisibleOnScreenEnabler3D** 进入场景树时会进行赋值。如果路径无效,在编辑器中将打印一条错误,并且不会影响任何节点。 - There is currently no description for this property. Please help us by :ref:`contributing one `! - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visibleonscreennotifier2d.rst b/classes/zh_CN/class_visibleonscreennotifier2d.rst index 1dd949a8d4..ed2bbebbcf 100644 --- a/classes/zh_CN/class_visibleonscreennotifier2d.rst +++ b/classes/zh_CN/class_visibleonscreennotifier2d.rst @@ -10,34 +10,34 @@ VisibleOnScreenNotifier2D ========================= -**Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`VisibleOnScreenEnabler2D` +**派生:** :ref:`VisibleOnScreenEnabler2D` -检测节点范围何时在屏幕上可见。 +2D 空间的矩形区域,用于检测其在屏幕上是否可见。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -VisibleOnScreenNotifier2D 检测它何时在屏幕上可见。它还会在其边界矩形进入或退出屏幕或视口时发出通知。 +:ref:`VisibleOnScreenEnabler2D` 表示 2D 空间的矩形区块。当该区块的任何部分在屏幕或视口中可见时,它将发出 :ref:`screen_entered` 信号,同样,当其任何部分都不可见时,它将发出 :ref:`screen_exited` 信号。 -如果希望节点在退出屏幕时自动禁用,请改用 :ref:`VisibleOnScreenEnabler2D`\ 。 +如果希望当该区块在屏幕上可见时自动启用节点,请使用 :ref:`VisibleOnScreenEnabler2D`\ 。 -\ **注意:**\ VisibleOnScreenNotifier2D 使用渲染剔除代码来确定它是否在屏幕上可见,这也意味着它的 :ref:`CanvasItem.visible` 必须是 ``true`` 才能正常工作。 +\ **注意:**\ **VisibleOnScreenNotifier2D** 使用渲染剔除代码来确定它在屏幕上是否可见,因此除非 :ref:`CanvasItem.visible` 被设置为 ``true``\ ,否则它不会起作用。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `2D Dodge The Creeps 演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -48,8 +48,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -64,8 +64,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_VisibleOnScreenNotifier2D_signal_screen_entered: @@ -93,8 +93,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisibleOnScreenNotifier2D_property_rect: @@ -115,8 +115,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_VisibleOnScreenNotifier2D_method_is_on_screen: @@ -126,12 +126,12 @@ Method Descriptions 如果为 ``true``\ ,则边界矩形在屏幕上。 -\ **注意:**\ 一旦添加到场景树中,需要一帧来计算节点的可见性,所以这个方法将在它被实例化后立即返回 ``false``\ ,即使屏幕在绘制过程中。 +\ **注意:**\ **VisibleOnScreenNotifier2D** 被添加到场景树后需要一帧才能确定其可见性,因此该方法在它被实例化后,在绘制阶段之前,将始终返回 ``false`` 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visibleonscreennotifier3d.rst b/classes/zh_CN/class_visibleonscreennotifier3d.rst index 2064605c99..776a1081ba 100644 --- a/classes/zh_CN/class_visibleonscreennotifier3d.rst +++ b/classes/zh_CN/class_visibleonscreennotifier3d.rst @@ -10,27 +10,27 @@ VisibleOnScreenNotifier3D ========================= -**Inherits:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`VisibleOnScreenEnabler3D` +**派生:** :ref:`VisibleOnScreenEnabler3D` -大约在节点在屏幕上可见时进行检测。 +3D 空间的盒形区块,用于检测其在屏幕上是否可见。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -VisibleOnScreenNotifier3D 检测它何时在该屏幕上可见。它还会在其边界矩形进入或退出该屏幕或 :ref:`Camera3D` 的视图时发出通知。 +:ref:`VisibleOnScreenEnabler3D` 表示 3D 空间的盒形区块。当该区块的任何部分在屏幕或 :ref:`Camera3D` 视图中可见时,它将发出 :ref:`screen_entered` 信号;同样,当其任何部分都不可见时,它将发出 :ref:`screen_exited` 信号。 -如果希望节点在退出屏幕时自动禁用,请改用 :ref:`VisibleOnScreenEnabler3D`\ 。 +如果你希望当该区块在屏幕上可见时自动启用节点,请使用 :ref:`VisibleOnScreenEnabler3D`\ 。 -\ **注意:**\ VisibleOnScreenNotifier3D 使用渲染剔除代码来确定它是否在屏幕上可见,这也意味着它的 :ref:`Node3D.visible` 必须为 ``true`` 时才能正常工作。 +\ **注意:**\ **VisibleOnScreenNotifier3D** 使用近似启发式,不考虑墙壁和其他遮挡,除非使用遮挡剔除。除非将 :ref:`Node3D.visible` 设置为 ``true``\ ,否则它也不会起作用。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -57,8 +57,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_VisibleOnScreenNotifier3D_signal_screen_entered: @@ -66,7 +66,7 @@ Signals **screen_entered** **(** **)** -当该 VisibleOnScreenNotifier3D 进入屏幕时发出。 +当该 **VisibleOnScreenNotifier3D** 进入屏幕时发出。 .. rst-class:: classref-item-separator @@ -78,7 +78,7 @@ Signals **screen_exited** **(** **)** -当该 VisibleOnScreenNotifier3D 退出屏幕时发出。 +当该 **VisibleOnScreenNotifier3D** 退出屏幕时发出。 .. rst-class:: classref-section-separator @@ -86,8 +86,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisibleOnScreenNotifier3D_property_aabb: @@ -100,7 +100,7 @@ Property Descriptions - void **set_aabb** **(** :ref:`AABB` value **)** - :ref:`AABB` **get_aabb** **(** **)** -该 VisibleOnScreenNotifier3D 的边界框。 +该 **VisibleOnScreenNotifier3D** 的边界框。 .. rst-class:: classref-section-separator @@ -108,8 +108,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_VisibleOnScreenNotifier3D_method_is_on_screen: @@ -119,12 +119,12 @@ Method Descriptions 如果为 ``true``\ ,则边界框在屏幕上。 -\ **注意:**\ 一旦添加到场景树中,需要一帧来计算节点的可见性,所以这个方法将在它被实例化后立即返回 ``false``\ ,即使屏幕在绘制过程中。 +\ **注意:**\ **VisibleOnScreenNotifier3D** 被添加到场景树后需要一帧来评估其可见性,因此该方法在实例化后将始终返回 ``false`` 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualinstance3d.rst b/classes/zh_CN/class_visualinstance3d.rst index 01239270fd..a5b946cfc9 100644 --- a/classes/zh_CN/class_visualinstance3d.rst +++ b/classes/zh_CN/class_visualinstance3d.rst @@ -10,23 +10,23 @@ VisualInstance3D ================ -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`Decal`, :ref:`FogVolume`, :ref:`GeometryInstance3D`, :ref:`GPUParticlesAttractor3D`, :ref:`GPUParticlesCollision3D`, :ref:`Light3D`, :ref:`LightmapGI`, :ref:`ReflectionProbe`, :ref:`RootMotionView`, :ref:`VisibleOnScreenNotifier3D`, :ref:`VoxelGI` +**派生:** :ref:`Decal`, :ref:`FogVolume`, :ref:`GeometryInstance3D`, :ref:`GPUParticlesAttractor3D`, :ref:`GPUParticlesCollision3D`, :ref:`Light3D`, :ref:`LightmapGI`, :ref:`ReflectionProbe`, :ref:`RootMotionView`, :ref:`VisibleOnScreenNotifier3D`, :ref:`VoxelGI` 所有可视 3D 节点的父节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **VisualInstance3D** 可用于将资源连接到视觉表示。所有的可视化 3D 节点都继承自 **VisualInstance3D**\ 。一般来说,你不应该直接访问 **VisualInstance3D** 的属性,因为它们是由继承自 **VisualInstance3D** 的节点访问和管理的。\ **VisualInstance3D** 是 :ref:`RenderingServer` 实例的节点表示。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,14 +41,14 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AABB` | :ref:`_get_aabb` **(** **)** |virtual| |const| | + | :ref:`AABB` | :ref:`_get_aabb` **(** **)** |virtual| |const| | +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AABB` | :ref:`get_aabb` **(** **)** |const| | +-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -69,8 +69,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualInstance3D_property_layers: @@ -135,10 +135,10 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_VisualInstance3D_method__get_aabb: +.. _class_VisualInstance3D_private_method__get_aabb: .. rst-class:: classref-method @@ -146,7 +146,7 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -220,10 +220,10 @@ void **set_layer_mask_value** **(** :ref:`int` layer_number, :ref:`bo 基于 ``value``\ ,启用或禁用 :ref:`layers` 中的指定层,该层由一个介于 1 和 20 之间的给定 ``layer_number`` 指定。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshader.rst b/classes/zh_CN/class_visualshader.rst index 33c8c964c2..23a470a6b3 100644 --- a/classes/zh_CN/class_visualshader.rst +++ b/classes/zh_CN/class_visualshader.rst @@ -10,28 +10,28 @@ VisualShader ============ -**Inherits:** :ref:`Shader` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shader` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 带有可视化编辑器的自定义着色器程序。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This class provides a graph-like visual editor for creating a :ref:`Shader`. Although **VisualShader**\ s do not require coding, they share the same logic with script shaders. They use :ref:`VisualShaderNode`\ s that can be connected to each other to control the flow of the shader. The visual shader graph is converted to a script shader behind the scenes. +该类提供了一个类似图形的可视化编辑器,用于创建 :ref:`Shader`\ 。尽管 **VisualShader** 不需要编码,但它们与脚本着色器共享相同的逻辑。它们使用可以相互连接的 :ref:`VisualShaderNode` 来控制着色器的流。可视化着色器图在幕后被转换为脚本着色器。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Using VisualShaders <../tutorials/shaders/visual_shaders>` +- :doc:`使用可视化着色器 <../tutorials/shaders/visual_shaders>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -42,8 +42,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -92,8 +92,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShader_Type: @@ -311,8 +311,8 @@ Varying 的类型为 :ref:`Transform2D`\ 。 .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_VisualShader_constant_NODE_ID_INVALID: @@ -336,8 +336,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShader_property_graph_offset: @@ -358,8 +358,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_VisualShader_method_add_node: @@ -573,10 +573,10 @@ void **set_node_position** **(** :ref:`Type` type, :ref: 设置指定节点的位置。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernode.rst b/classes/zh_CN/class_visualshadernode.rst index 23d92d66b6..983948328b 100644 --- a/classes/zh_CN/class_visualshadernode.rst +++ b/classes/zh_CN/class_visualshadernode.rst @@ -10,30 +10,30 @@ VisualShaderNode ================ -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeBillboard`, :ref:`VisualShaderNodeClamp`, :ref:`VisualShaderNodeColorFunc`, :ref:`VisualShaderNodeColorOp`, :ref:`VisualShaderNodeCompare`, :ref:`VisualShaderNodeConstant`, :ref:`VisualShaderNodeCubemap`, :ref:`VisualShaderNodeCustom`, :ref:`VisualShaderNodeDerivativeFunc`, :ref:`VisualShaderNodeDeterminant`, :ref:`VisualShaderNodeDistanceFade`, :ref:`VisualShaderNodeDotProduct`, :ref:`VisualShaderNodeFloatFunc`, :ref:`VisualShaderNodeFloatOp`, :ref:`VisualShaderNodeFresnel`, :ref:`VisualShaderNodeIf`, :ref:`VisualShaderNodeInput`, :ref:`VisualShaderNodeIntFunc`, :ref:`VisualShaderNodeIntOp`, :ref:`VisualShaderNodeIs`, :ref:`VisualShaderNodeLinearSceneDepth`, :ref:`VisualShaderNodeMix`, :ref:`VisualShaderNodeMultiplyAdd`, :ref:`VisualShaderNodeOuterProduct`, :ref:`VisualShaderNodeOutput`, :ref:`VisualShaderNodeParameter`, :ref:`VisualShaderNodeParameterRef`, :ref:`VisualShaderNodeParticleAccelerator`, :ref:`VisualShaderNodeParticleConeVelocity`, :ref:`VisualShaderNodeParticleEmit`, :ref:`VisualShaderNodeParticleEmitter`, :ref:`VisualShaderNodeParticleMultiplyByAxisAngle`, :ref:`VisualShaderNodeParticleRandomness`, :ref:`VisualShaderNodeProximityFade`, :ref:`VisualShaderNodeRandomRange`, :ref:`VisualShaderNodeRemap`, :ref:`VisualShaderNodeResizableBase`, :ref:`VisualShaderNodeRotationByAxis`, :ref:`VisualShaderNodeSample3D`, :ref:`VisualShaderNodeScreenNormalWorldSpace`, :ref:`VisualShaderNodeScreenUVToSDF`, :ref:`VisualShaderNodeSDFRaymarch`, :ref:`VisualShaderNodeSDFToScreenUV`, :ref:`VisualShaderNodeSmoothStep`, :ref:`VisualShaderNodeStep`, :ref:`VisualShaderNodeSwitch`, :ref:`VisualShaderNodeTexture`, :ref:`VisualShaderNodeTextureSDF`, :ref:`VisualShaderNodeTextureSDFNormal`, :ref:`VisualShaderNodeTransformCompose`, :ref:`VisualShaderNodeTransformDecompose`, :ref:`VisualShaderNodeTransformFunc`, :ref:`VisualShaderNodeTransformOp`, :ref:`VisualShaderNodeTransformVecMult`, :ref:`VisualShaderNodeUIntFunc`, :ref:`VisualShaderNodeUIntOp`, :ref:`VisualShaderNodeUVFunc`, :ref:`VisualShaderNodeUVPolarCoord`, :ref:`VisualShaderNodeVarying`, :ref:`VisualShaderNodeVectorBase`, :ref:`VisualShaderNodeWorldPositionFromDepth` +**派生:** :ref:`VisualShaderNodeBillboard`, :ref:`VisualShaderNodeClamp`, :ref:`VisualShaderNodeColorFunc`, :ref:`VisualShaderNodeColorOp`, :ref:`VisualShaderNodeCompare`, :ref:`VisualShaderNodeConstant`, :ref:`VisualShaderNodeCubemap`, :ref:`VisualShaderNodeCustom`, :ref:`VisualShaderNodeDerivativeFunc`, :ref:`VisualShaderNodeDeterminant`, :ref:`VisualShaderNodeDistanceFade`, :ref:`VisualShaderNodeDotProduct`, :ref:`VisualShaderNodeFloatFunc`, :ref:`VisualShaderNodeFloatOp`, :ref:`VisualShaderNodeFresnel`, :ref:`VisualShaderNodeIf`, :ref:`VisualShaderNodeInput`, :ref:`VisualShaderNodeIntFunc`, :ref:`VisualShaderNodeIntOp`, :ref:`VisualShaderNodeIs`, :ref:`VisualShaderNodeLinearSceneDepth`, :ref:`VisualShaderNodeMix`, :ref:`VisualShaderNodeMultiplyAdd`, :ref:`VisualShaderNodeOuterProduct`, :ref:`VisualShaderNodeOutput`, :ref:`VisualShaderNodeParameter`, :ref:`VisualShaderNodeParameterRef`, :ref:`VisualShaderNodeParticleAccelerator`, :ref:`VisualShaderNodeParticleConeVelocity`, :ref:`VisualShaderNodeParticleEmit`, :ref:`VisualShaderNodeParticleEmitter`, :ref:`VisualShaderNodeParticleMultiplyByAxisAngle`, :ref:`VisualShaderNodeParticleRandomness`, :ref:`VisualShaderNodeProximityFade`, :ref:`VisualShaderNodeRandomRange`, :ref:`VisualShaderNodeRemap`, :ref:`VisualShaderNodeResizableBase`, :ref:`VisualShaderNodeRotationByAxis`, :ref:`VisualShaderNodeSample3D`, :ref:`VisualShaderNodeScreenNormalWorldSpace`, :ref:`VisualShaderNodeScreenUVToSDF`, :ref:`VisualShaderNodeSDFRaymarch`, :ref:`VisualShaderNodeSDFToScreenUV`, :ref:`VisualShaderNodeSmoothStep`, :ref:`VisualShaderNodeStep`, :ref:`VisualShaderNodeSwitch`, :ref:`VisualShaderNodeTexture`, :ref:`VisualShaderNodeTextureSDF`, :ref:`VisualShaderNodeTextureSDFNormal`, :ref:`VisualShaderNodeTransformCompose`, :ref:`VisualShaderNodeTransformDecompose`, :ref:`VisualShaderNodeTransformFunc`, :ref:`VisualShaderNodeTransformOp`, :ref:`VisualShaderNodeTransformVecMult`, :ref:`VisualShaderNodeUIntFunc`, :ref:`VisualShaderNodeUIntOp`, :ref:`VisualShaderNodeUVFunc`, :ref:`VisualShaderNodeUVPolarCoord`, :ref:`VisualShaderNodeVarying`, :ref:`VisualShaderNodeVectorBase`, :ref:`VisualShaderNodeWorldPositionFromDepth` -Base class for :ref:`VisualShader` nodes. Not related to scene nodes. +:ref:`VisualShader` 节点的基类。与场景节点无关。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Visual shader graphs consist of various nodes. Each node in the graph is a separate object and they are represented as a rectangular boxes with title and a set of properties. Each node also has connection ports that allow to connect it to another nodes and control the flow of the shader. +可视化着色器图由各种节点组成。图中的每个节点都是一个独立的对象,它们被表示为带有标题和一系列属性的矩形框。每个节点还有连接端口,可以将其连接到另一个节点并控制着色器的流程。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Using VisualShaders <../tutorials/shaders/visual_shaders>` +- :doc:`使用可视化着色器 <../tutorials/shaders/visual_shaders>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -44,8 +44,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -72,8 +72,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNode_PortType: @@ -167,8 +167,8 @@ enum **PortType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNode_property_output_port_for_preview: @@ -189,8 +189,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_VisualShaderNode_method_clear_default_input_values: @@ -210,7 +210,7 @@ void **clear_default_input_values** **(** **)** :ref:`int` **get_default_input_port** **(** :ref:`PortType` type **)** |const| -Returns the input port which should be connected by default when this node is created as a result of dragging a connection from an existing node to the empty space on the graph. +返回输入端口,当由于将连接从已有节点拖动到图形上的空白区域而创建节点时,默认情况下应连接该输入端口。 .. rst-class:: classref-item-separator @@ -272,10 +272,10 @@ void **set_input_port_default_value** **(** :ref:`int` port, :ref:`Va 设置输入端口 ``port`` 的默认值 ``value``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodebillboard.rst b/classes/zh_CN/class_visualshadernodebillboard.rst index 5522e9916a..95b6854e51 100644 --- a/classes/zh_CN/class_visualshadernodebillboard.rst +++ b/classes/zh_CN/class_visualshadernodebillboard.rst @@ -10,21 +10,21 @@ VisualShaderNodeBillboard ========================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中,用于控制对象如何面向相机的节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个节点的输出端口需要连接至 :ref:`VisualShaderNodeOutput` 的 ``Model View Matrix`` 端口。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeBillboard_BillboardType: @@ -96,8 +96,8 @@ enum **BillboardType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeBillboard_property_billboard_type: @@ -129,10 +129,10 @@ Property Descriptions 如果为 ``true``\ ,则着色器将保持为网格设置的缩放。否则,进行公告板处理时将丢失缩放。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodebooleanconstant.rst b/classes/zh_CN/class_visualshadernodebooleanconstant.rst index 955519c5a9..aefd8883d3 100644 --- a/classes/zh_CN/class_visualshadernodebooleanconstant.rst +++ b/classes/zh_CN/class_visualshadernodebooleanconstant.rst @@ -10,14 +10,14 @@ VisualShaderNodeBooleanConstant =============================== -**Inherits:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中使用的布尔常量。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 只有一个输出端口,没有输入。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeBooleanConstant_property_constant: @@ -57,10 +57,10 @@ Property Descriptions 布尔常量,表示该节点的状态。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodebooleanparameter.rst b/classes/zh_CN/class_visualshadernodebooleanparameter.rst index 0637b32aee..99fab192d8 100644 --- a/classes/zh_CN/class_visualshadernodebooleanparameter.rst +++ b/classes/zh_CN/class_visualshadernodebooleanparameter.rst @@ -10,21 +10,21 @@ VisualShaderNodeBooleanParameter ================================ -**Inherits:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中使用的布尔参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``uniform bool``\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeBooleanParameter_property_default_value: @@ -74,10 +74,10 @@ Property Descriptions 启用 :ref:`default_value`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeclamp.rst b/classes/zh_CN/class_visualshadernodeclamp.rst index b54e6f4537..7e279c5064 100644 --- a/classes/zh_CN/class_visualshadernodeclamp.rst +++ b/classes/zh_CN/class_visualshadernodeclamp.rst @@ -10,21 +10,21 @@ VisualShaderNodeClamp ===================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中钳制某个值。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 将值限制在\ ``min``\ 和\ ``max``\ 之间。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeClamp_OpType: @@ -110,8 +110,8 @@ enum **OpType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeClamp_property_op_type: @@ -126,10 +126,10 @@ Property Descriptions 操作数和返回值的类型。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodecolorconstant.rst b/classes/zh_CN/class_visualshadernodecolorconstant.rst index 865681b809..c6a35776bb 100644 --- a/classes/zh_CN/class_visualshadernodecolorconstant.rst +++ b/classes/zh_CN/class_visualshadernodecolorconstant.rst @@ -10,14 +10,14 @@ VisualShaderNodeColorConstant ============================= -**Inherits:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`Color` 常量,在可视化着色器图中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 有两个输出端口,表示 :ref:`Color` 的 RGB 和 Alpha 通道。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeColorConstant_property_constant: @@ -57,10 +57,10 @@ Property Descriptions :ref:`Color` 常量,表示这个节点的状态。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodecolorfunc.rst b/classes/zh_CN/class_visualshadernodecolorfunc.rst index 93d03e0116..b2e05082d8 100644 --- a/classes/zh_CN/class_visualshadernodecolorfunc.rst +++ b/classes/zh_CN/class_visualshadernodecolorfunc.rst @@ -10,21 +10,21 @@ VisualShaderNodeColorFunc ========================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`Color` 函数,在可视化着色器图中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 接受一个 :ref:`Color` 到输入端口,并根据 :ref:`function` 对其进行转换。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeColorFunc_Function: @@ -110,8 +110,8 @@ enum **Function**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeColorFunc_property_function: @@ -126,10 +126,10 @@ Property Descriptions 要应用于输入颜色的函数。参阅 :ref:`Function` 的选项。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodecolorop.rst b/classes/zh_CN/class_visualshadernodecolorop.rst index 69fe51aede..aa83b42940 100644 --- a/classes/zh_CN/class_visualshadernodecolorop.rst +++ b/classes/zh_CN/class_visualshadernodecolorop.rst @@ -10,21 +10,21 @@ VisualShaderNodeColorOp ======================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中使用的 :ref:`Color` 运算符。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 将 :ref:`operator` 应用于两个颜色输入。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeColorOp_Operator: @@ -194,8 +194,8 @@ enum **Operator**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeColorOp_property_operator: @@ -210,10 +210,10 @@ Property Descriptions 要应用于输入的运算符。参阅 :ref:`Operator` 的选项。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodecolorparameter.rst b/classes/zh_CN/class_visualshadernodecolorparameter.rst index 64348f76ee..d2ec7f3fb7 100644 --- a/classes/zh_CN/class_visualshadernodecolorparameter.rst +++ b/classes/zh_CN/class_visualshadernodecolorparameter.rst @@ -10,21 +10,21 @@ VisualShaderNodeColorParameter ============================== -**Inherits:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中使用的 :ref:`Color` 参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``uniform vec4``\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeColorParameter_property_default_value: @@ -74,10 +74,10 @@ Property Descriptions 启用 :ref:`default_value`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodecomment.rst b/classes/zh_CN/class_visualshadernodecomment.rst index bf5c3cb483..d29dd2cf1b 100644 --- a/classes/zh_CN/class_visualshadernodecomment.rst +++ b/classes/zh_CN/class_visualshadernodecomment.rst @@ -10,21 +10,21 @@ VisualShaderNodeComment ======================= -**Inherits:** :ref:`VisualShaderNodeResizableBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeResizableBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 放置在可视化着色器图上的注释节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 可调整大小的矩形区域,标题 :ref:`title` 和描述 :ref:`description` 均可更改,可用于更好地组织其他可视化着色器节点。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeComment_property_description: @@ -74,10 +74,10 @@ Property Descriptions 节点的标题。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodecompare.rst b/classes/zh_CN/class_visualshadernodecompare.rst index ff8c1439f7..6bb36e8f4a 100644 --- a/classes/zh_CN/class_visualshadernodecompare.rst +++ b/classes/zh_CN/class_visualshadernodecompare.rst @@ -10,21 +10,21 @@ VisualShaderNodeCompare ======================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 可视化着色器图内常见类型的比较函数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 通过 :ref:`function` 比较 ``a`` 和 ``b`` 的 :ref:`type`\ 。返回一个布尔标量。在着色器代码中转换成 ``if`` 指令。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeCompare_ComparisonType: @@ -230,8 +230,8 @@ enum **Condition**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeCompare_property_condition: @@ -280,10 +280,10 @@ Property Descriptions 在比较中要使用的类型。参阅\ :ref:`ComparisonType`\ 的选项。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeconstant.rst b/classes/zh_CN/class_visualshadernodeconstant.rst index 1ce24abb24..cb4b250e7b 100644 --- a/classes/zh_CN/class_visualshadernodeconstant.rst +++ b/classes/zh_CN/class_visualshadernodeconstant.rst @@ -10,23 +10,23 @@ VisualShaderNodeConstant ======================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeBooleanConstant`, :ref:`VisualShaderNodeColorConstant`, :ref:`VisualShaderNodeFloatConstant`, :ref:`VisualShaderNodeIntConstant`, :ref:`VisualShaderNodeTransformConstant`, :ref:`VisualShaderNodeUIntConstant`, :ref:`VisualShaderNodeVec2Constant`, :ref:`VisualShaderNodeVec3Constant`, :ref:`VisualShaderNodeVec4Constant` +**派生:** :ref:`VisualShaderNodeBooleanConstant`, :ref:`VisualShaderNodeColorConstant`, :ref:`VisualShaderNodeFloatConstant`, :ref:`VisualShaderNodeIntConstant`, :ref:`VisualShaderNodeTransformConstant`, :ref:`VisualShaderNodeUIntConstant`, :ref:`VisualShaderNodeVec2Constant`, :ref:`VisualShaderNodeVec3Constant`, :ref:`VisualShaderNodeVec4Constant` 可视化着色器图中,常量的基础类型。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这是一个抽象类。可能的值请看派生类型的描述。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodecubemap.rst b/classes/zh_CN/class_visualshadernodecubemap.rst index 9c13b72ca8..323b87f676 100644 --- a/classes/zh_CN/class_visualshadernodecubemap.rst +++ b/classes/zh_CN/class_visualshadernodecubemap.rst @@ -10,21 +10,21 @@ VisualShaderNodeCubemap ======================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中使用的一种 :ref:`Cubemap` 采样节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 在着色器语言中被转换成 ``texture(cubemap, vec3)``\ 。返回一个颜色向量和 Alpha 通道的标量。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeCubemap_Source: @@ -124,8 +124,8 @@ enum **TextureType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeCubemap_property_cube_map: @@ -174,10 +174,10 @@ Property Descriptions 定义源纹理提供的数据类型。选项参阅\ :ref:`TextureType`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodecubemapparameter.rst b/classes/zh_CN/class_visualshadernodecubemapparameter.rst index fcc67e3445..49ad8bef32 100644 --- a/classes/zh_CN/class_visualshadernodecubemapparameter.rst +++ b/classes/zh_CN/class_visualshadernodecubemapparameter.rst @@ -10,21 +10,21 @@ VisualShaderNodeCubemapParameter ================================ -**Inherits:** :ref:`VisualShaderNodeTextureParameter` **<** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeTextureParameter` **<** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 可视化着色器图形中使用的 :ref:`Cubemap` 参数节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``uniform samplerCube``\ 。该输出值可被用作 :ref:`VisualShaderNodeCubemap` 的端口。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodecurvetexture.rst b/classes/zh_CN/class_visualshadernodecurvetexture.rst index 04db39f70c..669914e48e 100644 --- a/classes/zh_CN/class_visualshadernodecurvetexture.rst +++ b/classes/zh_CN/class_visualshadernodecurvetexture.rst @@ -10,21 +10,21 @@ VisualShaderNodeCurveTexture ============================ -**Inherits:** :ref:`VisualShaderNodeResizableBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeResizableBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中执行 :ref:`CurveTexture` 查找。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 带有内置的纹理曲线编辑器。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeCurveTexture_property_texture: @@ -55,10 +55,10 @@ Property Descriptions 源纹理。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodecurvexyztexture.rst b/classes/zh_CN/class_visualshadernodecurvexyztexture.rst index 4c63494ff6..c36f7a3d74 100644 --- a/classes/zh_CN/class_visualshadernodecurvexyztexture.rst +++ b/classes/zh_CN/class_visualshadernodecurvexyztexture.rst @@ -10,21 +10,21 @@ VisualShaderNodeCurveXYZTexture =============================== -**Inherits:** :ref:`VisualShaderNodeResizableBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeResizableBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中执行 :ref:`CurveXYZTexture` 查找。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 带有内置的纹理曲线编辑器。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeCurveXYZTexture_property_texture: @@ -55,10 +55,10 @@ Property Descriptions 源纹理。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodecustom.rst b/classes/zh_CN/class_visualshadernodecustom.rst index 360b29affd..f6d4f6e797 100644 --- a/classes/zh_CN/class_visualshadernodecustom.rst +++ b/classes/zh_CN/class_visualshadernodecustom.rst @@ -10,14 +10,14 @@ VisualShaderNodeCustom ====================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于定义自定义 :ref:`VisualShaderNode` 的虚类,以便在可视化着色器编辑器中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 继承这个类可以创建自定义的 :ref:`VisualShader` 脚本扩展,会自动加入到 Visual Shader 编辑器中。\ :ref:`VisualShaderNode` 的行为可以通过覆盖虚方法定义。 @@ -31,52 +31,64 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`可视化着色器插件 <../tutorials/plugins/editor/visual_shader_plugins>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_category` **(** **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_code` **(** :ref:`String[]` input_vars, :ref:`String[]` output_vars, :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_default_input_port` **(** :ref:`PortType` type **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_description` **(** **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_func_code` **(** :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_global_code` **(** :ref:`Mode` mode **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_input_port_count` **(** **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_input_port_name` **(** :ref:`int` port **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PortType` | :ref:`_get_input_port_type` **(** :ref:`int` port **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_output_port_count` **(** **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_output_port_name` **(** :ref:`int` port **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PortType` | :ref:`_get_output_port_type` **(** :ref:`int` port **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PortType` | :ref:`_get_return_icon_type` **(** **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_available` **(** :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_highend` **(** **)** |virtual| |const| | - +-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_category` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_code` **(** :ref:`String[]` input_vars, :ref:`String[]` output_vars, :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_default_input_port` **(** :ref:`PortType` type **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_description` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_func_code` **(** :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_global_code` **(** :ref:`Mode` mode **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_input_port_count` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_input_port_default_value` **(** :ref:`int` port **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_input_port_name` **(** :ref:`int` port **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PortType` | :ref:`_get_input_port_type` **(** :ref:`int` port **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_name` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_output_port_count` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_output_port_name` **(** :ref:`int` port **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PortType` | :ref:`_get_output_port_type` **(** :ref:`int` port **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_property_count` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_property_default_index` **(** :ref:`int` index **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_property_name` **(** :ref:`int` index **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_property_options` **(** :ref:`int` index **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PortType` | :ref:`_get_return_icon_type` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_available` **(** :ref:`Mode` mode, :ref:`Type` type **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_highend` **(** **)** |virtual| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_option_index` **(** :ref:`int` option **)** |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -84,10 +96,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_VisualShaderNodeCustom_method__get_category: +.. _class_VisualShaderNodeCustom_private_method__get_category: .. rst-class:: classref-method @@ -101,7 +113,7 @@ Method Descriptions ---- -.. _class_VisualShaderNodeCustom_method__get_code: +.. _class_VisualShaderNodeCustom_private_method__get_code: .. rst-class:: classref-method @@ -121,21 +133,21 @@ Method Descriptions ---- -.. _class_VisualShaderNodeCustom_method__get_default_input_port: +.. _class_VisualShaderNodeCustom_private_method__get_default_input_port: .. rst-class:: classref-method :ref:`int` **_get_default_input_port** **(** :ref:`PortType` type **)** |virtual| |const| -Override this method to define the input port which should be connected by default when this node is created as a result of dragging a connection from an existing node to the empty space on the graph. +覆盖该方法来定义当由于将连接从已有节点拖动到图形上的空白区域而创建节点时应默认连接的输入端口。 -Defining this method is **optional**. If not overridden, the connection will be created to the first valid port. +定义这个方法是\ **可选的**\ ,如果未被覆盖,将创建到第一个有效端口的连接。 .. rst-class:: classref-item-separator ---- -.. _class_VisualShaderNodeCustom_method__get_description: +.. _class_VisualShaderNodeCustom_private_method__get_description: .. rst-class:: classref-method @@ -149,7 +161,7 @@ Defining this method is **optional**. If not overridden, the connection will be ---- -.. _class_VisualShaderNodeCustom_method__get_func_code: +.. _class_VisualShaderNodeCustom_private_method__get_func_code: .. rst-class:: classref-method @@ -167,7 +179,7 @@ Defining this method is **optional**. If not overridden, the connection will be ---- -.. _class_VisualShaderNodeCustom_method__get_global_code: +.. _class_VisualShaderNodeCustom_private_method__get_global_code: .. rst-class:: classref-method @@ -185,7 +197,7 @@ Defining this method is **optional**. If not overridden, the connection will be ---- -.. _class_VisualShaderNodeCustom_method__get_input_port_count: +.. _class_VisualShaderNodeCustom_private_method__get_input_port_count: .. rst-class:: classref-method @@ -199,13 +211,27 @@ Defining this method is **optional**. If not overridden, the connection will be ---- -.. _class_VisualShaderNodeCustom_method__get_input_port_name: +.. _class_VisualShaderNodeCustom_private_method__get_input_port_default_value: + +.. rst-class:: classref-method + +:ref:`Variant` **_get_input_port_default_value** **(** :ref:`int` port **)** |virtual| |const| + +覆盖该方法可以定义指定输入端口的默认值。优先使用该方法而不是 :ref:`VisualShaderNode.set_input_port_default_value`\ 。 + +定义该方法是\ **必需的**\ 。如果没有被覆盖,则该节点的输入端口没有默认值。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeCustom_private_method__get_input_port_name: .. rst-class:: classref-method :ref:`String` **_get_input_port_name** **(** :ref:`int` port **)** |virtual| |const| -覆盖此方法来定义相关自定义节点的输入端口的名称。这些名称既用于编辑器中的输入槽,也作为着色器代码中的标识符,并在\ :ref:`_get_code`\ 中的\ ``input_vars``\ 数组中传递。 +覆盖此方法来定义相关自定义节点的输入端口的名称。这些名称既用于编辑器中的输入槽,也作为着色器代码中的标识符,并在\ :ref:`_get_code`\ 中的\ ``input_vars``\ 数组中传递。 定义这个方法是\ **可选的**\ ,但推荐使用。如果没有被覆盖,输入端口被命名为\ ``"in"+str(port)``\ 。 @@ -213,7 +239,7 @@ Defining this method is **optional**. If not overridden, the connection will be ---- -.. _class_VisualShaderNodeCustom_method__get_input_port_type: +.. _class_VisualShaderNodeCustom_private_method__get_input_port_type: .. rst-class:: classref-method @@ -227,7 +253,7 @@ Defining this method is **optional**. If not overridden, the connection will be ---- -.. _class_VisualShaderNodeCustom_method__get_name: +.. _class_VisualShaderNodeCustom_private_method__get_name: .. rst-class:: classref-method @@ -241,7 +267,7 @@ Defining this method is **optional**. If not overridden, the connection will be ---- -.. _class_VisualShaderNodeCustom_method__get_output_port_count: +.. _class_VisualShaderNodeCustom_private_method__get_output_port_count: .. rst-class:: classref-method @@ -255,13 +281,13 @@ Defining this method is **optional**. If not overridden, the connection will be ---- -.. _class_VisualShaderNodeCustom_method__get_output_port_name: +.. _class_VisualShaderNodeCustom_private_method__get_output_port_name: .. rst-class:: classref-method :ref:`String` **_get_output_port_name** **(** :ref:`int` port **)** |virtual| |const| -覆盖此方法来定义相关自定义节点的输出端口的名称。这些名字既用于编辑器中的输出槽,也作为着色器代码中的标识符,并在\ :ref:`_get_code`\ 中的\ ``output_vars``\ 数组中传递。 +覆盖此方法来定义相关自定义节点的输出端口的名称。这些名字既用于编辑器中的输出槽,也作为着色器代码中的标识符,并在\ :ref:`_get_code`\ 中的\ ``output_vars``\ 数组中传递。 定义这个方法是\ **可选的**\ ,但推荐使用。如果没有被覆盖,输出端口被命名为\ ``"out" + str(port)``\ 。 @@ -269,7 +295,7 @@ Defining this method is **optional**. If not overridden, the connection will be ---- -.. _class_VisualShaderNodeCustom_method__get_output_port_type: +.. _class_VisualShaderNodeCustom_private_method__get_output_port_type: .. rst-class:: classref-method @@ -283,7 +309,63 @@ Defining this method is **optional**. If not overridden, the connection will be ---- -.. _class_VisualShaderNodeCustom_method__get_return_icon_type: +.. _class_VisualShaderNodeCustom_private_method__get_property_count: + +.. rst-class:: classref-method + +:ref:`int` **_get_property_count** **(** **)** |virtual| |const| + +覆盖这个方法来定义属性的数量。 + +定义这个方法是\ **可选**\ 的。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeCustom_private_method__get_property_default_index: + +.. rst-class:: classref-method + +:ref:`int` **_get_property_default_index** **(** :ref:`int` index **)** |virtual| |const| + +覆盖这个方法可以定义关联的自定义节点的属性的默认索引。 + +定义这个方法是\ **可选**\ 的。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeCustom_private_method__get_property_name: + +.. rst-class:: classref-method + +:ref:`String` **_get_property_name** **(** :ref:`int` index **)** |virtual| |const| + +覆盖这个方法可以定义关联的自定义节点的属性的名称。 + +定义这个方法是\ **可选**\ 的。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeCustom_private_method__get_property_options: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_property_options** **(** :ref:`int` index **)** |virtual| |const| + +覆盖这个方法可以定义关联的自定义节点的下拉列表属性内的选项。 + +定义这个方法是\ **可选**\ 的。 + +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeCustom_private_method__get_return_icon_type: .. rst-class:: classref-method @@ -297,7 +379,7 @@ Defining this method is **optional**. If not overridden, the connection will be ---- -.. _class_VisualShaderNodeCustom_method__is_available: +.. _class_VisualShaderNodeCustom_private_method__is_available: .. rst-class:: classref-method @@ -311,7 +393,7 @@ Defining this method is **optional**. If not overridden, the connection will be ---- -.. _class_VisualShaderNodeCustom_method__is_highend: +.. _class_VisualShaderNodeCustom_private_method__is_highend: .. rst-class:: classref-method @@ -321,10 +403,22 @@ Defining this method is **optional**. If not overridden, the connection will be 定义这个方法是\ **可选**\ 的。未覆盖时为 ``false``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. rst-class:: classref-item-separator + +---- + +.. _class_VisualShaderNodeCustom_method_get_option_index: + +.. rst-class:: classref-method + +:ref:`int` **get_option_index** **(** :ref:`int` option **)** |const| + +返回图表中下拉列表选项的选定索引。你可以使用该函数来定义 :ref:`_get_code` 或 :ref:`_get_global_code` 中的特定行为。 + +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodederivativefunc.rst b/classes/zh_CN/class_visualshadernodederivativefunc.rst index 26b9bff64c..af7aad3cb8 100644 --- a/classes/zh_CN/class_visualshadernodederivativefunc.rst +++ b/classes/zh_CN/class_visualshadernodederivativefunc.rst @@ -10,21 +10,21 @@ VisualShaderNodeDerivativeFunc ============================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中,计算导数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 此节点仅在\ ``Fragment``\ 和\ ``Light``\ 可视化着色器中可用。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeDerivativeFunc_OpType: @@ -182,8 +182,8 @@ enum **Precision**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeDerivativeFunc_property_function: @@ -232,10 +232,10 @@ Property Descriptions 设置用于导数函数的精度级别。关选项,请参阅 :ref:`Precision`\ 。使用 GL 兼容性渲染器时,此设置不起作用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodedeterminant.rst b/classes/zh_CN/class_visualshadernodedeterminant.rst index 2d11f6ae69..42cf35d1f4 100644 --- a/classes/zh_CN/class_visualshadernodedeterminant.rst +++ b/classes/zh_CN/class_visualshadernodedeterminant.rst @@ -10,21 +10,21 @@ VisualShaderNodeDeterminant =========================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中计算 :ref:`Transform3D` 的行列式。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``determinant(x)``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodedistancefade.rst b/classes/zh_CN/class_visualshadernodedistancefade.rst index d81b9cb845..8dd8717f52 100644 --- a/classes/zh_CN/class_visualshadernodedistancefade.rst +++ b/classes/zh_CN/class_visualshadernodedistancefade.rst @@ -10,21 +10,21 @@ VisualShaderNodeDistanceFade ============================ -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 表示按距离淡出效果的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 距离淡出效果会根据每个像素与另一个对象的距离淡出。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodedotproduct.rst b/classes/zh_CN/class_visualshadernodedotproduct.rst index cb9f07208d..0675a2798c 100644 --- a/classes/zh_CN/class_visualshadernodedotproduct.rst +++ b/classes/zh_CN/class_visualshadernodedotproduct.rst @@ -10,21 +10,21 @@ VisualShaderNodeDotProduct ========================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 计算可视化着色器图中两个向量的点积。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``dot(a, b)``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeexpression.rst b/classes/zh_CN/class_visualshadernodeexpression.rst index 9f5f1ef792..31c4e75340 100644 --- a/classes/zh_CN/class_visualshadernodeexpression.rst +++ b/classes/zh_CN/class_visualshadernodeexpression.rst @@ -10,16 +10,16 @@ VisualShaderNodeExpression ========================== -**Inherits:** :ref:`VisualShaderNodeGroupBase` **<** :ref:`VisualShaderNodeResizableBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeGroupBase` **<** :ref:`VisualShaderNodeResizableBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeGlobalExpression` +**派生:** :ref:`VisualShaderNodeGlobalExpression` 用Godot着色语言编写的自定义可视化着色器图形表达式。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 自定义 Godot 着色器语言表达式,有自定义数量的输入和输出端口。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeExpression_property_expression: @@ -59,10 +59,10 @@ Property Descriptions Godot 着色器语言中的表达式,它将被注入到图形匹配的着色器函数(\ ``vertex``\ 、\ ``fragment`` 或 ``light``\ )的开头,因此不能用于声明函数、varying、uniform 或全局常量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodefaceforward.rst b/classes/zh_CN/class_visualshadernodefaceforward.rst index 18afeb54db..a0943a2436 100644 --- a/classes/zh_CN/class_visualshadernodefaceforward.rst +++ b/classes/zh_CN/class_visualshadernodefaceforward.rst @@ -10,21 +10,21 @@ VisualShaderNodeFaceForward =========================== -**Inherits:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 返回与可视化着色器图中的参考向量指向相同方向的向量。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 在着色器语言中翻译为 ``faceforward(N, I, Nref)``\ 。该函数有三个向量参数。\ ``N``\ ,定向向量,\ ``I``\ ,入射向量,以及\ ``Nref``\ ,参考矢量。如果 ``I`` 和 ``Nref`` 的点积小于零,返回值为 ``N``\ 。否则,将返回 ``-N``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodefloatconstant.rst b/classes/zh_CN/class_visualshadernodefloatconstant.rst index 1add0d277a..614f1414cc 100644 --- a/classes/zh_CN/class_visualshadernodefloatconstant.rst +++ b/classes/zh_CN/class_visualshadernodefloatconstant.rst @@ -10,21 +10,21 @@ VisualShaderNodeFloatConstant ============================= -**Inherits:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 可视化着色器图中使用的浮点数标量常量。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``float``\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeFloatConstant_property_constant: @@ -55,10 +55,10 @@ Property Descriptions 代表该节点状态的浮点数常量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodefloatfunc.rst b/classes/zh_CN/class_visualshadernodefloatfunc.rst index 51416495e1..f5da50c8c3 100644 --- a/classes/zh_CN/class_visualshadernodefloatfunc.rst +++ b/classes/zh_CN/class_visualshadernodefloatfunc.rst @@ -10,21 +10,21 @@ VisualShaderNodeFloatFunc ========================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中使用的浮点数标量函数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 在输入端口接受一个浮点数标量(\ ``x``\ )并根据 :ref:`function` 对其进行变换。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeFloatFunc_Function: @@ -318,8 +318,8 @@ enum **Function**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeFloatFunc_property_function: @@ -334,10 +334,10 @@ Property Descriptions 要应用于该标量的函数。可选项见 :ref:`Function`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodefloatop.rst b/classes/zh_CN/class_visualshadernodefloatop.rst index 7e37e30278..57f710a104 100644 --- a/classes/zh_CN/class_visualshadernodefloatop.rst +++ b/classes/zh_CN/class_visualshadernodefloatop.rst @@ -10,21 +10,21 @@ VisualShaderNodeFloatOp ======================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 浮点数标量运算符,在可视化着色器图中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 将 :ref:`operator` 应用于两个浮点数输入:\ ``a`` 和 ``b``\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeFloatOp_Operator: @@ -142,8 +142,8 @@ enum **Operator**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeFloatOp_property_operator: @@ -158,10 +158,10 @@ Property Descriptions 要应用于输入的运算符。参阅 :ref:`Operator` 的选项。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodefloatparameter.rst b/classes/zh_CN/class_visualshadernodefloatparameter.rst index 73bdd15f23..33dbd62732 100644 --- a/classes/zh_CN/class_visualshadernodefloatparameter.rst +++ b/classes/zh_CN/class_visualshadernodefloatparameter.rst @@ -10,21 +10,21 @@ VisualShaderNodeFloatParameter ============================== -**Inherits:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 标量浮点数参数,在可视化着色器图中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``uniform float``\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeFloatParameter_Hint: @@ -96,8 +96,8 @@ enum **Hint**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeFloatParameter_property_default_value: @@ -197,10 +197,10 @@ Property Descriptions 带步长(增量)的范围提示的步长值。会在 :ref:`hint` 为 :ref:`HINT_RANGE_STEP` 时使用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodefresnel.rst b/classes/zh_CN/class_visualshadernodefresnel.rst index 7e6721f23f..9dc4310887 100644 --- a/classes/zh_CN/class_visualshadernodefresnel.rst +++ b/classes/zh_CN/class_visualshadernodefresnel.rst @@ -10,21 +10,21 @@ VisualShaderNodeFresnel ======================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中使用的菲涅尔效果。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 返回基于表面法线和相机视角方向的点积的衰减,将相关输入传给它。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeglobalexpression.rst b/classes/zh_CN/class_visualshadernodeglobalexpression.rst index 4385c1c30d..5a7241af6e 100644 --- a/classes/zh_CN/class_visualshadernodeglobalexpression.rst +++ b/classes/zh_CN/class_visualshadernodeglobalexpression.rst @@ -10,21 +10,21 @@ VisualShaderNodeGlobalExpression ================================ -**Inherits:** :ref:`VisualShaderNodeExpression` **<** :ref:`VisualShaderNodeGroupBase` **<** :ref:`VisualShaderNodeResizableBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeExpression` **<** :ref:`VisualShaderNodeGroupBase` **<** :ref:`VisualShaderNodeResizableBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用Godot着色器语言编写的自定义全局可视化着色器图形表达式。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 自定义Godot着色器语言表达式,位于生成的着色器之上。你可以在内部放置各种函数定义,以便以后在\ :ref:`VisualShaderNodeExpression`\ 中调用,这些函数被注入到主着色器函数中。你还可以声明varyings、uniforms 和全局常量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodegroupbase.rst b/classes/zh_CN/class_visualshadernodegroupbase.rst index 1b7a9130de..9df4f61d4c 100644 --- a/classes/zh_CN/class_visualshadernodegroupbase.rst +++ b/classes/zh_CN/class_visualshadernodegroupbase.rst @@ -10,23 +10,23 @@ VisualShaderNodeGroupBase ========================= -**Inherits:** :ref:`VisualShaderNodeResizableBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeResizableBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeExpression` +**派生:** :ref:`VisualShaderNodeExpression` 可视化着色器图中,具有可变数量的输入和输出端口的系列节点的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 目前,没有直接使用,而用派生类代替。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -81,8 +81,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_VisualShaderNodeGroupBase_method_add_input_port: @@ -332,10 +332,10 @@ void **set_outputs** **(** :ref:`String` outputs **)** 使用一个\ :ref:`String`\ 格式的以冒号分隔的列表来定义所有输出端口: ``id,type,name;`` ,参阅\ :ref:`add_output_port`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeif.rst b/classes/zh_CN/class_visualshadernodeif.rst index 644cff3d0e..a6adf3d4f0 100644 --- a/classes/zh_CN/class_visualshadernodeif.rst +++ b/classes/zh_CN/class_visualshadernodeif.rst @@ -10,21 +10,21 @@ VisualShaderNodeIf ================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -Outputs a 3D vector based on the result of a floating point comparison within the visual shader graph. +根据可视化着色器图中浮点比较的结果输出 3D 向量。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -This visual shader node has six input ports. Port 1 and 2 provide the two floating point numbers ``a`` and ``b`` that will be compared. Port 3 is the tolerance, which allows similar floating point number to be considered equal. Ports 4 to 6 are the possible outputs, returned if ``a == b``, ``a > b``, or ``a < b`` respectively. +这个可视化着色器节点有六个输入端口。端口 1 和端口 2 提供的是需要比较的两个浮点数 ``a`` 和 ``b``\ 。端口 3 是公差,能够将相似的浮点数认定为相等。端口 4 到端口 6 是可能的输出,分别是 ``a == b``\ 、\ ``a > b``\ 、\ ``a < b`` 时的返回值。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeinput.rst b/classes/zh_CN/class_visualshadernodeinput.rst index c7fe4b1ed5..7c521672d8 100644 --- a/classes/zh_CN/class_visualshadernodeinput.rst +++ b/classes/zh_CN/class_visualshadernodeinput.rst @@ -10,28 +10,28 @@ VisualShaderNodeInput ===================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中,代表输入着色器参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 提供对着色器可用的输入变量(内置)的访问。关于每种着色器类型的可用内置变量列表,请参阅着色器参考(查看\ ``教程``\ 部分的链接)。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`着色参考索引 <../tutorials/shaders/shader_reference/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -42,8 +42,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_VisualShaderNodeInput_signal_input_type_changed: @@ -75,8 +75,8 @@ Signals .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeInput_property_input_name: @@ -97,8 +97,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_VisualShaderNodeInput_method_get_input_real_name: @@ -108,10 +108,10 @@ Method Descriptions 返回当前常量名称翻译至 Godot 着色器语言后的名称。例如,如果 :ref:`input_name` 等于 ``"albedo"``\ ,则返回 ``"ALBEDO"``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeintconstant.rst b/classes/zh_CN/class_visualshadernodeintconstant.rst index 91262a418c..1fcd7b26ff 100644 --- a/classes/zh_CN/class_visualshadernodeintconstant.rst +++ b/classes/zh_CN/class_visualshadernodeintconstant.rst @@ -10,21 +10,21 @@ VisualShaderNodeIntConstant =========================== -**Inherits:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 标量整数常量,在可视化着色器图中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``int``\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeIntConstant_property_constant: @@ -55,10 +55,10 @@ Property Descriptions 整数常量,代表该节点的状态。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeintfunc.rst b/classes/zh_CN/class_visualshadernodeintfunc.rst index eab0bb3aec..3f2a62cbf7 100644 --- a/classes/zh_CN/class_visualshadernodeintfunc.rst +++ b/classes/zh_CN/class_visualshadernodeintfunc.rst @@ -10,21 +10,21 @@ VisualShaderNodeIntFunc ======================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 标量整数函数,在可视化着色器图中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 在输入端口接受一个整数标量(\ ``x``\ )并根据 :ref:`function` 对其进行变换。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeIntFunc_Function: @@ -94,8 +94,8 @@ enum **Function**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeIntFunc_property_function: @@ -110,10 +110,10 @@ Property Descriptions 要应用于该标量的函数。可选项见 :ref:`Function`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeintop.rst b/classes/zh_CN/class_visualshadernodeintop.rst index bebd1e81db..3c9d7c5bfe 100644 --- a/classes/zh_CN/class_visualshadernodeintop.rst +++ b/classes/zh_CN/class_visualshadernodeintop.rst @@ -10,21 +10,21 @@ VisualShaderNodeIntOp ===================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 整数标量运算符,在可视化着色器图中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 将 :ref:`operator` 应用于两个整数输入:\ ``a`` 和 ``b``\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeIntOp_Operator: @@ -158,8 +158,8 @@ enum **Operator**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeIntOp_property_operator: @@ -174,10 +174,10 @@ Property Descriptions 要应用于输入的运算符。参阅 :ref:`Operator` 的选项。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeintparameter.rst b/classes/zh_CN/class_visualshadernodeintparameter.rst index 5a4eb349d6..c0188e17f0 100644 --- a/classes/zh_CN/class_visualshadernodeintparameter.rst +++ b/classes/zh_CN/class_visualshadernodeintparameter.rst @@ -10,21 +10,21 @@ VisualShaderNodeIntParameter ============================ -**Inherits:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`int` 类型着色器参数(uniform)的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`int` 类型的 :ref:`VisualShaderNodeParameter`\ 。可以自定义能够接受的值的范围。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeIntParameter_Hint: @@ -96,8 +96,8 @@ enum **Hint**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeIntParameter_property_default_value: @@ -197,10 +197,10 @@ Property Descriptions 参数值之间的步长。迫使参数成为给定值的倍数。\ :ref:`hint` 必须为 :ref:`HINT_RANGE_STEP` 才能生效。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeis.rst b/classes/zh_CN/class_visualshadernodeis.rst index 767551cc65..69dd03408e 100644 --- a/classes/zh_CN/class_visualshadernodeis.rst +++ b/classes/zh_CN/class_visualshadernodeis.rst @@ -10,21 +10,21 @@ VisualShaderNodeIs ================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 布尔比较运算符,在可视化着色器图中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 返回 ``INF``\ 或\ ``NaN``\ 与标量参数之间比较的布尔值结果。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeIs_Function: @@ -78,8 +78,8 @@ enum **Function**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeIs_property_function: @@ -94,10 +94,10 @@ Property Descriptions 比较函数。参阅\ :ref:`Function`\ 的选项。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodelinearscenedepth.rst b/classes/zh_CN/class_visualshadernodelinearscenedepth.rst index bdd0b7a5c0..18a478396b 100644 --- a/classes/zh_CN/class_visualshadernodelinearscenedepth.rst +++ b/classes/zh_CN/class_visualshadernodelinearscenedepth.rst @@ -10,21 +10,21 @@ VisualShaderNodeLinearSceneDepth ================================ -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 返回 DEPTH_TEXTURE 节点线性空间深度值的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该节点可用于片段着色器。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodemix.rst b/classes/zh_CN/class_visualshadernodemix.rst index 1fd9ed4c5e..b68b16a4cc 100644 --- a/classes/zh_CN/class_visualshadernodemix.rst +++ b/classes/zh_CN/class_visualshadernodemix.rst @@ -10,21 +10,21 @@ VisualShaderNodeMix =================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中,在两个值之间进行线性插值。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``mix(a, b, weight)``\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeMix_OpType: @@ -118,8 +118,8 @@ enum **OpType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeMix_property_op_type: @@ -134,10 +134,10 @@ Property Descriptions 操作数和返回值的类型。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodemultiplyadd.rst b/classes/zh_CN/class_visualshadernodemultiplyadd.rst index 9563cabeb1..3ab806ec34 100644 --- a/classes/zh_CN/class_visualshadernodemultiplyadd.rst +++ b/classes/zh_CN/class_visualshadernodemultiplyadd.rst @@ -10,21 +10,21 @@ VisualShaderNodeMultiplyAdd =========================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中,执行乘加融合运算。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 使用三个操作数来计算 ``(a * b + c)`` 表达式。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeMultiplyAdd_OpType: @@ -94,8 +94,8 @@ enum **OpType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeMultiplyAdd_property_op_type: @@ -110,10 +110,10 @@ Property Descriptions 操作数和返回值的类型。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeouterproduct.rst b/classes/zh_CN/class_visualshadernodeouterproduct.rst index 3514b2b8e5..745d6f2652 100644 --- a/classes/zh_CN/class_visualshadernodeouterproduct.rst +++ b/classes/zh_CN/class_visualshadernodeouterproduct.rst @@ -10,21 +10,21 @@ VisualShaderNodeOuterProduct ============================ -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 计算可视化着色器图中两个向量的外积。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- ``OuterProduct`` 将第一个参数 ``c`` 作为列向量(有一列的矩阵),将第二个参数 ``r`` 作为行向量(有一行的矩阵),进行线性代数矩阵乘法 ``c * r``\ 。产生一个矩阵,其行数是 ``c`` 的分量数,其列数是 ``r`` 的分量数。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeoutput.rst b/classes/zh_CN/class_visualshadernodeoutput.rst index 8807441e63..69b3466e1e 100644 --- a/classes/zh_CN/class_visualshadernodeoutput.rst +++ b/classes/zh_CN/class_visualshadernodeoutput.rst @@ -10,23 +10,23 @@ VisualShaderNodeOutput ====================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeParticleOutput` +**派生:** :ref:`VisualShaderNodeParticleOutput` 表示可视化着色器图中的输出着色器参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 此可视化着色器节点以 "输出" 块的形式出现在所有着色器图中,有多个输出值端口。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeparameter.rst b/classes/zh_CN/class_visualshadernodeparameter.rst index b3ff672168..8aea388436 100644 --- a/classes/zh_CN/class_visualshadernodeparameter.rst +++ b/classes/zh_CN/class_visualshadernodeparameter.rst @@ -10,23 +10,23 @@ VisualShaderNodeParameter ========================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeBooleanParameter`, :ref:`VisualShaderNodeColorParameter`, :ref:`VisualShaderNodeFloatParameter`, :ref:`VisualShaderNodeIntParameter`, :ref:`VisualShaderNodeTextureParameter`, :ref:`VisualShaderNodeTransformParameter`, :ref:`VisualShaderNodeUIntParameter`, :ref:`VisualShaderNodeVec2Parameter`, :ref:`VisualShaderNodeVec3Parameter`, :ref:`VisualShaderNodeVec4Parameter` +**派生:** :ref:`VisualShaderNodeBooleanParameter`, :ref:`VisualShaderNodeColorParameter`, :ref:`VisualShaderNodeFloatParameter`, :ref:`VisualShaderNodeIntParameter`, :ref:`VisualShaderNodeTextureParameter`, :ref:`VisualShaderNodeTransformParameter`, :ref:`VisualShaderNodeUIntParameter`, :ref:`VisualShaderNodeVec2Parameter`, :ref:`VisualShaderNodeVec3Parameter`, :ref:`VisualShaderNodeVec4Parameter` 可视化着色器图中,参数的基础类型。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 参数代表着色器中的一个变量,是由外部设置的,即从 :ref:`ShaderMaterial` 中设置。参数在 :ref:`ShaderMaterial` 中以属性的形式暴露,可以从检查器或脚本中分配。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeParameter_Qualifier: @@ -90,8 +90,8 @@ enum **Qualifier**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeParameter_property_parameter_name: @@ -123,10 +123,10 @@ Property Descriptions 定义该参数的作用域。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeparameterref.rst b/classes/zh_CN/class_visualshadernodeparameterref.rst index 9623f40349..4ed41f5b11 100644 --- a/classes/zh_CN/class_visualshadernodeparameterref.rst +++ b/classes/zh_CN/class_visualshadernodeparameterref.rst @@ -10,21 +10,21 @@ VisualShaderNodeParameterRef ============================ -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 对现有 :ref:`VisualShaderNodeParameter` 的引用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 创建对 :ref:`VisualShaderNodeParameter` 的引用,可以让你在不同的着色器或着色阶段轻松地重复使用这个参数。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeParameterRef_property_parameter_name: @@ -55,10 +55,10 @@ Property Descriptions 这个引用所指向的参数的名称。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeparticleaccelerator.rst b/classes/zh_CN/class_visualshadernodeparticleaccelerator.rst index 9ed509b67e..bced060ba8 100644 --- a/classes/zh_CN/class_visualshadernodeparticleaccelerator.rst +++ b/classes/zh_CN/class_visualshadernodeparticleaccelerator.rst @@ -10,21 +10,21 @@ VisualShaderNodeParticleAccelerator =================================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 对粒子进行加速的可视着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 可以在粒子着色器“process”步骤中使用的粒子加速器。会对粒子进行加速。请将其连接至 Velocity 输出端口。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeParticleAccelerator_Mode: @@ -86,8 +86,8 @@ enum **Mode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeParticleAccelerator_property_mode: @@ -102,10 +102,10 @@ Property Descriptions 定义粒子将以何种方式被加速。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeparticleboxemitter.rst b/classes/zh_CN/class_visualshadernodeparticleboxemitter.rst index 4d60327177..e82da7affa 100644 --- a/classes/zh_CN/class_visualshadernodeparticleboxemitter.rst +++ b/classes/zh_CN/class_visualshadernodeparticleboxemitter.rst @@ -10,21 +10,21 @@ VisualShaderNodeParticleBoxEmitter ================================== -**Inherits:** :ref:`VisualShaderNodeParticleEmitter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeParticleEmitter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 让粒子以盒状发射的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`VisualShaderNodeParticleEmitter` 使粒子在指定范围的盒形形状发射。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeparticleconevelocity.rst b/classes/zh_CN/class_visualshadernodeparticleconevelocity.rst index 3d2b911ff0..177affc205 100644 --- a/classes/zh_CN/class_visualshadernodeparticleconevelocity.rst +++ b/classes/zh_CN/class_visualshadernodeparticleconevelocity.rst @@ -10,21 +10,21 @@ VisualShaderNodeParticleConeVelocity ==================================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 让粒子以圆锥形移动的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该节点可被用于粒子着色器的“开始”步骤。它定义了粒子的初始速度,使它们以给定的散布,从中心开始以锥形运动。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeparticleemit.rst b/classes/zh_CN/class_visualshadernodeparticleemit.rst index ce129d4d8e..89fbbff8c3 100644 --- a/classes/zh_CN/class_visualshadernodeparticleemit.rst +++ b/classes/zh_CN/class_visualshadernodeparticleemit.rst @@ -10,21 +10,21 @@ VisualShaderNodeParticleEmit ============================ -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 一种可视化着色器节点,强制从子发射器中发射一个粒子。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该节点在内部调用 ``emit_subparticle`` 着色器方法。它将从配置的子发射器发射一个粒子,还允许自定义其发射方式。需要使用该着色器将子发射器分配给粒子节点。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeParticleEmit_EmitFlags: @@ -94,8 +94,8 @@ enum **EmitFlags**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeParticleEmit_property_flags: @@ -110,10 +110,10 @@ Property Descriptions 用于覆盖子发射器处理材质中定义的属性的标志。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeparticleemitter.rst b/classes/zh_CN/class_visualshadernodeparticleemitter.rst index 6a120ba176..cd4a83c417 100644 --- a/classes/zh_CN/class_visualshadernodeparticleemitter.rst +++ b/classes/zh_CN/class_visualshadernodeparticleemitter.rst @@ -10,23 +10,23 @@ VisualShaderNodeParticleEmitter =============================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeParticleBoxEmitter`, :ref:`VisualShaderNodeParticleMeshEmitter`, :ref:`VisualShaderNodeParticleRingEmitter`, :ref:`VisualShaderNodeParticleSphereEmitter` +**派生:** :ref:`VisualShaderNodeParticleBoxEmitter`, :ref:`VisualShaderNodeParticleMeshEmitter`, :ref:`VisualShaderNodeParticleRingEmitter`, :ref:`VisualShaderNodeParticleSphereEmitter` 粒子发射器的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 粒子发射器节点可被用于粒子着色器的“开始”步骤,它们定义粒子的起始位置。将它们连接到位置输出端口。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeParticleEmitter_property_mode_2d: @@ -57,10 +57,10 @@ Property Descriptions 如果为 ``true``\ ,则此发射器的结果将被投影到 2D 空间。默认情况下为 ``false``\ ,适用于 3D 空间。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeparticlemeshemitter.rst b/classes/zh_CN/class_visualshadernodeparticlemeshemitter.rst index 9fddd6cc64..2c5e4df69b 100644 --- a/classes/zh_CN/class_visualshadernodeparticlemeshemitter.rst +++ b/classes/zh_CN/class_visualshadernodeparticlemeshemitter.rst @@ -10,21 +10,21 @@ VisualShaderNodeParticleMeshEmitter =================================== -**Inherits:** :ref:`VisualShaderNodeParticleEmitter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeParticleEmitter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 让粒子从由 :ref:`Mesh` 定义的形状中发射的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 让粒子由分配的 :ref:`mesh` 的形状中发射的 :ref:`VisualShaderNodeParticleEmitter`\ 。它将从网格的表面发射,可以是全部表面,也可以是某个指定的表面。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeParticleMeshEmitter_property_mesh: @@ -93,10 +93,10 @@ Property Descriptions 如果为 ``true``\ ,则粒子会从该网格的所有表面上发射。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeparticlemultiplybyaxisangle.rst b/classes/zh_CN/class_visualshadernodeparticlemultiplybyaxisangle.rst index c88a3c442f..d2a75890ba 100644 --- a/classes/zh_CN/class_visualshadernodeparticlemultiplybyaxisangle.rst +++ b/classes/zh_CN/class_visualshadernodeparticlemultiplybyaxisangle.rst @@ -10,21 +10,21 @@ VisualShaderNodeParticleMultiplyByAxisAngle =========================================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于将粒子的位置与旋转相乘的可视化着色器辅助节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个节点会帮助将位置输入向量与指定轴的旋转相乘。针对发射器使用而设计。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeParticleMultiplyByAxisAngle_property_degrees_mode: @@ -55,10 +55,10 @@ Property Descriptions 如果为 ``true``\ ,夹角会被解释为度数,而不是弧度数。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeparticleoutput.rst b/classes/zh_CN/class_visualshadernodeparticleoutput.rst index ccb41a5922..7990427b92 100644 --- a/classes/zh_CN/class_visualshadernodeparticleoutput.rst +++ b/classes/zh_CN/class_visualshadernodeparticleoutput.rst @@ -10,21 +10,21 @@ VisualShaderNodeParticleOutput ============================== -**Inherits:** :ref:`VisualShaderNodeOutput` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeOutput` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 定义粒子发射输出值的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个节点定义了粒子的发射方式。它允许自定义位置和速度等属性。根据所在节点的不同(start、process、collision)和是否启用自定义数据,可用的端口也不同。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeparticlerandomness.rst b/classes/zh_CN/class_visualshadernodeparticlerandomness.rst index db70f1ed6d..59a1038148 100644 --- a/classes/zh_CN/class_visualshadernodeparticlerandomness.rst +++ b/classes/zh_CN/class_visualshadernodeparticlerandomness.rst @@ -10,21 +10,21 @@ VisualShaderNodeParticleRandomness ================================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于随机化粒子值的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 输出给定类型的伪随机值的随机节点,会根据指定的最大最小值生成。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeParticleRandomness_OpType: @@ -94,8 +94,8 @@ enum **OpType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeParticleRandomness_property_op_type: @@ -110,10 +110,10 @@ Property Descriptions 操作数和返回值的类型。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeparticleringemitter.rst b/classes/zh_CN/class_visualshadernodeparticleringemitter.rst index 3f8401a4df..8083957351 100644 --- a/classes/zh_CN/class_visualshadernodeparticleringemitter.rst +++ b/classes/zh_CN/class_visualshadernodeparticleringemitter.rst @@ -10,21 +10,21 @@ VisualShaderNodeParticleRingEmitter =================================== -**Inherits:** :ref:`VisualShaderNodeParticleEmitter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeParticleEmitter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 让粒子以环状发射的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`VisualShaderNodeParticleEmitter` 使粒子在具有指定的内外半径和高度的环形中发射。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeparticlesphereemitter.rst b/classes/zh_CN/class_visualshadernodeparticlesphereemitter.rst index 60c11f7348..54a9505aba 100644 --- a/classes/zh_CN/class_visualshadernodeparticlesphereemitter.rst +++ b/classes/zh_CN/class_visualshadernodeparticlesphereemitter.rst @@ -10,21 +10,21 @@ VisualShaderNodeParticleSphereEmitter ===================================== -**Inherits:** :ref:`VisualShaderNodeParticleEmitter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeParticleEmitter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 让粒子以球状发射的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`VisualShaderNodeParticleEmitter` 使粒子在具有指定内外半径的球体形状中发射。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeproximityfade.rst b/classes/zh_CN/class_visualshadernodeproximityfade.rst index f1f834d051..67e6d7ec0e 100644 --- a/classes/zh_CN/class_visualshadernodeproximityfade.rst +++ b/classes/zh_CN/class_visualshadernodeproximityfade.rst @@ -10,21 +10,21 @@ VisualShaderNodeProximityFade ============================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 代表邻近淡出效果的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 邻近淡出效果会根据每个像素与另一个对象的距离淡出。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernoderandomrange.rst b/classes/zh_CN/class_visualshadernoderandomrange.rst index 11b6b9bfcc..442458774e 100644 --- a/classes/zh_CN/class_visualshadernoderandomrange.rst +++ b/classes/zh_CN/class_visualshadernoderandomrange.rst @@ -10,21 +10,21 @@ VisualShaderNodeRandomRange =========================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 生成伪随机标量的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 随机范围节点,会根据种子输出指定范围内的伪随机标量值。如果给定的种子和范围相同,那么得到的值就始终相同,所以你应该提供不同的输入,例如使用时间作为输入。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernoderemap.rst b/classes/zh_CN/class_visualshadernoderemap.rst index 174a1398a2..7b143c4bea 100644 --- a/classes/zh_CN/class_visualshadernoderemap.rst +++ b/classes/zh_CN/class_visualshadernoderemap.rst @@ -10,21 +10,21 @@ VisualShaderNodeRemap ===================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` remap 函数的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- Remap 函数将输入范围变换到输出范围。例如你可以将 ``0..1`` 里的值变到 ``-2..2`` 里。详见 :ref:`@GlobalScope.remap`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernoderesizablebase.rst b/classes/zh_CN/class_visualshadernoderesizablebase.rst index bac0f96738..498e0f50bd 100644 --- a/classes/zh_CN/class_visualshadernoderesizablebase.rst +++ b/classes/zh_CN/class_visualshadernoderesizablebase.rst @@ -10,23 +10,23 @@ VisualShaderNodeResizableBase ============================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeComment`, :ref:`VisualShaderNodeCurveTexture`, :ref:`VisualShaderNodeCurveXYZTexture`, :ref:`VisualShaderNodeGroupBase` +**派生:** :ref:`VisualShaderNodeComment`, :ref:`VisualShaderNodeCurveTexture`, :ref:`VisualShaderNodeCurveXYZTexture`, :ref:`VisualShaderNodeGroupBase` 可视化着色器图中,可调整大小的节点的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 可调整大小的节点上有一个控制柄,用户能够根据需要调整其大小。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeResizableBase_property_size: @@ -57,10 +57,10 @@ Property Descriptions 可视化着色器图中,该节点的大小。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernoderotationbyaxis.rst b/classes/zh_CN/class_visualshadernoderotationbyaxis.rst index 2910b93a7c..13d8a582b0 100644 --- a/classes/zh_CN/class_visualshadernoderotationbyaxis.rst +++ b/classes/zh_CN/class_visualshadernoderotationbyaxis.rst @@ -10,21 +10,21 @@ VisualShaderNodeRotationByAxis ============================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A visual shader node that modifies the rotation of the object using a rotation matrix. +可视化着色器节点,使用旋转矩阵修改对象的旋转。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -RotationByAxis node will transform the vertices of a mesh with specified axis and angle in radians. It can be used to rotate an object in an arbitrary axis. +RotationByAxis 节点将使用指定的轴和弧度角度变换网格的顶点。它可被用于沿任意轴旋转对象。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodesample3d.rst b/classes/zh_CN/class_visualshadernodesample3d.rst index b0f86f715c..15c30a682f 100644 --- a/classes/zh_CN/class_visualshadernodesample3d.rst +++ b/classes/zh_CN/class_visualshadernodesample3d.rst @@ -10,23 +10,23 @@ VisualShaderNodeSample3D ======================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeTexture2DArray`, :ref:`VisualShaderNodeTexture3D` +**派生:** :ref:`VisualShaderNodeTexture2DArray`, :ref:`VisualShaderNodeTexture3D` 可视化着色器图中,对 3D 纹理进行采样的节点的基础节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 虚类,请改用其派生类。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeSample3D_Source: @@ -80,8 +80,8 @@ enum **Source**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeSample3D_property_source: @@ -96,10 +96,10 @@ Property Descriptions 输入源的类型。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodescreennormalworldspace.rst b/classes/zh_CN/class_visualshadernodescreennormalworldspace.rst index 245ff920b4..0f44e6eca9 100644 --- a/classes/zh_CN/class_visualshadernodescreennormalworldspace.rst +++ b/classes/zh_CN/class_visualshadernodescreennormalworldspace.rst @@ -10,21 +10,21 @@ VisualShaderNodeScreenNormalWorldSpace ====================================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A visual shader node that unpacks the screen normal texture in World Space. +可视化着色器节点,在世界空间中拆封屏幕法线纹理。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -The ScreenNormalWorldSpace node allows to create outline effects. +ScreenNormalWorldSpace 节点能够用来创建轮廓效果。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodescreenuvtosdf.rst b/classes/zh_CN/class_visualshadernodescreenuvtosdf.rst index 7e03e52511..5e8eef102f 100644 --- a/classes/zh_CN/class_visualshadernodescreenuvtosdf.rst +++ b/classes/zh_CN/class_visualshadernodescreenuvtosdf.rst @@ -10,21 +10,21 @@ VisualShaderNodeScreenUVToSDF ============================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 将屏幕 UV 转换为 SDF(带符号距离场)的函数,在可视化着色器图中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``screen_uv_to_sdf(uv)``\ 。如果该 UV 端口未被连接,则改用 ``SCREEN_UV``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodesdfraymarch.rst b/classes/zh_CN/class_visualshadernodesdfraymarch.rst index c13386393e..57ccdd5592 100644 --- a/classes/zh_CN/class_visualshadernodesdfraymarch.rst +++ b/classes/zh_CN/class_visualshadernodesdfraymarch.rst @@ -10,21 +10,21 @@ VisualShaderNodeSDFRaymarch =========================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于可视化着色器图的 SDF 光线步进算法。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 向屏幕 SDF(带符号距离场)投射一条射线,并返回行进的距离。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodesdftoscreenuv.rst b/classes/zh_CN/class_visualshadernodesdftoscreenuv.rst index f5a606e1db..71d4a3dadf 100644 --- a/classes/zh_CN/class_visualshadernodesdftoscreenuv.rst +++ b/classes/zh_CN/class_visualshadernodesdftoscreenuv.rst @@ -10,21 +10,21 @@ VisualShaderNodeSDFToScreenUV ============================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 将 SDF(带符号距离场)转换为屏幕 UV 的函数,在可视化着色器图中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``sdf_to_screen_uv(sdf_pos)``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodesmoothstep.rst b/classes/zh_CN/class_visualshadernodesmoothstep.rst index cfbcd65772..1f7635bc8c 100644 --- a/classes/zh_CN/class_visualshadernodesmoothstep.rst +++ b/classes/zh_CN/class_visualshadernodesmoothstep.rst @@ -10,14 +10,14 @@ VisualShaderNodeSmoothStep ========================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中计算 SmoothStep 函数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``smoothstep(edge0, edge1, x)``\ 。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeSmoothStep_OpType: @@ -120,8 +120,8 @@ enum **OpType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeSmoothStep_property_op_type: @@ -136,10 +136,10 @@ Property Descriptions 操作数和返回值的类型。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodestep.rst b/classes/zh_CN/class_visualshadernodestep.rst index 2b8c4316d8..7025a4e9b2 100644 --- a/classes/zh_CN/class_visualshadernodestep.rst +++ b/classes/zh_CN/class_visualshadernodestep.rst @@ -10,14 +10,14 @@ VisualShaderNodeStep ==================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中计算 Step 函数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 在着色器语言中转换成 ``step(edge, x)``\ 。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeStep_OpType: @@ -120,8 +120,8 @@ enum **OpType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeStep_property_op_type: @@ -136,10 +136,10 @@ Property Descriptions 操作数和返回值的类型。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeswitch.rst b/classes/zh_CN/class_visualshadernodeswitch.rst index 54728adaa1..9740dc4dff 100644 --- a/classes/zh_CN/class_visualshadernodeswitch.rst +++ b/classes/zh_CN/class_visualshadernodeswitch.rst @@ -10,21 +10,21 @@ VisualShaderNodeSwitch ====================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 可视化着色器中使用的选择器函数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -如果提供的布尔值为 ``true`` 或 ``false``\ ,则返回 ``op_type`` 类型的一个关联值。 +如果提供的布尔值为 ``true`` 或 ``false``\ ,则返回 :ref:`op_type` 类型的一个关联值。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeSwitch_OpType: @@ -126,8 +126,8 @@ enum **OpType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeSwitch_property_op_type: @@ -142,10 +142,10 @@ Property Descriptions 操作数和返回值的类型。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetexture.rst b/classes/zh_CN/class_visualshadernodetexture.rst index bb40eefc3c..a56083340c 100644 --- a/classes/zh_CN/class_visualshadernodetexture.rst +++ b/classes/zh_CN/class_visualshadernodetexture.rst @@ -10,21 +10,21 @@ VisualShaderNodeTexture ======================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中,执行 2D 纹理查找。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 对提供的纹理进行查找操作,支持从多个纹理源选择。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeTexture_Source: @@ -172,8 +172,8 @@ enum **TextureType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeTexture_property_source: @@ -222,10 +222,10 @@ Property Descriptions 如果\ :ref:`source`\ 被设置为\ :ref:`SOURCE_TEXTURE`\ ,则指定纹理的类型。有关选项,请参阅 :ref:`TextureType`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetexture2darray.rst b/classes/zh_CN/class_visualshadernodetexture2darray.rst index b0c912c349..b7d02d4bd2 100644 --- a/classes/zh_CN/class_visualshadernodetexture2darray.rst +++ b/classes/zh_CN/class_visualshadernodetexture2darray.rst @@ -10,21 +10,21 @@ VisualShaderNodeTexture2DArray ============================== -**Inherits:** :ref:`VisualShaderNodeSample3D` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeSample3D` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 可视化着色器图中使用的 2D 纹理 uniform 数组。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``uniform sampler2DArray``\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeTexture2DArray_property_texture_array: @@ -55,10 +55,10 @@ Property Descriptions 源纹理数组。\ :ref:`VisualShaderNodeSample3D.source` 为 :ref:`VisualShaderNodeSample3D.SOURCE_TEXTURE` 时使用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetexture2darrayparameter.rst b/classes/zh_CN/class_visualshadernodetexture2darrayparameter.rst index eb128b13c3..874ad94fbd 100644 --- a/classes/zh_CN/class_visualshadernodetexture2darrayparameter.rst +++ b/classes/zh_CN/class_visualshadernodetexture2darrayparameter.rst @@ -10,21 +10,21 @@ VisualShaderNodeTexture2DArrayParameter ======================================= -**Inherits:** :ref:`VisualShaderNodeTextureParameter` **<** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeTextureParameter` **<** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`Texture2DArray` 类型着色器参数(uniform)的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个参数允许为着色器提供一个纹理集合。可以使用 :ref:`VisualShaderNodeTexture2DArray` 从数组中提取纹理。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetexture2dparameter.rst b/classes/zh_CN/class_visualshadernodetexture2dparameter.rst index 8bfb6cc964..81152638c1 100644 --- a/classes/zh_CN/class_visualshadernodetexture2dparameter.rst +++ b/classes/zh_CN/class_visualshadernodetexture2dparameter.rst @@ -10,21 +10,21 @@ VisualShaderNodeTexture2DParameter ================================== -**Inherits:** :ref:`VisualShaderNodeTextureParameter` **<** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeTextureParameter` **<** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中提供 2D 纹理参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``uniform sampler2D``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetexture3d.rst b/classes/zh_CN/class_visualshadernodetexture3d.rst index 92a202ebce..9e08b0b278 100644 --- a/classes/zh_CN/class_visualshadernodetexture3d.rst +++ b/classes/zh_CN/class_visualshadernodetexture3d.rst @@ -10,21 +10,21 @@ VisualShaderNodeTexture3D ========================= -**Inherits:** :ref:`VisualShaderNodeSample3D` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeSample3D` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中,执行 3D 纹理查找。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 对提供的纹理进行查找操作,支持从多个纹理源选择。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeTexture3D_property_texture: @@ -55,10 +55,10 @@ Property Descriptions 源纹理。在 :ref:`VisualShaderNodeSample3D.source` 为 :ref:`VisualShaderNodeSample3D.SOURCE_TEXTURE` 时使用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetexture3dparameter.rst b/classes/zh_CN/class_visualshadernodetexture3dparameter.rst index e2d72f07d8..2a9ea9b1fd 100644 --- a/classes/zh_CN/class_visualshadernodetexture3dparameter.rst +++ b/classes/zh_CN/class_visualshadernodetexture3dparameter.rst @@ -10,21 +10,21 @@ VisualShaderNodeTexture3DParameter ================================== -**Inherits:** :ref:`VisualShaderNodeTextureParameter` **<** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeTextureParameter` **<** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中提供 3D 纹理参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``uniform sampler3D``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetextureparameter.rst b/classes/zh_CN/class_visualshadernodetextureparameter.rst index d3058bd628..8650c871f0 100644 --- a/classes/zh_CN/class_visualshadernodetextureparameter.rst +++ b/classes/zh_CN/class_visualshadernodetextureparameter.rst @@ -10,23 +10,23 @@ VisualShaderNodeTextureParameter ================================ -**Inherits:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeCubemapParameter`, :ref:`VisualShaderNodeTexture2DArrayParameter`, :ref:`VisualShaderNodeTexture2DParameter`, :ref:`VisualShaderNodeTexture3DParameter`, :ref:`VisualShaderNodeTextureParameterTriplanar` +**派生:** :ref:`VisualShaderNodeCubemapParameter`, :ref:`VisualShaderNodeTexture2DArrayParameter`, :ref:`VisualShaderNodeTexture2DParameter`, :ref:`VisualShaderNodeTexture3DParameter`, :ref:`VisualShaderNodeTextureParameterTriplanar` 在可视化着色器图中执行 uniform 的纹理查找。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 对作为 uniform 着色器提供的纹理进行查找操作。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -49,8 +49,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeTextureParameter_TextureType: @@ -316,8 +316,8 @@ enum **TextureSource**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeTextureParameter_property_color_default: @@ -400,10 +400,10 @@ Property Descriptions 定义源纹理提供的数据类型。选项参阅\ :ref:`TextureType`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetextureparametertriplanar.rst b/classes/zh_CN/class_visualshadernodetextureparametertriplanar.rst index b03d8dbd52..16b717e6e6 100644 --- a/classes/zh_CN/class_visualshadernodetextureparametertriplanar.rst +++ b/classes/zh_CN/class_visualshadernodetextureparametertriplanar.rst @@ -10,21 +10,21 @@ VisualShaderNodeTextureParameterTriplanar ========================================= -**Inherits:** :ref:`VisualShaderNodeTextureParameter` **<** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeTextureParameter` **<** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中用三角面进行 uniform 纹理查找。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 对作为uniform着色器提供的纹理进行查找操作,并支持三角面贴图。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetexturesdf.rst b/classes/zh_CN/class_visualshadernodetexturesdf.rst index 3bee159b2f..ca1aa3326c 100644 --- a/classes/zh_CN/class_visualshadernodetexturesdf.rst +++ b/classes/zh_CN/class_visualshadernodetexturesdf.rst @@ -10,21 +10,21 @@ VisualShaderNodeTextureSDF ========================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中执行 SDF(带符号距离场)纹理查找。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``texture_sdf(sdf_pos)``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetexturesdfnormal.rst b/classes/zh_CN/class_visualshadernodetexturesdfnormal.rst index 3f7e3e3b00..637544e5d8 100644 --- a/classes/zh_CN/class_visualshadernodetexturesdfnormal.rst +++ b/classes/zh_CN/class_visualshadernodetexturesdfnormal.rst @@ -10,21 +10,21 @@ VisualShaderNodeTextureSDFNormal ================================ -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中,执行 SDF(带符号距离场)法线纹理查找。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``texture_sdf_normal(sdf_pos)``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetransformcompose.rst b/classes/zh_CN/class_visualshadernodetransformcompose.rst index c91b319967..1962948b37 100644 --- a/classes/zh_CN/class_visualshadernodetransformcompose.rst +++ b/classes/zh_CN/class_visualshadernodetransformcompose.rst @@ -10,21 +10,21 @@ VisualShaderNodeTransformCompose ================================ -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中,将四个 :ref:`Vector3` 合成为 :ref:`Transform3D`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 使用四个类型为 ``vec3`` 的向量创建一个 4x4 变换矩阵。每个向量是矩阵中的一行,最后一列是一个 ``vec4(0, 0, 0, 1)``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetransformconstant.rst b/classes/zh_CN/class_visualshadernodetransformconstant.rst index 1a5e898041..bb73f4e4e0 100644 --- a/classes/zh_CN/class_visualshadernodetransformconstant.rst +++ b/classes/zh_CN/class_visualshadernodetransformconstant.rst @@ -10,21 +10,21 @@ VisualShaderNodeTransformConstant ================================= -**Inherits:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`Transform3D` 常量,在可视化着色器图中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`Transform3D` 常量,可用作输入节点。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeTransformConstant_property_constant: @@ -55,10 +55,10 @@ Property Descriptions :ref:`Transform3D` 常量,代表该节点的状态。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetransformdecompose.rst b/classes/zh_CN/class_visualshadernodetransformdecompose.rst index dbc65811ec..13905d7136 100644 --- a/classes/zh_CN/class_visualshadernodetransformdecompose.rst +++ b/classes/zh_CN/class_visualshadernodetransformdecompose.rst @@ -10,21 +10,21 @@ VisualShaderNodeTransformDecompose ================================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中,将 :ref:`Transform3D` 分解为四个 :ref:`Vector3`\ 。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 获取一个4x4的变换矩阵,并将其分解为四个\ ``vec3``\ 值,每行一个。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetransformfunc.rst b/classes/zh_CN/class_visualshadernodetransformfunc.rst index 05b8ef9c38..a8452b7206 100644 --- a/classes/zh_CN/class_visualshadernodetransformfunc.rst +++ b/classes/zh_CN/class_visualshadernodetransformfunc.rst @@ -10,21 +10,21 @@ VisualShaderNodeTransformFunc ============================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中,计算 :ref:`Transform3D` 函数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 计算提供的 :ref:`Transform3D` 的逆或转置函数。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeTransformFunc_Function: @@ -78,8 +78,8 @@ enum **Function**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeTransformFunc_property_function: @@ -94,10 +94,10 @@ Property Descriptions 要计算的函数。选项参阅\ :ref:`Function`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetransformop.rst b/classes/zh_CN/class_visualshadernodetransformop.rst index b7d8fd30d8..f94973b066 100644 --- a/classes/zh_CN/class_visualshadernodetransformop.rst +++ b/classes/zh_CN/class_visualshadernodetransformop.rst @@ -10,21 +10,21 @@ VisualShaderNodeTransformOp =========================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中使用的 :ref:`Transform3D` 运算符。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 对两个变换(4x4 矩阵)输入应用 :ref:`operator`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeTransformOp_Operator: @@ -134,8 +134,8 @@ enum **Operator**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeTransformOp_property_operator: @@ -150,10 +150,10 @@ Property Descriptions 要对变换执行的运算的类型。选项见 :ref:`Operator`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetransformparameter.rst b/classes/zh_CN/class_visualshadernodetransformparameter.rst index 1e8c9b3c6c..9154e25757 100644 --- a/classes/zh_CN/class_visualshadernodetransformparameter.rst +++ b/classes/zh_CN/class_visualshadernodetransformparameter.rst @@ -10,21 +10,21 @@ VisualShaderNodeTransformParameter ================================== -**Inherits:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 可视化着色器图中使用的 :ref:`Transform3D` 参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``uniform mat4``\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeTransformParameter_property_default_value: @@ -74,10 +74,10 @@ Property Descriptions 启用 :ref:`default_value`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodetransformvecmult.rst b/classes/zh_CN/class_visualshadernodetransformvecmult.rst index 878ee196b7..8fd6e712c1 100644 --- a/classes/zh_CN/class_visualshadernodetransformvecmult.rst +++ b/classes/zh_CN/class_visualshadernodetransformvecmult.rst @@ -10,21 +10,21 @@ VisualShaderNodeTransformVecMult ================================ -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中,将 :ref:`Transform3D` 与 :ref:`Vector3` 相乘。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 对一个变换(4x4 矩阵)和一个向量进行乘法运算,支持不同的乘法运算符。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeTransformVecMult_Operator: @@ -94,8 +94,8 @@ enum **Operator**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeTransformVecMult_property_operator: @@ -110,10 +110,10 @@ Property Descriptions 要执行的乘法类型。参阅 :ref:`Operator` 的选项。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeuintconstant.rst b/classes/zh_CN/class_visualshadernodeuintconstant.rst index d270d8d17f..841fd57331 100644 --- a/classes/zh_CN/class_visualshadernodeuintconstant.rst +++ b/classes/zh_CN/class_visualshadernodeuintconstant.rst @@ -10,21 +10,21 @@ VisualShaderNodeUIntConstant ============================ -**Inherits:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 可视化着色器图中使用的无符号整数标量常量。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``uint``\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeUIntConstant_property_constant: @@ -55,10 +55,10 @@ Property Descriptions 无符号整数常量,代表该节点的状态。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeuintfunc.rst b/classes/zh_CN/class_visualshadernodeuintfunc.rst index 14ee64f520..7f712be4f5 100644 --- a/classes/zh_CN/class_visualshadernodeuintfunc.rst +++ b/classes/zh_CN/class_visualshadernodeuintfunc.rst @@ -10,21 +10,21 @@ VisualShaderNodeUIntFunc ======================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 无符号标量整数函数,在可视化着色器图中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 接受一个无符号整数标量(\ ``x``\ )到输入端口,并根据 :ref:`function` 对其进行转换。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeUIntFunc_Function: @@ -78,8 +78,8 @@ enum **Function**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeUIntFunc_property_function: @@ -94,10 +94,10 @@ Property Descriptions 要应用于该标量的函数。可选项见 :ref:`Function`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeuintop.rst b/classes/zh_CN/class_visualshadernodeuintop.rst index 8329f96d0a..53b980ac64 100644 --- a/classes/zh_CN/class_visualshadernodeuintop.rst +++ b/classes/zh_CN/class_visualshadernodeuintop.rst @@ -10,21 +10,21 @@ VisualShaderNodeUIntOp ====================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 无符号标量整数运算符,在可视化着色器图中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 对两个无符号整数输入 ``a`` 和 ``b`` 应用 :ref:`operator`\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeUIntOp_Operator: @@ -158,8 +158,8 @@ enum **Operator**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeUIntOp_property_operator: @@ -174,10 +174,10 @@ Property Descriptions 要应用于输入的运算符。参阅 :ref:`Operator` 的选项。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeuintparameter.rst b/classes/zh_CN/class_visualshadernodeuintparameter.rst index 448480ad3b..bb8794bd6a 100644 --- a/classes/zh_CN/class_visualshadernodeuintparameter.rst +++ b/classes/zh_CN/class_visualshadernodeuintparameter.rst @@ -10,21 +10,21 @@ VisualShaderNodeUIntParameter ============================= -**Inherits:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 无符号 :ref:`int` 类型着色器参数(uniform)的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 无符号 :ref:`int` 类型的 :ref:`VisualShaderNodeParameter`\ 。还可以对值的可接受范围进行自定义。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeUIntParameter_property_default_value: @@ -74,10 +74,10 @@ Property Descriptions 如果为 ``true``\ ,则该节点有自定义默认值。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeuvfunc.rst b/classes/zh_CN/class_visualshadernodeuvfunc.rst index d2476f5802..0c782a09c1 100644 --- a/classes/zh_CN/class_visualshadernodeuvfunc.rst +++ b/classes/zh_CN/class_visualshadernodeuvfunc.rst @@ -10,21 +10,21 @@ VisualShaderNodeUVFunc ====================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 包含一些用于修改纹理坐标(\ ``uv``\ )的函数,在可视化着色器图中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- UV 函数与 :ref:`Vector2` 函数类似,但这个节点的输入端口默认使用着色器的 UV 值。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeUVFunc_Function: @@ -78,8 +78,8 @@ enum **Function**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeUVFunc_property_function: @@ -94,10 +94,10 @@ Property Descriptions 要对纹理坐标应用的函数。选项见 :ref:`Function`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeuvpolarcoord.rst b/classes/zh_CN/class_visualshadernodeuvpolarcoord.rst index 037c995376..90db0373c7 100644 --- a/classes/zh_CN/class_visualshadernodeuvpolarcoord.rst +++ b/classes/zh_CN/class_visualshadernodeuvpolarcoord.rst @@ -10,21 +10,21 @@ VisualShaderNodeUVPolarCoord ============================ -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 使用极坐标修改纹理 UV 的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- UV 极坐标节点会使用指定的缩放、缩放强度和重复参数将 UV 值转化为极坐标。可以用来创建各种漩涡变形。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevarying.rst b/classes/zh_CN/class_visualshadernodevarying.rst index 08be748137..07d3c505fe 100644 --- a/classes/zh_CN/class_visualshadernodevarying.rst +++ b/classes/zh_CN/class_visualshadernodevarying.rst @@ -10,23 +10,23 @@ VisualShaderNodeVarying ======================= -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeVaryingGetter`, :ref:`VisualShaderNodeVaryingSetter` +**派生:** :ref:`VisualShaderNodeVaryingGetter`, :ref:`VisualShaderNodeVaryingSetter` 代表“verying”着色器值的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- Varying 值是能够在着色器函数之间传递的着色器变量,例如从 Vertex 着色器传递到 Fragment 着色器。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -43,8 +43,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeVarying_property_varying_name: @@ -76,10 +76,10 @@ Property Descriptions 变量的类型。决定该变量可以从哪里访问。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevaryinggetter.rst b/classes/zh_CN/class_visualshadernodevaryinggetter.rst index cbf1aaae1d..e7316a716f 100644 --- a/classes/zh_CN/class_visualshadernodevaryinggetter.rst +++ b/classes/zh_CN/class_visualshadernodevaryinggetter.rst @@ -10,21 +10,21 @@ VisualShaderNodeVaryingGetter ============================= -**Inherits:** :ref:`VisualShaderNodeVarying` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeVarying` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于获取 varying 的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 让着色器中定义的 varying 输出一个值。你需要首先创建可用于该函数的 varying,例如 Fragment 着色器的 varying getter 需要模式为 :ref:`VisualShader.VARYING_MODE_VERTEX_TO_FRAG_LIGHT` 的 varying。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevaryingsetter.rst b/classes/zh_CN/class_visualshadernodevaryingsetter.rst index 72f75eb8a1..f0028fd0e0 100644 --- a/classes/zh_CN/class_visualshadernodevaryingsetter.rst +++ b/classes/zh_CN/class_visualshadernodevaryingsetter.rst @@ -10,21 +10,21 @@ VisualShaderNodeVaryingSetter ============================= -**Inherits:** :ref:`VisualShaderNodeVarying` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeVarying` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于设置 varying 的可视化着色器节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 向着色器中定义的 varying 输入一个值。你需要首先创建可用于该函数的 varying,例如 Fragment 着色器的 varying setter 需要模式为 :ref:`VisualShader.VARYING_MODE_FRAG_TO_LIGHT` 的 varying。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevec2constant.rst b/classes/zh_CN/class_visualshadernodevec2constant.rst index 1a698c80fc..209bc13fcd 100644 --- a/classes/zh_CN/class_visualshadernodevec2constant.rst +++ b/classes/zh_CN/class_visualshadernodevec2constant.rst @@ -10,21 +10,21 @@ VisualShaderNodeVec2Constant ============================ -**Inherits:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 可视化着色器图中使用的 :ref:`Vector2` 常量。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`Vector2` 常量,可用作输入节点。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeVec2Constant_property_constant: @@ -55,10 +55,10 @@ Property Descriptions 代表该节点状态的 :ref:`Vector2` 常量。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevec2parameter.rst b/classes/zh_CN/class_visualshadernodevec2parameter.rst index 7221771520..79264c7d76 100644 --- a/classes/zh_CN/class_visualshadernodevec2parameter.rst +++ b/classes/zh_CN/class_visualshadernodevec2parameter.rst @@ -10,21 +10,21 @@ VisualShaderNodeVec2Parameter ============================= -**Inherits:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 可视化着色器图中使用的 :ref:`Vector2` 参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``uniform vec2``\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeVec2Parameter_property_default_value: @@ -74,10 +74,10 @@ Property Descriptions 启用 :ref:`default_value`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevec3constant.rst b/classes/zh_CN/class_visualshadernodevec3constant.rst index 8282c2e4b7..3f9a0f89dd 100644 --- a/classes/zh_CN/class_visualshadernodevec3constant.rst +++ b/classes/zh_CN/class_visualshadernodevec3constant.rst @@ -10,21 +10,21 @@ VisualShaderNodeVec3Constant ============================ -**Inherits:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` :ref:`Vector3` 常量,用于可视化着色器图中。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- :ref:`Vector3` 常量,可用作输入节点。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeVec3Constant_property_constant: @@ -55,10 +55,10 @@ Property Descriptions :ref:`Vector3` 常量,表示该节点的状态。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevec3parameter.rst b/classes/zh_CN/class_visualshadernodevec3parameter.rst index ac24c8aec7..9895eaecd3 100644 --- a/classes/zh_CN/class_visualshadernodevec3parameter.rst +++ b/classes/zh_CN/class_visualshadernodevec3parameter.rst @@ -10,21 +10,21 @@ VisualShaderNodeVec3Parameter ============================= -**Inherits:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 可视化着色器图中使用的 :ref:`Vector3` 参数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``uniform vec3``\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeVec3Parameter_property_default_value: @@ -74,10 +74,10 @@ Property Descriptions 启用 :ref:`default_value`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevec4constant.rst b/classes/zh_CN/class_visualshadernodevec4constant.rst index cbb036bfd7..b19151e708 100644 --- a/classes/zh_CN/class_visualshadernodevec4constant.rst +++ b/classes/zh_CN/class_visualshadernodevec4constant.rst @@ -10,21 +10,21 @@ VisualShaderNodeVec4Constant ============================ -**Inherits:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeConstant` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 4D 常向量,用于可视化着色器图中。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 4D 常向量,可用作输入节点。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeVec4Constant_property_constant: @@ -55,10 +55,10 @@ Property Descriptions 4D 常向量(表示为 :ref:`Quaternion`\ ),表示该节点的状态。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevec4parameter.rst b/classes/zh_CN/class_visualshadernodevec4parameter.rst index 28d563b0ea..737a136682 100644 --- a/classes/zh_CN/class_visualshadernodevec4parameter.rst +++ b/classes/zh_CN/class_visualshadernodevec4parameter.rst @@ -10,21 +10,21 @@ VisualShaderNodeVec4Parameter ============================= -**Inherits:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeParameter` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 4D 向量参数,在可视化着色器图中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``uniform vec4``\ 。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeVec4Parameter_property_default_value: @@ -74,10 +74,10 @@ Property Descriptions 启用 :ref:`default_value`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevectorbase.rst b/classes/zh_CN/class_visualshadernodevectorbase.rst index 85d9006915..ac3e83b8b0 100644 --- a/classes/zh_CN/class_visualshadernodevectorbase.rst +++ b/classes/zh_CN/class_visualshadernodevectorbase.rst @@ -10,23 +10,23 @@ VisualShaderNodeVectorBase ========================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`VisualShaderNodeFaceForward`, :ref:`VisualShaderNodeVectorCompose`, :ref:`VisualShaderNodeVectorDecompose`, :ref:`VisualShaderNodeVectorDistance`, :ref:`VisualShaderNodeVectorFunc`, :ref:`VisualShaderNodeVectorLen`, :ref:`VisualShaderNodeVectorOp`, :ref:`VisualShaderNodeVectorRefract` +**派生:** :ref:`VisualShaderNodeFaceForward`, :ref:`VisualShaderNodeVectorCompose`, :ref:`VisualShaderNodeVectorDecompose`, :ref:`VisualShaderNodeVectorDistance`, :ref:`VisualShaderNodeVectorFunc`, :ref:`VisualShaderNodeVectorLen`, :ref:`VisualShaderNodeVectorOp`, :ref:`VisualShaderNodeVectorRefract` 在可视化着色器图中执行向量运算的基础类型节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这是一个抽象类。可进行的运算描述见派生类。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeVectorBase_OpType: @@ -88,8 +88,8 @@ enum **OpType**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeVectorBase_property_op_type: @@ -104,10 +104,10 @@ Property Descriptions 要进行运算的向量类型。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevectorcompose.rst b/classes/zh_CN/class_visualshadernodevectorcompose.rst index 240860ac86..11b903916b 100644 --- a/classes/zh_CN/class_visualshadernodevectorcompose.rst +++ b/classes/zh_CN/class_visualshadernodevectorcompose.rst @@ -10,21 +10,21 @@ VisualShaderNodeVectorCompose ============================= -**Inherits:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中,从标量合成 :ref:`Vector2`\ 、\ :ref:`Vector3` 或 4D 向量(由 :ref:`Quaternion` 表示)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 使用标量值创建 ``vec2``\ 、\ ``vec3`` 或 ``vec4``\ ,这些标量值可以由独立的输入提供。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevectordecompose.rst b/classes/zh_CN/class_visualshadernodevectordecompose.rst index 66abc0d7be..2ffe718b08 100644 --- a/classes/zh_CN/class_visualshadernodevectordecompose.rst +++ b/classes/zh_CN/class_visualshadernodevectordecompose.rst @@ -10,21 +10,21 @@ VisualShaderNodeVectorDecompose =============================== -**Inherits:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中,将 :ref:`Vector2`\ 、\ :ref:`Vector3` 或 4D 向量(由 :ref:`Quaternion` 表示)分解为标量。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 接受 ``vec2``\ 、\ ``vec3`` 或 ``vec4`` 并将其分解为标量值,这些标量值可以用作独立的输出。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevectordistance.rst b/classes/zh_CN/class_visualshadernodevectordistance.rst index f8bc30b062..5184bc06a9 100644 --- a/classes/zh_CN/class_visualshadernodevectordistance.rst +++ b/classes/zh_CN/class_visualshadernodevectordistance.rst @@ -10,23 +10,23 @@ VisualShaderNodeVectorDistance ============================== -**Inherits:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 返回两点之间的距离。用于可视化着色器图中。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 计算从向量 ``p0`` 表示的点到向量 ``p1`` 的距离。 在着色器语言中被转换成 ``distance(p0, p1)``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevectorfunc.rst b/classes/zh_CN/class_visualshadernodevectorfunc.rst index e7bcbe4038..40475a1180 100644 --- a/classes/zh_CN/class_visualshadernodevectorfunc.rst +++ b/classes/zh_CN/class_visualshadernodevectorfunc.rst @@ -10,21 +10,21 @@ VisualShaderNodeVectorFunc ========================== -**Inherits:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中使用的向量函数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 可视化着色器节点,能够使用向量执行不同的函数。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeVectorFunc_Function: @@ -326,8 +326,8 @@ enum **Function**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeVectorFunc_property_function: @@ -342,10 +342,10 @@ Property Descriptions 要执行的函数。参阅 :ref:`Function` 的选项。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevectorlen.rst b/classes/zh_CN/class_visualshadernodevectorlen.rst index dc735641e4..1a104240a9 100644 --- a/classes/zh_CN/class_visualshadernodevectorlen.rst +++ b/classes/zh_CN/class_visualshadernodevectorlen.rst @@ -10,21 +10,21 @@ VisualShaderNodeVectorLen ========================= -**Inherits:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 返回\ :ref:`Vector3`\ 在可视化着色器图中的长度。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 翻译为着色器语言中的 ``length(p0)``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevectorop.rst b/classes/zh_CN/class_visualshadernodevectorop.rst index ef77ff4b67..638d3f6617 100644 --- a/classes/zh_CN/class_visualshadernodevectorop.rst +++ b/classes/zh_CN/class_visualshadernodevectorop.rst @@ -10,21 +10,21 @@ VisualShaderNodeVectorOp ======================== -**Inherits:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 在可视化着色器图中使用的向量运算符。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于使用向量运算符的可视化着色器节点。对向量\ ``a``\ 和向量\ ``b``\ 进行操作。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VisualShaderNodeVectorOp_Operator: @@ -158,8 +158,8 @@ enum **Operator**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VisualShaderNodeVectorOp_property_operator: @@ -174,10 +174,10 @@ Property Descriptions 要使用的运算符。参阅\ :ref:`Operator`\ 的选项。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodevectorrefract.rst b/classes/zh_CN/class_visualshadernodevectorrefract.rst index f13fe2e1e1..1c5117c6c8 100644 --- a/classes/zh_CN/class_visualshadernodevectorrefract.rst +++ b/classes/zh_CN/class_visualshadernodevectorrefract.rst @@ -10,21 +10,21 @@ VisualShaderNodeVectorRefract ============================= -**Inherits:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNodeVectorBase` **<** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 返回指向折射方向的向量。在可视化着色器图中使用。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 在着色器语言中转换成 ``refract(I, N, eta)``\ ,其中 ``I`` 是入射向量,\ ``N`` 是法线向量,\ ``eta`` 是折射的比率。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_visualshadernodeworldpositionfromdepth.rst b/classes/zh_CN/class_visualshadernodeworldpositionfromdepth.rst index 83f0c66d7d..8e5196b8d4 100644 --- a/classes/zh_CN/class_visualshadernodeworldpositionfromdepth.rst +++ b/classes/zh_CN/class_visualshadernodeworldpositionfromdepth.rst @@ -10,21 +10,21 @@ VisualShaderNodeWorldPositionFromDepth ====================================== -**Inherits:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`VisualShaderNode` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` -A visual shader node that calculates the position of the pixel in world space using the depth texture. +可视化着色器节点,使用深度纹理计算像素在世界空间中的位置。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -The WorldPositionFromDepth node reconstructs the depth position of the pixel in world space. This can be used to obtain world space UVs for projection mapping like Caustics. +WorldPositionFromDepth 节点重建世界空间中像素的深度位置。这可被用于获取用于投影映射(如焦散)的世界空间 UV。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_voxelgi.rst b/classes/zh_CN/class_voxelgi.rst index 396da6592b..3fc72bcfc2 100644 --- a/classes/zh_CN/class_voxelgi.rst +++ b/classes/zh_CN/class_voxelgi.rst @@ -10,14 +10,14 @@ VoxelGI ======= -**Inherits:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`VisualInstance3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 实时全局光照(GI)探测。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **VoxelGI** 用于为场景提供高质量的实时的间接光照和反射。它们预先计算发光物体的效果和静态几何体的效果,以实时模拟复杂光线的行为。\ **VoxelGI** 需要经过烘焙才能产生可见的效果。然而,一旦烘焙,动态对象将接收来自它们的光。此外,灯光可以是完全动态的,也可以是烘焙的。 @@ -31,17 +31,17 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`Using Voxel global illumination <../tutorials/3d/global_illumination/using_voxel_gi>` +- :doc:`使用体素全局光照 <../tutorials/3d/global_illumination/using_voxel_gi>` - `第三人称射击演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -76,8 +76,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_VoxelGI_Subdiv: @@ -131,8 +131,8 @@ enum **Subdiv**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VoxelGI_property_camera_attributes: @@ -206,8 +206,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_VoxelGI_method_bake: @@ -233,10 +233,10 @@ void **debug_bake** **(** **)** 在启用 ``create_visual_debug`` 的情况下调用 :ref:`bake` 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_voxelgidata.rst b/classes/zh_CN/class_voxelgidata.rst index 72c0213b5d..3e9b5aff09 100644 --- a/classes/zh_CN/class_voxelgidata.rst +++ b/classes/zh_CN/class_voxelgidata.rst @@ -10,14 +10,14 @@ VoxelGIData =========== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 包含用于 :ref:`VoxelGI` 节点的烘焙体素全局光照数据。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **VoxelGIData** 包含烘焙的体素全局照明,用于 :ref:`VoxelGI` 节点。\ **VoxelGIData** 还提供了若干用来调整全局照明最终外观的属性。这些属性可以在运行时调整,无须再次烘焙 :ref:`VoxelGI` 节点。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `第三人称射击演示 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -56,8 +56,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -84,8 +84,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_VoxelGIData_property_bias: @@ -208,8 +208,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_VoxelGIData_method_allocate: @@ -219,7 +219,7 @@ void **allocate** **(** :ref:`Transform3D` to_cell_xform, :re .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -247,7 +247,7 @@ void **allocate** **(** :ref:`Transform3D` to_cell_xform, :re .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -261,7 +261,7 @@ void **allocate** **(** :ref:`Transform3D` to_cell_xform, :re .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -275,7 +275,7 @@ void **allocate** **(** :ref:`Transform3D` to_cell_xform, :re .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -289,7 +289,7 @@ void **allocate** **(** :ref:`Transform3D` to_cell_xform, :re .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -303,12 +303,12 @@ void **allocate** **(** :ref:`Transform3D` to_cell_xform, :re .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_vscrollbar.rst b/classes/zh_CN/class_vscrollbar.rst index 93ce590941..a890e85af8 100644 --- a/classes/zh_CN/class_vscrollbar.rst +++ b/classes/zh_CN/class_vscrollbar.rst @@ -10,21 +10,21 @@ VScrollBar ========== -**Inherits:** :ref:`ScrollBar` **<** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`ScrollBar` **<** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 垂直滚动条,从顶部(最小)滚动到底部(最大)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 垂直滚动条,通常用于为超出控件可见高度的内容进行导航。这是基于 :ref:`Range` 的控件,从顶部(最小)滚动到底部(最大)。注意,滚动方向和 :ref:`VSlider` 相反。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -35,179 +35,10 @@ Properties | |bitfield|\<:ref:`SizeFlags`\> | size_flags_vertical | ``1`` (overrides :ref:`Control`) | +--------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+ -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`decrement` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`decrement_highlight` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`decrement_pressed` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`increment` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`increment_highlight` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`increment_pressed` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox` | :ref:`grabber` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox` | :ref:`grabber_highlight` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox` | :ref:`grabber_pressed` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox` | :ref:`scroll` | - +-----------------------------------+-----------------------------------------------------------------------------+ - | :ref:`StyleBox` | :ref:`scroll_focus` | - +-----------------------------------+-----------------------------------------------------------------------------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_VScrollBar_theme_icon_decrement: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **decrement** - -按钮使用的图标,用于向上滚动\ :ref:`ScrollBar`\ 。支持使用\ :ref:`ScrollBar.custom_step`\ 属性的自定义步长。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_icon_decrement_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **decrement_highlight** - -当鼠标指针悬停在递减按钮上时显示。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_icon_decrement_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **decrement_pressed** - -在按下递减按钮时显示。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_icon_increment: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **increment** - -作为按钮使用的图标,用于向下滚动\ :ref:`ScrollBar`\ 。支持使用\ :ref:`ScrollBar.custom_step`\ 属性的自定义步长。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_icon_increment_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **increment_highlight** - -当鼠标指针悬停在增量按钮上时显示。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_icon_increment_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **increment_pressed** - -在按下增量按钮时显示。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_style_grabber: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **grabber** - -用作拖动条的纹理,表示当前的可拖动元素。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_style_grabber_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **grabber_highlight** - -当鼠标悬停在拖动条上时使用。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_style_grabber_pressed: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **grabber_pressed** - -在拖动条被拖动时使用。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_style_scroll: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **scroll** - -用作此 :ref:`ScrollBar` 的背景。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VScrollBar_theme_style_scroll_focus: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **scroll_focus** - -当 :ref:`ScrollBar` 具有 GUI 焦点时用作背景。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_vseparator.rst b/classes/zh_CN/class_vseparator.rst index 78d943af2a..473c1e10d1 100644 --- a/classes/zh_CN/class_vseparator.rst +++ b/classes/zh_CN/class_vseparator.rst @@ -10,64 +10,21 @@ VSeparator ========== -**Inherits:** :ref:`Separator` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Separator` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 分隔其他控件的垂直线。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 分隔其他\ **水平**\ 排列的控件的垂直线。\ **VSeparator** 只提供视觉上的分隔,通常用 :ref:`StyleBoxLine` 绘制。 -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +---------------------------------+---------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`separation` | ``4`` | - +---------------------------------+---------------------------------------------------------------+-------+ - | :ref:`StyleBox` | :ref:`separator` | | - +---------------------------------+---------------------------------------------------------------+-------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_VSeparator_theme_constant_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **separation** = ``4`` - -分隔器覆盖区域的宽度。效果上和最小宽度一致。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSeparator_theme_style_separator: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **separator** - -分隔线的样式。与 :ref:`StyleBoxLine` 一起使用效果最好(记得要启用 :ref:`StyleBoxLine.vertical`\ )。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_vslider.rst b/classes/zh_CN/class_vslider.rst index 027e9328e0..fd288e76be 100644 --- a/classes/zh_CN/class_vslider.rst +++ b/classes/zh_CN/class_vslider.rst @@ -10,21 +10,21 @@ VSlider ======= -**Inherits:** :ref:`Slider` **<** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Slider` **<** :ref:`Range` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 从下(最小)到上(最大)的垂直滚动条。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 垂直滚动条,可用通过沿着垂直轴移动抓取器来调整取值。这个控件继承自 :ref:`Range`\ ,从下(最小)到上(最大)滚动。注意这个方向和 :ref:`VScrollBar` 的方向是相反的。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -35,151 +35,10 @@ Properties | |bitfield|\<:ref:`SizeFlags`\> | size_flags_vertical | ``1`` (overrides :ref:`Control`) | +--------------------------------------------------------+-----------------------+--------------------------------------------------------------------------------+ -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`center_grabber` | ``0`` | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`grabber_offset` | ``0`` | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`grabber` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`grabber_disabled` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`grabber_highlight` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`tick` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`StyleBox` | :ref:`grabber_area` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`StyleBox` | :ref:`grabber_area_highlight` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - | :ref:`StyleBox` | :ref:`slider` | | - +-----------------------------------+---------------------------------------------------------------------------------+-------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_VSlider_theme_constant_center_grabber: - -.. rst-class:: classref-themeproperty - -:ref:`int` **center_grabber** = ``0`` - -布尔常量。如果为 ``1``\ ,则会忽略抓取器纹理的大小,根据其中心位置将其缩放到滚动条的边界。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSlider_theme_constant_grabber_offset: - -.. rst-class:: classref-themeproperty - -:ref:`int` **grabber_offset** = ``0`` - -抓取器的水平偏移量。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSlider_theme_icon_grabber: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **grabber** - -用作拖动条的纹理(可拖动的元素)。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSlider_theme_icon_grabber_disabled: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **grabber_disabled** - -抓取器禁用时的材质。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSlider_theme_icon_grabber_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **grabber_highlight** - -抓取器获得焦点时的材质。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSlider_theme_icon_tick: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **tick** - -刻度的纹理。当 :ref:`Slider.tick_count` 大于 0 时可见。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSlider_theme_style_grabber_area: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **grabber_area** - -抓取器下方区域的背景。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSlider_theme_style_grabber_area_highlight: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **grabber_area_highlight** - -抓取器下方区域的背景,在悬停或聚焦状态显示。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSlider_theme_style_slider: - -.. rst-class:: classref-themeproperty - -:ref:`StyleBox` **slider** - -整个滑动条的背景。决定了 ``grabber_area`` 的宽度。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_vsplitcontainer.rst b/classes/zh_CN/class_vsplitcontainer.rst index b1bff4d371..09889002fa 100644 --- a/classes/zh_CN/class_vsplitcontainer.rst +++ b/classes/zh_CN/class_vsplitcontainer.rst @@ -10,99 +10,28 @@ VSplitContainer =============== -**Inherits:** :ref:`SplitContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`SplitContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` 会将两个子控件进行垂直分隔的容器,并且提供了用于调整分隔比例的抓取器。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 仅接受两个子控件的容器,会将这两个控件垂直排列,在两者之间创建一条分隔线。分隔线可以拖动,从而改变两个子控件之间的大小关系。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用容器 <../tutorials/ui/gui_containers>` -.. rst-class:: classref-reftable-group - -Theme Properties ----------------- - -.. table:: - :widths: auto - - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - | :ref:`int` | :ref:`autohide` | ``1`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - | :ref:`int` | :ref:`minimum_grab_thickness` | ``6`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - | :ref:`int` | :ref:`separation` | ``12`` | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - | :ref:`Texture2D` | :ref:`grabber` | | - +-----------------------------------+--------------------------------------------------------------------------------------------+--------+ - -.. rst-class:: classref-section-separator - ----- - -.. rst-class:: classref-descriptions-group - -Theme Property Descriptions ---------------------------- - -.. _class_VSplitContainer_theme_constant_autohide: - -.. rst-class:: classref-themeproperty - -:ref:`int` **autohide** = ``1`` - -布尔值。如果1 (``true``),抓取器将在不在光标下时自动隐藏。如果0 (``false``),抓取器总是可见。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSplitContainer_theme_constant_minimum_grab_thickness: - -.. rst-class:: classref-themeproperty - -:ref:`int` **minimum_grab_thickness** = ``6`` - -用户可以点击的区域的最小粗细,点击该区域将抓取分割线。如果 :ref:`separation` 或 :ref:`grabber` 的粗细太小,这将保证分割线仍然可以被拖动。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSplitContainer_theme_constant_separation: - -.. rst-class:: classref-themeproperty - -:ref:`int` **separation** = ``12`` - -容器两侧之间的空间。 - -.. rst-class:: classref-item-separator - ----- - -.. _class_VSplitContainer_theme_icon_grabber: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **grabber** - -在中间区域绘制的抓取图标。 - -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_weakref.rst b/classes/zh_CN/class_weakref.rst index 73b00b0350..b7961183e0 100644 --- a/classes/zh_CN/class_weakref.rst +++ b/classes/zh_CN/class_weakref.rst @@ -10,21 +10,21 @@ WeakRef ======= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 存放 :ref:`Object`\ 。如果该对象为 :ref:`RefCounted`\ ,则不会影响其引用计数。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 弱引用可以存放 :ref:`RefCounted`\ ,但不会影响其引用计数。可以使用 :ref:`@GlobalScope.weakref` 创建 :ref:`Object` 的弱引用。如果该对象不是引用,弱引用仍然有效,只是对这个对象没有任何影响。弱引用在多个类的变量相互引用的情况下很有用。如果没有弱引用,使用这些类可能会导致内存泄漏,因为这两个引用会阻止彼此被释放。将部分变量设置为弱引用可以防止这种循环依赖,让引用能够被释放。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_WeakRef_method_get_ref: @@ -50,10 +50,10 @@ Method Descriptions 返回这个弱引用所引用的 :ref:`Object`\ 。如果该对象不复存在,则返回 ``null``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_webrtcdatachannel.rst b/classes/zh_CN/class_webrtcdatachannel.rst index 548c2012cb..1c6dc2a878 100644 --- a/classes/zh_CN/class_webrtcdatachannel.rst +++ b/classes/zh_CN/class_webrtcdatachannel.rst @@ -10,18 +10,18 @@ WebRTCDataChannel ================= -**Inherits:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`WebRTCDataChannelExtension` +**派生:** :ref:`WebRTCDataChannelExtension` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -32,8 +32,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -70,8 +70,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_WebRTCDataChannel_WriteMode: @@ -143,8 +143,8 @@ enum **ChannelState**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_WebRTCDataChannel_property_write_mode: @@ -165,8 +165,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_WebRTCDataChannel_method_close: @@ -314,10 +314,10 @@ void **close** **(** **)** 如果最后收到的数据包是以文本形式传输,则返回 ``true``\ 。见 :ref:`write_mode`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_webrtcdatachannelextension.rst b/classes/zh_CN/class_webrtcdatachannelextension.rst index 8ac2aa8b96..604a8b0ddb 100644 --- a/classes/zh_CN/class_webrtcdatachannelextension.rst +++ b/classes/zh_CN/class_webrtcdatachannelextension.rst @@ -10,57 +10,57 @@ WebRTCDataChannelExtension ========================== -**Inherits:** :ref:`WebRTCDataChannel` **<** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`WebRTCDataChannel` **<** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_close` **(** **)** |virtual| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_available_packet_count` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_buffered_amount` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_id` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_label` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_max_packet_life_time` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_max_packet_size` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_max_retransmits` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_get_packet` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_protocol` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ChannelState` | :ref:`_get_ready_state` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`WriteMode` | :ref:`_get_write_mode` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_negotiated` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_ordered` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_poll` **(** **)** |virtual| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_put_packet` **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_write_mode` **(** :ref:`WriteMode` p_write_mode **)** |virtual| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_was_string_packet` **(** **)** |virtual| |const| | - +----------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_close` **(** **)** |virtual| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_available_packet_count` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_buffered_amount` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_id` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_label` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_max_packet_life_time` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_max_packet_size` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_max_retransmits` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_get_packet` **(** const uint8_t ** r_buffer, int32_t* r_buffer_size **)** |virtual| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_protocol` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ChannelState` | :ref:`_get_ready_state` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WriteMode` | :ref:`_get_write_mode` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_negotiated` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_ordered` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_poll` **(** **)** |virtual| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_put_packet` **(** const uint8_t* p_buffer, :ref:`int` p_buffer_size **)** |virtual| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_set_write_mode` **(** :ref:`WriteMode` p_write_mode **)** |virtual| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_was_string_packet` **(** **)** |virtual| |const| | + +----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -68,10 +68,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_WebRTCDataChannelExtension_method__close: +.. _class_WebRTCDataChannelExtension_private_method__close: .. rst-class:: classref-method @@ -79,13 +79,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__get_available_packet_count: +.. _class_WebRTCDataChannelExtension_private_method__get_available_packet_count: .. rst-class:: classref-method @@ -93,13 +93,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__get_buffered_amount: +.. _class_WebRTCDataChannelExtension_private_method__get_buffered_amount: .. rst-class:: classref-method @@ -107,13 +107,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__get_id: +.. _class_WebRTCDataChannelExtension_private_method__get_id: .. rst-class:: classref-method @@ -121,13 +121,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__get_label: +.. _class_WebRTCDataChannelExtension_private_method__get_label: .. rst-class:: classref-method @@ -135,13 +135,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__get_max_packet_life_time: +.. _class_WebRTCDataChannelExtension_private_method__get_max_packet_life_time: .. rst-class:: classref-method @@ -149,13 +149,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__get_max_packet_size: +.. _class_WebRTCDataChannelExtension_private_method__get_max_packet_size: .. rst-class:: classref-method @@ -163,13 +163,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__get_max_retransmits: +.. _class_WebRTCDataChannelExtension_private_method__get_max_retransmits: .. rst-class:: classref-method @@ -177,13 +177,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__get_packet: +.. _class_WebRTCDataChannelExtension_private_method__get_packet: .. rst-class:: classref-method @@ -191,13 +191,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__get_protocol: +.. _class_WebRTCDataChannelExtension_private_method__get_protocol: .. rst-class:: classref-method @@ -205,13 +205,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__get_ready_state: +.. _class_WebRTCDataChannelExtension_private_method__get_ready_state: .. rst-class:: classref-method @@ -219,13 +219,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__get_write_mode: +.. _class_WebRTCDataChannelExtension_private_method__get_write_mode: .. rst-class:: classref-method @@ -233,13 +233,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__is_negotiated: +.. _class_WebRTCDataChannelExtension_private_method__is_negotiated: .. rst-class:: classref-method @@ -247,13 +247,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__is_ordered: +.. _class_WebRTCDataChannelExtension_private_method__is_ordered: .. rst-class:: classref-method @@ -261,13 +261,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__poll: +.. _class_WebRTCDataChannelExtension_private_method__poll: .. rst-class:: classref-method @@ -275,13 +275,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__put_packet: +.. _class_WebRTCDataChannelExtension_private_method__put_packet: .. rst-class:: classref-method @@ -289,13 +289,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__set_write_mode: +.. _class_WebRTCDataChannelExtension_private_method__set_write_mode: .. rst-class:: classref-method @@ -303,13 +303,13 @@ void **_set_write_mode** **(** :ref:`WriteMode .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCDataChannelExtension_method__was_string_packet: +.. _class_WebRTCDataChannelExtension_private_method__was_string_packet: .. rst-class:: classref-method @@ -317,12 +317,12 @@ void **_set_write_mode** **(** :ref:`WriteMode .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_webrtcmultiplayerpeer.rst b/classes/zh_CN/class_webrtcmultiplayerpeer.rst index 63a96cae5d..8adaf7dc40 100644 --- a/classes/zh_CN/class_webrtcmultiplayerpeer.rst +++ b/classes/zh_CN/class_webrtcmultiplayerpeer.rst @@ -10,14 +10,14 @@ WebRTCMultiplayerPeer ===================== -**Inherits:** :ref:`MultiplayerPeer` **<** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`MultiplayerPeer` **<** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` 简单的接口,用于创建由 :ref:`WebRTCPeerConnection` 组成的点对点网状网络,与 :ref:`MultiplayerAPI` 兼容。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类构建了一个完整的 :ref:`WebRTCPeerConnection` 网状结构(每个对等体有一个连接),可用作 :ref:`MultiplayerAPI.multiplayer_peer`\ 。 @@ -29,8 +29,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -59,8 +59,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_WebRTCMultiplayerPeer_method_add_peer: @@ -160,10 +160,10 @@ void **remove_peer** **(** :ref:`int` peer_id **)** 从 mesh 结构中移除具有给定 ``peer_id`` 的对等体。如果该对等体已连接,并且为它发出过 :ref:`MultiplayerPeer.peer_connected`\ ,那么 :ref:`MultiplayerPeer.peer_disconnected` 也将被发出。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_webrtcpeerconnection.rst b/classes/zh_CN/class_webrtcpeerconnection.rst index ab0bbb42ac..e75d381f30 100644 --- a/classes/zh_CN/class_webrtcpeerconnection.rst +++ b/classes/zh_CN/class_webrtcpeerconnection.rst @@ -10,33 +10,33 @@ WebRTCPeerConnection ==================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`WebRTCPeerConnectionExtension` +**派生:** :ref:`WebRTCPeerConnectionExtension` 与 WebRTC 对等体连接的接口。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -A WebRTC connection between the local computer and a remote peer. Provides an interface to connect, maintain and monitor the connection. +本地计算机和远程对等体之间的 WebRTC 连接。提供一个接口来连接、维护和监控连接。 -Setting up a WebRTC connection between two peers may not seem a trivial task, but it can be broken down into 3 main steps: +在两个对等体之间建立 WebRTC 连接看上去可能不是一项简单的任务,但它可以分解为 3 个主要步骤。 -- The peer that wants to initiate the connection (``A`` from now on) creates an offer and send it to the other peer (``B`` from now on). +- 想要启动连接的对等体(\ ``A``\ 从现在开始)创建一个提交,并将其发送给另一个对等体(\ ``B``\ 从现在开始)。 -- ``B`` receives the offer, generate and answer, and sends it to ``A``). +- ``B`` 收到要约,生成和回答,并将其发送给 ``A``\ )。 -- ``A`` and ``B`` then generates and exchange ICE candidates with each other. +- ``A`` 和 ``B`` 然后生成并相互交换 ICE 候选。 -After these steps, the connection should become connected. Keep on reading or look into the tutorial for more information. +在这些步骤之后,连接应该成功建立。继续阅读或查看教程以了解更多信息。 .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -73,8 +73,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_WebRTCPeerConnection_signal_data_channel_received: @@ -116,8 +116,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_WebRTCPeerConnection_ConnectionState: @@ -271,8 +271,8 @@ enum **SignalingState**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_WebRTCPeerConnection_method_add_ice_candidate: @@ -417,7 +417,7 @@ void **close** **(** **)** :ref:`Error` **poll** **(** **)** -经常调用这个方法以正确接收信号,例如在 :ref:`Node._process` 或 :ref:`Node._physics_process` 中。 +经常调用这个方法以正确接收信号,例如在 :ref:`Node._process` 或 :ref:`Node._physics_process` 中。 .. rst-class:: classref-item-separator @@ -461,10 +461,10 @@ void **set_default_extension** **(** :ref:`StringName` extensi 如果 ``type`` 为 ``"answer"``\ ,对等体将开始发出 :ref:`ice_candidate_created`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_webrtcpeerconnectionextension.rst b/classes/zh_CN/class_webrtcpeerconnectionextension.rst index 4f40090e22..480ad6786b 100644 --- a/classes/zh_CN/class_webrtcpeerconnectionextension.rst +++ b/classes/zh_CN/class_webrtcpeerconnectionextension.rst @@ -10,43 +10,43 @@ WebRTCPeerConnectionExtension ============================= -**Inherits:** :ref:`WebRTCPeerConnection` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`WebRTCPeerConnection` **<** :ref:`RefCounted` **<** :ref:`Object` .. container:: contribute - There is currently no description for this class. Please help us by :ref:`contributing one `! + 目前没有这个类的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_add_ice_candidate` **(** :ref:`String` p_sdp_mid_name, :ref:`int` p_sdp_mline_index, :ref:`String` p_sdp_name **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_close` **(** **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`WebRTCDataChannel` | :ref:`_create_data_channel` **(** :ref:`String` p_label, :ref:`Dictionary` p_config **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_create_offer` **(** **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ConnectionState` | :ref:`_get_connection_state` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`GatheringState` | :ref:`_get_gathering_state` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SignalingState` | :ref:`_get_signaling_state` **(** **)** |virtual| |const| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_initialize` **(** :ref:`Dictionary` p_config **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_poll` **(** **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_set_local_description` **(** :ref:`String` p_type, :ref:`String` p_sdp **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_set_remote_description` **(** :ref:`String` p_type, :ref:`String` p_sdp **)** |virtual| | - +-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_add_ice_candidate` **(** :ref:`String` p_sdp_mid_name, :ref:`int` p_sdp_mline_index, :ref:`String` p_sdp_name **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_close` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WebRTCDataChannel` | :ref:`_create_data_channel` **(** :ref:`String` p_label, :ref:`Dictionary` p_config **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_create_offer` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ConnectionState` | :ref:`_get_connection_state` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`GatheringState` | :ref:`_get_gathering_state` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SignalingState` | :ref:`_get_signaling_state` **(** **)** |virtual| |const| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_initialize` **(** :ref:`Dictionary` p_config **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_poll` **(** **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_set_local_description` **(** :ref:`String` p_type, :ref:`String` p_sdp **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_set_remote_description` **(** :ref:`String` p_type, :ref:`String` p_sdp **)** |virtual| | + +-------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -54,10 +54,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_WebRTCPeerConnectionExtension_method__add_ice_candidate: +.. _class_WebRTCPeerConnectionExtension_private_method__add_ice_candidate: .. rst-class:: classref-method @@ -65,13 +65,13 @@ Method Descriptions .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCPeerConnectionExtension_method__close: +.. _class_WebRTCPeerConnectionExtension_private_method__close: .. rst-class:: classref-method @@ -79,13 +79,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCPeerConnectionExtension_method__create_data_channel: +.. _class_WebRTCPeerConnectionExtension_private_method__create_data_channel: .. rst-class:: classref-method @@ -93,13 +93,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCPeerConnectionExtension_method__create_offer: +.. _class_WebRTCPeerConnectionExtension_private_method__create_offer: .. rst-class:: classref-method @@ -107,13 +107,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCPeerConnectionExtension_method__get_connection_state: +.. _class_WebRTCPeerConnectionExtension_private_method__get_connection_state: .. rst-class:: classref-method @@ -121,13 +121,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCPeerConnectionExtension_method__get_gathering_state: +.. _class_WebRTCPeerConnectionExtension_private_method__get_gathering_state: .. rst-class:: classref-method @@ -135,13 +135,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCPeerConnectionExtension_method__get_signaling_state: +.. _class_WebRTCPeerConnectionExtension_private_method__get_signaling_state: .. rst-class:: classref-method @@ -149,13 +149,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCPeerConnectionExtension_method__initialize: +.. _class_WebRTCPeerConnectionExtension_private_method__initialize: .. rst-class:: classref-method @@ -163,13 +163,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCPeerConnectionExtension_method__poll: +.. _class_WebRTCPeerConnectionExtension_private_method__poll: .. rst-class:: classref-method @@ -177,13 +177,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCPeerConnectionExtension_method__set_local_description: +.. _class_WebRTCPeerConnectionExtension_private_method__set_local_description: .. rst-class:: classref-method @@ -191,13 +191,13 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_WebRTCPeerConnectionExtension_method__set_remote_description: +.. _class_WebRTCPeerConnectionExtension_private_method__set_remote_description: .. rst-class:: classref-method @@ -205,12 +205,12 @@ void **_close** **(** **)** |virtual| .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_websocketmultiplayerpeer.rst b/classes/zh_CN/class_websocketmultiplayerpeer.rst index 99d07b61db..dfd3d7243b 100644 --- a/classes/zh_CN/class_websocketmultiplayerpeer.rst +++ b/classes/zh_CN/class_websocketmultiplayerpeer.rst @@ -10,14 +10,14 @@ WebSocketMultiplayerPeer ======================== -**Inherits:** :ref:`MultiplayerPeer` **<** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`MultiplayerPeer` **<** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` WebSocket 服务器和客户端的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 用于 WebSocket 服务器和客户端的基类,可以用作 :ref:`MultiplayerAPI` 的多人对等体。 @@ -25,8 +25,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -47,8 +47,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -71,8 +71,8 @@ Methods .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_WebSocketMultiplayerPeer_property_handshake_headers: @@ -178,8 +178,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_WebSocketMultiplayerPeer_method_create_client: @@ -239,10 +239,10 @@ Method Descriptions 返回给定对等体的远程端口。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_websocketpeer.rst b/classes/zh_CN/class_websocketpeer.rst index 3a0d648cfb..06bf954c80 100644 --- a/classes/zh_CN/class_websocketpeer.rst +++ b/classes/zh_CN/class_websocketpeer.rst @@ -10,14 +10,14 @@ WebSocketPeer ============= -**Inherits:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`PacketPeer` **<** :ref:`RefCounted` **<** :ref:`Object` WebSocket 连接。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类代表 WebSocket 连接,可以用作 WebSocket 客户端(兼容 RFC 6455),也可以用作 WebSocket 服务器的远程对等体。 @@ -58,8 +58,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -78,8 +78,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -124,8 +124,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_WebSocketPeer_WriteMode: @@ -197,8 +197,8 @@ enum **State**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_WebSocketPeer_property_handshake_headers: @@ -289,8 +289,8 @@ WebSocket 握手期间允许的 WebSocket 子协议。 .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_WebSocketPeer_method_accept_stream: @@ -494,10 +494,10 @@ void **set_no_delay** **(** :ref:`bool` enabled **)** 如果最后收到的数据包是作为文本有效载荷发送的,返回 ``true``\ 。见 :ref:`WriteMode`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_webxrinterface.rst b/classes/zh_CN/class_webxrinterface.rst index c73ad5e8cb..ce747eb8ee 100644 --- a/classes/zh_CN/class_webxrinterface.rst +++ b/classes/zh_CN/class_webxrinterface.rst @@ -10,14 +10,14 @@ WebXRInterface ============== -**Inherits:** :ref:`XRInterface` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`XRInterface` **<** :ref:`RefCounted` **<** :ref:`Object` 使用 WebXR 的 AR/VR 接口。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- WebXR 是一种开放标准,允许创建在网络浏览器中运行的 VR 和 AR 应用程序。 @@ -115,15 +115,15 @@ WebXR 支持范围广泛的设备,从功能强大的设备(如 Valve Index .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - `如何使用 Godot 4 制作 WebXR 的 VR 游戏 `__ .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -144,8 +144,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -172,8 +172,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_WebXRInterface_signal_display_refresh_rate_changed: @@ -355,8 +355,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_WebXRInterface_TargetRayMode: @@ -402,8 +402,8 @@ enum **TargetRayMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_WebXRInterface_property_optional_features: @@ -533,8 +533,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_WebXRInterface_method_get_available_display_refresh_rates: @@ -638,10 +638,10 @@ void **set_display_refresh_rate** **(** :ref:`float` refresh_rate * 为当前的 HMD 设置屏幕刷新率。不是所有 HMD 和浏览器都支持。不会立即生效,发出 :ref:`display_refresh_rate_changed` 信号后才会生效。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_window.rst b/classes/zh_CN/class_window.rst index ba5670918d..5bec7c1c68 100644 --- a/classes/zh_CN/class_window.rst +++ b/classes/zh_CN/class_window.rst @@ -10,16 +10,16 @@ Window ====== -**Inherits:** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Viewport` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AcceptDialog`, :ref:`Popup` +**派生:** :ref:`AcceptDialog`, :ref:`Popup` 所有窗口、对话框、弹出框的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 创建窗口的节点。窗口可以是原生系统窗口,也可以是嵌入到其他 **Window** 中的窗口(见 :ref:`Viewport.gui_embed_subwindows`\ )。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,6 +58,8 @@ Properties +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`WindowInitialPosition` | :ref:`initial_position` | ``0`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`keep_title_visible` | ``false`` | + +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`Vector2i` | :ref:`max_size` | ``Vector2i(0, 0)`` | +-----------------------------------------------------------------+-----------------------------------------------------------------------------------+--------------------------+ | :ref:`Vector2i` | :ref:`min_size` | ``Vector2i(0, 0)`` | @@ -95,14 +97,14 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_contents_minimum_size` **(** **)** |virtual| |const| | + | :ref:`Vector2` | :ref:`_get_contents_minimum_size` **(** **)** |virtual| |const| | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_theme_color_override` **(** :ref:`StringName` name, :ref:`Color` color **)** | +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -249,8 +251,8 @@ Methods .. rst-class:: classref-reftable-group -Theme Properties ----------------- +主题属性 +-------- .. table:: :widths: auto @@ -289,8 +291,8 @@ Theme Properties .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_Window_signal_about_to_popup: @@ -398,7 +400,7 @@ Signals **mouse_entered** **(** **)** -Emitted when the mouse cursor enters the **Window**'s visible area, that is not occluded behind other :ref:`Control`\ s or windows, provided its :ref:`Viewport.gui_disable_input` is ``false`` and regardless if it's currently focused or not. +当鼠标光标进入 **Window** 的可见区域时发出,该区域未被其他 :ref:`Control` 或窗口遮挡,只要其 :ref:`Viewport.gui_disable_input` 为 ``false`` 并且无论它当前聚焦与否。 .. rst-class:: classref-item-separator @@ -410,7 +412,7 @@ Emitted when the mouse cursor enters the **Window**'s visible area, that is not **mouse_exited** **(** **)** -Emitted when the mouse cursor leaves the **Window**'s visible area, that is not occluded behind other :ref:`Control`\ s or windows, provided its :ref:`Viewport.gui_disable_input` is ``false`` and regardless if it's currently focused or not. +当鼠标光标离开 **Window** 的可见区域时发出,该区域未被其他 :ref:`Control` 或窗口遮挡,只要其 :ref:`Viewport.gui_disable_input` 为 ``false`` 并且无论它当前聚焦与否。 .. rst-class:: classref-item-separator @@ -466,8 +468,8 @@ Emitted when the mouse cursor leaves the **Window**'s visible area, that is not .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_Window_Mode: @@ -505,9 +507,15 @@ enum **Mode**: :ref:`Mode` **MODE_FULLSCREEN** = ``3`` -全屏窗口模式。请注意,这不是\ *独占的*\ 全屏显示。在 Windows 和 Linux 上,无边框窗口用于模拟全屏。在 macOS 上,会创建一个新的桌面用于显示正在运行的项目。 +具有完整多窗口支持的全屏模式。 -无论平台如何,启用全屏都会更改窗口大小以匹配显示器的大小。因此,请确保你的项目在启用全屏模式时支持\ :doc:`多种分辨率 <../tutorials/rendering/multiple_resolutions>`\ 。 +全屏窗口覆盖屏幕的整个显示区域,且没有任何装饰。显示的视频模式没有更改。 + +\ **在 Windows 上:**\ 多窗口全屏模式具有 1px 宽的颜色为 :ref:`ProjectSettings.rendering/environment/defaults/default_clear_color` 的边框。 + +\ **在 macOS 上:**\ 使用新桌面来显示正在运行的项目。 + +\ **注意:**\ 无论平台如何,启用全屏都会更改窗口大小以匹配显示器的大小。因此,请确保你的项目在启用全屏模式时支持\ :doc:`多种分辨率 <../tutorials/rendering/multiple_resolutions>`\ 。 .. _class_Window_constant_MODE_EXCLUSIVE_FULLSCREEN: @@ -515,11 +523,17 @@ enum **Mode**: :ref:`Mode` **MODE_EXCLUSIVE_FULLSCREEN** = ``4`` -独占式全屏窗口模式。该模式仅在 Windows 平台上实现。在其他平台上等同于 :ref:`MODE_FULLSCREEN`\ 。 +单窗口全屏模式。这种模式开销较小,但一次只能在给定屏幕上打开一个窗口(打开子窗口或切换应用程序会触发全屏过渡)。 -同一屏幕上一次只能有一个窗口处于独占式全屏模式。如果同一屏幕上有多个窗口都启用了独占式全屏模式,则最后一个设置为该模式的窗口会优先显示。 +全屏窗口会覆盖屏幕的整个显示区域,没有边框或装饰。显示视频模式没有改变。 -无论在哪个平台上,启用全屏模式将会将窗口大小调整为与显示器相匹配的大小。因此,在启用全屏模式之前,请确保你的项目支持\ :doc:`多分辨率 <../tutorials/rendering/multiple_resolutions>`\ 。 +\ **在 Windows 上:**\ 取决于视频驱动程序,全屏过渡可能会导致屏幕暂时变黑。 + +\ **在 macOS 上:**\ 一个新的桌面用于显示正在运行的项目。当鼠标指针悬停在屏幕边缘时,独占全屏模式会阻止 Dock 和 Menu 出现。 + +\ **在 Linux(X11)上:**\ 独占全屏模式会绕过合成器。 + +\ **注意:**\ 无论平台如何,启用全屏都会更改窗口大小以匹配显示器的大小。因此,确保你的项目在启用全屏模式时支持\ :doc:`多个分辨率 <../tutorials/rendering/multiple_resolutions>`\ 。 .. rst-class:: classref-item-separator @@ -713,7 +727,7 @@ enum **ContentScaleStretch**: :ref:`ContentScaleStretch` **CONTENT_SCALE_STRETCH_FRACTIONAL** = ``0`` -The content will be stretched according to a fractional factor. This fills all the space available in the window, but allows "pixel wobble" to occur due to uneven pixel scaling. +内容会根据小数系数进行拉伸。这样就能够填充窗口的所有空间,但非整数的像素缩放会导致发生“像素摆动”。 .. _class_Window_constant_CONTENT_SCALE_STRETCH_INTEGER: @@ -721,7 +735,7 @@ The content will be stretched according to a fractional factor. This fills all t :ref:`ContentScaleStretch` **CONTENT_SCALE_STRETCH_INTEGER** = ``1`` -The content will be stretched only according to an integer factor, preserving sharp pixels. This may leave a black background visible on the window's edges depending on the window size. +内容只会根据整数系数进行拉伸,保持像素的锐利。可能导致窗口的边缘留出可见的黑色背景,具体取决于窗口大小。 .. rst-class:: classref-item-separator @@ -829,8 +843,8 @@ enum **WindowInitialPosition**: .. rst-class:: classref-descriptions-group -Constants ---------- +常量 +---- .. _class_Window_constant_NOTIFICATION_VISIBILITY_CHANGED: @@ -862,8 +876,8 @@ Constants .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_Window_property_always_on_top: @@ -995,7 +1009,7 @@ Property Descriptions - void **set_content_scale_stretch** **(** :ref:`ContentScaleStretch` value **)** - :ref:`ContentScaleStretch` **get_content_scale_stretch** **(** **)** -The policy to use to determine the final scale factor for 2D elements. This affects how :ref:`content_scale_factor` is applied, in addition to the automatic scale factor determined by :ref:`content_scale_size`. +决定 2D 元素最终缩放系数的策略。会影响 :ref:`content_scale_factor` 的使用,与 :ref:`content_scale_size` 决定的自动缩放系数共同生效。 .. rst-class:: classref-item-separator @@ -1075,6 +1089,23 @@ The policy to use to determine the final scale factor for 2D elements. This affe ---- +.. _class_Window_property_keep_title_visible: + +.. rst-class:: classref-property + +:ref:`bool` **keep_title_visible** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_keep_title_visible** **(** :ref:`bool` value **)** +- :ref:`bool` **get_keep_title_visible** **(** **)** + +如果为 ``true``\ ,则该 **Window** 宽度被扩展以保持标题栏文本完全可见。 + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_property_max_size: .. rst-class:: classref-property @@ -1218,7 +1249,7 @@ The policy to use to determine the final scale factor for 2D elements. This affe - void **set_flag** **(** :ref:`Flags` flag, :ref:`bool` enabled **)** - :ref:`bool` **get_flag** **(** :ref:`Flags` flag **)** |const| -If ``true``, the **Window** will be considered a popup. Popups are sub-windows that don't show as separate windows in system's window manager's window list and will send close request when anything is clicked outside of them (unless :ref:`exclusive` is enabled). +如果为 ``true``\ ,则该 **Window** 将被视为弹出窗口。弹出窗口是子窗口,不会在系统窗口管理器的窗口列表中显示为单独的窗口,并且会在单击它们之外的任何位置时发送关闭请求(除非启用了 :ref:`exclusive`\ )。 .. rst-class:: classref-item-separator @@ -1427,16 +1458,16 @@ If ``true``, the **Window** will be considered a popup. Popups are sub-windows t .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_Window_method__get_contents_minimum_size: +.. _class_Window_private_method__get_contents_minimum_size: .. rst-class:: classref-method :ref:`Vector2` **_get_contents_minimum_size** **(** **)** |virtual| |const| -Virtual method to be implemented by the user. Overrides the value returned by :ref:`get_contents_minimum_size`. +需要用户实现的虚方法。能够覆盖 :ref:`get_contents_minimum_size` 的返回值。 .. rst-class:: classref-item-separator @@ -1580,9 +1611,9 @@ void **end_bulk_theme_override** **(** **)** :ref:`Vector2` **get_contents_minimum_size** **(** **)** |const| -Returns the combined minimum size from the child :ref:`Control` nodes of the window. Use :ref:`child_controls_changed` to update it when children nodes have changed. +返回该窗口子 :ref:`Control` 节点最小尺寸的合并大小。请在子节点发生改变时使用 :ref:`child_controls_changed` 进行更新。 -The value returned by this method can be overridden with :ref:`_get_contents_minimum_size`. +这个方法的返回值可以使用 :ref:`_get_contents_minimum_size` 覆盖。 .. rst-class:: classref-item-separator @@ -2032,7 +2063,7 @@ void **hide** **(** **)** void **move_to_center** **(** **)** -Centers a native window on the current screen and an embedded window on its embedder :ref:`Viewport`. +在当前屏幕里居中原生窗口,如果时嵌入式窗口则是在嵌入器 :ref:`Viewport` 里居中。 .. rst-class:: classref-item-separator @@ -2370,8 +2401,8 @@ void **show** **(** **)** .. rst-class:: classref-descriptions-group -Theme Property Descriptions ---------------------------- +主题属性说明 +------------ .. _class_Window_theme_color_title_color: @@ -2525,12 +2556,12 @@ Theme Property Descriptions :ref:`StyleBox` **embedded_unfocused_border** -The background style used when the **Window** is embedded and unfocused. +**Window** 为嵌入式且未获得焦点时使用的背景样式。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_workerthreadpool.rst b/classes/zh_CN/class_workerthreadpool.rst index 1f561c6998..2d529ada4f 100644 --- a/classes/zh_CN/class_workerthreadpool.rst +++ b/classes/zh_CN/class_workerthreadpool.rst @@ -10,14 +10,14 @@ WorkerThreadPool ================ -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 单例,启动时会分配一些 :ref:`Thread`\ ,可以将任务卸载到这些线程中执行。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **WorkerThreadPool** 单例在项目启动时会分配一组 :ref:`Thread`\ (称作工作线程)并提供将任务卸载至这些线程上执行的方法。这样就能够简化多线程的使用,不必创建 :ref:`Thread`\ 。 @@ -68,8 +68,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`使用多线程 <../tutorials/performance/using_multiple_threads>` @@ -77,8 +77,8 @@ Tutorials .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -105,8 +105,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_WorkerThreadPool_method_add_group_task: @@ -202,10 +202,10 @@ void **wait_for_group_task_completion** **(** :ref:`int` group_id **) 如果其他正在执行的任务调用了该方法,并且由于任务调度的原因,要等待的任务位于调用栈更下层的位置,因此无法继续,则返回 :ref:`@GlobalScope.ERR_BUSY`\ 。这是比较高级的情况,只有任务之间存在依赖关系时才会出现。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_world2d.rst b/classes/zh_CN/class_world2d.rst index 47b966d09f..65f4046b99 100644 --- a/classes/zh_CN/class_world2d.rst +++ b/classes/zh_CN/class_world2d.rst @@ -10,28 +10,28 @@ World2D ======= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 一种保存了所有 2D 世界组件的资源,例如画布和物理运算空间。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类包含所有与 2D 世界相关的内容:物理空间、可视场景和音频空间。2D 节点会将它们的资源注册到当前的 2D 世界中。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`发射射线 <../tutorials/physics/ray-casting>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_World2D_property_canvas: @@ -81,7 +81,7 @@ Property Descriptions - :ref:`PhysicsDirectSpaceState2D` **get_direct_space_state** **(** **)** -直接访问该世界的物理 3D 空间状态。可用于查询当前和可能的碰撞。在多线程物理中使用时,仅可在主线程的 :ref:`Node._physics_process` 中访问。 +直接访问该世界的物理 3D 空间状态。可用于查询当前和可能的碰撞。在多线程物理中使用时,仅可在主线程的 :ref:`Node._physics_process` 中访问。 .. rst-class:: classref-item-separator @@ -115,10 +115,10 @@ Property Descriptions 这个世界物理空间资源的 :ref:`RID`\ 。由 :ref:`PhysicsServer2D` 用于 2D 物理,将其视为一个空间和一个区域。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_world3d.rst b/classes/zh_CN/class_world3d.rst index d8fd39752c..1fe1b1d335 100644 --- a/classes/zh_CN/class_world3d.rst +++ b/classes/zh_CN/class_world3d.rst @@ -10,28 +10,28 @@ World3D ======= -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 包含 3D 世界所有组件的资源,例如可视场景和物理空间。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个类包含所有与世界相关的内容:物理空间、可视场景和音频空间。3D 节点会将它们的资源注册到当前的 3D 世界中。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`发射射线 <../tutorials/physics/ray-casting>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_World3D_property_camera_attributes: @@ -88,7 +88,7 @@ Property Descriptions - :ref:`PhysicsDirectSpaceState3D` **get_direct_space_state** **(** **)** -直接访问该世界的物理 3D 空间状态。可用于查询当前和可能的碰撞。在多线程物理中使用时,仅可在主线程的 :ref:`Node._physics_process` 中访问。 +直接访问该世界的物理 3D 空间状态。可用于查询当前和可能的碰撞。在多线程物理中使用时,仅可在主线程的 :ref:`Node._physics_process` 中访问。 .. rst-class:: classref-item-separator @@ -172,10 +172,10 @@ Property Descriptions 该 World3D 的物理空间。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_worldboundaryshape2d.rst b/classes/zh_CN/class_worldboundaryshape2d.rst index bc71be44e9..155cbc8da5 100644 --- a/classes/zh_CN/class_worldboundaryshape2d.rst +++ b/classes/zh_CN/class_worldboundaryshape2d.rst @@ -10,21 +10,21 @@ WorldBoundaryShape2D ==================== -**Inherits:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape2D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于物理碰撞的 2D 空间边界(半平面)形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 2D 世界边界形状,应当用于物理用途。\ **WorldBoundaryShape2D** 本质上和无限直线类似,能够强制所有物理体都保持在它的上方。哪个方向是“上方”由该直线的法线确定,这个方向在编辑器中由直线上方的一条段线表示。用例是无限的平坦地面。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -41,8 +41,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_WorldBoundaryShape2D_property_distance: @@ -74,12 +74,12 @@ Property Descriptions - void **set_normal** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_normal** **(** **)** -该直线的法线,通常是单位向量。方向表示不带碰撞的那半个平面。长度可以是零以外的任何值。默认为 ``Vector2.UP``\ 。 +该直线的法线,通常是一个单位向量。它的方向表示非碰撞半平面。可以是任意长度,但不能为零。默认为 :ref:`Vector2.UP`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_worldboundaryshape3d.rst b/classes/zh_CN/class_worldboundaryshape3d.rst index 3e57d1ee3d..70f1146ab2 100644 --- a/classes/zh_CN/class_worldboundaryshape3d.rst +++ b/classes/zh_CN/class_worldboundaryshape3d.rst @@ -10,21 +10,21 @@ WorldBoundaryShape3D ==================== -**Inherits:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Shape3D` **<** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` 用于物理碰撞的 3D 空间边界(半空间)形状。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 3D 世界边界形状,应当用于物理用途。\ **WorldBoundaryShape3D** 本质上和无限平面类似,能够强制所有物理体都保持在它的上方。哪个方向是“上方”由该平面 :ref:`plane` 的法线确定,这个方向在编辑器中由平面上方的一条线表示。用例是无限的平坦地面。 .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -39,8 +39,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_WorldBoundaryShape3D_property_plane: @@ -55,10 +55,10 @@ Property Descriptions 该 **WorldBoundaryShape3D** 用于碰撞的 :ref:`Plane`\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_worldenvironment.rst b/classes/zh_CN/class_worldenvironment.rst index 662b274f17..5263147205 100644 --- a/classes/zh_CN/class_worldenvironment.rst +++ b/classes/zh_CN/class_worldenvironment.rst @@ -10,14 +10,14 @@ WorldEnvironment ================ -**Inherits:** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node` **<** :ref:`Object` 整个场景的默认环境属性,后期处理效果、照明和背景设置。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **WorldEnvironment** 节点用于为场景配置默认的 :ref:`Environment`\ 。 @@ -27,8 +27,8 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`环境和后期处理 <../tutorials/3d/environment_and_post_processing>` @@ -40,8 +40,8 @@ Tutorials .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_WorldEnvironment_property_camera_attributes: @@ -91,10 +91,10 @@ Property Descriptions 此 **WorldEnvironment** 世界环境所使用的 :ref:`Environment` 环境资源,定义默认属性。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_x509certificate.rst b/classes/zh_CN/class_x509certificate.rst index a55d6f1b3f..15711f7876 100644 --- a/classes/zh_CN/class_x509certificate.rst +++ b/classes/zh_CN/class_x509certificate.rst @@ -10,14 +10,14 @@ X509Certificate =============== -**Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` X509 证书(例如用于 TLS)。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- X509Certificate 类代表 X509 证书。证书可以像其他的 :ref:`Resource` 资源一样加载和保存。 @@ -25,15 +25,15 @@ X509Certificate 类代表 X509 证书。证书可以像其他的 :ref:`Resource< .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- -- :doc:`SSL certificates <../tutorials/networking/ssl_certificates>` +- :doc:`SSL 证书 <../tutorials/networking/ssl_certificates>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_X509Certificate_method_load: @@ -101,10 +101,10 @@ Method Descriptions 返回证书的字符串表示,如果证书无效则返回空字符串。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_xmlparser.rst b/classes/zh_CN/class_xmlparser.rst index 0a07b0de74..ee09a6d7eb 100644 --- a/classes/zh_CN/class_xmlparser.rst +++ b/classes/zh_CN/class_xmlparser.rst @@ -10,20 +10,20 @@ XMLParser ========= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -Provides a low-level interface for creating parsers for XML files. +为创建 XML 文件解析器提供低阶接口。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- -Provides a low-level interface for creating parsers for `XML `__ files. This class can serve as base to make custom XML parsers. +为创建 `XML `__ 文件解析器提供低阶接口。制作自定义 XML 解析器时,可以将这个类作为基础。 -To parse XML, you must open a file with the :ref:`open` method or a buffer with the :ref:`open_buffer` method. Then, the :ref:`read` method must be called to parse the next nodes. Most of the methods take into consideration the currently parsed node. +要解析 XML,你必须使用 :ref:`open` 方法打开文件,或者使用 :ref:`open_buffer` 方法打开缓冲区。然后必须使用 :ref:`read` 方法解析后续节点。大多数方法使用的是当前解析节点。 -Here is an example of using **XMLParser** to parse a SVG file (which is based on XML), printing each element and its attributes as a dictionary: +以下是使用 **XMLParser** 解析 SVG 文件(基于 XML)的粒子,会输出所有的元素,以字典的形式输出对应的属性: .. tabs:: @@ -38,7 +38,7 @@ Here is an example of using **XMLParser** to parse a SVG file (which is based on var attributes_dict = {} for idx in range(parser.get_attribute_count()): attributes_dict[parser.get_attribute_name(idx)] = parser.get_attribute_value(idx) - print("The ", node_name, " element has the following attributes: ", attributes_dict) + print("元素 ", node_name, " 包含的属性有:", attributes_dict) .. code-tab:: csharp @@ -54,7 +54,7 @@ Here is an example of using **XMLParser** to parse a SVG file (which is based on { attributesDict[parser.GetAttributeName(idx)] = parser.GetAttributeValue(idx); } - GD.Print($"The {nodeName} element has the following attributes: {attributesDict}"); + GD.Print($"元素 {nodeName} 包含的属性有:{attributesDict}"); } } @@ -62,8 +62,8 @@ Here is an example of using **XMLParser** to parse a SVG file (which is based on .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -110,8 +110,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_XMLParser_NodeType: @@ -133,7 +133,7 @@ enum **NodeType**: :ref:`NodeType` **NODE_ELEMENT** = ``1`` -An element node type, also known as a tag, e.g. ````. +元素节点类型,也称作标签,例如 ``<title>``\ 。 .. _class_XMLParser_constant_NODE_ELEMENT_END: @@ -141,7 +141,7 @@ An element node type, also known as a tag, e.g. ``<title>``. :ref:`NodeType<enum_XMLParser_NodeType>` **NODE_ELEMENT_END** = ``2`` -An end of element node type, e.g. ````. +元素结束节点类型,例如 ````\ 。 .. _class_XMLParser_constant_NODE_TEXT: @@ -149,7 +149,7 @@ An end of element node type, e.g. ````. :ref:`NodeType` **NODE_TEXT** = ``3`` -A text node type, i.e. text that is not inside an element. This includes whitespace. +文本节点类型,即不在元素中的文本。包含空白字符。 .. _class_XMLParser_constant_NODE_COMMENT: @@ -157,7 +157,7 @@ A text node type, i.e. text that is not inside an element. This includes whitesp :ref:`NodeType` **NODE_COMMENT** = ``4`` -A comment node type, e.g. ````. +注释节点类型,例如 ````\ 。 .. _class_XMLParser_constant_NODE_CDATA: @@ -165,7 +165,7 @@ A comment node type, e.g. ````. :ref:`NodeType` **NODE_CDATA** = ``5`` -A node type for CDATA (Character Data) sections, e.g. ````. +CDATA(字符数据)部分对应的节点类型,例如 ````\ 。 .. _class_XMLParser_constant_NODE_UNKNOWN: @@ -173,7 +173,7 @@ A node type for CDATA (Character Data) sections, e.g. ``` **NODE_UNKNOWN** = ``6`` -An unknown node type. +未知节点类型。 .. rst-class:: classref-section-separator @@ -181,8 +181,8 @@ An unknown node type. .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_XMLParser_method_get_attribute_count: @@ -190,9 +190,9 @@ Method Descriptions :ref:`int` **get_attribute_count** **(** **)** |const| -Returns the number of attributes in the currently parsed element. +返回当前解析元素中属性的数量。 -\ **Note:** If this method is used while the currently parsed node is not :ref:`NODE_ELEMENT` or :ref:`NODE_ELEMENT_END`, this count will not be updated and will still reflect the last element. +\ **注意:**\ 如果在当前解析的节点不是 :ref:`NODE_ELEMENT` 或 :ref:`NODE_ELEMENT_END` 时调用这个方法,则该计数不会更新,仍然反映的是之前的元素。 .. rst-class:: classref-item-separator @@ -204,7 +204,7 @@ Returns the number of attributes in the currently parsed element. :ref:`String` **get_attribute_name** **(** :ref:`int` idx **)** |const| -Returns the name of an attribute of the currently parsed element, specified by the ``idx`` index. +返回当前解析元素中某个属性的名称,属性由 ``idx`` 索引指定。 .. rst-class:: classref-item-separator @@ -216,7 +216,7 @@ Returns the name of an attribute of the currently parsed element, specified by t :ref:`String` **get_attribute_value** **(** :ref:`int` idx **)** |const| -Returns the value of an attribute of the currently parsed element, specified by the ``idx`` index. +返回当前解析元素中某个属性的取值,属性由 ``idx`` 索引指定。 .. rst-class:: classref-item-separator @@ -228,7 +228,7 @@ Returns the value of an attribute of the currently parsed element, specified by :ref:`int` **get_current_line** **(** **)** |const| -Returns the current line in the parsed file, counting from 0. +返回解析文件中的当前行,从 0 开始计数。 .. rst-class:: classref-item-separator @@ -240,7 +240,7 @@ Returns the current line in the parsed file, counting from 0. :ref:`String` **get_named_attribute_value** **(** :ref:`String` name **)** |const| -Returns the value of an attribute of the currently parsed element, specified by its ``name``. This method will raise an error if the element has no such attribute. +返回当前解析元素中某个属性的取值,属性由名称 ``name`` 指定。如果该元素没有符合要求的属性,则会引发错误。 .. rst-class:: classref-item-separator @@ -252,7 +252,7 @@ Returns the value of an attribute of the currently parsed element, specified by :ref:`String` **get_named_attribute_value_safe** **(** :ref:`String` name **)** |const| -Returns the value of an attribute of the currently parsed element, specified by its ``name``. This method will return an empty string if the element has no such attribute. +返回当前解析元素中某个属性的取值,属性由名称 ``name`` 指定。如果该元素没有符合要求的属性,则会返回空字符串。 .. rst-class:: classref-item-separator @@ -264,7 +264,7 @@ Returns the value of an attribute of the currently parsed element, specified by :ref:`String` **get_node_data** **(** **)** |const| -Returns the contents of a text node. This method will raise an error if the current parsed node is of any other type. +返回文本节点的内容。如果当前解析节点是其他类型,则会引发错误。 .. rst-class:: classref-item-separator @@ -276,7 +276,7 @@ Returns the contents of a text node. This method will raise an error if the curr :ref:`String` **get_node_name** **(** **)** |const| -Returns the name of an element node. This method will raise an error if the currently parsed node is not of :ref:`NODE_ELEMENT` or :ref:`NODE_ELEMENT_END` type. +返回元素节点的名称。如果当前解析节点既不是 :ref:`NODE_ELEMENT` 类型又不是 :ref:`NODE_ELEMENT_END` 类型,则会引发错误。 .. rst-class:: classref-item-separator @@ -288,7 +288,7 @@ Returns the name of an element node. This method will raise an error if the curr :ref:`int` **get_node_offset** **(** **)** |const| -Returns the byte offset of the currently parsed node since the beginning of the file or buffer. This is usually equivalent to the number of characters before the read position. +返回当前解析节点相对于文件或缓冲区开始处的字节偏移量。通常等价于读取位置之前的字符数。 .. rst-class:: classref-item-separator @@ -300,7 +300,7 @@ Returns the byte offset of the currently parsed node since the beginning of the :ref:`NodeType` **get_node_type** **(** **)** -Returns the type of the current node. Compare with :ref:`NodeType` constants. +返回当前节点的类型。请使用 :ref:`NodeType` 常量进行比较。 .. rst-class:: classref-item-separator @@ -312,7 +312,7 @@ Returns the type of the current node. Compare with :ref:`NodeType` **has_attribute** **(** :ref:`String` name **)** |const| -Returns ``true`` if the currently parsed element has an attribute with the ``name``. +如果当前解析元素存在名为 ``name`` 的属性,则返回 ``true``\ 。 .. rst-class:: classref-item-separator @@ -324,7 +324,7 @@ Returns ``true`` if the currently parsed element has an attribute with the ``nam :ref:`bool` **is_empty** **(** **)** |const| -Returns ``true`` if the currently parsed element is empty, e.g. ````. +如果当前解析元素为空则返回 ``true``\ ,例如 ````\ 。 .. rst-class:: classref-item-separator @@ -336,7 +336,7 @@ Returns ``true`` if the currently parsed element is empty, e.g. ````. :ref:`Error` **open** **(** :ref:`String` file **)** -Opens an XML ``file`` for parsing. This method returns an error code. +打开 XML 文件 ``file`` 进行解析。这个方法返回的是错误码。 .. rst-class:: classref-item-separator @@ -348,7 +348,7 @@ Opens an XML ``file`` for parsing. This method returns an error code. :ref:`Error` **open_buffer** **(** :ref:`PackedByteArray` buffer **)** -Opens an XML raw ``buffer`` for parsing. This method returns an error code. +打开 XML 原始缓冲区 ``buffer`` 进行解析。这个方法返回的是错误码。 .. rst-class:: classref-item-separator @@ -360,7 +360,7 @@ Opens an XML raw ``buffer`` for parsing. This method returns an error code. :ref:`Error` **read** **(** **)** -Parses the next node in the file. This method returns an error code. +解析文件的下一个节点。这个方法返回的是错误码。 .. rst-class:: classref-item-separator @@ -372,7 +372,7 @@ Parses the next node in the file. This method returns an error code. :ref:`Error` **seek** **(** :ref:`int` position **)** -Moves the buffer cursor to a certain offset (since the beginning) and reads the next node there. This method returns an error code. +将缓冲区光标移动到某一偏移量(相对于开始位置)并在那里读取下一个节点。这个方法返回的是错误码。 .. rst-class:: classref-item-separator @@ -384,12 +384,12 @@ Moves the buffer cursor to a certain offset (since the beginning) and reads the void **skip_section** **(** **)** -Skips the current section. If the currently parsed node contains more inner nodes, they will be ignored and the cursor will go to the closing of the current element. +跳过当前部分。如果当前解析的节点包含其他内部节点,则会忽略这些节点,光标将跳转到当前元素的结尾处。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_xranchor3d.rst b/classes/zh_CN/class_xranchor3d.rst index 03b4f44d50..0c3d082243 100644 --- a/classes/zh_CN/class_xranchor3d.rst +++ b/classes/zh_CN/class_xranchor3d.rst @@ -10,14 +10,14 @@ XRAnchor3D ========== -**Inherits:** :ref:`XRNode3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`XRNode3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` AR 空间中的锚点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- **XRAnchor3D** 点是一个空间节点,它将由 AR 平台识别的真实世界位置映射到游戏世界中的某个位置。例如,只要 ARKit 中的平面检测处于开启状态,ARKit 就会识别和更新平面(桌子、地板等)的位置,并为它们创建锚点。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`XR 文档索引 <../tutorials/xr/index>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_XRAnchor3D_method_get_plane: @@ -75,10 +75,10 @@ Method Descriptions 返回检测到的平面的估计尺寸。比如当锚点与现实世界中的一张桌子有关时,这就是该桌子表面的估计尺寸。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_xrcamera3d.rst b/classes/zh_CN/class_xrcamera3d.rst index 77e65c2dd6..a2e2d021f6 100644 --- a/classes/zh_CN/class_xrcamera3d.rst +++ b/classes/zh_CN/class_xrcamera3d.rst @@ -10,14 +10,14 @@ XRCamera3D ========== -**Inherits:** :ref:`Camera3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Camera3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 应用了一些 AR/VR 规则的相机节点,例如位置跟踪。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这是用于我们相机的一种辅助空间节点;请注意,如果立体渲染适用(VR-HMD),则大多数相机属性都会被忽略,因为 HMD 信息会覆盖它们。可以信任的属性只有近平面和远平面。 @@ -25,15 +25,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`XR 文档索引 <../tutorials/xr/index>` -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_xrcontroller3d.rst b/classes/zh_CN/class_xrcontroller3d.rst index fbd0807732..47f835aad9 100644 --- a/classes/zh_CN/class_xrcontroller3d.rst +++ b/classes/zh_CN/class_xrcontroller3d.rst @@ -10,14 +10,14 @@ XRController3D ============== -**Inherits:** :ref:`XRNode3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`XRNode3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` 表示空间跟踪控制器的空间节点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这是一个辅助空间节点,链接到控制器的跟踪。它还为控制器上的按钮等状态,提供了几个方便的直通方式。 @@ -29,15 +29,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`XR 文档索引 <../tutorials/xr/index>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -60,8 +60,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_XRController3D_signal_button_pressed: @@ -113,8 +113,8 @@ Signals .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_XRController3D_method_get_float: @@ -172,10 +172,10 @@ Method Descriptions 如果名称为 ``name`` 的按钮处于按下状态,则返回 ``true``\ 。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_xrinterface.rst b/classes/zh_CN/class_xrinterface.rst index ce86bcde90..1b24c80bc6 100644 --- a/classes/zh_CN/class_xrinterface.rst +++ b/classes/zh_CN/class_xrinterface.rst @@ -10,16 +10,16 @@ XRInterface =========== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`MobileVRInterface`, :ref:`OpenXRInterface`, :ref:`WebXRInterface`, :ref:`XRInterfaceExtension` +**派生:** :ref:`MobileVRInterface`, :ref:`OpenXRInterface`, :ref:`WebXRInterface`, :ref:`XRInterfaceExtension` XR 接口实现的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 需要实现该类以使 Godot 可以使用 AR 或 VR 平台,并且这些应作为 C++ 模块或 GDExtension 模块实现。部分接口公开给 GDScript,因此可以检测、启用和配置 AR 或 VR 平台。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`XR 文档索引 <../tutorials/xr/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -52,8 +52,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -110,8 +110,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_XRInterface_signal_play_area_changed: @@ -127,8 +127,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_XRInterface_Capabilities: @@ -332,8 +332,8 @@ Alpha 混合模式。通常用于带有穿透功能的 AR 或 VR 设备。Alpha .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_XRInterface_property_ar_is_anchor_detection_enabled: @@ -363,7 +363,7 @@ Property Descriptions - :ref:`bool` **set_environment_blend_mode** **(** :ref:`EnvironmentBlendMode` mode **)** - :ref:`EnvironmentBlendMode` **get_environment_blend_mode** **(** **)** -Specify how XR should blend in the environment. This is specific to certain AR and passthrough devices where camera images are blended in by the XR compositor. +指定 XR 应如何融入环境。这是特定于某些 AR 和直通设备的,其中相机图像由 XR 合成器混合。 .. rst-class:: classref-item-separator @@ -405,8 +405,8 @@ Specify how XR should blend in the environment. This is specific to certain AR a .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_XRInterface_method_get_camera_feed_id: @@ -706,10 +706,10 @@ void **uninitialize** **(** **)** 关闭接口。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_xrinterfaceextension.rst b/classes/zh_CN/class_xrinterfaceextension.rst index 6a1e92f926..aaa22e2b4c 100644 --- a/classes/zh_CN/class_xrinterfaceextension.rst +++ b/classes/zh_CN/class_xrinterfaceextension.rst @@ -10,94 +10,94 @@ XRInterfaceExtension ==================== -**Inherits:** :ref:`XRInterface` **<** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`XRInterface` **<** :ref:`RefCounted` **<** :ref:`Object` XR 接口扩展(插件)的基类。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 外部 XR 接口插件应继承自这个类。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`XR 文档索引 <../tutorials/xr/index>` .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_end_frame` **(** **)** |virtual| | + | void | :ref:`_end_frame` **(** **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_get_anchor_detection_is_enabled` **(** **)** |virtual| |const| | + | :ref:`bool` | :ref:`_get_anchor_detection_is_enabled` **(** **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_camera_feed_id` **(** **)** |virtual| |const| | + | :ref:`int` | :ref:`_get_camera_feed_id` **(** **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`_get_camera_transform` **(** **)** |virtual| | + | :ref:`Transform3D` | :ref:`_get_camera_transform` **(** **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_capabilities` **(** **)** |virtual| |const| | + | :ref:`int` | :ref:`_get_capabilities` **(** **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_get_color_texture` **(** **)** |virtual| | + | :ref:`RID` | :ref:`_get_color_texture` **(** **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_get_depth_texture` **(** **)** |virtual| | + | :ref:`RID` | :ref:`_get_depth_texture` **(** **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`_get_name` **(** **)** |virtual| |const| | + | :ref:`StringName` | :ref:`_get_name` **(** **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector3Array` | :ref:`_get_play_area` **(** **)** |virtual| |const| | + | :ref:`PackedVector3Array` | :ref:`_get_play_area` **(** **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PlayAreaMode` | :ref:`_get_play_area_mode` **(** **)** |virtual| |const| | + | :ref:`PlayAreaMode` | :ref:`_get_play_area_mode` **(** **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat64Array` | :ref:`_get_projection_for_view` **(** :ref:`int` view, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far **)** |virtual| | + | :ref:`PackedFloat64Array` | :ref:`_get_projection_for_view` **(** :ref:`int` view, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`_get_render_target_size` **(** **)** |virtual| | + | :ref:`Vector2` | :ref:`_get_render_target_size` **(** **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_suggested_pose_names` **(** :ref:`StringName` tracker_name **)** |virtual| |const| | + | :ref:`PackedStringArray` | :ref:`_get_suggested_pose_names` **(** :ref:`StringName` tracker_name **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_suggested_tracker_names` **(** **)** |virtual| |const| | + | :ref:`PackedStringArray` | :ref:`_get_suggested_tracker_names` **(** **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`_get_system_info` **(** **)** |virtual| |const| | + | :ref:`Dictionary` | :ref:`_get_system_info` **(** **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`TrackingStatus` | :ref:`_get_tracking_status` **(** **)** |virtual| |const| | + | :ref:`TrackingStatus` | :ref:`_get_tracking_status` **(** **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform3D` | :ref:`_get_transform_for_view` **(** :ref:`int` view, :ref:`Transform3D` cam_transform **)** |virtual| | + | :ref:`Transform3D` | :ref:`_get_transform_for_view` **(** :ref:`int` view, :ref:`Transform3D` cam_transform **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_get_velocity_texture` **(** **)** |virtual| | + | :ref:`RID` | :ref:`_get_velocity_texture` **(** **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_view_count` **(** **)** |virtual| | + | :ref:`int` | :ref:`_get_view_count` **(** **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`_get_vrs_texture` **(** **)** |virtual| | + | :ref:`RID` | :ref:`_get_vrs_texture` **(** **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_initialize` **(** **)** |virtual| | + | :ref:`bool` | :ref:`_initialize` **(** **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_initialized` **(** **)** |virtual| |const| | + | :ref:`bool` | :ref:`_is_initialized` **(** **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_post_draw_viewport` **(** :ref:`RID` render_target, :ref:`Rect2` screen_rect **)** |virtual| | + | void | :ref:`_post_draw_viewport` **(** :ref:`RID` render_target, :ref:`Rect2` screen_rect **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_pre_draw_viewport` **(** :ref:`RID` render_target **)** |virtual| | + | :ref:`bool` | :ref:`_pre_draw_viewport` **(** :ref:`RID` render_target **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_pre_render` **(** **)** |virtual| | + | void | :ref:`_pre_render` **(** **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_process` **(** **)** |virtual| | + | void | :ref:`_process` **(** **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_set_anchor_detection_is_enabled` **(** :ref:`bool` enabled **)** |virtual| | + | void | :ref:`_set_anchor_detection_is_enabled` **(** :ref:`bool` enabled **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_set_play_area_mode` **(** :ref:`PlayAreaMode` mode **)** |virtual| |const| | + | :ref:`bool` | :ref:`_set_play_area_mode` **(** :ref:`PlayAreaMode` mode **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_supports_play_area_mode` **(** :ref:`PlayAreaMode` mode **)** |virtual| |const| | + | :ref:`bool` | :ref:`_supports_play_area_mode` **(** :ref:`PlayAreaMode` mode **)** |virtual| |const| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_trigger_haptic_pulse` **(** :ref:`String` action_name, :ref:`StringName` tracker_name, :ref:`float` frequency, :ref:`float` amplitude, :ref:`float` duration_sec, :ref:`float` delay_sec **)** |virtual| | + | void | :ref:`_trigger_haptic_pulse` **(** :ref:`String` action_name, :ref:`StringName` tracker_name, :ref:`float` frequency, :ref:`float` amplitude, :ref:`float` duration_sec, :ref:`float` delay_sec **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_uninitialize` **(** **)** |virtual| | + | void | :ref:`_uninitialize` **(** **)** |virtual| | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_blit` **(** :ref:`RID` render_target, :ref:`Rect2` src_rect, :ref:`Rect2i` dst_rect, :ref:`bool` use_layer, :ref:`int` layer, :ref:`bool` apply_lens_distortion, :ref:`Vector2` eye_center, :ref:`float` k1, :ref:`float` k2, :ref:`float` upscale, :ref:`float` aspect_ratio **)** | +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -116,10 +116,10 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- -.. _class_XRInterfaceExtension_method__end_frame: +.. _class_XRInterfaceExtension_private_method__end_frame: .. rst-class:: classref-method @@ -131,7 +131,7 @@ void **_end_frame** **(** **)** |virtual| ---- -.. _class_XRInterfaceExtension_method__get_anchor_detection_is_enabled: +.. _class_XRInterfaceExtension_private_method__get_anchor_detection_is_enabled: .. rst-class:: classref-method @@ -143,7 +143,7 @@ void **_end_frame** **(** **)** |virtual| ---- -.. _class_XRInterfaceExtension_method__get_camera_feed_id: +.. _class_XRInterfaceExtension_private_method__get_camera_feed_id: .. rst-class:: classref-method @@ -155,7 +155,7 @@ void **_end_frame** **(** **)** |virtual| ---- -.. _class_XRInterfaceExtension_method__get_camera_transform: +.. _class_XRInterfaceExtension_private_method__get_camera_transform: .. rst-class:: classref-method @@ -167,7 +167,7 @@ void **_end_frame** **(** **)** |virtual| ---- -.. _class_XRInterfaceExtension_method__get_capabilities: +.. _class_XRInterfaceExtension_private_method__get_capabilities: .. rst-class:: classref-method @@ -179,7 +179,7 @@ void **_end_frame** **(** **)** |virtual| ---- -.. _class_XRInterfaceExtension_method__get_color_texture: +.. _class_XRInterfaceExtension_private_method__get_color_texture: .. rst-class:: classref-method @@ -191,7 +191,7 @@ void **_end_frame** **(** **)** |virtual| ---- -.. _class_XRInterfaceExtension_method__get_depth_texture: +.. _class_XRInterfaceExtension_private_method__get_depth_texture: .. rst-class:: classref-method @@ -203,7 +203,7 @@ void **_end_frame** **(** **)** |virtual| ---- -.. _class_XRInterfaceExtension_method__get_name: +.. _class_XRInterfaceExtension_private_method__get_name: .. rst-class:: classref-method @@ -215,7 +215,7 @@ void **_end_frame** **(** **)** |virtual| ---- -.. _class_XRInterfaceExtension_method__get_play_area: +.. _class_XRInterfaceExtension_private_method__get_play_area: .. rst-class:: classref-method @@ -227,7 +227,7 @@ void **_end_frame** **(** **)** |virtual| ---- -.. _class_XRInterfaceExtension_method__get_play_area_mode: +.. _class_XRInterfaceExtension_private_method__get_play_area_mode: .. rst-class:: classref-method @@ -239,7 +239,7 @@ void **_end_frame** **(** **)** |virtual| ---- -.. _class_XRInterfaceExtension_method__get_projection_for_view: +.. _class_XRInterfaceExtension_private_method__get_projection_for_view: .. rst-class:: classref-method @@ -251,7 +251,7 @@ void **_end_frame** **(** **)** |virtual| ---- -.. _class_XRInterfaceExtension_method__get_render_target_size: +.. _class_XRInterfaceExtension_private_method__get_render_target_size: .. rst-class:: classref-method @@ -263,7 +263,7 @@ void **_end_frame** **(** **)** |virtual| ---- -.. _class_XRInterfaceExtension_method__get_suggested_pose_names: +.. _class_XRInterfaceExtension_private_method__get_suggested_pose_names: .. rst-class:: classref-method @@ -275,7 +275,7 @@ void **_end_frame** **(** **)** |virtual| ---- -.. _class_XRInterfaceExtension_method__get_suggested_tracker_names: +.. _class_XRInterfaceExtension_private_method__get_suggested_tracker_names: .. rst-class:: classref-method @@ -287,19 +287,19 @@ void **_end_frame** **(** **)** |virtual| ---- -.. _class_XRInterfaceExtension_method__get_system_info: +.. _class_XRInterfaceExtension_private_method__get_system_info: .. rst-class:: classref-method :ref:`Dictionary` **_get_system_info** **(** **)** |virtual| |const| -Returns a :ref:`Dictionary` with system information related to this interface. +返回包含与这个接口相关的系统信息的 :ref:`Dictionary`\ 。 .. rst-class:: classref-item-separator ---- -.. _class_XRInterfaceExtension_method__get_tracking_status: +.. _class_XRInterfaceExtension_private_method__get_tracking_status: .. rst-class:: classref-method @@ -311,7 +311,7 @@ Returns a :ref:`Dictionary` with system information related to ---- -.. _class_XRInterfaceExtension_method__get_transform_for_view: +.. _class_XRInterfaceExtension_private_method__get_transform_for_view: .. rst-class:: classref-method @@ -323,7 +323,7 @@ Returns a :ref:`Dictionary` with system information related to ---- -.. _class_XRInterfaceExtension_method__get_velocity_texture: +.. _class_XRInterfaceExtension_private_method__get_velocity_texture: .. rst-class:: classref-method @@ -335,7 +335,7 @@ Returns a :ref:`Dictionary` with system information related to ---- -.. _class_XRInterfaceExtension_method__get_view_count: +.. _class_XRInterfaceExtension_private_method__get_view_count: .. rst-class:: classref-method @@ -347,7 +347,7 @@ Returns a :ref:`Dictionary` with system information related to ---- -.. _class_XRInterfaceExtension_method__get_vrs_texture: +.. _class_XRInterfaceExtension_private_method__get_vrs_texture: .. rst-class:: classref-method @@ -355,13 +355,13 @@ Returns a :ref:`Dictionary` with system information related to .. container:: contribute - There is currently no description for this method. Please help us by :ref:`contributing one `! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator ---- -.. _class_XRInterfaceExtension_method__initialize: +.. _class_XRInterfaceExtension_private_method__initialize: .. rst-class:: classref-method @@ -373,7 +373,7 @@ Returns a :ref:`Dictionary` with system information related to ---- -.. _class_XRInterfaceExtension_method__is_initialized: +.. _class_XRInterfaceExtension_private_method__is_initialized: .. rst-class:: classref-method @@ -385,7 +385,7 @@ Returns a :ref:`Dictionary` with system information related to ---- -.. _class_XRInterfaceExtension_method__post_draw_viewport: +.. _class_XRInterfaceExtension_private_method__post_draw_viewport: .. rst-class:: classref-method @@ -397,7 +397,7 @@ void **_post_draw_viewport** **(** :ref:`RID` render_target, :ref:`Re ---- -.. _class_XRInterfaceExtension_method__pre_draw_viewport: +.. _class_XRInterfaceExtension_private_method__pre_draw_viewport: .. rst-class:: classref-method @@ -409,7 +409,7 @@ void **_post_draw_viewport** **(** :ref:`RID` render_target, :ref:`Re ---- -.. _class_XRInterfaceExtension_method__pre_render: +.. _class_XRInterfaceExtension_private_method__pre_render: .. rst-class:: classref-method @@ -421,7 +421,7 @@ void **_pre_render** **(** **)** |virtual| ---- -.. _class_XRInterfaceExtension_method__process: +.. _class_XRInterfaceExtension_private_method__process: .. rst-class:: classref-method @@ -433,7 +433,7 @@ void **_process** **(** **)** |virtual| ---- -.. _class_XRInterfaceExtension_method__set_anchor_detection_is_enabled: +.. _class_XRInterfaceExtension_private_method__set_anchor_detection_is_enabled: .. rst-class:: classref-method @@ -445,7 +445,7 @@ void **_set_anchor_detection_is_enabled** **(** :ref:`bool` enabled ---- -.. _class_XRInterfaceExtension_method__set_play_area_mode: +.. _class_XRInterfaceExtension_private_method__set_play_area_mode: .. rst-class:: classref-method @@ -457,7 +457,7 @@ void **_set_anchor_detection_is_enabled** **(** :ref:`bool` enabled ---- -.. _class_XRInterfaceExtension_method__supports_play_area_mode: +.. _class_XRInterfaceExtension_private_method__supports_play_area_mode: .. rst-class:: classref-method @@ -469,7 +469,7 @@ void **_set_anchor_detection_is_enabled** **(** :ref:`bool` enabled ---- -.. _class_XRInterfaceExtension_method__trigger_haptic_pulse: +.. _class_XRInterfaceExtension_private_method__trigger_haptic_pulse: .. rst-class:: classref-method @@ -481,7 +481,7 @@ void **_trigger_haptic_pulse** **(** :ref:`String` action_name, :r ---- -.. _class_XRInterfaceExtension_method__uninitialize: +.. _class_XRInterfaceExtension_private_method__uninitialize: .. rst-class:: classref-method @@ -513,7 +513,7 @@ void **add_blit** **(** :ref:`RID` render_target, :ref:`Rect2`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -527,7 +527,7 @@ void **add_blit** **(** :ref:`RID` render_target, :ref:`Rect2`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! .. rst-class:: classref-item-separator @@ -553,12 +553,12 @@ void **add_blit** **(** :ref:`RID` render_target, :ref:`Rect2`! + 目前没有这个方法的描述。请帮我们\ :ref:`贡献一个 `\ ! -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_xrnode3d.rst b/classes/zh_CN/class_xrnode3d.rst index ca162dcc40..f11a00f8ec 100644 --- a/classes/zh_CN/class_xrnode3d.rst +++ b/classes/zh_CN/class_xrnode3d.rst @@ -10,30 +10,30 @@ XRNode3D ======== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`XRAnchor3D`, :ref:`XRController3D` +**派生:** :ref:`XRAnchor3D`, :ref:`XRController3D` 空间节点,位置由 :ref:`XRServer` 自动更新。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这个节点可以绑定到 :ref:`XRPositionalTracker` 的某个姿势,\ :ref:`XRServer` 会自动更新其 :ref:`Node3D.transform`\ 。这类节点必须添加为 :ref:`XROrigin3D` 节点的子节点。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`XR 文档索引 <../tutorials/xr/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +46,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -68,8 +68,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_XRNode3D_signal_tracking_changed: @@ -77,7 +77,7 @@ Signals **tracking_changed** **(** :ref:`bool` tracking **)** -Emitted when the :ref:`tracker` starts or stops receiving updated tracking data for the :ref:`pose` being tracked. The ``tracking`` argument indicates whether the tracker is getting updated tracking data. +当 :ref:`tracker` 开始或停止接收正被跟踪的 :ref:`pose` 的更新跟踪数据时发出。\ ``tracking`` 参数指示跟踪器是否正在获取更新的跟踪数据。 .. rst-class:: classref-section-separator @@ -85,8 +85,8 @@ Emitted when the :ref:`tracker` starts or stops .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_XRNode3D_property_pose: @@ -128,8 +128,8 @@ Godot 定义了许多标准跟踪器,例如 ``left_hand`` 和 ``right_hand``\ .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_XRNode3D_method_get_has_tracking_data: @@ -177,10 +177,10 @@ void **trigger_haptic_pulse** **(** :ref:`String` action_name, :re \ ``action_name`` 是该脉冲的动作名称。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_xrorigin3d.rst b/classes/zh_CN/class_xrorigin3d.rst index 5c27690308..1936c0a44a 100644 --- a/classes/zh_CN/class_xrorigin3d.rst +++ b/classes/zh_CN/class_xrorigin3d.rst @@ -10,14 +10,14 @@ XROrigin3D ========== -**Inherits:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` +**继承:** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` AR/VR 的原点。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 这是 AR/VR 系统中的一个特殊节点,会将我们跟踪空间中心的物理位置映射到游戏世界中的虚拟位置。 @@ -29,15 +29,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`XR 文档索引 <../tutorials/xr/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Properties .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_XROrigin3D_property_current: @@ -89,10 +89,10 @@ Property Descriptions \ **注意:**\ 这种方法是对 :ref:`XRServer` 本身的直接调用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_xrpose.rst b/classes/zh_CN/class_xrpose.rst index fbdb09f49e..558d4717cd 100644 --- a/classes/zh_CN/class_xrpose.rst +++ b/classes/zh_CN/class_xrpose.rst @@ -10,14 +10,14 @@ XRPose ====== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 这个对象包含了跟踪对象姿势相关的所有数据。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- XR 运行时通常可以识别设备上的多个位置,例如空间跟踪的控制器。 @@ -25,15 +25,15 @@ XR 运行时会为每个姿势都提供朝向、位置、线速度和角速度 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`XR 文档索引 <../tutorials/xr/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -70,8 +70,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_XRPose_TrackingConfidence: @@ -109,8 +109,8 @@ enum **TrackingConfidence**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_XRPose_property_angular_velocity: @@ -224,8 +224,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_XRPose_method_get_adjusted_transform: @@ -235,10 +235,10 @@ Method Descriptions 返回受到世界缩放和我们参考系影响的 :ref:`transform`\ 。这是用于放置 :ref:`XRNode3D` 对象的变换。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_xrpositionaltracker.rst b/classes/zh_CN/class_xrpositionaltracker.rst index 61ed22a196..64488b92f9 100644 --- a/classes/zh_CN/class_xrpositionaltracker.rst +++ b/classes/zh_CN/class_xrpositionaltracker.rst @@ -10,14 +10,14 @@ XRPositionalTracker =================== -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 追踪对象。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 此对象的一个实例,表示一个被追踪的设备,例如一个控制器或锚点。HMD 没有在此处表示,因为它们是在内部处理的。 @@ -27,15 +27,15 @@ Description .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`XR 文档索引 <../tutorials/xr/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -54,8 +54,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -80,8 +80,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_XRPositionalTracker_signal_button_pressed: @@ -149,7 +149,7 @@ Signals **pose_lost_tracking** **(** :ref:`XRPose` pose **)** -Emitted when a pose tracked by this tracker stops getting updated tracking data. +当被该追踪器追踪的一个姿势停止获取更新的跟踪数据时发出。 .. rst-class:: classref-item-separator @@ -169,8 +169,8 @@ Emitted when a pose tracked by this tracker stops getting updated tracking data. .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_XRPositionalTracker_TrackerHand: @@ -208,8 +208,8 @@ enum **TrackerHand**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_XRPositionalTracker_property_description: @@ -302,8 +302,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_XRPositionalTracker_method_get_input: @@ -373,10 +373,10 @@ void **set_pose** **(** :ref:`StringName` name, :ref:`Transfor 设置给定姿势的变换、线速度、角速度和追踪置信度。此方法由一个 :ref:`XRInterface` 实现调用,不应直接使用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_xrserver.rst b/classes/zh_CN/class_xrserver.rst index 119aace053..5de0df964f 100644 --- a/classes/zh_CN/class_xrserver.rst +++ b/classes/zh_CN/class_xrserver.rst @@ -10,28 +10,28 @@ XRServer ======== -**Inherits:** :ref:`Object` +**继承:** :ref:`Object` 用于 AR 和 VR 功能的服务。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- AR/VR 服务器是我们“高级虚拟现实”解决方案的核心,负责执行所有处理。 .. rst-class:: classref-introduction-group -Tutorials ---------- +教程 +---- - :doc:`XR 文档索引 <../tutorials/xr/index>` .. rst-class:: classref-reftable-group -Properties ----------- +属性 +---- .. table:: :widths: auto @@ -46,8 +46,8 @@ Properties .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -86,8 +86,8 @@ Methods .. rst-class:: classref-descriptions-group -Signals -------- +信号 +---- .. _class_XRServer_signal_interface_added: @@ -151,8 +151,8 @@ Signals .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_XRServer_TrackerType: @@ -256,8 +256,8 @@ enum **RotationMode**: .. rst-class:: classref-descriptions-group -Property Descriptions ---------------------- +属性说明 +-------- .. _class_XRServer_property_primary_interface: @@ -314,8 +314,8 @@ Property Descriptions .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_XRServer_method_add_interface: @@ -479,10 +479,10 @@ void **remove_tracker** **(** :ref:`XRPositionalTracker` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 允许创建 zip 文件。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该类实现了一个写入器,可以将多个 blob 存储在一个压缩文件中。 @@ -37,8 +37,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -61,8 +61,8 @@ Methods .. rst-class:: classref-descriptions-group -Enumerations ------------- +枚举 +---- .. _enum_ZIPPacker_ZipAppend: @@ -100,8 +100,8 @@ enum **ZipAppend**: .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ZIPPacker_method_close: @@ -167,10 +167,10 @@ Method Descriptions 需要在 :ref:`start_file` 之后调用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/class_zipreader.rst b/classes/zh_CN/class_zipreader.rst index 82d789d605..2f6c42e9a8 100644 --- a/classes/zh_CN/class_zipreader.rst +++ b/classes/zh_CN/class_zipreader.rst @@ -10,14 +10,14 @@ ZIPReader ========= -**Inherits:** :ref:`RefCounted` **<** :ref:`Object` +**继承:** :ref:`RefCounted` **<** :ref:`Object` 允许读取 zip 文件的内容。 .. rst-class:: classref-introduction-group -Description ------------ +描述 +---- 该类实现了一个可以提取 zip 存档中各个文件内容的读取器。 @@ -34,8 +34,8 @@ Description .. rst-class:: classref-reftable-group -Methods -------- +方法 +---- .. table:: :widths: auto @@ -58,8 +58,8 @@ Methods .. rst-class:: classref-descriptions-group -Method Descriptions -------------------- +方法说明 +-------- .. _class_ZIPReader_method_close: @@ -79,9 +79,9 @@ Method Descriptions :ref:`bool` **file_exists** **(** :ref:`String` path, :ref:`bool` case_sensitive=true **)** -Returns ``true`` if the file exists in the loaded zip archive. +如果加载的 zip 存档中存在对应的文件,则返回 ``true``\ 。 -Must be called after :ref:`open`. +必须在 :ref:`open` 之后调用。 .. rst-class:: classref-item-separator @@ -123,10 +123,10 @@ Must be called after :ref:`open`. 必须在 :ref:`open` 之后调用。 -.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` -.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` -.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` -.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` -.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` -.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` -.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |virtual| replace:: :abbr:`virtual (本方法通常需要用户覆盖才能生效。)` +.. |const| replace:: :abbr:`const (本方法没有副作用。不会修改该实例的任何成员变量。)` +.. |vararg| replace:: :abbr:`vararg (本方法除了在此处描述的参数外,还能够继续接受任意数量的参数。)` +.. |constructor| replace:: :abbr:`constructor (本方法用于构造某个类型。)` +.. |static| replace:: :abbr:`static (调用本方法无需实例,所以可以直接使用类名调用。)` +.. |operator| replace:: :abbr:`operator (本方法描述的是使用本类型作为左操作数的有效操作符。)` +.. |bitfield| replace:: :abbr:`BitField (这个值是由下列标志构成的位掩码整数。)` diff --git a/classes/zh_CN/index.rst b/classes/zh_CN/index.rst index 55cf6ffd23..261cabcd54 100644 --- a/classes/zh_CN/index.rst +++ b/classes/zh_CN/index.rst @@ -1,4 +1,5 @@ :github_url: hide +:allow_comments: False .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. @@ -32,6 +33,7 @@ Nodes class_animatablebody3d class_animatedsprite2d class_animatedsprite3d + class_animationmixer class_animationplayer class_animationtree class_area2d @@ -263,8 +265,8 @@ Nodes class_xrnode3d class_xrorigin3d -Resources -========= +资源 +== .. toctree:: :maxdepth: 1 @@ -438,6 +440,7 @@ Resources class_missingresource class_multimesh class_navigationmesh + class_navigationmeshsourcegeometrydata2d class_navigationmeshsourcegeometrydata3d class_navigationpolygon class_noise