upgraded the game
This commit is contained in:
21
Assets/Scripts/ESCQuit.cs
Normal file
21
Assets/Scripts/ESCQuit.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/ESCQuit.cs.meta
Normal file
11
Assets/Scripts/ESCQuit.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9cf471439c551fd459075afc8510ea03
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user