stuff made here

This commit is contained in:
2021-07-22 20:09:52 +02:00
parent 2168955a99
commit 0668fe1890
20 changed files with 222546 additions and 895 deletions

View File

@@ -0,0 +1,40 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class MenuMouse : MonoBehaviour
{
public Vector3 pos;
// Start is called before the first frame update
void Start()
{
pos.y -= 4.69f;
pos.x -= 8.66f;
}
// Update is called once per frame
void Update()
{
pos.x += Input.GetAxisRaw("Mouse X") * Time.deltaTime * 40f;
pos.y += Input.GetAxisRaw("Mouse Y") * Time.deltaTime * 40f;
pos.z = -8f;
if (pos.x > 8.62f){
pos.x = 8.62f;
}
if (pos.x < -8.62f){
pos.x = -8.62f;
}
if (pos.y > 4.81f){
pos.y = 4.81f;
}
if (pos.y < -4.68f){
pos.y = -4.68f;
}
transform.position = pos;
}
public void play(){
SceneManager.LoadScene("Tutorial");
}
}

View File

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

View File

@@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MenuZoom : MonoBehaviour
{
public Camera cam;
public GameObject objects;
bool firstrun = true;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (firstrun){
firstrun = false;
while(cam.fieldOfView > 3f){
cam.fieldOfView -= 0.001f;
}
objects.SetActive(true);
while(cam.fieldOfView < 5f){
cam.fieldOfView += 0.001f;
}
}
}
}

View File

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

View File

@@ -6,28 +6,22 @@ using UnityEngine;
public class RotateAroundSelfAxis : MonoBehaviour
{
public bool right_rotation = true;
public bool flipping = false;
[Range(0, (float)Math.PI * 2)] [SerializeField] public float flip_angle = 0;
[Range(0, 60)] [SerializeField] public float speed = 1;
[Range(0f, 600f)] [SerializeField] public float speed = 1;
Quaternion rotation;
// Start is called before the first frame update
void Start()
{
rotation = transform.rotation;
}
// Update is called once per frame
void Update()
{
if(right_rotation) {
transform.localRotation *= Quaternion.AngleAxis(speed * Time.deltaTime, new Vector3(0f, 0f, -1f));
} else {
transform.localRotation *= Quaternion.AngleAxis(speed * Time.deltaTime, new Vector3(0f, 0f, 1f));
}
Debug.Log(rotation[2]);
}
}