test
testing
This commit is contained in:
BIN
Binary file not shown.
+4
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 49d7999f9fb85954c9541f9a0b0486c3
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
BIN
Binary file not shown.
+4
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5cae1a02f5362443284e452c3020967f
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
var startTimeMin : float = 0;
|
||||
var startTimeMax : float = 0;
|
||||
var stopTimeMin : float = 10;
|
||||
var stopTimeMax : float = 10;
|
||||
|
||||
var firstMaterial : Material;
|
||||
var secondMaterial : Material;
|
||||
|
||||
private var startTime : float;
|
||||
private var stopTime : float;
|
||||
|
||||
//the time at which this came into existence
|
||||
private var spawnTime : float;
|
||||
private var isReallyOn : boolean;
|
||||
function Start ()
|
||||
{
|
||||
isReallyOn = this.particleEmitter.emit;
|
||||
|
||||
//this kind of emitter should always start off
|
||||
this.particleEmitter.emit = false;
|
||||
|
||||
spawnTime = Time.time;
|
||||
|
||||
//get a random number between startTimeMin and Max
|
||||
startTime = (Random.value * (startTimeMax - startTimeMin)) + startTimeMin + Time.time;
|
||||
stopTime = (Random.value * (stopTimeMax - stopTimeMin)) + stopTimeMin + Time.time;
|
||||
|
||||
//assign a random material
|
||||
if (Random.value > 0.5)
|
||||
{
|
||||
this.renderer.material = firstMaterial;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.renderer.material = secondMaterial;
|
||||
}
|
||||
}
|
||||
|
||||
function FixedUpdate ()
|
||||
{
|
||||
//is the start time passed? turn emit on
|
||||
if (Time.time > startTime)
|
||||
{
|
||||
this.particleEmitter.emit = isReallyOn;
|
||||
}
|
||||
|
||||
if (Time.time > stopTime)
|
||||
{
|
||||
this.particleEmitter.emit = false;
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df92d695c4ff68242accb9e653b5d492
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
BIN
Binary file not shown.
+4
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: abdc837d9a07acd409959e581ef68e61
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73f397fcfa3321a49ac827430c240174
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
userData:
|
||||
BIN
Binary file not shown.
+4
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3049dffabc5225d40b27675901977fdd
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
BIN
Binary file not shown.
+4
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02a46fb295082ed488cab61782ddc01f
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
BIN
Binary file not shown.
+4
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b74c77ac638a7df4888a2868fe0c8da3
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
BIN
Binary file not shown.
+4
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b4d8055067ce04d4c98367d69c10b358
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
BIN
Binary file not shown.
+4
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 21588279b895eef48a0448f7f2519813
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
BIN
Binary file not shown.
+4
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2d7e594d401a7524e82695dcd66c2bc0
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
BIN
Binary file not shown.
+4
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 36aa334bd0865ca459c9b3dfbbaf7198
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
BIN
Binary file not shown.
+4
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89e463182d43fd449ad551ac8dbeb99f
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
BIN
Binary file not shown.
+4
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35c8aea4fddc3f842bd829a8fd3d7e1c
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
BIN
Binary file not shown.
+4
@@ -0,0 +1,4 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f06b8099b9784ec43ba5312c467321e4
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
Reference in New Issue
Block a user