网演高层钦州
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

932 B

对外的监听消息,可以通过MessageDispatcher.SendMessage(MessageName.XXX.ToString());来实现对应功能
/// <summary>
/// 消息名称
/// </summary>
public enum MessageName {
/// <summary>
/// 小地图缩小
/// </summary>
MiniMapShrink,
/// <summary>
/// 小地图放大
/// </summary>
MiniMapEnlarge,
/// <summary>
/// 小地图缩放
/// </summary>
MiniMapZoom,
/// <summary>
/// 复位相机
/// </summary>
RestCamera,
/// <summary>
/// 小地图右键点击
/// </summary>
MiniMapRightClick

Inspector 可修改参数
//缩放速度
public float zoomSpeed = 10;
//相机最小值
public float zoomMin = 50;
//相机最大值
public float zoomMax = 300;
//当前相机大小
private float currentSize = 50;
//相机视野边界最大值
public Vector2 PosToWorldMax = new Vector2(700f,450);
//相机视野边界最小值
public Vector2 PosToWorldMin = new Vector2(-1700f,-1700);
}