tnt graphics, bug fixes, folder organization
This commit is contained in:
@@ -6,12 +6,10 @@
|
||||
// Handle room and scene transitions
|
||||
public class TeleportHandler : MonoBehaviour
|
||||
{
|
||||
Image blackScreenObject;
|
||||
PlayerController playerController;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
blackScreenObject = GameManager.Instance.GetBlackScreen();
|
||||
playerController = GetComponent<PlayerController>();
|
||||
}
|
||||
|
||||
@@ -43,7 +41,7 @@ IEnumerator EnterRoomCoroutine(RoomDoor door)
|
||||
while (fadeTime < fadeDuration)
|
||||
{
|
||||
blackScreenColor.a = Mathf.Lerp(0, 1, fadeTime / fadeDuration);
|
||||
blackScreenObject.color = blackScreenColor;
|
||||
GameManager.Instance.GetBlackScreen().color = blackScreenColor;
|
||||
fadeTime += Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
@@ -55,7 +53,7 @@ IEnumerator EnterRoomCoroutine(RoomDoor door)
|
||||
while (fadeTime < fadeDuration)
|
||||
{
|
||||
blackScreenColor.a = Mathf.Lerp(1, 0, fadeTime / fadeDuration);
|
||||
blackScreenObject.color = blackScreenColor;
|
||||
GameManager.Instance.GetBlackScreen().color = blackScreenColor;
|
||||
playerController.WalkInDirection((door.linkedDoor.WalkDirection.position - playerController.transform.position).normalized);
|
||||
|
||||
fadeTime += Time.deltaTime;
|
||||
|
||||
Reference in New Issue
Block a user