命名空间:using System.Drawing; Graphics类:有道词典翻译 在C#里是封装一个 GDI+ 绘图图面,此类不能被继承. Pen类:定义用于绘制直线和曲线的对象. 此类不能被继承. Graphics g = new Graphics();创建画板对象 Pen p = new Pen();创建笔对象 Rectangle rec = new Rectangle(30,30,150,150);画矩形1 g.DrawRectangle(p,rec);画矩形2 g.DrawElli…
UnityEditor研究学习之自定义Editor 今天我们来研究下Unity3d中自定义Editor,这个会让物体的脚本在Inspector视窗中,产生不同的视觉效果. 什么意思,举个例子,比如游戏中我有个角色Player,他有攻击力,护甲,装备等属性. 所以我定义一个脚本:MyPlayer.cs: using UnityEngine; using System.Collections; public class MyPlayer : MonoBehaviour { public int ar…