This commit is contained in:
Gerard Gascón 2025-04-24 17:37:25 +02:00
commit 341a877b4a
2338 changed files with 1346408 additions and 0 deletions

View file

@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CineMachineUpdater : MonoBehaviour
{
Cinemachine.CinemachineVirtualCamera _camera;
private void Awake()
{
_camera = GetComponent<Cinemachine.CinemachineVirtualCamera>();
_camera.Follow = GameMaster.Instance.player.transform.parent.GetComponentInChildren<WeightedLocation>().transform;
}
void setUP()
{
_camera.Follow = GameMaster.Instance.player.transform.parent.gameObject.GetComponent<WeightedLocation>().gameObject.transform;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4f1c36c0c43fff943aedf210e8555d4f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 500
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,35 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RoomBasedCamera : MonoBehaviour
{
public Vector3 cameraAngle=Vector3.zero;
private float armLength=20;
public Vector3 tweakVector = Vector3.zero;
public LeanTweenType easeType = LeanTweenType.easeInOutCubic;
public float easeTime = 0.5f;
private GameObject player;
private void Awake()
{
GameMaster.Instance.player.GetComponent<DungeonIntruder>().roomChange.AddListener(swapFocus);
player=GameMaster.Instance.player;
}
private void Start()
{
transform.eulerAngles = cameraAngle;
if(GameMaster.Instance.Dungeon!=null && GameMaster.Instance.Dungeon.EntryRoom!=null)
transform.position = GameMaster.Instance.Dungeon.EntryRoom.transform.position;
transform.position += transform.forward * -armLength + tweakVector;
}
void swapFocus()
{
transform.LeanMove(player.GetComponent<DungeonIntruder>().currentRoom.gameObject.transform.position+ transform.forward * -armLength+tweakVector, easeTime).setEase(easeType);
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f735946c53bd8c24997d91bf7b6f1822
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 400
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: