【镜头】增加选中单位镜头自动居中
parent
1e5f5e157b
commit
04756b7bf6
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,6 @@
|
|||
using Gameplay.Level.Select;
|
||||
using Gameplay.Unit;
|
||||
using PhxhSDK;
|
||||
|
||||
namespace Gameplay.Level
|
||||
{
|
||||
|
|
@ -22,6 +23,12 @@ namespace Gameplay.Level
|
|||
UnSelectUnit();
|
||||
newUnit.OnSelect();
|
||||
selectView.SetOwner(newUnit);
|
||||
|
||||
// 居中镜头
|
||||
if (LevelManager.Instance.CurrentLevel.isInBattle)
|
||||
{
|
||||
CameraManager.Instance.MainCamera.GetComponent<CameraController>().KeepCenter(newUnit.transform.position);
|
||||
}
|
||||
}
|
||||
|
||||
public void SelectUnit(uint id)
|
||||
|
|
|
|||
Loading…
Reference in New Issue