合并代码
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class IDesignScaleCamera : UIInputDesignUnit {
|
||||
public readonly float Min = 0.1f;
|
||||
public readonly float Max = 4f;
|
||||
public override void ScrollWheel(DataUIMouseInput data) {
|
||||
float size = ViewCamera.scale + data.ScrollWheel;
|
||||
size = Mathf.Clamp(size, Min, Max);
|
||||
ViewCamera.scale = Mathf.Lerp(ViewCamera.scale, size, Time.deltaTime * 20);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user