< Summary

Class:DCL.Camera.CameraStateBase
Assembly:Camera
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/Camera/CameraStateBase.cs
Covered lines:7
Uncovered lines:4
Coverable lines:11
Total lines:39
Line coverage:63.6% (7 of 11)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Initialize(...)0%110100%
Cleanup()0%110100%
OnSelect()0%110100%
OnUnselect()0%110100%
OnUpdate()0%2100%
OnSetRotation(...)0%2100%
OnGetRotation()0%2100%
OnBlock(...)0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/Camera/CameraStateBase.cs

#LineLine coverage
 1using System;
 2using Cinemachine;
 3using DCL.Camera;
 4using UnityEngine;
 5
 6namespace DCL.Camera
 7{
 8    public class CameraStateBase : MonoBehaviour
 9    {
 10        public CinemachineVirtualCameraBase defaultVirtualCamera;
 11
 12        protected new UnityEngine.Camera camera;
 13        protected Transform cameraTransform;
 14        public CameraMode.ModeId cameraModeId;
 15
 16        public virtual void Initialize(UnityEngine.Camera camera)
 17        {
 179118            this.camera = camera;
 179119            this.cameraTransform = this.camera.transform;
 179120            gameObject.SetActive(false);
 179121        }
 22
 23        public virtual void Cleanup()
 24        {
 119425        }
 26
 119827        public virtual void OnSelect() { gameObject.SetActive(true); }
 28
 119829        public virtual void OnUnselect() { gameObject.SetActive(false); }
 30
 031        public virtual void OnUpdate() { }
 32
 033        public virtual void OnSetRotation(CameraController.SetRotationPayload payload) { }
 34
 035        public virtual Vector3 OnGetRotation() { return Vector3.zero; }
 36
 037        public virtual void OnBlock(bool blocked) { }
 38    }
 39}