3rd Level
This commit is contained in:
parent
7d29b5e394
commit
8ae9410126
@ -81,7 +81,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
layerMask:
|
layerMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 4294967103
|
m_Bits: 4294965311
|
||||||
--- !u!1 &5991452379241120368
|
--- !u!1 &5991452379241120368
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -128,7 +128,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
layerMask:
|
layerMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 4294967103
|
m_Bits: 4294965311
|
||||||
--- !u!1 &7391517555913877016
|
--- !u!1 &7391517555913877016
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -371,7 +371,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
layerMask:
|
layerMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 4294967231
|
m_Bits: 4294965439
|
||||||
--- !u!1 &7984300476647789986
|
--- !u!1 &7984300476647789986
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -418,4 +418,4 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
layerMask:
|
layerMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 4294967231
|
m_Bits: 4294965439
|
||||||
|
@ -14,7 +14,7 @@ GameObject:
|
|||||||
- component: {fileID: 6241563109229534231}
|
- component: {fileID: 6241563109229534231}
|
||||||
- component: {fileID: 6151226926209823380}
|
- component: {fileID: 6151226926209823380}
|
||||||
- component: {fileID: 4209054098996045085}
|
- component: {fileID: 4209054098996045085}
|
||||||
m_Layer: 0
|
m_Layer: 8
|
||||||
m_Name: End Point
|
m_Name: End Point
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
|
@ -20765,11 +20765,11 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5137337335022132405, guid: 8bb5d26746f32bd41bb00bc9809065ac, type: 3}
|
- target: {fileID: 5137337335022132405, guid: 8bb5d26746f32bd41bb00bc9809065ac, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: 73
|
value: 7.5
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5137337335022132405, guid: 8bb5d26746f32bd41bb00bc9809065ac, type: 3}
|
- target: {fileID: 5137337335022132405, guid: 8bb5d26746f32bd41bb00bc9809065ac, type: 3}
|
||||||
propertyPath: m_LocalPosition.y
|
propertyPath: m_LocalPosition.y
|
||||||
value: -42.1
|
value: -9
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5137337335022132405, guid: 8bb5d26746f32bd41bb00bc9809065ac, type: 3}
|
- target: {fileID: 5137337335022132405, guid: 8bb5d26746f32bd41bb00bc9809065ac, type: 3}
|
||||||
propertyPath: m_LocalPosition.z
|
propertyPath: m_LocalPosition.z
|
||||||
|
@ -11604,11 +11604,11 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5137337335022132405, guid: 8bb5d26746f32bd41bb00bc9809065ac, type: 3}
|
- target: {fileID: 5137337335022132405, guid: 8bb5d26746f32bd41bb00bc9809065ac, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: 0
|
value: 7.5
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5137337335022132405, guid: 8bb5d26746f32bd41bb00bc9809065ac, type: 3}
|
- target: {fileID: 5137337335022132405, guid: 8bb5d26746f32bd41bb00bc9809065ac, type: 3}
|
||||||
propertyPath: m_LocalPosition.y
|
propertyPath: m_LocalPosition.y
|
||||||
value: 0
|
value: -10
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5137337335022132405, guid: 8bb5d26746f32bd41bb00bc9809065ac, type: 3}
|
- target: {fileID: 5137337335022132405, guid: 8bb5d26746f32bd41bb00bc9809065ac, type: 3}
|
||||||
propertyPath: m_LocalPosition.z
|
propertyPath: m_LocalPosition.z
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -46,7 +46,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
layerMask:
|
layerMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 4294966335
|
m_Bits: 4294965311
|
||||||
--- !u!1 &2083070160
|
--- !u!1 &2083070160
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -93,7 +93,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
layerMask:
|
layerMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 4294966335
|
m_Bits: 4294965311
|
||||||
--- !u!1 &2460162872455742730
|
--- !u!1 &2460162872455742730
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -140,7 +140,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
layerMask:
|
layerMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 4294966912
|
m_Bits: 4294965888
|
||||||
--- !u!1 &4589051977042145238
|
--- !u!1 &4589051977042145238
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -611,7 +611,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
layerMask:
|
layerMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 4294966280
|
m_Bits: 4294965256
|
||||||
--- !u!1 &7718275112619760423
|
--- !u!1 &7718275112619760423
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -65,7 +65,7 @@ namespace AI
|
|||||||
spriteRenderer.flipX = !isMovingRight;
|
spriteRenderer.flipX = !isMovingRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
movement.Move(isMovingRight ? 1f : -1f);
|
movement.Move(isMovingRight ? 2f : -2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected CollisionChecker GetCollisionCheckerOnChild(string childName)
|
protected CollisionChecker GetCollisionCheckerOnChild(string childName)
|
||||||
|
@ -1,21 +1,40 @@
|
|||||||
using Cinemachine;
|
using Cinemachine;
|
||||||
|
using Level;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.U2D;
|
||||||
|
|
||||||
namespace Camera
|
namespace Camera
|
||||||
{
|
{
|
||||||
public class CameraPlayerFinder : MonoBehaviour
|
public class CameraPlayerFinder : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
private const float FollowOrthoSize = 7.5f;
|
||||||
|
private const float FixedOrthoSize = 15f;
|
||||||
private CinemachineVirtualCamera _cinemachineVirtualCamera;
|
private CinemachineVirtualCamera _cinemachineVirtualCamera;
|
||||||
|
private PixelPerfectCamera pixelPerfectCamera = null;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
_cinemachineVirtualCamera = GetComponent<CinemachineVirtualCamera>();
|
_cinemachineVirtualCamera = GetComponent<CinemachineVirtualCamera>();
|
||||||
|
pixelPerfectCamera = GameObject.FindObjectOfType<PixelPerfectCamera>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (_cinemachineVirtualCamera.Follow == null && GameObject.FindWithTag("Player") != null && !GameObject.Find("Fixed Camera Point"))
|
if (LevelManager.Instance.CurrentLevel?.FixedCameraPoint == null)
|
||||||
_cinemachineVirtualCamera.Follow = GameObject.FindWithTag("Player").transform;
|
{
|
||||||
|
if (_cinemachineVirtualCamera.Follow == null)
|
||||||
|
{
|
||||||
|
_cinemachineVirtualCamera.Follow = LevelManager.Instance.Player.transform;
|
||||||
|
_cinemachineVirtualCamera.m_Lens.OrthographicSize = FollowOrthoSize;
|
||||||
|
pixelPerfectCamera.enabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (_cinemachineVirtualCamera.Follow != LevelManager.Instance.CurrentLevel.FixedCameraPoint)
|
||||||
|
{
|
||||||
|
_cinemachineVirtualCamera.Follow = LevelManager.Instance.CurrentLevel.FixedCameraPoint;
|
||||||
|
// _cinemachineVirtualCamera.m_Lens.OrthographicSize = FixedOrthoSize;
|
||||||
|
pixelPerfectCamera.enabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -53,4 +53,4 @@ Physics2DSettings:
|
|||||||
m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
|
m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
|
||||||
m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
|
m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
|
||||||
m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
|
m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
|
||||||
m_LayerCollisionMatrix: fffefffffffefffffffefffffffefffffffefffffffefffffffffffffffeffff40feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
m_LayerCollisionMatrix: fffefffffffefffffffefffffffefffffffefffffffefffffffbfffffffaffff40fafffffffbffff3ffcffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
@ -15,7 +15,7 @@ TagManager:
|
|||||||
- Enemy
|
- Enemy
|
||||||
- Interactables
|
- Interactables
|
||||||
- Projectiles
|
- Projectiles
|
||||||
-
|
- Fake
|
||||||
-
|
-
|
||||||
-
|
-
|
||||||
-
|
-
|
||||||
|
Loading…
x
Reference in New Issue
Block a user