forked from Unity-Technologies/EntityComponentSystemSamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathParticleComponents.cs
More file actions
56 lines (47 loc) · 1.08 KB
/
Copy pathParticleComponents.cs
File metadata and controls
56 lines (47 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using Unity.Entities;
using Unity.Mathematics;
using Unity.Rendering;
public struct Particle : IComponentData
{}
public struct ParticleAge : IComponentData
{
public ParticleAge(float maxAge)
{
this.maxAge = maxAge;
age = 0;
}
public float maxAge;
public float age;
}
public struct ParticleVelocity : IComponentData
{
public ParticleVelocity(float2 velocity)
{
this.velocity = velocity;
}
public float2 velocity;
}
public struct ParticleColorTransition : IComponentData
{
public ParticleColorTransition(float4 start, float4 end)
{
startColor = start;
endColor = end;
}
public float4 startColor;
public float4 endColor;
}
public struct ParticleSizeTransition : IComponentData
{
public ParticleSizeTransition(float startL, float startW, float endL, float endW)
{
startLength = startL;
startWidth = startW;
endLength = endL;
endWidth = endW;
}
public float startLength;
public float startWidth;
public float endLength;
public float endWidth;
}