This commit is contained in:
2022-12-01 22:41:35 +05:30
parent c64a4d6814
commit 786cd95f19
5848 changed files with 19818945 additions and 23842 deletions

View File

@@ -0,0 +1,39 @@
using UnityEngine;
using System.Collections;
namespace EpicToonFX
{
public class ETFXLightFade : MonoBehaviour
{
[Header("Seconds to dim the light")]
public float life = 0.2f;
public bool killAfterLife = true;
private Light li;
private float initIntensity;
// Use this for initialization
void Start()
{
if (gameObject.GetComponent<Light>())
{
li = gameObject.GetComponent<Light>();
initIntensity = li.intensity;
}
else
print("No light object found on " + gameObject.name);
}
// Update is called once per frame
void Update()
{
if (gameObject.GetComponent<Light>())
{
li.intensity -= initIntensity * (Time.deltaTime / life);
if (killAfterLife && li.intensity <= 0)
//Destroy(gameObject);
Destroy(gameObject.GetComponent<Light>());
}
}
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 2f54e17d705a2894d88787e24190ebfa
timeCreated: 1499439792
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,17 @@
using UnityEngine;
using System.Collections;
namespace EpicToonFX
{
public class ETFXPitchRandomizer : MonoBehaviour
{
public float randomPercent = 10;
void Start ()
{
transform.GetComponent<AudioSource>().pitch *= 1 + Random.Range(-randomPercent / 100, randomPercent / 100);
}
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 628ef9b0c7e4fd24db54868035e11237
timeCreated: 1499558257
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,30 @@
using UnityEngine;
using System.Collections;
namespace EpicToonFX
{
public class ETFXRotation : MonoBehaviour
{
[Header("Rotate axises by degrees per second")]
public Vector3 rotateVector = Vector3.zero;
public enum spaceEnum { Local, World };
public spaceEnum rotateSpace;
// Use this for initialization
void Start()
{
}
// Update is called once per frame
void Update()
{
if (rotateSpace == spaceEnum.Local)
transform.Rotate(rotateVector * Time.deltaTime);
if (rotateSpace == spaceEnum.World)
transform.Rotate(rotateVector * Time.deltaTime, Space.World);
}
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 7faa64a828219b44cb0eb5bfbfa83524
timeCreated: 1494264015
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: