update level1

This commit is contained in:
2025-05-09 15:27:33 +09:00
parent 73fee031b1
commit 2e86126b5f
26 changed files with 5436 additions and 3919 deletions

View File

@@ -1,11 +1,12 @@
using System;
using System.Collections;
using UnityEngine;
using UnityEngine.LightTransport;
public class WorldSwitcher : MonoBehaviour
{
private const float _SCALE_DURATION = 0.5f;
private const float _SCALE_FACTOR = 100.0f;
private const float _SCALE_FACTOR = 150.0f;
[SerializeField]
private GameObject _spriteMask;
@@ -42,6 +43,10 @@ public class WorldSwitcher : MonoBehaviour
var currentScale = _spriteMask.transform.localScale;
var from = _currentWorldIndex == 0 ? currentScale : new Vector3(_SCALE_FACTOR, _SCALE_FACTOR, 1);
var to = newIndex == 0 ? Vector3.zero : new Vector3(_SCALE_FACTOR, _SCALE_FACTOR, 1);
_world2.SetActive(true);
_world1.SetActive(true);
StartCoroutine(ScaleOverTime(_spriteMask.transform, from, to, _SCALE_DURATION, () =>
{
_currentWorldIndex = newIndex;