├── LICENSE └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 liangxiegame 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #### ProgramingStyle 2 | 3 | ~~~c# 4 | /**************************************************************************** 5 | * Copyright (c) 2017 liangxieq (填写自己的 github id/或者昵称) 6 | * Copyright (c) 2018.5 karsion (要注明最后维护者) 7 | 8 | * https://github.com/liangxiegame/QCSharpStyleGuide (git 地址要注明) 9 | * http://liangxiegame.com (当然也可以署上自己的博客) 10 | * 11 | * Permission is hereby granted, free of charge, to any person obtaining a copy 12 | * of this software and associated documentation files (the "Software"), to deal 13 | * in the Software without restriction, including without limitation the rights 14 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | * copies of the Software, and to permit persons to whom the Software is 16 | * furnished to do so, subject to the following conditions: 17 | * 18 | * The above copyright notice and this permission notice shall be included in 19 | * all copies or substantial portions of the Software. 20 | * 21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | * THE SOFTWARE. 28 | ****************************************************************************/ 29 | 30 | 31 | namespace QFramework.Example 32 | { 33 | using UnityEngine; 34 | using UnityEngine.UI; 35 | using System.Collections; 36 | using System.Collections.Generic; 37 | 38 | /// 39 | /// 展示编码风格 40 | /// 41 | public class ProgrammingStyle : MonoBehaviour 42 | { 43 | #region Basic App 44 | /// 45 | /// 私有成员变量不做限制 46 | /// 47 | [SerializeField] Button mBtnEnterMainPage; 48 | 49 | /// 50 | /// public类型使用首字母大写驼峰式 51 | /// 52 | public int LastIndex = 0; 53 | 54 | /// 55 | /// public 类型属性也算public类型变量 56 | /// 57 | public int CurSelectIndex 58 | { 59 | get { return mCurSelectIndex; } 60 | } 61 | 62 | void Start () 63 | { 64 | mBtnEnterMainPage = transform.Find ("BtnEnterMainPage").GetComponent