(client)chore:修改了摄像机的跟踪方式,摄像机控制不再使用单例
This commit is contained in:
@ -110,14 +110,6 @@ namespace Entity
|
||||
result.Add(("结束操控", EndControl));
|
||||
else
|
||||
result.Add(("手动操控", StartControl));
|
||||
if (CameraControl.CameraControl.Instance.focusedEntity == entity)
|
||||
{
|
||||
result.Add(("取消跟随", ()=>CameraControl.CameraControl.Instance.focusedEntity=null));
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Add(("视角跟随", ()=>CameraControl.CameraControl.Instance.focusedEntity=entity));
|
||||
}
|
||||
result.Add(("杀死", () => entity.Kill()));
|
||||
result.Add(("变成笨蛋", BecomeDefault));
|
||||
return result;
|
||||
@ -132,13 +124,11 @@ namespace Entity
|
||||
private void StartControl()
|
||||
{
|
||||
entity.PlayerControlled = true;
|
||||
CameraControl.CameraControl.Instance.focusedEntity=entity;
|
||||
}
|
||||
|
||||
private void EndControl()
|
||||
{
|
||||
entity.PlayerControlled = false;
|
||||
CameraControl.CameraControl.Instance.focusedEntity=null;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user