// using Cinemachine; // using Entitas.CodeGeneration.Attributes; // using UnityEngine; // // namespace CoreGame.Render // { // [Combat, Unique] // public class VirtualCameraProxy : ProxyBase // { // public CinemachineVirtualCamera virtualCamera; // public CinemachineBrain brain; // private Transform m_Target; // // internal Vector3 followPos; // internal bool hasSynced; // private Vector3 m_CachePos; // // // todo 需要加绑点 // protected override void Initialize(GameObject go, CombatEntity ent) // { // this.virtualCamera = go.GetComponentsInChildren()[0]; // brain = Camera.main.gameObject.GetComponent(); // hasSynced = false; // // virtualCamera.m_Lens.OrthographicSize = 8.5f; //调整相机大小 // m_CachePos = brain.OutputCamera.transform.position; // var componentsInChildren = go.GetComponentsInChildren(); // for (int i = 0; i < componentsInChildren.Length; i++) // { // if (componentsInChildren[i].name == "Folloe") // { // virtualCamera.Follow = componentsInChildren[i]; // m_Target = componentsInChildren[i]; // break; // } // } // brain.ManualUpdate(); // // } // // public void Sync() // { // // m_Target.position = followPos; // // brain.ManualUpdate(); // brain.OutputCamera.transform.position = new Vector3(followPos.x, followPos.y, m_CachePos.z); // hasSynced = true; // } // } // }