This commit is contained in:
HelarJ
2022-03-14 16:33:09 +02:00
301 changed files with 34777 additions and 15746 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 60ce99a0af04f934190ce18ee4f567b6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,44 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
public class FlyWand : MonoBehaviour
{
private GameObject player;
private bool isFlying;
public ParticleSystem particles;
public float flySpeed = 10f;
public float testForce;
private void Awake()
{
player = GameObject.FindGameObjectWithTag("Player");
isFlying = false;
}
private void Update()
{
if (isFlying)
{
//player.transform.position += transform.up * flySpeed * Time.deltaTime;
player.GetComponent<Rigidbody>().AddForce(-transform.up * testForce * Time.deltaTime);
}
}
public void EnableFly()
{
isFlying = true;
particles.Play();
}
public void DisableFly()
{
isFlying = false;
particles.Stop();
particles.Clear();
}
}

View File

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

View File

@@ -0,0 +1,32 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
public class VignetteController : MonoBehaviour
{
private Rigidbody player;
public Volume vignette;
public float threshold = 5f;
public float maxValue = 1f;
void Start()
{
player = GameObject.FindGameObjectWithTag("Player").GetComponent<Rigidbody>();
}
// Update is called once per frame
void Update()
{
if(vignette.profile.TryGet(out Vignette vig)) //https://www.youtube.com/watch?v=8S22Qt_-nY8
{
float value = (Mathf.Abs(player.velocity.x) + Mathf.Abs(player.velocity.y) + Mathf.Abs(player.velocity.z)) / threshold;
if (value > maxValue) value = maxValue;
vig.intensity.Override(value);
}
}
}

View File

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