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

21
Assets/Scripts/ESCQuit.cs Normal file
View File

@@ -0,0 +1,21 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ESCQuit : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update ()
{
if(Input.GetKeyDown(KeyCode.Escape) == true)
{
Application.Quit();
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9cf471439c551fd459075afc8510ea03
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

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;
}
}
}

View File

@@ -10,7 +10,7 @@ public class Rotation : MonoBehaviour
public bool static_center = true;
public bool right_rotation = true;
public bool flipping = false;
[Range(0.1f, 8)] public float speed = 1;
[Range(1f, 180f)] public float speed = 1;
[Range(0, (float)Math.PI * 2)] public float flip_angle = 0;
private float angle;