示例#1
0
 /// <summary>
 /// 初始化地图碰撞体
 /// </summary>
 private void InitMapCollider(Vector2Int mapSize)
 {
     var(ColliderWidth, ColliderHeight) = MapMetrics.GetMapColliderSize(mapSize);
     this.MapCollider.size   = new Vector3(ColliderWidth, ColliderHeight, 0.1f);
     this.MapCollider.center = new Vector3(ColliderWidth * 0.5f - 0.5f, ColliderHeight * 0.5f - 0.5f);
 }