{"id":16204365,"url":"https://github.com/liangxiegame/qcsharpstyleguide","last_synced_at":"2025-07-14T12:35:14.846Z","repository":{"id":38375674,"uuid":"103025733","full_name":"liangxiegame/QCSharpStyleGuide","owner":"liangxiegame","description":null,"archived":false,"fork":false,"pushed_at":"2018-05-25T08:04:38.000Z","size":4,"stargazers_count":45,"open_issues_count":0,"forks_count":14,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-03T00:11:30.555Z","etag":null,"topics":["csharp","unity","unity3d"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/liangxiegame.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-10T11:58:06.000Z","updated_at":"2025-03-18T11:34:56.000Z","dependencies_parsed_at":"2022-08-25T02:11:41.237Z","dependency_job_id":null,"html_url":"https://github.com/liangxiegame/QCSharpStyleGuide","commit_stats":null,"previous_names":["liangxiegame/qcsharpstyleguide"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/liangxiegame/QCSharpStyleGuide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangxiegame%2FQCSharpStyleGuide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangxiegame%2FQCSharpStyleGuide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangxiegame%2FQCSharpStyleGuide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangxiegame%2FQCSharpStyleGuide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liangxiegame","download_url":"https://codeload.github.com/liangxiegame/QCSharpStyleGuide/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangxiegame%2FQCSharpStyleGuide/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265292693,"owners_count":23742126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","unity","unity3d"],"created_at":"2024-10-10T09:58:04.974Z","updated_at":"2025-07-14T12:35:14.816Z","avatar_url":"https://github.com/liangxiegame.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"#### ProgramingStyle\n\n~~~c#\n/****************************************************************************\n * Copyright (c) 2017 liangxieq （填写自己的 github id/或者昵称)\n * Copyright (c) 2018.5 karsion  (要注明最后维护者)\n \n * https://github.com/liangxiegame/QCSharpStyleGuide  (git 地址要注明)\n * http://liangxiegame.com (当然也可以署上自己的博客)\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n ****************************************************************************/\n \n\nnamespace QFramework.Example \n{\t\n\tusing UnityEngine;\n\tusing UnityEngine.UI;\n\tusing System.Collections;\n\tusing System.Collections.Generic;\n\t\n\t/// \u003csummary\u003e\n\t/// 展示编码风格\n\t/// \u003c/summary\u003e\n\tpublic class ProgrammingStyle : MonoBehaviour \n\t{\n\t\t#region Basic App\n\t\t/// \u003csummary\u003e\n\t\t/// 私有成员变量不做限制\n\t\t/// \u003c/summary\u003e\n\t\t[SerializeField] Button mBtnEnterMainPage;\n\n\t\t/// \u003csummary\u003e\n\t\t/// public类型使用首字母大写驼峰式\n\t\t/// \u003c/summary\u003e\n\t\tpublic int LastIndex = 0;\n\n\t\t/// \u003csummary\u003e\n\t\t/// public 类型属性也算public类型变量\n\t\t/// \u003c/summary\u003e\n\t\tpublic int CurSelectIndex \n\t\t{\n\t\t\tget { return mCurSelectIndex; }\n\t\t}\n\n\t\tvoid Start () \n\t\t{\n\t\t\tmBtnEnterMainPage = transform.Find (\"BtnEnterMainPage\").GetComponent\u003cButton\u003e();\n\n\t\t\t// GameObject命名\n\t\t\t// 临时变量命名采用首字母小写驼峰式\n\t\t\tGameObject firstPosGo = transform.Find (\"FirstPosGo\").gameObject;\n\t\t}\n\n\t\t/// \u003csummary\u003e\n\t\t/// 方法名一律首字母大写驼峰式\n\t\t/// \u003c/summary\u003e\n\t\tpublic void Hide() \n\t\t{\n\t\t\tgameObject.SetActive (false);\n\t\t}\n\t\t#endregion\n\n\t\t#region Advanced\n\t\t/*\n\t\t * GameObject-\u003eGo\n\t\t * Transform-\u003eTrans\n\t\t * Button-\u003eBtn\n\t\t * \n\t\t * For-\u003e4\n\t\t * To-\u003e2\n\t\t * Dictionary-\u003eDict\n\t\t * Number-\u003eNum\n\t\t * Current-\u003eCur\n\t\t */\n\n\t\t/// \u003csummary\u003e\n\t\t/// 1.Bg肯定是图片\n\t\t/// \u003c/summary\u003e\n\t\t[SerializeField] Image mBg;\n\n\t\t/// \u003csummary\u003e\n\t\t/// GameObject-\u003eGo\n\t\t/// \u003c/summary\u003e\n\t\t[SerializeField] GameObject mDialogGo;\n\n\t\t/// \u003csummary\u003e\n\t\t/// Transfom-\u003eTrans\n\t\t/// \u003c/summary\u003e\n\t\t[SerializeField] Transform mScrollViewTrans;\n\n\t\t/// \u003csummary\u003e\n\t\t/// Index、Num、Count等肯定是int\n\t\t/// \u003c/summary\u003e\n\t\t[SerializeField] int mCurSelectIndex;\n\n\t\t/// \u003csummary\u003e\n\t\t/// RectTransform-\u003eRectTrans;\n\t\t/// \u003c/summary\u003e\n\t\t[SerializeField] RectTransform mScrollContentRectTrans;\n\n\t\t/// \u003csummary\u003e\n\t\t/// 1.Pos肯定是Vector3、Vector2\n\t\t/// 2.Size肯定是Vector2\n\t\t/// \u003c/summary\u003e\n\t\t[SerializeField] Vector3 mCachedPos;\n\t\t[SerializeField] Vector2 mCachedSize;\n\n\t\t/// \u003csummary\u003e\n\t\t/// 后缀s表示是个数组\n\t\t/// \u003c/summary\u003e\n\t\t[SerializeField] Vector3[] mCachedPositions;\n\n\t\t/// \u003csummary\u003e\n\t\t/// 1.List后缀\n\t\t/// 2.4-\u003efor 表示所属关系可以表示Dict\n\t\t/// 3.Dict后置\n\t\t/// \u003c/summary\u003e\n\t\t[SerializeField] List\u003cVector3\u003e mCachedPosList;\n\t\t[SerializeField] Dictionary\u003cstring,Vector3\u003e mPos4ChildName;\n\t\t[SerializeField] Dictionary\u003cstring,Vector3\u003e mChildPosDict;\n\t\t#endregion\n\t}\n}\n~~~\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliangxiegame%2Fqcsharpstyleguide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliangxiegame%2Fqcsharpstyleguide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliangxiegame%2Fqcsharpstyleguide/lists"}