예제 #1
0
    void EnterCamera()
    {
        active = true;
        if (!switchMaster)
        {
            switchMaster = Object.FindObjectOfType <CinemachineSwitchMaster>();
            enterCamera  = switchMaster.GetCamera(enterCameraManager, enterCameraInd);
            brain        = switchMaster.Brain;
        }

        if (switchMaster)
        {
            switchMaster.SwitchCamera(enterCameraManager, enterCameraInd, false, ActivateSwitchObjects);
        }

        //see if toggle or hold
        if (switchType == SwitchType.Toggle)
        {
            Toggle(switchButton);
        }
        else if (switchType == SwitchType.Hold)
        {
            Hold(switchButton);
        }
    }
    private void OnEnable()
    {
        source    = (CinemachineSwitchMaster)target;
        sourceRef = serializedObject;

        GetProperties();
    }
예제 #3
0
    void Start()
    {
        helper = FindObjectOfType(typeof(CinemachineSwitchMaster)) as CinemachineSwitchMaster;

        //unfreeze the game
        Time.timeScale = 1;
    }
예제 #4
0
 public void Initialize(CinemachineSwitchMaster _master)
 {
     master = _master;
     SpawnCameras();
 }