upgraded the game

This commit is contained in:
2021-07-22 21:52:18 +02:00
parent 2e017145f1
commit f6035eaa38
19 changed files with 504 additions and 36 deletions

View File

@@ -6,7 +6,8 @@ public class MenuZoom : MonoBehaviour
{
public Camera cam;
public GameObject objects;
bool firstrun = true;
bool flag1 = true;
bool flag2 = false;
// Start is called before the first frame update
void Start()
{
@@ -16,14 +17,22 @@ public class MenuZoom : MonoBehaviour
// Update is called once per frame
void Update()
{
if (firstrun){
firstrun = false;
while(cam.fieldOfView > 3f){
cam.fieldOfView -= 0.001f;
if (flag1){
if(cam.orthographicSize > 1f){
cam.orthographicSize -= 0.1f;
}
objects.SetActive(true);
while(cam.fieldOfView < 5f){
cam.fieldOfView += 0.001f;
else{
flag1 = false;
flag2 = true;
objects.SetActive(true);
}
}
if(flag2){
if(cam.orthographicSize < 5f){
cam.orthographicSize += 0.06f;
}
else{
flag2 = false;
}
}
}