c#代码
木马吖
这个作者很懒,什么都没留下…
展开
-
学习过程中简单状态机
状态机. using System.Collections; using System.Collections.Generic; using UnityEngine; public enum PersonState { EatMeal, Work, Sleep, Chat } public class StateTest : MonoBehaviour { //当前帧的状态 public Pers...原创 2019-01-26 12:12:57 · 133 阅读 · 0 评论 -
简单工厂 抽象工厂
简单工厂例子和抽象工厂 using System.Collections; using System.Collections.Generic; using UnityEngine; public class SimpleFactoryTest : MonoBehaviour { // Use this for initialization void Start () { //简单工厂模式 ...原创 2019-01-26 12:14:28 · 82 阅读 · 1 评论 -
对象池简单实例
对象池 using System.Collections; using System.Collections.Generic; using UnityEngine; public class ObjectPool : MonoBehaviour { //monster的模板 public GameObject mMonster; //monster的对象池 private Stack monste...原创 2019-01-26 12:15:11 · 141 阅读 · 0 评论 -
数据结构链表的常用操作
链表常用操作 using System; namespace 链表 { //一般链表都是有头部节点的 简称为头结点 头结点不参与运算 public class LinkList { private Node _head; private int _count; public LinkList() { _head = new Node(); ...原创 2019-01-26 12:17:10 · 76 阅读 · 0 评论