public ICameraBehaviour SetCameraBehaviour(ICameraBehaviour cameraBehaviour) { if (current != null) { current.RemoveControl(); } cameraBehaviour.GrantControl(this); current = cameraBehaviour; return(current); }
private void InitCameraBehaviour() { ICameraBehaviour freeLook = gameObject.GetOrAddComponent <CameraFreeLook>(); m_CameraBehaviour.Add(freeLook); ICameraBehaviour lockLook = gameObject.GetOrAddComponent <CameraLockLook>(); m_CameraBehaviour.Add(lockLook); //ICameraBehaviour smartLook = gameObject.GetOrAddComponent<CameraSmartLook>(); //m_CameraBehaviour.Add(smartLook); SwitchCameraBehaviour(CameraBehaviourType.Default); }
//c-tor public CalculateCameraBehaviour(ICameraBehaviour strategy) { this.cameraStrategy = strategy; }
//c-tor public CalculateCameraBehaviour( ICameraBehaviour strategy) { this.cameraStrategy = strategy; }