VFX for abilities
parent
3850e59fb5
commit
e26bd70115
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c865e48369a325f4784ecd8444d1ec51
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f348a2fb2f8a7fe4e82fb08818415884
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f991151302bbc8440bc158a1be7d008d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e427a3233ad87024e9480ecb6a128456
|
||||
labels:
|
||||
- cartoonfx
|
||||
- ground
|
||||
- light
|
||||
- particles
|
||||
- toon
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6fdcf828c6e2b0449c56aec449fa3c5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b2165fbc1d575ee4098e242f632ed259
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,66 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!850595691 &4890085278179872738
|
||||
LightingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: CFX1 DemoSettings
|
||||
serializedVersion: 6
|
||||
m_GIWorkflowMode: 1
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_RealtimeEnvironmentLighting: 1
|
||||
m_BounceScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_UsingShadowmask: 0
|
||||
m_BakeBackend: 0
|
||||
m_LightmapMaxSize: 1024
|
||||
m_BakeResolution: 50
|
||||
m_Padding: 2
|
||||
m_LightmapCompression: 0
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 0
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAO: 0
|
||||
m_MixedBakeMode: 1
|
||||
m_LightmapsBakeMode: 1
|
||||
m_FilterMode: 1
|
||||
m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_RealtimeResolution: 1
|
||||
m_ForceWhiteAlbedo: 0
|
||||
m_ForceUpdates: 0
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherRayCount: 1024
|
||||
m_FinalGatherFiltering: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVREnvironmentSampleCount: 512
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_PVRBounces: 2
|
||||
m_PVRMinBounces: 2
|
||||
m_PVREnvironmentImportanceSampling: 0
|
||||
m_PVRFilteringMode: 2
|
||||
m_PVRDenoiserTypeDirect: 0
|
||||
m_PVRDenoiserTypeIndirect: 0
|
||||
m_PVRDenoiserTypeAO: 0
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_PVRTiledBaking: 0
|
||||
m_NumRaysToShootPerTexel: -1
|
||||
m_RespectSceneVisibilityWhenBakingGI: 0
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bada21239a0529b439536bfd0e91c874
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 4890085278179872738
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a7171bf41aeb6949b08451fbcd42dd7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ef74fe7f8dfc6894481d107231650819
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d56b3c7055d81cb44803b5d7db4b65e0
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2076145b3bfdcca4193bfd3effd1400f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 086093bf5c1cde94a82a35d3a10ed3cb
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3e4d2179e984b8a40ae871f7f984ce54
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c6b44bc1c4ff034b907d51d04682992
|
||||
timeCreated: 1504799664
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9ff999f14db2c44ea3d654f7f7304ab
|
||||
timeCreated: 1504799663
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b6bf11867d5895459390f7a4fb45b5e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a6ef903b479ca2645b849fa01c6a7d63
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ddc205c0c8c9eca43be1bdcb38ef42e7
|
||||
timeCreated: 1504707645
|
||||
licenseType: Store
|
||||
NativeFormatImporter:
|
||||
mainObjectFileID: 100100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 472d68cea808e2e4ba2a8d7b9ea3b6ff
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26bca93eeb22b2946a9e4a559e4cb465
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,148 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
// Script handling the Demo scene of CartoonFX particles.
|
||||
public class CFX2_Demo : MonoBehaviour
|
||||
{
|
||||
public bool orderedSpawns = true;
|
||||
public float step = 1.0f;
|
||||
public float range = 5.0f;
|
||||
private float order = -5.0f;
|
||||
|
||||
public Material groundMat, waterMat;
|
||||
public GameObject[] ParticleExamples;
|
||||
|
||||
private int exampleIndex;
|
||||
private string randomSpawnsDelay = "0.5";
|
||||
private bool randomSpawns;
|
||||
|
||||
private bool slowMo;
|
||||
|
||||
void OnMouseDown()
|
||||
{
|
||||
RaycastHit hit = new RaycastHit();
|
||||
if(this.GetComponent<Collider>().Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit, 9999f))
|
||||
{
|
||||
GameObject particle = spawnParticle();
|
||||
particle.transform.position = hit.point + particle.transform.position;
|
||||
}
|
||||
}
|
||||
|
||||
private GameObject spawnParticle()
|
||||
{
|
||||
GameObject particles = (GameObject)Instantiate(ParticleExamples[exampleIndex]);
|
||||
particles.transform.position = new Vector3(0,particles.transform.position.y,0);
|
||||
#if UNITY_3_5
|
||||
particles.SetActiveRecursively(true);
|
||||
#else
|
||||
particles.SetActive(true);
|
||||
for(int i = 0; i < particles.transform.childCount; i++)
|
||||
particles.transform.GetChild(i).gameObject.SetActive(true);
|
||||
#endif
|
||||
|
||||
return particles;
|
||||
}
|
||||
|
||||
void OnGUI()
|
||||
{
|
||||
GUILayout.BeginArea(new Rect(5,20,Screen.width-10,60));
|
||||
|
||||
GUILayout.BeginHorizontal();
|
||||
GUILayout.Label("Effect");
|
||||
if(GUILayout.Button("<"))
|
||||
{
|
||||
prevParticle();
|
||||
}
|
||||
GUILayout.Label(ParticleExamples[exampleIndex].name, GUILayout.Width(210));
|
||||
if(GUILayout.Button(">"))
|
||||
{
|
||||
nextParticle();
|
||||
}
|
||||
|
||||
GUILayout.Label("Click on the ground to spawn selected particles", GUILayout.Width(150));
|
||||
|
||||
if(GUILayout.Button(CFX_Demo_RotateCamera.rotating ? "Pause Camera" : "Rotate Camera"))
|
||||
{
|
||||
CFX_Demo_RotateCamera.rotating = !CFX_Demo_RotateCamera.rotating;
|
||||
}
|
||||
|
||||
if(GUILayout.Button(randomSpawns ? "Stop Random Spawns" : "Start Random Spawns", GUILayout.Width(140)))
|
||||
{
|
||||
randomSpawns = !randomSpawns;
|
||||
if(randomSpawns) StartCoroutine("RandomSpawnsCoroutine");
|
||||
else StopCoroutine("RandomSpawnsCoroutine");
|
||||
}
|
||||
|
||||
randomSpawnsDelay = GUILayout.TextField(randomSpawnsDelay, 10, GUILayout.Width(42));
|
||||
randomSpawnsDelay = Regex.Replace(randomSpawnsDelay, @"[^0-9.]", "");
|
||||
|
||||
if(GUILayout.Button(this.GetComponent<Renderer>().enabled ? "Hide Ground" : "Show Ground", GUILayout.Width(90)))
|
||||
{
|
||||
this.GetComponent<Renderer>().enabled = !this.GetComponent<Renderer>().enabled;
|
||||
}
|
||||
|
||||
if(GUILayout.Button(slowMo ? "Normal Speed" : "Slow Motion", GUILayout.Width(100)))
|
||||
{
|
||||
slowMo = !slowMo;
|
||||
if(slowMo) Time.timeScale = 0.33f;
|
||||
else Time.timeScale = 1.0f;
|
||||
}
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.EndArea();
|
||||
}
|
||||
|
||||
IEnumerator RandomSpawnsCoroutine()
|
||||
{
|
||||
|
||||
LOOP:
|
||||
GameObject particles = spawnParticle();
|
||||
|
||||
if(orderedSpawns)
|
||||
{
|
||||
particles.transform.position = this.transform.position + new Vector3(order,particles.transform.position.y,0);
|
||||
order -= step;
|
||||
if(order < -range) order = range;
|
||||
}
|
||||
else particles.transform.position = this.transform.position + new Vector3(Random.Range(-range,range),0,Random.Range(-range,range)) + new Vector3(0,particles.transform.position.y,0);
|
||||
|
||||
yield return new WaitForSeconds(float.Parse(randomSpawnsDelay));
|
||||
|
||||
goto LOOP;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if(Input.GetKeyDown(KeyCode.LeftArrow))
|
||||
{
|
||||
prevParticle();
|
||||
}
|
||||
else if(Input.GetKeyDown(KeyCode.RightArrow))
|
||||
{
|
||||
nextParticle();
|
||||
}
|
||||
}
|
||||
|
||||
private void prevParticle()
|
||||
{
|
||||
exampleIndex--;
|
||||
if(exampleIndex < 0) exampleIndex = ParticleExamples.Length - 1;
|
||||
|
||||
if(ParticleExamples[exampleIndex].name.Contains("Splash") || ParticleExamples[exampleIndex].name.Contains("Skim"))
|
||||
this.GetComponent<Renderer>().material = waterMat;
|
||||
else
|
||||
this.GetComponent<Renderer>().material = groundMat;
|
||||
}
|
||||
private void nextParticle()
|
||||
{
|
||||
exampleIndex++;
|
||||
if(exampleIndex >= ParticleExamples.Length) exampleIndex = 0;
|
||||
|
||||
if(ParticleExamples[exampleIndex].name.Contains("Splash") || ParticleExamples[exampleIndex].name.Contains("Skim"))
|
||||
this.GetComponent<Renderer>().material = waterMat;
|
||||
else
|
||||
this.GetComponent<Renderer>().material = groundMat;
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b89446a500d6ec54788d5bd056a68979
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,38 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
// Cartoon FX - (c) 2015 Jean Moreno
|
||||
//
|
||||
// Script handling looped effect in the Demo Scene, so that they eventually stop
|
||||
|
||||
[RequireComponent(typeof(ParticleSystem))]
|
||||
public class CFX_AutoStopLoopedEffect : MonoBehaviour
|
||||
{
|
||||
public float effectDuration = 2.5f;
|
||||
private float d;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
d = effectDuration;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if(d > 0)
|
||||
{
|
||||
d -= Time.deltaTime;
|
||||
if(d <= 0)
|
||||
{
|
||||
this.GetComponent<ParticleSystem>().Stop(true);
|
||||
|
||||
CFX_Demo_Translate translation = this.gameObject.GetComponent<CFX_Demo_Translate>();
|
||||
if(translation != null)
|
||||
{
|
||||
translation.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9c4e89389fa607479b0744ec6611490
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
@ -0,0 +1,191 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
// Cartoon FX - (c) 2015 Jean Moreno
|
||||
|
||||
// Script handling the Demo scene of CartoonFX particles.
|
||||
|
||||
public class CFX_Demo : MonoBehaviour
|
||||
{
|
||||
public bool orderedSpawns = true;
|
||||
public float step = 1.0f;
|
||||
public float range = 5.0f;
|
||||
private float order = -5.0f;
|
||||
|
||||
public Material groundMat, waterMat;
|
||||
public GameObject[] ParticleExamples;
|
||||
|
||||
private Dictionary<string,float> ParticlesYOffsetD = new Dictionary<string, float>
|
||||
{
|
||||
{"CFX_ElectricGround", 0.15f},
|
||||
{"CFX_ElectricityBall", 1.0f},
|
||||
{"CFX_ElectricityBolt", 1.0f},
|
||||
{"CFX_Explosion", 2.0f},
|
||||
{"CFX_SmallExplosion", 1.5f},
|
||||
{"CFX_SmokeExplosion", 2.5f},
|
||||
{"CFX_Flame", 1.0f},
|
||||
{"CFX_DoubleFlame", 1.0f},
|
||||
{"CFX_Hit", 1.0f},
|
||||
{"CFX_CircularLightWall", 0.05f},
|
||||
{"CFX_LightWall", 0.05f},
|
||||
{"CFX_Flash", 2.0f},
|
||||
{"CFX_Poof", 1.5f},
|
||||
{"CFX_Virus", 1.0f},
|
||||
{"CFX_SmokePuffs", 2.0f},
|
||||
{"CFX_Slash", 1.0f},
|
||||
{"CFX_Splash", 0.05f},
|
||||
{"CFX_Fountain", 0.05f},
|
||||
{"CFX_Ripple", 0.05f},
|
||||
{"CFX_Magic", 2.0f},
|
||||
{"CFX_SoftStar", 1.0f},
|
||||
{"CFX_SpikyAura_Sphere", 1.0f},
|
||||
{"CFX_Firework", 2.4f},
|
||||
{"CFX_GroundA", 0.05f},
|
||||
};
|
||||
|
||||
private int exampleIndex;
|
||||
private string randomSpawnsDelay = "0.5";
|
||||
private bool randomSpawns;
|
||||
|
||||
private bool slowMo;
|
||||
|
||||
void OnMouseDown()
|
||||
{
|
||||
RaycastHit hit = new RaycastHit();
|
||||
if(this.GetComponent<Collider>().Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit, 9999f))
|
||||
{
|
||||
GameObject particle = spawnParticle();
|
||||
particle.transform.position = hit.point + particle.transform.position;
|
||||
}
|
||||
}
|
||||
|
||||
private GameObject spawnParticle()
|
||||
{
|
||||
GameObject particles = (GameObject)Instantiate(ParticleExamples[exampleIndex]);
|
||||
|
||||
#if UNITY_3_5
|
||||
particles.SetActiveRecursively(true);
|
||||
#else
|
||||
particles.SetActive(true);
|
||||
for(int i = 0; i < particles.transform.childCount; i++)
|
||||
particles.transform.GetChild(i).gameObject.SetActive(true);
|
||||
#endif
|
||||
|
||||
float Y = 0.0f;
|
||||
foreach(KeyValuePair<string,float> kvp in ParticlesYOffsetD)
|
||||
{
|
||||
if(particles.name.StartsWith(kvp.Key))
|
||||
{
|
||||
Y = kvp.Value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
particles.transform.position = new Vector3(0,Y,0);
|
||||
|
||||
return particles;
|
||||
}
|
||||
|
||||
void OnGUI()
|
||||
{
|
||||
GUILayout.BeginArea(new Rect(5,20,Screen.width-10,30));
|
||||
GUILayout.BeginHorizontal();
|
||||
|
||||
GUILayout.Label("Effect", GUILayout.Width(50));
|
||||
if(GUILayout.Button("<",GUILayout.Width(20)))
|
||||
{
|
||||
prevParticle();
|
||||
}
|
||||
GUILayout.Label(ParticleExamples[exampleIndex].name, GUILayout.Width(190));
|
||||
if(GUILayout.Button(">",GUILayout.Width(20)))
|
||||
{
|
||||
nextParticle();
|
||||
}
|
||||
|
||||
GUILayout.Label("Click on the ground to spawn selected particles");
|
||||
|
||||
if(GUILayout.Button(CFX_Demo_RotateCamera.rotating ? "Pause Camera" : "Rotate Camera", GUILayout.Width(140)))
|
||||
{
|
||||
CFX_Demo_RotateCamera.rotating = !CFX_Demo_RotateCamera.rotating;
|
||||
}
|
||||
|
||||
|
||||
if(GUILayout.Button(randomSpawns ? "Stop Random Spawns" : "Start Random Spawns", GUILayout.Width(140)))
|
||||
{
|
||||
randomSpawns = !randomSpawns;
|
||||
if(randomSpawns) StartCoroutine("RandomSpawnsCoroutine");
|
||||
else StopCoroutine("RandomSpawnsCoroutine");
|
||||
}
|
||||
|
||||
randomSpawnsDelay = GUILayout.TextField(randomSpawnsDelay, 10, GUILayout.Width(42));
|
||||
randomSpawnsDelay = Regex.Replace(randomSpawnsDelay, @"[^0-9.]", "");
|
||||
|
||||
if(GUILayout.Button(this.GetComponent<Renderer>().enabled ? "Hide Ground" : "Show Ground", GUILayout.Width(90)))
|
||||
{
|
||||
this.GetComponent<Renderer>().enabled = !this.GetComponent<Renderer>().enabled;
|
||||
}
|
||||
|
||||
if(GUILayout.Button(slowMo ? "Normal Speed" : "Slow Motion", GUILayout.Width(100)))
|
||||
{
|
||||
slowMo = !slowMo;
|
||||
if(slowMo) Time.timeScale = 0.33f;
|
||||
else Time.timeScale = 1.0f;
|
||||
}
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
GUILayout.EndArea();
|
||||
}
|
||||
|
||||
IEnumerator RandomSpawnsCoroutine()
|
||||
{
|
||||
|
||||
LOOP:
|
||||
GameObject particles = spawnParticle();
|
||||
|
||||
if(orderedSpawns)
|
||||
{
|
||||
particles.transform.position = this.transform.position + new Vector3(order,particles.transform.position.y,0);
|
||||
order -= step;
|
||||
if(order < -range) order = range;
|
||||
}
|
||||
else particles.transform.position = this.transform.position + new Vector3(Random.Range(-range,range),0,Random.Range(-range,range)) + new Vector3(0,particles.transform.position.y,0);
|
||||
|
||||
yield return new WaitForSeconds(float.Parse(randomSpawnsDelay));
|
||||
|
||||
goto LOOP;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if(Input.GetKeyDown(KeyCode.LeftArrow))
|
||||
{
|
||||
prevParticle();
|
||||
}
|
||||
else if(Input.GetKeyDown(KeyCode.RightArrow))
|
||||
{
|
||||
nextParticle();
|
||||
}
|
||||
}
|
||||
|
||||
private void prevParticle()
|
||||
{
|
||||
exampleIndex--;
|
||||
if(exampleIndex < 0) exampleIndex = ParticleExamples.Length - 1;
|
||||
|
||||
if(ParticleExamples[exampleIndex].name.Contains("Splash") || ParticleExamples[exampleIndex].name == "CFX_Ripple" || ParticleExamples[exampleIndex].name == "CFX_Fountain")
|
||||
this.GetComponent<Renderer>().material = waterMat;
|
||||
else
|
||||
this.GetComponent<Renderer>().material = groundMat;
|
||||
}
|
||||
private void nextParticle()
|
||||
{
|
||||
exampleIndex++;
|
||||
if(exampleIndex >= ParticleExamples.Length) exampleIndex = 0;
|
||||
|
||||
if(ParticleExamples[exampleIndex].name.Contains("Splash") || ParticleExamples[exampleIndex].name == "CFX_Ripple" || ParticleExamples[exampleIndex].name == "CFX_Fountain")
|
||||
this.GetComponent<Renderer>().material = waterMat;
|
||||
else
|
||||
this.GetComponent<Renderer>().material = groundMat;
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8469526271e317d469f107c0a3240521
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
@ -0,0 +1,239 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
// Cartoon FX - (c) 2015 - Jean Moreno
|
||||
//
|
||||
// Script handling the Demo scene of the Cartoon FX Packs
|
||||
|
||||
public class CFX_Demo_New : MonoBehaviour
|
||||
{
|
||||
public Renderer groundRenderer;
|
||||
public Collider groundCollider;
|
||||
[Space]
|
||||
[Space]
|
||||
public Image slowMoBtn;
|
||||
public Text slowMoLabel;
|
||||
public Image camRotBtn;
|
||||
public Text camRotLabel;
|
||||
public Image groundBtn;
|
||||
public Text groundLabel;
|
||||
[Space]
|
||||
public Text EffectLabel;
|
||||
public Text EffectIndexLabel;
|
||||
|
||||
//-------------------------------------------------------------
|
||||
|
||||
private GameObject[] ParticleExamples;
|
||||
private int exampleIndex;
|
||||
private bool slowMo;
|
||||
private Vector3 defaultCamPosition;
|
||||
private Quaternion defaultCamRotation;
|
||||
|
||||
private List<GameObject> onScreenParticles = new List<GameObject>();
|
||||
|
||||
//-------------------------------------------------------------
|
||||
|
||||
void Awake()
|
||||
{
|
||||
List<GameObject> particleExampleList = new List<GameObject>();
|
||||
int nbChild = this.transform.childCount;
|
||||
for(int i = 0; i < nbChild; i++)
|
||||
{
|
||||
GameObject child = this.transform.GetChild(i).gameObject;
|
||||
particleExampleList.Add(child);
|
||||
}
|
||||
particleExampleList.Sort( delegate(GameObject o1, GameObject o2) { return o1.name.CompareTo(o2.name); } );
|
||||
ParticleExamples = particleExampleList.ToArray();
|
||||
|
||||
defaultCamPosition = Camera.main.transform.position;
|
||||
defaultCamRotation = Camera.main.transform.rotation;
|
||||
|
||||
StartCoroutine("CheckForDeletedParticles");
|
||||
|
||||
UpdateUI();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if(Input.GetKeyDown(KeyCode.LeftArrow))
|
||||
{
|
||||
prevParticle();
|
||||
}
|
||||
else if(Input.GetKeyDown(KeyCode.RightArrow))
|
||||
{
|
||||
nextParticle();
|
||||
}
|
||||
else if(Input.GetKeyDown(KeyCode.Delete))
|
||||
{
|
||||
destroyParticles();
|
||||
}
|
||||
|
||||
if(Input.GetMouseButtonDown(0))
|
||||
{
|
||||
RaycastHit hit = new RaycastHit();
|
||||
if(groundCollider.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit, 9999f))
|
||||
{
|
||||
GameObject particle = spawnParticle();
|
||||
particle.transform.position = hit.point + particle.transform.position;
|
||||
}
|
||||
}
|
||||
|
||||
float scroll = Input.GetAxis("Mouse ScrollWheel");
|
||||
if(scroll != 0f)
|
||||
{
|
||||
Camera.main.transform.Translate(Vector3.forward * (scroll < 0f ? -1f : 1f), Space.Self);
|
||||
}
|
||||
|
||||
if(Input.GetMouseButtonDown(2))
|
||||
{
|
||||
Camera.main.transform.position = defaultCamPosition;
|
||||
Camera.main.transform.rotation = defaultCamRotation;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// MESSAGES
|
||||
|
||||
public void OnToggleGround()
|
||||
{
|
||||
var c = Color.white;
|
||||
groundRenderer.enabled = !groundRenderer.enabled;
|
||||
c.a = groundRenderer.enabled ? 1f : 0.33f;
|
||||
groundBtn.color = c;
|
||||
groundLabel.color = c;
|
||||
}
|
||||
|
||||
public void OnToggleCamera()
|
||||
{
|
||||
var c = Color.white;
|
||||
CFX_Demo_RotateCamera.rotating = !CFX_Demo_RotateCamera.rotating;
|
||||
c.a = CFX_Demo_RotateCamera.rotating ? 1f : 0.33f;
|
||||
camRotBtn.color = c;
|
||||
camRotLabel.color = c;
|
||||
}
|
||||
|
||||
public void OnToggleSlowMo()
|
||||
{
|
||||
var c = Color.white;
|
||||
|
||||
slowMo = !slowMo;
|
||||
if(slowMo)
|
||||
{
|
||||
Time.timeScale = 0.33f;
|
||||
c.a = 1f;
|
||||
}
|
||||
else
|
||||
{
|
||||
Time.timeScale = 1.0f;
|
||||
c.a = 0.33f;
|
||||
}
|
||||
|
||||
slowMoBtn.color = c;
|
||||
slowMoLabel.color = c;
|
||||
}
|
||||
|
||||
public void OnPreviousEffect()
|
||||
{
|
||||
prevParticle();
|
||||
}
|
||||
|
||||
public void OnNextEffect()
|
||||
{
|
||||
nextParticle();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// UI
|
||||
|
||||
private void UpdateUI()
|
||||
{
|
||||
EffectLabel.text = ParticleExamples[exampleIndex].name;
|
||||
EffectIndexLabel.text = string.Format("{0}/{1}", (exampleIndex+1).ToString("00"), ParticleExamples.Length.ToString("00"));
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------
|
||||
// SYSTEM
|
||||
|
||||
private GameObject spawnParticle()
|
||||
{
|
||||
GameObject particles = (GameObject)Instantiate(ParticleExamples[exampleIndex]);
|
||||
particles.transform.position = new Vector3(0,particles.transform.position.y,0);
|
||||
#if UNITY_3_5
|
||||
particles.SetActiveRecursively(true);
|
||||
#else
|
||||
particles.SetActive(true);
|
||||
// for(int i = 0; i < particles.transform.childCount; i++)
|
||||
// particles.transform.GetChild(i).gameObject.SetActive(true);
|
||||
#endif
|
||||
|
||||
ParticleSystem ps = particles.GetComponent<ParticleSystem>();
|
||||
|
||||
#if UNITY_5_5_OR_NEWER
|
||||
if (ps != null)
|
||||
{
|
||||
var main = ps.main;
|
||||
if (main.loop)
|
||||
{
|
||||
ps.gameObject.AddComponent<CFX_AutoStopLoopedEffect>();
|
||||
ps.gameObject.AddComponent<CFX_AutoDestructShuriken>();
|
||||
}
|
||||
}
|
||||
#else
|
||||
if(ps != null && ps.loop)
|
||||
{
|
||||
ps.gameObject.AddComponent<CFX_AutoStopLoopedEffect>();
|
||||
ps.gameObject.AddComponent<CFX_AutoDestructShuriken>();
|
||||
}
|
||||
#endif
|
||||
|
||||
onScreenParticles.Add(particles);
|
||||
|
||||
return particles;
|
||||
}
|
||||
|
||||
IEnumerator CheckForDeletedParticles()
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
yield return new WaitForSeconds(5.0f);
|
||||
for(int i = onScreenParticles.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if(onScreenParticles[i] == null)
|
||||
{
|
||||
onScreenParticles.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void prevParticle()
|
||||
{
|
||||
exampleIndex--;
|
||||
if(exampleIndex < 0) exampleIndex = ParticleExamples.Length - 1;
|
||||
|
||||
UpdateUI();
|
||||
}
|
||||
private void nextParticle()
|
||||
{
|
||||
exampleIndex++;
|
||||
if(exampleIndex >= ParticleExamples.Length) exampleIndex = 0;
|
||||
|
||||
UpdateUI();
|
||||
}
|
||||
|
||||
private void destroyParticles()
|
||||
{
|
||||
for(int i = onScreenParticles.Count - 1; i >= 0; i--)
|
||||
{
|
||||
if(onScreenParticles[i] != null)
|
||||
{
|
||||
GameObject.Destroy(onScreenParticles[i]);
|
||||
}
|
||||
|
||||
onScreenParticles.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b17383a625e88348a99a6eeef772d40
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
// Cartoon FX - (c) 2015 Jean Moreno
|
||||
|
||||
public class CFX_Demo_RandomDir : MonoBehaviour
|
||||
{
|
||||
public Vector3 min = new Vector3(0,0,0);
|
||||
public Vector3 max = new Vector3(0,360,0);
|
||||
|
||||
void Start ()
|
||||
{
|
||||
this.transform.eulerAngles = new Vector3(Random.Range(min.x,max.x),Random.Range(min.y,max.y),Random.Range(min.z,max.z));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27666076fd6e86245aa62dfd9e943d6c
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
// Cartoon FX - (c) 2015 Jean Moreno
|
||||
|
||||
public class CFX_Demo_RandomDirectionTranslate : MonoBehaviour
|
||||
{
|
||||
public float speed = 30.0f;
|
||||
public Vector3 baseDir = Vector3.zero;
|
||||
public Vector3 axis = Vector3.forward;
|
||||
public bool gravity;
|
||||
private Vector3 dir;
|
||||
|
||||
void Start ()
|
||||
{
|
||||
dir = new Vector3(Random.Range(0.0f,360.0f),Random.Range(0.0f,360.0f),Random.Range(0.0f,360.0f)).normalized;
|
||||
dir.Scale(axis);
|
||||
dir += baseDir;
|
||||
}
|
||||
|
||||
void Update ()
|
||||
{
|
||||
this.transform.Translate(dir * speed * Time.deltaTime);
|
||||
|
||||
if(gravity)
|
||||
{
|
||||
this.transform.Translate(Physics.gravity * Time.deltaTime);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83982eed39974834bada258fbddd1e72
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
// Cartoon FX - (c) 2015 Jean Moreno
|
||||
|
||||
public class CFX_Demo_RotateCamera : MonoBehaviour
|
||||
{
|
||||
static public bool rotating = true;
|
||||
|
||||
public float speed = 30.0f;
|
||||
public Transform rotationCenter;
|
||||
|
||||
void Update ()
|
||||
{
|
||||
if(rotating)
|
||||
transform.RotateAround(rotationCenter.position, Vector3.up, speed*Time.deltaTime);
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f71e90e62dfae594490eb4d9b611f930
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
// Cartoon FX - (c) 2015, Jean Moreno
|
||||
|
||||
public class CFX_Demo_Translate : MonoBehaviour
|
||||
{
|
||||
public float speed = 30.0f;
|
||||
public Vector3 rotation = Vector3.forward;
|
||||
public Vector3 axis = Vector3.forward;
|
||||
public bool gravity;
|
||||
private Vector3 dir;
|
||||
|
||||
void Start ()
|
||||
{
|
||||
dir = new Vector3(Random.Range(0.0f,360.0f),Random.Range(0.0f,360.0f),Random.Range(0.0f,360.0f));
|
||||
dir.Scale(rotation);
|
||||
this.transform.localEulerAngles = dir;
|
||||
}
|
||||
|
||||
void Update ()
|
||||
{
|
||||
this.transform.Translate(axis * speed * Time.deltaTime, Space.Self);
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1e42ac40a6fba2e4d94a0070ef45cea1
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 87c964e7d27f4764393e36054e147f1b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5fefbc813de49524d89e5fcce98dc957
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
@ -0,0 +1,193 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System.Collections;
|
||||
|
||||
// Cartoon FX - (c) 2012-2016 Jean Moreno
|
||||
|
||||
// CFX Spawn System Editor interface
|
||||
|
||||
[CustomEditor(typeof(CFX_SpawnSystem))]
|
||||
public class CFX_SpawnSystemEditor : Editor
|
||||
{
|
||||
private SerializedProperty _hideObjectsInHierarchy;
|
||||
private SerializedProperty p_hideObjectsInHierarchy
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_hideObjectsInHierarchy == null)
|
||||
_hideObjectsInHierarchy = this.serializedObject.FindProperty("hideObjectsInHierarchy");
|
||||
return _hideObjectsInHierarchy;
|
||||
}
|
||||
}
|
||||
|
||||
private SerializedProperty _onlyGetInactiveObjects;
|
||||
private SerializedProperty p_onlyGetInactiveObjects
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_onlyGetInactiveObjects == null)
|
||||
_onlyGetInactiveObjects = this.serializedObject.FindProperty("onlyGetInactiveObjects");
|
||||
return _onlyGetInactiveObjects;
|
||||
}
|
||||
}
|
||||
|
||||
private SerializedProperty _instantiateIfNeeded;
|
||||
private SerializedProperty p_instantiateIfNeeded
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_instantiateIfNeeded == null)
|
||||
_instantiateIfNeeded = this.serializedObject.FindProperty("instantiateIfNeeded");
|
||||
return _instantiateIfNeeded;
|
||||
}
|
||||
}
|
||||
|
||||
private SerializedProperty _spawnAsChildren;
|
||||
private SerializedProperty p_spawnAsChildren
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_spawnAsChildren == null)
|
||||
_spawnAsChildren = this.serializedObject.FindProperty("spawnAsChildren");
|
||||
return _spawnAsChildren;
|
||||
}
|
||||
}
|
||||
|
||||
private GUIContent guiContent = new GUIContent();
|
||||
private GUIContent getGuiContent(string label, string tooltip = null)
|
||||
{
|
||||
guiContent.text = label;
|
||||
guiContent.tooltip = tooltip;
|
||||
return guiContent;
|
||||
}
|
||||
|
||||
// GUI ----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
//Options
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
#if UNITY_4_2
|
||||
EditorGUIUtility.LookLikeControls(230f);
|
||||
#else
|
||||
float labelWidth = EditorGUIUtility.labelWidth;
|
||||
EditorGUIUtility.labelWidth = 230f;
|
||||
#endif
|
||||
|
||||
EditorGUILayout.PropertyField(p_hideObjectsInHierarchy, getGuiContent("Hide preloaded objects in Hierarchy", "Will prevent the preloaded instances to show in the Hierarchy"));
|
||||
EditorGUILayout.PropertyField(p_spawnAsChildren, getGuiContent("Spawn as children of this GameObject", "Will place the preloaded instances under this GameObject, for better organization of the Hierarchy"));
|
||||
|
||||
EditorGUILayout.PropertyField(p_onlyGetInactiveObjects, getGuiContent("Only retrieve inactive GameObjects", "Will only return preloaded instances if they are inactive.\nThis means that you have to deactivate the GameObject before being able to reuse it\n(this is already handled on Cartoon FX effects with the CFX_AutoDestructShuriken script)"));
|
||||
bool guiEnabled = GUI.enabled;
|
||||
GUI.enabled = p_onlyGetInactiveObjects.boolValue;
|
||||
EditorGUILayout.PropertyField(p_instantiateIfNeeded, getGuiContent("Instantiate new instances if needed", "If no active GameObject is found in the preloaded list, then instantiate new ones as needed"));
|
||||
GUI.enabled = guiEnabled;
|
||||
|
||||
#if !UNITY_4_2
|
||||
EditorGUIUtility.labelWidth = labelWidth;
|
||||
#endif
|
||||
|
||||
if(EditorGUI.EndChangeCheck())
|
||||
{
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
//Drag/drop Prefabs
|
||||
GUI.SetNextControlName("DragDropBox");
|
||||
EditorGUILayout.HelpBox("Drag GameObjects you want to preload here!\n\nTIP:\nUse the Inspector Lock at the top right to be able to drag multiple objects at once!", MessageType.None);
|
||||
Rect dropRect = GUILayoutUtility.GetLastRect();
|
||||
|
||||
for(int i = 0; i < (this.target as CFX_SpawnSystem).objectsToPreload.Length; i++)
|
||||
{
|
||||
GUILayout.BeginHorizontal();
|
||||
|
||||
EditorGUI.BeginChangeCheck();
|
||||
GameObject obj = (GameObject)EditorGUILayout.ObjectField((this.target as CFX_SpawnSystem).objectsToPreload[i], typeof(GameObject), true);
|
||||
if(EditorGUI.EndChangeCheck())
|
||||
{
|
||||
#if UNITY_4_2
|
||||
Undo.RegisterUndo(target, "change Spawn System object to preload");
|
||||
#else
|
||||
Undo.RecordObject(target, "change Spawn System object to preload");
|
||||
#endif
|
||||
(this.target as CFX_SpawnSystem).objectsToPreload[i] = obj;
|
||||
}
|
||||
EditorGUILayout.LabelField(new GUIContent("times","Number of times to copy the effect\nin the pool, i.e. the max number of\ntimes the object will be used\nsimultaneously"), GUILayout.Width(40));
|
||||
EditorGUI.BeginChangeCheck();
|
||||
int nb = EditorGUILayout.IntField("", (this.target as CFX_SpawnSystem).objectsToPreloadTimes[i], GUILayout.Width(50));
|
||||
if(nb < 1)
|
||||
nb = 1;
|
||||
if(EditorGUI.EndChangeCheck())
|
||||
{
|
||||
#if UNITY_4_2
|
||||
Undo.RegisterUndo(target, "change Spawn System preload count");
|
||||
#else
|
||||
Undo.RecordObject(target, "change Spawn System preload count");
|
||||
#endif
|
||||
(this.target as CFX_SpawnSystem).objectsToPreloadTimes[i] = nb;
|
||||
}
|
||||
|
||||
if(GUI.changed)
|
||||
{
|
||||
EditorUtility.SetDirty(target);
|
||||
}
|
||||
|
||||
if(GUILayout.Button("X", EditorStyles.miniButton, GUILayout.Width(24)))
|
||||
{
|
||||
Object preloadedObject = (this.target as CFX_SpawnSystem).objectsToPreload[i];
|
||||
string objectName = (preloadedObject == null) ? "" : preloadedObject.name;
|
||||
#if UNITY_4_2
|
||||
Undo.RegisterUndo(target, string.Format("remove {0} from Spawn System", objectName));
|
||||
#else
|
||||
Undo.RecordObject(target, string.Format("remove {0} from Spawn System", objectName));
|
||||
#endif
|
||||
ArrayUtility.RemoveAt<GameObject>(ref (this.target as CFX_SpawnSystem).objectsToPreload, i);
|
||||
ArrayUtility.RemoveAt<int>(ref (this.target as CFX_SpawnSystem).objectsToPreloadTimes, i);
|
||||
|
||||
EditorUtility.SetDirty(target);
|
||||
}
|
||||
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
if((Event.current.type == EventType.DragPerform || Event.current.type == EventType.DragUpdated)
|
||||
&& dropRect.Contains(Event.current.mousePosition))
|
||||
{
|
||||
DragAndDrop.visualMode = DragAndDropVisualMode.Copy;
|
||||
|
||||
if(Event.current.type == EventType.DragPerform)
|
||||
{
|
||||
foreach(Object o in DragAndDrop.objectReferences)
|
||||
{
|
||||
if(o is GameObject)
|
||||
{
|
||||
bool already = false;
|
||||
foreach(GameObject otherObj in (this.target as CFX_SpawnSystem).objectsToPreload)
|
||||
{
|
||||
if(o == otherObj)
|
||||
{
|
||||
already = true;
|
||||
Debug.LogWarning("CFX_SpawnSystem: Object has already been added: " + o.name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!already)
|
||||
{
|
||||
#if UNITY_4_2
|
||||
Undo.RegisterUndo(target, string.Format("add {0} to Spawn System", o.name));
|
||||
#else
|
||||
Undo.RecordObject(target, string.Format("add {0} to Spawn System", o.name));
|
||||
#endif
|
||||
ArrayUtility.Add<GameObject>(ref (this.target as CFX_SpawnSystem).objectsToPreload, (GameObject)o);
|
||||
ArrayUtility.Add<int>(ref (this.target as CFX_SpawnSystem).objectsToPreloadTimes, 1);
|
||||
|
||||
EditorUtility.SetDirty(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a20330d93336f2245901dbd9a34b88f8
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1a4e99f62e1b4b40ac0a423acf7c903
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 87d63f8e8fee02f4bb750ed717e60ebf
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,28 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: CFXM3_AuraRays ADD
|
||||
m_Shader: {fileID: 10720, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 13807a919991cfe44b57d7db2be003d8, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _InvFade: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
|
@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 77e3cbacb5b834b42a5ccfe9ad151923
|
||||
NativeFormatImporter:
|
||||
userData:
|
@ -0,0 +1,31 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: CFXM3_GlowDot ADD
|
||||
m_Shader: {fileID: 10720, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: ae3fa1042e1f4b245970c609dd6952c4, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _InvFade: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _TintColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
--- !u!1002 &2100001
|
||||
EditorExtensionImpl:
|
||||
serializedVersion: 6
|
@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 64787e354b16ddf41ab85b12fe15dbff
|
||||
NativeFormatImporter:
|
||||
userData:
|
@ -0,0 +1,28 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: CFXM3_GlowStar ADD
|
||||
m_Shader: {fileID: 10720, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 6cfb04d83be10e549887ebb5340a46f9, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _InvFade: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
|
@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0053b65302e6f7649b1c013c4c41906b
|
||||
NativeFormatImporter:
|
||||
userData:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a6f7d0d209faadf4a8689fea1929013e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,28 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: CFXM3_IceBulk ADD
|
||||
m_Shader: {fileID: 10720, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 8ec934b6b46a3424c961170abc530b6f, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _InvFade: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.23529412}
|
@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b85bac8660bfec243b2385f00819aa04
|
||||
NativeFormatImporter:
|
||||
userData:
|
@ -0,0 +1,28 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: CFXM3_IceSmoke ADD
|
||||
m_Shader: {fileID: 10720, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 8d5678f01a805b84eafa29e231b62e70, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _InvFade: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.23529412}
|
@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0bae96837733cfe40ad617e2bc581c34
|
||||
NativeFormatImporter:
|
||||
userData:
|
@ -0,0 +1,31 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: CFXM3_IceSmoke Intense ADD
|
||||
m_Shader: {fileID: 10720, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 8d5678f01a805b84eafa29e231b62e70, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _InvFade: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _TintColor: {r: 1, g: 1, b: 1, a: 0.5019608}
|
||||
--- !u!1002 &2100001
|
||||
EditorExtensionImpl:
|
||||
serializedVersion: 6
|
@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dbc0726520a1c2a4ea1190e959325a4b
|
||||
NativeFormatImporter:
|
||||
userData:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8c0b7ddf850d2c7449a1ae688cdb0378
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4eec49c450c64394b93925a83d0bf149
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,30 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: CFX_Anim_Electricity_Add
|
||||
m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords:
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 67b0a4cd4c72b86469e7ca179598fcaf, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
- _InvFade: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _TintColor: {r: 1, g: 1, b: 1, a: 0.5}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fcb97c6faf083ca4f978210036f3832b
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 545d633ab98aa144bae8082018b89e3b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,35 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: CFX_ElectricBolt_Add
|
||||
m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
data:
|
||||
first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: 347a4af640f58824d8438fae9b34a012, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
data:
|
||||
first:
|
||||
name: _InvFade
|
||||
second: 1
|
||||
m_Colors:
|
||||
data:
|
||||
first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _TintColor
|
||||
second: {r: .5, g: .5, b: .5, a: .5}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c36c09a0f6dd93458248f001ebce5ab
|
@ -0,0 +1,35 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: CFX_Sparkles_Add
|
||||
m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
data:
|
||||
first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: a070c34b838259a4eb4338c1c5b753b3, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
data:
|
||||
first:
|
||||
name: _InvFade
|
||||
second: 1
|
||||
m_Colors:
|
||||
data:
|
||||
first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _TintColor
|
||||
second: {r: .5, g: .5, b: .5, a: .5}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f70f45ac7c9fb644c9a039b7d3aab297
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c29ee406928386e4d86d6ab379efe507
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,49 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: CFX2_Glow Soft
|
||||
m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 2800000, guid: 0b178db3c9e8755499da46a52e53ce76, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 8a75e78ce03d6bf4aa7ab9b759c2ca32, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _Mask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _InvFade: 0.7322388
|
||||
- _TexCoordScrollX: 1
|
||||
- _TexCoordScrollY: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!1002 &2100001
|
||||
EditorExtensionImpl:
|
||||
serializedVersion: 6
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b6a4ebddb006a4a4bb0bea6365c7512a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,38 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: CFX_WhiteCircle
|
||||
m_Shader: {fileID: 202, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
data:
|
||||
first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: 7b11eec997e4c3044a59e4a2ff710b4e, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
data:
|
||||
first:
|
||||
name: _InvFade
|
||||
second: 1
|
||||
m_Colors:
|
||||
data:
|
||||
first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _TintColor
|
||||
second: {r: .5, g: .5, b: .5, a: .235294119}
|
||||
--- !u!1002 &2100001
|
||||
EditorExtensionImpl:
|
||||
serializedVersion: 6
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1fdeac39b28b45742b821b6c8acff998
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 18f3ccd1122d115498938bdd93b0a6db
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,35 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_Name: CFX_RayRounded
|
||||
m_Shader: {fileID: 202, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_ShaderKeywords: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 2
|
||||
m_TexEnvs:
|
||||
data:
|
||||
first:
|
||||
name: _MainTex
|
||||
second:
|
||||
m_Texture: {fileID: 2800000, guid: 80afd895097ad144893ad78943aaf475, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Floats:
|
||||
data:
|
||||
first:
|
||||
name: _InvFade
|
||||
second: .642985046
|
||||
m_Colors:
|
||||
data:
|
||||
first:
|
||||
name: _Color
|
||||
second: {r: 1, g: 1, b: 1, a: 1}
|
||||
data:
|
||||
first:
|
||||
name: _TintColor
|
||||
second: {r: .5, g: .5, b: .5, a: .5}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7cd73ef8e5a31a244a672ae32c0f6ddb
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 478658f3c44239740a565a63edec7e70
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
// Cartoon FX - (c) 2013,2014 Jean Moreno
|
||||
|
||||
// Indefinitely rotates an object at a constant speed
|
||||
|
||||
public class CFX2_AutoRotate : MonoBehaviour
|
||||
{
|
||||
public Vector3 speed = new Vector3(0,40f,0);
|
||||
|
||||
void Update ()
|
||||
{
|
||||
transform.Rotate(speed * Time.deltaTime);
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27a58d422b4911f42bd5bd9d8caf6f8f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,44 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
// Cartoon FX - (c) 2015 Jean Moreno
|
||||
|
||||
// Automatically destructs an object when it has stopped emitting particles and when they have all disappeared from the screen.
|
||||
// Check is performed every 0.5 seconds to not query the particle system's state every frame.
|
||||
// (only deactivates the object if the OnlyDeactivate flag is set, automatically used with CFX Spawn System)
|
||||
|
||||
[RequireComponent(typeof(ParticleSystem))]
|
||||
public class CFX_AutoDestructShuriken : MonoBehaviour
|
||||
{
|
||||
// If true, deactivate the object instead of destroying it
|
||||
public bool OnlyDeactivate;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
StartCoroutine("CheckIfAlive");
|
||||
}
|
||||
|
||||
IEnumerator CheckIfAlive ()
|
||||
{
|
||||
ParticleSystem ps = this.GetComponent<ParticleSystem>();
|
||||
|
||||
while(true && ps != null)
|
||||
{
|
||||
yield return new WaitForSeconds(0.5f);
|
||||
if(!ps.IsAlive(true))
|
||||
{
|
||||
if(OnlyDeactivate)
|
||||
{
|
||||
#if UNITY_3_5
|
||||
this.gameObject.SetActiveRecursively(false);
|
||||
#else
|
||||
this.gameObject.SetActive(false);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
GameObject.Destroy(this.gameObject);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6fd2e8874f60266498a388d7229a1bac
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
@ -0,0 +1,20 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
// Cartoon FX - (c) 2015 Jean Moreno
|
||||
|
||||
// Indefinitely rotates an object at a constant speed
|
||||
|
||||
public class CFX_AutoRotate : MonoBehaviour
|
||||
{
|
||||
// Rotation speed & axis
|
||||
public Vector3 rotation;
|
||||
|
||||
// Rotation space
|
||||
public Space space = Space.Self;
|
||||
|
||||
void Update()
|
||||
{
|
||||
this.transform.Rotate(rotation * Time.deltaTime, space);
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b78c1ba9facacbd48b8e1d9a4fb3ee0d
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
// Cartoon FX - (c) 2015 Jean Moreno
|
||||
|
||||
// Automatically destroys the GameObject when there are no children left.
|
||||
|
||||
public class CFX_AutodestructWhenNoChildren : MonoBehaviour
|
||||
{
|
||||
// Update is called once per frame
|
||||
void Update ()
|
||||
{
|
||||
if( transform.childCount == 0)
|
||||
{
|
||||
GameObject.Destroy(this.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aeafe347c69d67e41b5deb895305e834
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 79c859f5f7a87c8438b7a5e91d7f499e
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
@ -0,0 +1,65 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
// Cartoon FX - (c) 2015 Jean Moreno
|
||||
|
||||
// Decreases a light's intensity over time.
|
||||
|
||||
[RequireComponent(typeof(Light))]
|
||||
public class CFX_LightIntensityFade : MonoBehaviour
|
||||
{
|
||||
// Duration of the effect.
|
||||
public float duration = 1.0f;
|
||||
|
||||
// Delay of the effect.
|
||||
public float delay = 0.0f;
|
||||
|
||||
/// Final intensity of the light.
|
||||
public float finalIntensity = 0.0f;
|
||||
|
||||
// Base intensity, automatically taken from light parameters.
|
||||
private float baseIntensity;
|
||||
|
||||
// If <c>true</c>, light will destructs itself on completion of the effect
|
||||
public bool autodestruct;
|
||||
|
||||
private float p_lifetime = 0.0f;
|
||||
private float p_delay;
|
||||
|
||||
void Start()
|
||||
{
|
||||
baseIntensity = GetComponent<Light>().intensity;
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
p_lifetime = 0.0f;
|
||||
p_delay = delay;
|
||||
if(delay > 0) GetComponent<Light>().enabled = false;
|
||||
}
|
||||
|
||||
void Update ()
|
||||
{
|
||||
if(p_delay > 0)
|
||||
{
|
||||
p_delay -= Time.deltaTime;
|
||||
if(p_delay <= 0)
|
||||
{
|
||||
GetComponent<Light>().enabled = true;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(p_lifetime/duration < 1.0f)
|
||||
{
|
||||
GetComponent<Light>().intensity = Mathf.Lerp(baseIntensity, finalIntensity, p_lifetime/duration);
|
||||
p_lifetime += Time.deltaTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(autodestruct)
|
||||
GameObject.Destroy(this.gameObject);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c2255468ea97f384a9ebbb13e497e050
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
@ -0,0 +1,37 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
// Cartoon FX - (c) 2015, Jean Moreno
|
||||
|
||||
// Drag/Drop this script on a Particle System (or an object having Particle System objects as children) to prevent a Shuriken bug
|
||||
// where a system would emit at its original instantiated position before being translated, resulting in particles in-between
|
||||
// the two positions.
|
||||
// Possibly a threading bug from Unity (as of 3.5.4)
|
||||
|
||||
public class CFX_ShurikenThreadFix : MonoBehaviour
|
||||
{
|
||||
private ParticleSystem[] systems;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
systems = GetComponentsInChildren<ParticleSystem>();
|
||||
|
||||
foreach(ParticleSystem ps in systems)
|
||||
{
|
||||
ps.Stop(true);
|
||||
ps.Clear(true);
|
||||
}
|
||||
|
||||
StartCoroutine("WaitFrame");
|
||||
}
|
||||
|
||||
IEnumerator WaitFrame()
|
||||
{
|
||||
yield return null;
|
||||
|
||||
foreach(ParticleSystem ps in systems)
|
||||
{
|
||||
ps.Play(true);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 275fc5543f4e43c48a8b9ce3c3b559e0
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue