Added new animas for Pulver
Added new sprite sheets and anims for pulver front and back walk/idle.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
using UnityEngine;
|
||||
using Unity.Cinemachine;
|
||||
|
||||
public class cameraSwitcher : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private CinemachineCamera virtualCamera;
|
||||
[SerializeField] private float zoomedFOV = 30f;
|
||||
[SerializeField] private float normalFOV = 40f;
|
||||
[SerializeField] private Vector3 zoomedOffset = new Vector3(0, 2, -10);
|
||||
[SerializeField] private Vector3 normalOffset = new Vector3(0, 5, -10);
|
||||
|
||||
private int playerInsideCount = 0;
|
||||
//private CinemachineTransposer transposer;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
/* if (virtualCamera != null)
|
||||
{
|
||||
transposer = virtualCamera.GetCinemachineComponent<CinemachineTransposer>();
|
||||
}*/
|
||||
}
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
if (other.CompareTag("Player"))
|
||||
{
|
||||
playerInsideCount++;
|
||||
/*if (playerInsideCount == 1 && virtualCamera != null)
|
||||
{
|
||||
// Adjust FOV
|
||||
virtualCamera.m_Lens.FieldOfView = zoomedFOV;
|
||||
// Adjust follow distance (offset)
|
||||
if (transposer != null)
|
||||
transposer.m_FollowOffset = zoomedOffset;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerExit2D(Collider2D other)
|
||||
{
|
||||
if (other.CompareTag("Player"))
|
||||
{
|
||||
playerInsideCount--;
|
||||
/*if (playerInsideCount == 0 && virtualCamera != null)
|
||||
{
|
||||
// Restore FOV
|
||||
virtualCamera.m_Lens.FieldOfView = normalFOV;
|
||||
// Restore follow distance (offset)
|
||||
if (transposer != null)
|
||||
transposer.m_FollowOffset = normalOffset;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 165735a7ab2540c4aa3eba7ec6cd97fd
|
||||
Reference in New Issue
Block a user