2025-05-18 01:04:31 +08:00

119 lines
2.3 KiB
C#

// ***********************************************************************
// Assembly : Unity
// Author :
// Created :
// 代码规范
// Last Modified By :
// Last Modified On :
// ***********************************************************************
// <copyright file= "Example" company="DefaultCompany"></copyright>
// <summary></summary>
// ***********************************************************************
/*
namespace N
{
using System;
using UnityEngine;
/// <summary>
/// Pascal 命名
/// </summary>
public enum TestEnum
{
None,
}
[Flags]
public enum TestEnumF
{
None,
}
/// <summary>
/// Pascal 命名
/// </summary>
public delegate void Testdelegate();
/// <summary>
/// 接口 I开头 Pascal 命名
/// </summary>
public interface IInterface
{
void Test();
}
/// <summary>
/// 类名 Pascal 命名
/// </summary>
public class Example : MonoBehaviour, IInterface
{
public const int CONST_KEY = 0; //常量全部大写
public static event Testdelegate TestAction;// 静态公开变量 Pascal 命名
private static int _StaticInt = 0; // 静态私变量 下划线 _Pascal 命名
/// <summary>
/// 静态变量 Pascal 命名
/// </summary>
public static int StaticInt
{
get;
set;
}
/// <summary>
/// 公开成员变量 camel 命名
/// </summary>
public int publicField;
/// <summary>
/// 私有成员变量 下划线 _camel 命名
/// </summary>
private int _privateField;
/// <summary>
/// /// <summary>
/// 属性 camel 命名
/// </summary>
public int property
{
get;
set;
}
/// <summary>
/// 方法 Pascal 命名
/// </summary>
public void Method()
{
var tmp = 0;
if (tmp == 0)
{
}
switch (tmp)
{
case 0:
break;
default:
break;
}
}
/// <summary>
/// 响应事件
/// </summary>
internal void OnMouseEnter()
{
}
public void Test()
{
throw new NotImplementedException();
}
}
}
*/