http://gamasutra.com/blogs/VictorBarcelo/20131217/207204/Using_abstractions_and_interfaces_with_Unity3D.php Unity3D includes a component architecture paradigm. This allows us to attach code as classes that derive from MonoBehaviour to our GameObjects…
在使用A星算法和物体布局的过程中,常常会使用的网格的概念,即建立在网格的基础上,会使得游戏的相关编程变得简单的多. 格子的代码: using System.Collections; using System.Collections.Generic; using UnityEngine; [System.Serializable] public class Node { public Vector3 _worldPos;//格子中心点的位置 public int _gridX, _gridY;//…