浏览代码

Issue #245 simple fix for camera erratic behaviour (#250)

* hair color mask material, old lady hairdo and glass, moustache, and shell bowl

Various art assets to make the townsfolk more unique. Bowl made from a giant shell.

* Fix Plant Critter mesh scaling and name (#239)

* Townsfolk_M animations, Palm2

* New tree type

* simple fix for camera

* Reset HasBeenPrewarmed (#243)

* [WIP] Added some table furniture (#233)

* Added some table furnitures

* Corrected all furniture prefabs to be prefab variant

* Added back recklol Dissolve effect (#217)

* Added recklol dissolve effect with some tweaks

* Added names to dissolve outputs

* Added a dissolve effect option in contextual menu and add alpha cutoff in Toon_Disolve

* [Bot] Automated dotnet-format update

* Imported Smurjo's models, reorganised folders

* Hotfix for null checking `ToState`. (#244)

* Wiki and Readme images

* Update README.md

* Update README.md

* Initial decoupling o...
/main
GitHub 4 年前
当前提交
1564f41c
共有 1 个文件被更改,包括 15 次插入0 次删除
  1. 15
      UOP1_Project/Assets/Scripts/CameraManager.cs

15
UOP1_Project/Assets/Scripts/CameraManager.cs


using System;
using UnityEngine;
using Cinemachine;
using System.Collections;
public class CameraManager : MonoBehaviour
{

[Tooltip("The CameraManager listens to this event, fired by objects in any scene, to adapt camera position")]
[SerializeField] private TransformEventChannelSO _frameObjectChannel = default;
private bool cameraMovementLock = false;
public void SetupProtagonistVirtualCamera(Transform target)
{

Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
StartCoroutine(DisableMouseControlForFrame());
}
IEnumerator DisableMouseControlForFrame()
{
cameraMovementLock = true;
yield return new WaitForEndOfFrame();
cameraMovementLock = false;
}
private void OnDisableMouseControlCamera()

private void OnCameraMove(Vector2 cameraMovement, bool isDeviceMouse)
{
if (cameraMovementLock)
return;
if (isDeviceMouse && !_isRMBPressed)
return;

正在加载...
取消
保存