init
This commit is contained in:
commit
f5c1616018
679 changed files with 188502 additions and 0 deletions
19
Assets/Scripts/CameraHeight.cs
Normal file
19
Assets/Scripts/CameraHeight.cs
Normal file
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
|
||||
public class CameraHeight : MonoBehaviour {
|
||||
private float _currentHeight;
|
||||
|
||||
private void Start() {
|
||||
SetHeight(0f);
|
||||
}
|
||||
|
||||
public void SetHeight(float height) {
|
||||
if (height <= _currentHeight)
|
||||
return;
|
||||
|
||||
_currentHeight = height;
|
||||
transform.DOMoveY(height, 1f).SetEase(Ease.OutCubic);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue