예제 #1
0
		protected override void Init()
		{
			if (InitialModuleUI.s_Texts == null)
			{
				InitialModuleUI.s_Texts = new InitialModuleUI.Texts();
			}
			if (this.m_LengthInSec != null)
			{
				return;
			}
			this.m_LengthInSec = base.GetProperty0("lengthInSec");
			this.m_Looping = base.GetProperty0("looping");
			this.m_Prewarm = base.GetProperty0("prewarm");
			this.m_StartDelay = base.GetProperty0("startDelay");
			this.m_PlayOnAwake = base.GetProperty0("playOnAwake");
			this.m_SimulationSpace = base.GetProperty0("moveWithTransform");
			this.m_LifeTime = new SerializedMinMaxCurve(this, InitialModuleUI.s_Texts.lifetime, "startLifetime");
			this.m_Speed = new SerializedMinMaxCurve(this, InitialModuleUI.s_Texts.speed, "startSpeed", ModuleUI.kUseSignedRange);
			this.m_Color = new SerializedMinMaxGradient(this, "startColor");
			this.m_Size = new SerializedMinMaxCurve(this, InitialModuleUI.s_Texts.size, "startSize");
			this.m_Rotation = new SerializedMinMaxCurve(this, InitialModuleUI.s_Texts.rotation, "startRotation", ModuleUI.kUseSignedRange);
			this.m_Rotation.m_RemapValue = 57.29578f;
			this.m_Rotation.m_DefaultCurveScalar = 3.14159274f;
			this.m_GravityModifier = base.GetProperty("gravityModifier");
			this.m_InheritVelocity = base.GetProperty("inheritVelocity");
			this.m_MaxNumParticles = base.GetProperty("maxNumParticles");
		}
예제 #2
0
 protected override void Init()
 {
   if (this.m_Curve != null)
     return;
   this.m_Curve = new SerializedMinMaxCurve((ModuleUI) this, this.m_SizeText);
   this.m_Curve.m_AllowConstant = false;
 }
 protected override void Init()
 {
   if (InitialModuleUI.s_Texts == null)
     InitialModuleUI.s_Texts = new InitialModuleUI.Texts();
   if (this.m_LengthInSec != null)
     return;
   this.m_LengthInSec = this.GetProperty0("lengthInSec");
   this.m_Looping = this.GetProperty0("looping");
   this.m_Prewarm = this.GetProperty0("prewarm");
   this.m_StartDelay = new SerializedMinMaxCurve((ModuleUI) this, InitialModuleUI.s_Texts.startDelay, "startDelay", false, true);
   this.m_StartDelay.m_AllowCurves = false;
   this.m_PlayOnAwake = this.GetProperty0("playOnAwake");
   this.m_SimulationSpace = this.GetProperty0("moveWithTransform");
   this.m_ScalingMode = this.GetProperty0("scalingMode");
   this.m_LifeTime = new SerializedMinMaxCurve((ModuleUI) this, InitialModuleUI.s_Texts.lifetime, "startLifetime");
   this.m_Speed = new SerializedMinMaxCurve((ModuleUI) this, InitialModuleUI.s_Texts.speed, "startSpeed", ModuleUI.kUseSignedRange);
   this.m_Color = new SerializedMinMaxGradient((SerializedModule) this, "startColor");
   this.m_Size = new SerializedMinMaxCurve((ModuleUI) this, InitialModuleUI.s_Texts.size, "startSize");
   this.m_Rotation3D = this.GetProperty("rotation3D");
   this.m_RotationX = new SerializedMinMaxCurve((ModuleUI) this, InitialModuleUI.s_Texts.x, "startRotationX", ModuleUI.kUseSignedRange);
   this.m_RotationY = new SerializedMinMaxCurve((ModuleUI) this, InitialModuleUI.s_Texts.y, "startRotationY", ModuleUI.kUseSignedRange);
   this.m_RotationZ = new SerializedMinMaxCurve((ModuleUI) this, InitialModuleUI.s_Texts.z, "startRotation", ModuleUI.kUseSignedRange);
   this.m_RotationX.m_RemapValue = 57.29578f;
   this.m_RotationY.m_RemapValue = 57.29578f;
   this.m_RotationZ.m_RemapValue = 57.29578f;
   this.m_RotationX.m_DefaultCurveScalar = 3.141593f;
   this.m_RotationY.m_DefaultCurveScalar = 3.141593f;
   this.m_RotationZ.m_DefaultCurveScalar = 3.141593f;
   this.m_RandomizeRotationDirection = this.GetProperty("randomizeRotationDirection");
   this.m_GravityModifier = this.GetProperty("gravityModifier");
   this.m_MaxNumParticles = this.GetProperty("maxNumParticles");
 }
예제 #4
0
 protected override void Init()
 {
     if (this.m_Curve == null)
     {
         this.m_Curve = new SerializedMinMaxCurve(this, this.m_SizeText);
         this.m_Curve.m_AllowConstant = false;
     }
 }
 protected override void Init()
 {
   if (this.m_Curve != null)
     return;
   if (InheritVelocityModuleUI.s_Texts == null)
     InheritVelocityModuleUI.s_Texts = new InheritVelocityModuleUI.Texts();
   this.m_Mode = this.GetProperty("m_Mode");
   this.m_Curve = new SerializedMinMaxCurve((ModuleUI) this, GUIContent.none, "m_Curve", ModuleUI.kUseSignedRange);
 }
 protected override void Init()
 {
   if (this.m_Curve != null)
     return;
   if (SizeByVelocityModuleUI.s_Texts == null)
     SizeByVelocityModuleUI.s_Texts = new SizeByVelocityModuleUI.Texts();
   this.m_Curve = new SerializedMinMaxCurve((ModuleUI) this, SizeByVelocityModuleUI.s_Texts.size);
   this.m_Curve.m_AllowConstant = false;
   this.m_Range = this.GetProperty("range");
 }
 protected override void Init()
 {
   if (this.m_X != null)
     return;
   if (VelocityModuleUI.s_Texts == null)
     VelocityModuleUI.s_Texts = new VelocityModuleUI.Texts();
   this.m_X = new SerializedMinMaxCurve((ModuleUI) this, VelocityModuleUI.s_Texts.x, "x", ModuleUI.kUseSignedRange);
   this.m_Y = new SerializedMinMaxCurve((ModuleUI) this, VelocityModuleUI.s_Texts.y, "y", ModuleUI.kUseSignedRange);
   this.m_Z = new SerializedMinMaxCurve((ModuleUI) this, VelocityModuleUI.s_Texts.z, "z", ModuleUI.kUseSignedRange);
   this.m_InWorldSpace = this.GetProperty("inWorldSpace");
 }
예제 #8
0
 protected override void Init()
 {
     if (this.m_Curve == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_Curve = new SerializedMinMaxCurve(this, s_Texts.rotation, ModuleUI.kUseSignedRange);
         this.m_Curve.m_RemapValue = 57.29578f;
     }
 }
예제 #9
0
		protected override void Init()
		{
			if (this.m_Curve != null)
			{
				return;
			}
			if (RotationModuleUI.s_Texts == null)
			{
				RotationModuleUI.s_Texts = new RotationModuleUI.Texts();
			}
			this.m_Curve = new SerializedMinMaxCurve(this, RotationModuleUI.s_Texts.rotation, ModuleUI.kUseSignedRange);
			this.m_Curve.m_RemapValue = 57.29578f;
		}
예제 #10
0
 protected override void Init()
 {
     if (this.m_Curve == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_Curve = new SerializedMinMaxCurve(this, s_Texts.size);
         this.m_Curve.m_AllowConstant = false;
         this.m_Range = base.GetProperty("range");
     }
 }
예제 #11
0
 protected override void Init()
 {
   if (this.m_TilesX != null)
     return;
   if (UVModuleUI.s_Texts == null)
     UVModuleUI.s_Texts = new UVModuleUI.Texts();
   this.m_FrameOverTime = new SerializedMinMaxCurve((ModuleUI) this, UVModuleUI.s_Texts.frameOverTime, "frameOverTime");
   this.m_TilesX = this.GetProperty("tilesX");
   this.m_TilesY = this.GetProperty("tilesY");
   this.m_AnimationType = this.GetProperty("animationType");
   this.m_Cycles = this.GetProperty("cycles");
   this.m_RandomRow = this.GetProperty("randomRow");
   this.m_RowIndex = this.GetProperty("rowIndex");
 }
 protected override void Init()
 {
   if (this.m_Z != null)
     return;
   if (RotationModuleUI.s_Texts == null)
     RotationModuleUI.s_Texts = new RotationModuleUI.Texts();
   this.m_X = new SerializedMinMaxCurve((ModuleUI) this, RotationModuleUI.s_Texts.x, "x", ModuleUI.kUseSignedRange);
   this.m_Y = new SerializedMinMaxCurve((ModuleUI) this, RotationModuleUI.s_Texts.y, "y", ModuleUI.kUseSignedRange);
   this.m_Z = new SerializedMinMaxCurve((ModuleUI) this, RotationModuleUI.s_Texts.z, "curve", ModuleUI.kUseSignedRange);
   this.m_X.m_RemapValue = 57.29578f;
   this.m_Y.m_RemapValue = 57.29578f;
   this.m_Z.m_RemapValue = 57.29578f;
   this.m_SeparateAxes = this.GetProperty("separateAxes");
 }
 protected override void Init()
 {
   if (this.m_X != null)
     return;
   if (ClampVelocityModuleUI.s_Texts == null)
     ClampVelocityModuleUI.s_Texts = new ClampVelocityModuleUI.Texts();
   this.m_X = new SerializedMinMaxCurve((ModuleUI) this, ClampVelocityModuleUI.s_Texts.x, "x", ModuleUI.kUseSignedRange);
   this.m_Y = new SerializedMinMaxCurve((ModuleUI) this, ClampVelocityModuleUI.s_Texts.y, "y", ModuleUI.kUseSignedRange);
   this.m_Z = new SerializedMinMaxCurve((ModuleUI) this, ClampVelocityModuleUI.s_Texts.z, "z", ModuleUI.kUseSignedRange);
   this.m_Magnitude = new SerializedMinMaxCurve((ModuleUI) this, ClampVelocityModuleUI.s_Texts.magnitude, "magnitude");
   this.m_SeparateAxes = this.GetProperty("separateAxis");
   this.m_InWorldSpace = this.GetProperty("inWorldSpace");
   this.m_Dampen = this.GetProperty("dampen");
 }
예제 #14
0
 protected override void Init()
 {
     if (this.m_X == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_X = new SerializedMinMaxCurve(this, s_Texts.x, "x", ModuleUI.kUseSignedRange);
         this.m_Y = new SerializedMinMaxCurve(this, s_Texts.y, "y", ModuleUI.kUseSignedRange);
         this.m_Z = new SerializedMinMaxCurve(this, s_Texts.z, "z", ModuleUI.kUseSignedRange);
         this.m_InWorldSpace = base.GetProperty("inWorldSpace");
     }
 }
예제 #15
0
		protected override void Init()
		{
			if (this.m_X != null)
			{
				return;
			}
			if (ForceModuleUI.s_Texts == null)
			{
				ForceModuleUI.s_Texts = new ForceModuleUI.Texts();
			}
			this.m_X = new SerializedMinMaxCurve(this, ForceModuleUI.s_Texts.x, "x", ModuleUI.kUseSignedRange);
			this.m_Y = new SerializedMinMaxCurve(this, ForceModuleUI.s_Texts.y, "y", ModuleUI.kUseSignedRange);
			this.m_Z = new SerializedMinMaxCurve(this, ForceModuleUI.s_Texts.z, "z", ModuleUI.kUseSignedRange);
			this.m_RandomizePerFrame = base.GetProperty("randomizePerFrame");
			this.m_InWorldSpace = base.GetProperty("inWorldSpace");
		}
예제 #16
0
 protected override void Init()
 {
     if (this.m_X == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_X = new SerializedMinMaxCurve(this, s_Texts.x, "curve");
         this.m_Y = new SerializedMinMaxCurve(this, s_Texts.y, "y");
         this.m_Z = new SerializedMinMaxCurve(this, s_Texts.z, "z");
         this.m_X.m_AllowConstant = false;
         this.m_Y.m_AllowConstant = false;
         this.m_Z.m_AllowConstant = false;
         this.m_SeparateAxes = base.GetProperty("separateAxes");
     }
 }
예제 #17
0
 protected override void Init()
 {
     if (this.m_X == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_X = new SerializedMinMaxCurve(this, s_Texts.x, "x", ModuleUI.kUseSignedRange);
         this.m_Y = new SerializedMinMaxCurve(this, s_Texts.y, "y", ModuleUI.kUseSignedRange);
         this.m_Z = new SerializedMinMaxCurve(this, s_Texts.z, "z", ModuleUI.kUseSignedRange);
         this.m_Magnitude = new SerializedMinMaxCurve(this, s_Texts.magnitude, "magnitude");
         this.m_SeparateAxis = base.GetProperty("separateAxis");
         this.m_InWorldSpace = base.GetProperty("inWorldSpace");
         this.m_Dampen = base.GetProperty("dampen");
     }
 }
예제 #18
0
 protected override void Init()
 {
     if (this.m_TilesX == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_FrameOverTime = new SerializedMinMaxCurve(this, s_Texts.frameOverTime, "frameOverTime");
         this.m_TilesX = base.GetProperty("tilesX");
         this.m_TilesY = base.GetProperty("tilesY");
         this.m_AnimationType = base.GetProperty("animationType");
         this.m_Cycles = base.GetProperty("cycles");
         this.m_RandomRow = base.GetProperty("randomRow");
         this.m_RowIndex = base.GetProperty("rowIndex");
     }
 }
예제 #19
0
 protected override void Init()
 {
     if (this.m_Z == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_X = new SerializedMinMaxCurve(this, s_Texts.x, "x", ModuleUI.kUseSignedRange);
         this.m_Y = new SerializedMinMaxCurve(this, s_Texts.y, "y", ModuleUI.kUseSignedRange);
         this.m_Z = new SerializedMinMaxCurve(this, s_Texts.z, "curve", ModuleUI.kUseSignedRange);
         this.m_X.m_RemapValue = 57.29578f;
         this.m_Y.m_RemapValue = 57.29578f;
         this.m_Z.m_RemapValue = 57.29578f;
         this.m_SeparateAxes = base.GetProperty("separateAxes");
     }
 }
예제 #20
0
 protected override void Init()
 {
     if (this.m_StrengthX == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_StrengthX = new SerializedMinMaxCurve(this, s_Texts.x, "strength", ModuleUI.kUseSignedRange);
         this.m_StrengthY = new SerializedMinMaxCurve(this, s_Texts.y, "strengthY", ModuleUI.kUseSignedRange);
         this.m_StrengthZ = new SerializedMinMaxCurve(this, s_Texts.z, "strengthZ", ModuleUI.kUseSignedRange);
         this.m_SeparateAxes = base.GetProperty("separateAxes");
         this.m_Damping = base.GetProperty("damping");
         this.m_Frequency = base.GetProperty("frequency");
         this.m_Octaves = base.GetProperty("octaves");
         this.m_OctaveMultiplier = base.GetProperty("octaveMultiplier");
         this.m_OctaveScale = base.GetProperty("octaveScale");
         this.m_Quality = base.GetProperty("quality");
         this.m_ScrollSpeed = new SerializedMinMaxCurve(this, s_Texts.scrollSpeed, "scrollSpeed", ModuleUI.kUseSignedRange);
         this.m_ScrollSpeed.m_AllowRandom = false;
         this.m_RemapX = new SerializedMinMaxCurve(this, s_Texts.x, "remap", ModuleUI.kUseSignedRange);
         this.m_RemapY = new SerializedMinMaxCurve(this, s_Texts.y, "remapY", ModuleUI.kUseSignedRange);
         this.m_RemapZ = new SerializedMinMaxCurve(this, s_Texts.z, "remapZ", ModuleUI.kUseSignedRange);
         this.m_RemapX.m_AllowRandom = false;
         this.m_RemapY.m_AllowRandom = false;
         this.m_RemapZ.m_AllowRandom = false;
         this.m_RemapX.m_AllowConstant = false;
         this.m_RemapY.m_AllowConstant = false;
         this.m_RemapZ.m_AllowConstant = false;
         this.m_RemapEnabled = base.GetProperty("remapEnabled");
         if (s_PreviewTexture == null)
         {
             s_PreviewTexture = new Texture2D(0x60, 0x60, TextureFormat.RGBA32, false, true);
             s_PreviewTexture.name = "ParticleNoisePreview";
             s_PreviewTexture.filterMode = FilterMode.Bilinear;
             s_PreviewTexture.hideFlags = HideFlags.HideAndDontSave;
             s_Texts.previewTexture.image = s_PreviewTexture;
         }
         s_PreviewTextureDirty = true;
         this.previewTextureStyle = new GUIStyle(ParticleSystemStyles.Get().label);
         this.previewTextureStyle.alignment = TextAnchor.LowerCenter;
         this.previewTextureStyle.imagePosition = ImagePosition.ImageAbove;
     }
 }
예제 #21
0
 protected override void Init()
 {
     if (this.m_Ratio == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_Ratio = base.GetProperty("ratio");
         this.m_RandomDistribution = base.GetProperty("randomDistribution");
         this.m_Light = base.GetProperty("light");
         this.m_UseParticleColor = base.GetProperty("color");
         this.m_SizeAffectsRange = base.GetProperty("range");
         this.m_AlphaAffectsIntensity = base.GetProperty("intensity");
         this.m_MaxLights = base.GetProperty("maxLights");
         this.m_Range = new SerializedMinMaxCurve(this, s_Texts.rangeCurve, "rangeCurve");
         this.m_Intensity = new SerializedMinMaxCurve(this, s_Texts.intensityCurve, "intensityCurve");
     }
 }
예제 #22
0
 protected override void Init()
 {
     if (s_Texts == null)
     {
         s_Texts = new Texts();
     }
     if (this.m_LengthInSec == null)
     {
         this.m_LengthInSec = base.GetProperty0("lengthInSec");
         this.m_Looping = base.GetProperty0("looping");
         this.m_Prewarm = base.GetProperty0("prewarm");
         this.m_StartDelay = new SerializedMinMaxCurve(this, s_Texts.startDelay, "startDelay", false, true);
         this.m_StartDelay.m_AllowCurves = false;
         this.m_PlayOnAwake = base.GetProperty0("playOnAwake");
         this.m_SimulationSpace = base.GetProperty0("moveWithTransform");
         this.m_CustomSimulationSpace = base.GetProperty0("moveWithCustomTransform");
         this.m_SimulationSpeed = base.GetProperty0("simulationSpeed");
         this.m_ScalingMode = base.GetProperty0("scalingMode");
         this.m_AutoRandomSeed = base.GetProperty0("autoRandomSeed");
         this.m_RandomSeed = base.GetProperty0("randomSeed");
         this.m_LifeTime = new SerializedMinMaxCurve(this, s_Texts.lifetime, "startLifetime");
         this.m_Speed = new SerializedMinMaxCurve(this, s_Texts.speed, "startSpeed", ModuleUI.kUseSignedRange);
         this.m_Color = new SerializedMinMaxGradient(this, "startColor");
         this.m_Color.m_AllowRandomColor = true;
         this.m_Size3D = base.GetProperty("size3D");
         this.m_SizeX = new SerializedMinMaxCurve(this, s_Texts.x, "startSize");
         this.m_SizeY = new SerializedMinMaxCurve(this, s_Texts.y, "startSizeY");
         this.m_SizeZ = new SerializedMinMaxCurve(this, s_Texts.z, "startSizeZ");
         this.m_Rotation3D = base.GetProperty("rotation3D");
         this.m_RotationX = new SerializedMinMaxCurve(this, s_Texts.x, "startRotationX", ModuleUI.kUseSignedRange);
         this.m_RotationY = new SerializedMinMaxCurve(this, s_Texts.y, "startRotationY", ModuleUI.kUseSignedRange);
         this.m_RotationZ = new SerializedMinMaxCurve(this, s_Texts.z, "startRotation", ModuleUI.kUseSignedRange);
         this.m_RotationX.m_RemapValue = 57.29578f;
         this.m_RotationY.m_RemapValue = 57.29578f;
         this.m_RotationZ.m_RemapValue = 57.29578f;
         this.m_RotationX.m_DefaultCurveScalar = 3.141593f;
         this.m_RotationY.m_DefaultCurveScalar = 3.141593f;
         this.m_RotationZ.m_DefaultCurveScalar = 3.141593f;
         this.m_RandomizeRotationDirection = base.GetProperty("randomizeRotationDirection");
         this.m_GravityModifier = new SerializedMinMaxCurve(this, s_Texts.gravity, "gravityModifier", ModuleUI.kUseSignedRange);
         this.m_MaxNumParticles = base.GetProperty("maxNumParticles");
     }
 }
 protected override void Init()
 {
   if (EmissionModuleUI.s_Texts == null)
     EmissionModuleUI.s_Texts = new EmissionModuleUI.Texts();
   if (this.m_BurstCount != null)
     return;
   this.m_Type = this.GetProperty("m_Type");
   this.m_Rate = new SerializedMinMaxCurve((ModuleUI) this, EmissionModuleUI.s_Texts.rate, "rate");
   this.m_BurstTime[0] = this.GetProperty("time0");
   this.m_BurstTime[1] = this.GetProperty("time1");
   this.m_BurstTime[2] = this.GetProperty("time2");
   this.m_BurstTime[3] = this.GetProperty("time3");
   this.m_BurstParticleMinCount[0] = this.GetProperty("cnt0");
   this.m_BurstParticleMinCount[1] = this.GetProperty("cnt1");
   this.m_BurstParticleMinCount[2] = this.GetProperty("cnt2");
   this.m_BurstParticleMinCount[3] = this.GetProperty("cnt3");
   this.m_BurstParticleMaxCount[0] = this.GetProperty("cntmax0");
   this.m_BurstParticleMaxCount[1] = this.GetProperty("cntmax1");
   this.m_BurstParticleMaxCount[2] = this.GetProperty("cntmax2");
   this.m_BurstParticleMaxCount[3] = this.GetProperty("cntmax3");
   this.m_BurstCount = this.GetProperty("m_BurstCount");
 }
예제 #24
0
 protected override void Init()
 {
     if (this.m_Ratio == null)
     {
         if (s_Texts == null)
         {
             s_Texts = new Texts();
         }
         this.m_Ratio = base.GetProperty("ratio");
         this.m_Lifetime = new SerializedMinMaxCurve(this, s_Texts.lifetime, "lifetime");
         this.m_MinVertexDistance = base.GetProperty("minVertexDistance");
         this.m_TextureMode = base.GetProperty("textureMode");
         this.m_WorldSpace = base.GetProperty("worldSpace");
         this.m_DieWithParticles = base.GetProperty("dieWithParticles");
         this.m_SizeAffectsWidth = base.GetProperty("sizeAffectsWidth");
         this.m_SizeAffectsLifetime = base.GetProperty("sizeAffectsLifetime");
         this.m_InheritParticleColor = base.GetProperty("inheritParticleColor");
         this.m_ColorOverLifetime = new SerializedMinMaxGradient(this, "colorOverLifetime");
         this.m_WidthOverTrail = new SerializedMinMaxCurve(this, s_Texts.widthOverTrail, "widthOverTrail");
         this.m_ColorOverTrail = new SerializedMinMaxGradient(this, "colorOverTrail");
     }
 }
예제 #25
0
		protected override void Init()
		{
			if (EmissionModuleUI.s_Texts == null)
			{
				EmissionModuleUI.s_Texts = new EmissionModuleUI.Texts();
			}
			if (this.m_BurstCount != null)
			{
				return;
			}
			this.m_Type = base.GetProperty("m_Type");
			this.m_Rate = new SerializedMinMaxCurve(this, EmissionModuleUI.s_Texts.rate, "rate");
			this.m_Rate.m_AllowRandom = false;
			this.m_BurstTime[0] = base.GetProperty("time0");
			this.m_BurstTime[1] = base.GetProperty("time1");
			this.m_BurstTime[2] = base.GetProperty("time2");
			this.m_BurstTime[3] = base.GetProperty("time3");
			this.m_BurstParticleCount[0] = base.GetProperty("cnt0");
			this.m_BurstParticleCount[1] = base.GetProperty("cnt1");
			this.m_BurstParticleCount[2] = base.GetProperty("cnt2");
			this.m_BurstParticleCount[3] = base.GetProperty("cnt3");
			this.m_BurstCount = base.GetProperty("m_BurstCount");
		}
예제 #26
0
 protected override void Init()
 {
     if (this.m_TilesX == null)
     {
         if (UVModuleUI.s_Texts == null)
         {
             UVModuleUI.s_Texts = new UVModuleUI.Texts();
         }
         this.m_Mode                     = base.GetProperty("mode");
         this.m_FrameOverTime            = new SerializedMinMaxCurve(this, UVModuleUI.s_Texts.frameOverTime, "frameOverTime");
         this.m_StartFrame               = new SerializedMinMaxCurve(this, UVModuleUI.s_Texts.startFrame, "startFrame");
         this.m_StartFrame.m_AllowCurves = false;
         this.m_TilesX                   = base.GetProperty("tilesX");
         this.m_TilesY                   = base.GetProperty("tilesY");
         this.m_AnimationType            = base.GetProperty("animationType");
         this.m_RandomRow                = base.GetProperty("randomRow");
         this.m_RowIndex                 = base.GetProperty("rowIndex");
         this.m_Sprites                  = base.GetProperty("sprites");
         this.m_Cycles                   = base.GetProperty("cycles");
         this.m_UVChannelMask            = base.GetProperty("uvChannelMask");
         this.m_FlipU                    = base.GetProperty("flipU");
         this.m_FlipV                    = base.GetProperty("flipV");
     }
 }
 protected override void Init()
 {
   if (this.m_Type != null)
     return;
   if (CollisionModuleUI.s_Texts == null)
     CollisionModuleUI.s_Texts = new CollisionModuleUI.Texts();
   this.m_Type = this.GetProperty("type");
   List<SerializedProperty> serializedPropertyList = new List<SerializedProperty>();
   for (int index = 0; index < this.m_Planes.Length; ++index)
   {
     this.m_Planes[index] = this.GetProperty("plane" + (object) index);
     if (index == 0 || this.m_Planes[index].objectReferenceValue != (Object) null)
       serializedPropertyList.Add(this.m_Planes[index]);
   }
   this.m_ShownPlanes = serializedPropertyList.ToArray();
   this.m_Dampen = new SerializedMinMaxCurve((ModuleUI) this, CollisionModuleUI.s_Texts.dampen, "m_Dampen");
   this.m_Dampen.m_AllowCurves = false;
   this.m_Bounce = new SerializedMinMaxCurve((ModuleUI) this, CollisionModuleUI.s_Texts.bounce, "m_Bounce");
   this.m_Bounce.m_AllowCurves = false;
   this.m_LifetimeLossOnCollision = new SerializedMinMaxCurve((ModuleUI) this, CollisionModuleUI.s_Texts.lifetimeLoss, "m_EnergyLossOnCollision");
   this.m_LifetimeLossOnCollision.m_AllowCurves = false;
   this.m_MinKillSpeed = this.GetProperty("minKillSpeed");
   this.m_RadiusScale = this.GetProperty("radiusScale");
   this.m_PlaneVisualizationType = (CollisionModuleUI.PlaneVizType) EditorPrefs.GetInt("PlaneColisionVizType", 1);
   this.m_ScaleGrid = EditorPrefs.GetFloat("ScalePlaneColision", 1f);
   this.m_VisualizeBounds = EditorPrefs.GetBool("VisualizeBounds", false);
   this.m_CollidesWith = this.GetProperty("collidesWith");
   this.m_CollidesWithDynamic = this.GetProperty("collidesWithDynamic");
   this.m_InteriorCollisions = this.GetProperty("interiorCollisions");
   this.m_MaxCollisionShapes = this.GetProperty("maxCollisionShapes");
   this.m_Quality = this.GetProperty("quality");
   this.m_VoxelSize = this.GetProperty("voxelSize");
   this.m_CollisionMessages = this.GetProperty("collisionMessages");
   this.m_CollisionMode = this.GetProperty("collisionMode");
   this.SyncVisualization();
 }
예제 #28
0
 private static Color GetColor(SerializedMinMaxCurve mmCurve)
 {
     return(mmCurve.m_Module.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor().GetCurveColor(mmCurve.maxCurve));
 }
예제 #29
0
 public static void GUIMinMaxCurve(string label, SerializedMinMaxCurve mmCurve, params GUILayoutOption[] layoutOptions)
 {
     ModuleUI.GUIMinMaxCurve(GUIContent.Temp(label), mmCurve, layoutOptions);
 }
예제 #30
0
        public override void OnInspectorGUI(ParticleSystem s)
        {
            if (InitialModuleUI.s_Texts == null)
            {
                InitialModuleUI.s_Texts = new InitialModuleUI.Texts();
            }
            ModuleUI.GUIFloat(InitialModuleUI.s_Texts.duration, this.m_LengthInSec, "f2", new GUILayoutOption[0]);
            this.m_LengthInSec.floatValue = Mathf.Min(100000f, Mathf.Max(0f, this.m_LengthInSec.floatValue));
            bool boolValue = this.m_Looping.boolValue;

            ModuleUI.GUIToggle(InitialModuleUI.s_Texts.looping, this.m_Looping, new GUILayoutOption[0]);
            if (this.m_Looping.boolValue && !boolValue && s.time >= this.m_LengthInSec.floatValue)
            {
                s.time = 0f;
            }
            using (new EditorGUI.DisabledScope(!this.m_Looping.boolValue))
            {
                ModuleUI.GUIToggle(InitialModuleUI.s_Texts.prewarm, this.m_Prewarm, new GUILayoutOption[0]);
            }
            using (new EditorGUI.DisabledScope(this.m_Prewarm.boolValue && this.m_Looping.boolValue))
            {
                ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.startDelay, this.m_StartDelay, new GUILayoutOption[0]);
            }
            ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.lifetime, this.m_LifeTime, new GUILayoutOption[0]);
            ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.speed, this.m_Speed, new GUILayoutOption[0]);
            EditorGUI.BeginChangeCheck();
            bool flag = ModuleUI.GUIToggle(InitialModuleUI.s_Texts.size3D, this.m_Size3D, new GUILayoutOption[0]);

            if (EditorGUI.EndChangeCheck())
            {
                if (flag)
                {
                    this.m_SizeX.RemoveCurveFromEditor();
                }
                else
                {
                    this.m_SizeX.RemoveCurveFromEditor();
                    this.m_SizeY.RemoveCurveFromEditor();
                    this.m_SizeZ.RemoveCurveFromEditor();
                }
            }
            SerializedMinMaxCurve arg_21A_0 = this.m_SizeZ;
            MinMaxCurveState      state     = this.m_SizeX.state;

            this.m_SizeY.state = state;
            arg_21A_0.state    = state;
            if (flag)
            {
                this.m_SizeX.m_DisplayName = InitialModuleUI.s_Texts.x;
                base.GUITripleMinMaxCurve(GUIContent.none, InitialModuleUI.s_Texts.x, this.m_SizeX, InitialModuleUI.s_Texts.y, this.m_SizeY, InitialModuleUI.s_Texts.z, this.m_SizeZ, null, new GUILayoutOption[0]);
            }
            else
            {
                this.m_SizeX.m_DisplayName = InitialModuleUI.s_Texts.size;
                ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.size, this.m_SizeX, new GUILayoutOption[0]);
            }
            EditorGUI.BeginChangeCheck();
            bool flag2 = ModuleUI.GUIToggle(InitialModuleUI.s_Texts.rotation3D, this.m_Rotation3D, new GUILayoutOption[0]);

            if (EditorGUI.EndChangeCheck())
            {
                if (flag2)
                {
                    this.m_RotationZ.RemoveCurveFromEditor();
                }
                else
                {
                    this.m_RotationX.RemoveCurveFromEditor();
                    this.m_RotationY.RemoveCurveFromEditor();
                    this.m_RotationZ.RemoveCurveFromEditor();
                }
            }
            SerializedMinMaxCurve arg_341_0 = this.m_RotationX;

            state = this.m_RotationZ.state;
            this.m_RotationY.state = state;
            arg_341_0.state        = state;
            if (flag2)
            {
                this.m_RotationZ.m_DisplayName = InitialModuleUI.s_Texts.z;
                base.GUITripleMinMaxCurve(GUIContent.none, InitialModuleUI.s_Texts.x, this.m_RotationX, InitialModuleUI.s_Texts.y, this.m_RotationY, InitialModuleUI.s_Texts.z, this.m_RotationZ, null, new GUILayoutOption[0]);
            }
            else
            {
                this.m_RotationZ.m_DisplayName = InitialModuleUI.s_Texts.rotation;
                ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.rotation, this.m_RotationZ, new GUILayoutOption[0]);
            }
            ModuleUI.GUIFloat(InitialModuleUI.s_Texts.randomizeRotationDirection, this.m_RandomizeRotationDirection, new GUILayoutOption[0]);
            base.GUIMinMaxGradient(InitialModuleUI.s_Texts.color, this.m_Color, new GUILayoutOption[0]);
            ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.gravity, this.m_GravityModifier, new GUILayoutOption[0]);
            int num = ModuleUI.GUIPopup(InitialModuleUI.s_Texts.simulationSpace, this.m_SimulationSpace, new string[]
            {
                "Local",
                "World",
                "Custom"
            }, new GUILayoutOption[0]);

            if (num == 2 && this.m_CustomSimulationSpace != null)
            {
                ModuleUI.GUIObject(InitialModuleUI.s_Texts.customSimulationSpace, this.m_CustomSimulationSpace, new GUILayoutOption[0]);
            }
            ModuleUI.GUIFloat(InitialModuleUI.s_Texts.simulationSpeed, this.m_SimulationSpeed, new GUILayoutOption[0]);
            if (this.m_ParticleSystemUI.m_ParticleSystem.shape.shapeType != ParticleSystemShapeType.SkinnedMeshRenderer && this.m_ParticleSystemUI.m_ParticleSystem.shape.shapeType != ParticleSystemShapeType.MeshRenderer)
            {
                ModuleUI.GUIPopup(InitialModuleUI.s_Texts.scalingMode, this.m_ScalingMode, new string[]
                {
                    "Hierarchy",
                    "Local",
                    "Shape"
                }, new GUILayoutOption[0]);
            }
            bool boolValue2 = this.m_PlayOnAwake.boolValue;
            bool flag3      = ModuleUI.GUIToggle(InitialModuleUI.s_Texts.autoplay, this.m_PlayOnAwake, new GUILayoutOption[0]);

            if (boolValue2 != flag3)
            {
                this.m_ParticleSystemUI.m_ParticleEffectUI.PlayOnAwakeChanged(flag3);
            }
            ModuleUI.GUIInt(InitialModuleUI.s_Texts.maxParticles, this.m_MaxNumParticles, new GUILayoutOption[0]);
            if (!ModuleUI.GUIToggle(InitialModuleUI.s_Texts.autoRandomSeed, this.m_AutoRandomSeed, new GUILayoutOption[0]))
            {
                bool flag4 = this.m_ParticleSystemUI.m_ParticleEffectUI.m_Owner is ParticleSystemInspector;
                if (flag4)
                {
                    GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                    ModuleUI.GUIInt(InitialModuleUI.s_Texts.randomSeed, this.m_RandomSeed, new GUILayoutOption[0]);
                    if (GUILayout.Button("Reseed", EditorStyles.miniButton, new GUILayoutOption[]
                    {
                        GUILayout.Width(60f)
                    }))
                    {
                        this.m_RandomSeed.intValue = this.m_ParticleSystemUI.m_ParticleSystem.GenerateRandomSeed();
                    }
                    GUILayout.EndHorizontal();
                }
                else
                {
                    ModuleUI.GUIInt(InitialModuleUI.s_Texts.randomSeed, this.m_RandomSeed, new GUILayoutOption[0]);
                    if (GUILayout.Button("Reseed", EditorStyles.miniButton, new GUILayoutOption[0]))
                    {
                        this.m_RandomSeed.intValue = this.m_ParticleSystemUI.m_ParticleSystem.GenerateRandomSeed();
                    }
                }
            }
        }
예제 #31
0
 public static void GUIMinMaxCurve(string label, SerializedMinMaxCurve mmCurve)
 {
     ModuleUI.GUIMinMaxCurve(GUIContent.Temp(label), mmCurve);
 }
예제 #32
0
 public void GUITripleMinMaxCurve(GUIContent label, GUIContent x, SerializedMinMaxCurve xCurve, GUIContent y, SerializedMinMaxCurve yCurve, GUIContent z, SerializedMinMaxCurve zCurve, SerializedProperty randomizePerFrame)
 {
   MinMaxCurveState state = xCurve.state;
   bool flag = label != GUIContent.none;
   int num1 = !flag ? 1 : 2;
   if (state == MinMaxCurveState.k_TwoScalars)
     ++num1;
   Rect controlRect = ModuleUI.GetControlRect(13 * num1);
   Rect popupRect = ModuleUI.GetPopupRect(controlRect);
   Rect totalPosition = ModuleUI.SubtractPopupWidth(controlRect);
   Rect rect = totalPosition;
   float num2 = (float) (((double) totalPosition.width - 8.0) / 3.0);
   if (num1 > 1)
     rect.height = 13f;
   if (flag)
   {
     ModuleUI.PrefixLabel(totalPosition, label);
     rect.y += rect.height;
   }
   rect.width = num2;
   GUIContent[] guiContentArray = new GUIContent[3]{ x, y, z };
   SerializedMinMaxCurve[] minMaxCurves = new SerializedMinMaxCurve[3]{ xCurve, yCurve, zCurve };
   if (state == MinMaxCurveState.k_Scalar)
   {
     for (int index = 0; index < minMaxCurves.Length; ++index)
     {
       ModuleUI.Label(rect, guiContentArray[index]);
       float a = ModuleUI.FloatDraggable(rect, minMaxCurves[index].scalar, minMaxCurves[index].m_RemapValue, 10f);
       if (!minMaxCurves[index].signedRange)
         minMaxCurves[index].scalar.floatValue = Mathf.Max(a, 0.0f);
       rect.x += num2 + 4f;
     }
   }
   else if (state == MinMaxCurveState.k_TwoScalars)
   {
     for (int index = 0; index < minMaxCurves.Length; ++index)
     {
       ModuleUI.Label(rect, guiContentArray[index]);
       float minConstant = minMaxCurves[index].minConstant;
       float maxConstant = minMaxCurves[index].maxConstant;
       EditorGUI.BeginChangeCheck();
       float num3 = ModuleUI.FloatDraggable(rect, maxConstant, minMaxCurves[index].m_RemapValue, 10f, "g5");
       if (EditorGUI.EndChangeCheck())
         minMaxCurves[index].maxConstant = num3;
       rect.y += 13f;
       EditorGUI.BeginChangeCheck();
       float num4 = ModuleUI.FloatDraggable(rect, minConstant, minMaxCurves[index].m_RemapValue, 10f, "g5");
       if (EditorGUI.EndChangeCheck())
         minMaxCurves[index].minConstant = num4;
       rect.x += num2 + 4f;
       rect.y -= 13f;
     }
   }
   else
   {
     rect.width = num2;
     Rect ranges = !xCurve.signedRange ? ModuleUI.kUnsignedRange : ModuleUI.kSignedRange;
     for (int index = 0; index < minMaxCurves.Length; ++index)
     {
       ModuleUI.Label(rect, guiContentArray[index]);
       Rect position = rect;
       position.xMin += 10f;
       SerializedProperty minCurve = state != MinMaxCurveState.k_TwoCurves ? (SerializedProperty) null : minMaxCurves[index].minCurve;
       ModuleUI.GUICurveField(position, minMaxCurves[index].maxCurve, minCurve, ModuleUI.GetColor(minMaxCurves[index]), ranges, new ModuleUI.CurveFieldMouseDownCallback(minMaxCurves[index].OnCurveAreaMouseDown));
       rect.x += num2 + 4f;
     }
   }
   ModuleUI.GUIMMCurveStateList(popupRect, minMaxCurves);
 }
예제 #33
0
 public static void GUIMMCurveStateList(Rect rect, SerializedMinMaxCurve[] minMaxCurves)
 {
   if (!EditorGUI.ButtonMouseDown(rect, GUIContent.none, FocusType.Passive, ParticleSystemStyles.Get().minMaxCurveStateDropDown) || minMaxCurves.Length == 0)
     return;
   GUIContent[] guiContentArray = new GUIContent[4]{ new GUIContent("Constant"), new GUIContent("Curve"), new GUIContent("Random Between Two Constants"), new GUIContent("Random Between Two Curves") };
   MinMaxCurveState[] minMaxCurveStateArray = new MinMaxCurveState[4]{ MinMaxCurveState.k_Scalar, MinMaxCurveState.k_Curve, MinMaxCurveState.k_TwoScalars, MinMaxCurveState.k_TwoCurves };
   bool[] flagArray = new bool[4]{ (minMaxCurves[0].m_AllowConstant ? 1 : 0) != 0, (minMaxCurves[0].m_AllowCurves ? 1 : 0) != 0, (minMaxCurves[0].m_AllowRandom ? 1 : 0) != 0, (!minMaxCurves[0].m_AllowRandom ? 0 : (minMaxCurves[0].m_AllowCurves ? 1 : 0)) != 0 };
   GenericMenu genericMenu = new GenericMenu();
   for (int index = 0; index < guiContentArray.Length; ++index)
   {
     if (flagArray[index])
       genericMenu.AddItem(guiContentArray[index], minMaxCurves[0].state == minMaxCurveStateArray[index], new GenericMenu.MenuFunction2(ModuleUI.SelectMinMaxCurveStateCallback), (object) new ModuleUI.CurveStateCallbackData(minMaxCurveStateArray[index], minMaxCurves));
   }
   genericMenu.DropDown(rect);
   Event.current.Use();
 }
예제 #34
0
        public override void OnInspectorGUI(ParticleSystem s)
        {
            if (NoiseModuleUI.s_Texts == null)
            {
                NoiseModuleUI.s_Texts = new NoiseModuleUI.Texts();
            }
            if (NoiseModuleUI.s_PreviewTextureDirty)
            {
                this.m_ParticleSystemUI.m_ParticleSystem.GenerateNoisePreviewTexture(NoiseModuleUI.s_PreviewTexture);
                NoiseModuleUI.s_PreviewTextureDirty = false;
            }
            bool flag = this.m_ParticleSystemUI.m_ParticleEffectUI.m_Owner is ParticleSystemInspector;

            if (flag)
            {
                GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                GUILayout.BeginVertical(new GUILayoutOption[0]);
            }
            EditorGUI.BeginChangeCheck();
            bool flag2 = ModuleUI.GUIToggle(NoiseModuleUI.s_Texts.separateAxes, this.m_SeparateAxes, new GUILayoutOption[0]);
            bool flag3 = EditorGUI.EndChangeCheck();

            EditorGUI.BeginChangeCheck();
            if (flag3)
            {
                if (flag2)
                {
                    this.m_StrengthX.RemoveCurveFromEditor();
                    this.m_RemapX.RemoveCurveFromEditor();
                }
                else
                {
                    this.m_StrengthX.RemoveCurveFromEditor();
                    this.m_StrengthY.RemoveCurveFromEditor();
                    this.m_StrengthZ.RemoveCurveFromEditor();
                    this.m_RemapX.RemoveCurveFromEditor();
                    this.m_RemapY.RemoveCurveFromEditor();
                    this.m_RemapZ.RemoveCurveFromEditor();
                }
            }
            SerializedMinMaxCurve arg_12D_0 = this.m_StrengthZ;
            MinMaxCurveState      state     = this.m_StrengthX.state;

            this.m_StrengthY.state = state;
            arg_12D_0.state        = state;
            SerializedMinMaxCurve arg_151_0 = this.m_RemapZ;

            state = this.m_RemapX.state;
            this.m_RemapY.state = state;
            arg_151_0.state     = state;
            if (flag2)
            {
                this.m_StrengthX.m_DisplayName = NoiseModuleUI.s_Texts.x;
                base.GUITripleMinMaxCurve(GUIContent.none, NoiseModuleUI.s_Texts.x, this.m_StrengthX, NoiseModuleUI.s_Texts.y, this.m_StrengthY, NoiseModuleUI.s_Texts.z, this.m_StrengthZ, null, new GUILayoutOption[0]);
            }
            else
            {
                this.m_StrengthX.m_DisplayName = NoiseModuleUI.s_Texts.strength;
                ModuleUI.GUIMinMaxCurve(NoiseModuleUI.s_Texts.strength, this.m_StrengthX, new GUILayoutOption[0]);
            }
            ModuleUI.GUIFloat(NoiseModuleUI.s_Texts.frequency, this.m_Frequency, new GUILayoutOption[0]);
            ModuleUI.GUIMinMaxCurve(NoiseModuleUI.s_Texts.scrollSpeed, this.m_ScrollSpeed, new GUILayoutOption[0]);
            ModuleUI.GUIToggle(NoiseModuleUI.s_Texts.damping, this.m_Damping, new GUILayoutOption[0]);
            int num = ModuleUI.GUIInt(NoiseModuleUI.s_Texts.octaves, this.m_Octaves, new GUILayoutOption[0]);

            using (new EditorGUI.DisabledScope(num == 1))
            {
                ModuleUI.GUIFloat(NoiseModuleUI.s_Texts.octaveMultiplier, this.m_OctaveMultiplier, new GUILayoutOption[0]);
                ModuleUI.GUIFloat(NoiseModuleUI.s_Texts.octaveScale, this.m_OctaveScale, new GUILayoutOption[0]);
            }
            ModuleUI.GUIPopup(NoiseModuleUI.s_Texts.quality, this.m_Quality, NoiseModuleUI.s_Texts.qualityDropdown, new GUILayoutOption[0]);
            bool flag4 = ModuleUI.GUIToggle(NoiseModuleUI.s_Texts.remap, this.m_RemapEnabled, new GUILayoutOption[0]);

            using (new EditorGUI.DisabledScope(!flag4))
            {
                if (flag2)
                {
                    this.m_RemapX.m_DisplayName = NoiseModuleUI.s_Texts.x;
                    base.GUITripleMinMaxCurve(GUIContent.none, NoiseModuleUI.s_Texts.x, this.m_RemapX, NoiseModuleUI.s_Texts.y, this.m_RemapY, NoiseModuleUI.s_Texts.z, this.m_RemapZ, null, new GUILayoutOption[0]);
                }
                else
                {
                    this.m_RemapX.m_DisplayName = NoiseModuleUI.s_Texts.remap;
                    ModuleUI.GUIMinMaxCurve(NoiseModuleUI.s_Texts.remapCurve, this.m_RemapX, new GUILayoutOption[0]);
                }
            }
            if (flag)
            {
                GUILayout.EndVertical();
            }
            if (EditorGUI.EndChangeCheck() || this.m_ScrollSpeed.scalar.floatValue > 0f || flag4 || flag3)
            {
                NoiseModuleUI.s_PreviewTextureDirty = true;
                this.m_ParticleSystemUI.m_ParticleEffectUI.m_Owner.Repaint();
            }
            GUILayout.Label(NoiseModuleUI.s_Texts.previewTexture, this.previewTextureStyle, new GUILayoutOption[]
            {
                GUILayout.ExpandWidth(true),
                GUILayout.ExpandHeight(false)
            });
            if (flag)
            {
                GUILayout.EndHorizontal();
            }
        }
예제 #35
0
        protected override void Init()
        {
            // Already initialized?
            if (m_Type != null)
            {
                return;
            }
            if (s_Texts == null)
            {
                s_Texts = new Texts();
            }

            m_Type = GetProperty("type");

            List <SerializedProperty> shownPlanes = new List <SerializedProperty>();

            for (int i = 0; i < m_Planes.Length; ++i)
            {
                m_Planes[i] = GetProperty("plane" + i); // Keep name in sync with transfer func in CollisionModule.h
                System.Diagnostics.Debug.Assert(m_Planes[i] != null);

                // Always show the first plane
                if (i == 0 || m_Planes[i].objectReferenceValue != null)
                {
                    shownPlanes.Add(m_Planes[i]);
                }
            }

            m_ShownPlanes = shownPlanes.ToArray();

            m_Dampen = new SerializedMinMaxCurve(this, s_Texts.dampen, "m_Dampen");
            m_Dampen.m_AllowCurves = false;

            m_Bounce = new SerializedMinMaxCurve(this, s_Texts.bounce, "m_Bounce");
            m_Bounce.m_AllowCurves = false;

            m_LifetimeLossOnCollision = new SerializedMinMaxCurve(this, s_Texts.lifetimeLoss, "m_EnergyLossOnCollision");
            m_LifetimeLossOnCollision.m_AllowCurves = false;

            m_MinKillSpeed = GetProperty("minKillSpeed");
            m_MaxKillSpeed = GetProperty("maxKillSpeed");
            m_RadiusScale  = GetProperty("radiusScale");

            m_PlaneVisualizationType = (PlaneVizType)EditorPrefs.GetInt("PlaneColisionVizType", (int)PlaneVizType.Solid);
            m_ScaleGrid       = EditorPrefs.GetFloat("ScalePlaneColision", 1f);
            s_VisualizeBounds = EditorPrefs.GetBool("VisualizeBounds", false);

            m_CollidesWith        = GetProperty("collidesWith");
            m_CollidesWithDynamic = GetProperty("collidesWithDynamic");
            m_MaxCollisionShapes  = GetProperty("maxCollisionShapes");

            m_Quality = GetProperty("quality");

            m_VoxelSize = GetProperty("voxelSize");

            m_CollisionMessages = GetProperty("collisionMessages");
            m_CollisionMode     = GetProperty("collisionMode");

            m_ColliderForce = GetProperty("colliderForce");
            m_MultiplyColliderForceByCollisionAngle = GetProperty("multiplyColliderForceByCollisionAngle");
            m_MultiplyColliderForceByParticleSpeed  = GetProperty("multiplyColliderForceByParticleSpeed");
            m_MultiplyColliderForceByParticleSize   = GetProperty("multiplyColliderForceByParticleSize");

            SyncVisualization();
        }
예제 #36
0
        public void GUITripleMinMaxCurve(GUIContent label, GUIContent x, SerializedMinMaxCurve xCurve, GUIContent y, SerializedMinMaxCurve yCurve, GUIContent z, SerializedMinMaxCurve zCurve, SerializedProperty randomizePerFrame)
        {
            MinMaxCurveState state = xCurve.state;
            bool             flag  = label != GUIContent.none;
            int num = (!flag) ? 1 : 2;

            if (state == MinMaxCurveState.k_TwoScalars)
            {
                num++;
            }
            Rect rect      = ModuleUI.GetControlRect(13 * num);
            Rect popupRect = ModuleUI.GetPopupRect(rect);

            rect = ModuleUI.SubtractPopupWidth(rect);
            Rect  rect2 = rect;
            float num2  = (rect.width - 8f) / 3f;

            if (num > 1)
            {
                rect2.height = 13f;
            }
            if (flag)
            {
                ModuleUI.PrefixLabel(rect, label);
                rect2.y += rect2.height;
            }
            rect2.width = num2;
            GUIContent[] array = new GUIContent[]
            {
                x,
                y,
                z
            };
            SerializedMinMaxCurve[] array2 = new SerializedMinMaxCurve[]
            {
                xCurve,
                yCurve,
                zCurve
            };
            if (state == MinMaxCurveState.k_Scalar)
            {
                for (int i = 0; i < array2.Length; i++)
                {
                    ModuleUI.Label(rect2, array[i]);
                    float a = ModuleUI.FloatDraggable(rect2, array2[i].scalar, array2[i].m_RemapValue, 10f);
                    if (!array2[i].signedRange)
                    {
                        array2[i].scalar.floatValue = Mathf.Max(a, 0f);
                    }
                    rect2.x += num2 + 4f;
                }
            }
            else if (state == MinMaxCurveState.k_TwoScalars)
            {
                for (int j = 0; j < array2.Length; j++)
                {
                    ModuleUI.Label(rect2, array[j]);
                    float num3 = array2[j].minConstant;
                    float num4 = array2[j].maxConstant;
                    EditorGUI.BeginChangeCheck();
                    num4 = ModuleUI.FloatDraggable(rect2, num4, array2[j].m_RemapValue, 10f, "g5");
                    if (EditorGUI.EndChangeCheck())
                    {
                        array2[j].maxConstant = num4;
                    }
                    rect2.y += 13f;
                    EditorGUI.BeginChangeCheck();
                    num3 = ModuleUI.FloatDraggable(rect2, num3, array2[j].m_RemapValue, 10f, "g5");
                    if (EditorGUI.EndChangeCheck())
                    {
                        array2[j].minConstant = num3;
                    }
                    rect2.x += num2 + 4f;
                    rect2.y -= 13f;
                }
            }
            else
            {
                rect2.width = num2;
                Rect ranges = (!xCurve.signedRange) ? ModuleUI.kUnsignedRange : ModuleUI.kSignedRange;
                for (int k = 0; k < array2.Length; k++)
                {
                    ModuleUI.Label(rect2, array[k]);
                    Rect position = rect2;
                    position.xMin += 10f;
                    SerializedProperty minCurve = (state != MinMaxCurveState.k_TwoCurves) ? null : array2[k].minCurve;
                    ModuleUI.GUICurveField(position, array2[k].maxCurve, minCurve, ModuleUI.GetColor(array2[k]), ranges, new ModuleUI.CurveFieldMouseDownCallback(array2[k].OnCurveAreaMouseDown));
                    rect2.x += num2 + 4f;
                }
            }
            ModuleUI.GUIMMCurveStateList(popupRect, array2);
        }
예제 #37
0
 public static void GUIMMCurveStateList(Rect rect, SerializedMinMaxCurve minMaxCurves)
 {
     SerializedMinMaxCurve[] curveArray = new SerializedMinMaxCurve[] { minMaxCurves };
     GUIMMCurveStateList(rect, curveArray);
 }
예제 #38
0
 public static void GUIMMCurveStateList(Rect rect, SerializedMinMaxCurve minMaxCurves)
 {
   SerializedMinMaxCurve[] minMaxCurves1 = new SerializedMinMaxCurve[1]{ minMaxCurves };
   ModuleUI.GUIMMCurveStateList(rect, minMaxCurves1);
 }
예제 #39
0
        public void GUITripleMinMaxCurve(GUIContent label, GUIContent x, SerializedMinMaxCurve xCurve, GUIContent y, SerializedMinMaxCurve yCurve, GUIContent z, SerializedMinMaxCurve zCurve, SerializedProperty randomizePerFrame)
        {
            MinMaxCurveState state = xCurve.state;
            bool             flag  = label != GUIContent.none;
            int num = !flag ? 1 : 2;

            if (state == MinMaxCurveState.k_TwoScalars)
            {
                num++;
            }
            Rect controlRect = GetControlRect(13 * num);
            Rect popupRect   = GetPopupRect(controlRect);

            controlRect = SubtractPopupWidth(controlRect);
            Rect  rect = controlRect;
            float num2 = (controlRect.width - 8f) / 3f;

            if (num > 1)
            {
                rect.height = 13f;
            }
            if (flag)
            {
                PrefixLabel(controlRect, label);
                rect.y += rect.height;
            }
            rect.width = num2;
            GUIContent[]            contentArray = new GUIContent[] { x, y, z };
            SerializedMinMaxCurve[] minMaxCurves = new SerializedMinMaxCurve[] { xCurve, yCurve, zCurve };
            switch (state)
            {
            case MinMaxCurveState.k_Scalar:
                for (int i = 0; i < minMaxCurves.Length; i++)
                {
                    Label(rect, contentArray[i]);
                    float a = FloatDraggable(rect, minMaxCurves[i].scalar, minMaxCurves[i].m_RemapValue, 10f);
                    if (!minMaxCurves[i].signedRange)
                    {
                        minMaxCurves[i].scalar.floatValue = Mathf.Max(a, 0f);
                    }
                    rect.x += num2 + 4f;
                }
                break;

            case MinMaxCurveState.k_TwoScalars:
                for (int j = 0; j < minMaxCurves.Length; j++)
                {
                    Label(rect, contentArray[j]);
                    float minConstant = minMaxCurves[j].minConstant;
                    float maxConstant = minMaxCurves[j].maxConstant;
                    EditorGUI.BeginChangeCheck();
                    maxConstant = FloatDraggable(rect, maxConstant, minMaxCurves[j].m_RemapValue, 10f, "g5");
                    if (EditorGUI.EndChangeCheck())
                    {
                        minMaxCurves[j].maxConstant = maxConstant;
                    }
                    rect.y += 13f;
                    EditorGUI.BeginChangeCheck();
                    minConstant = FloatDraggable(rect, minConstant, minMaxCurves[j].m_RemapValue, 10f, "g5");
                    if (EditorGUI.EndChangeCheck())
                    {
                        minMaxCurves[j].minConstant = minConstant;
                    }
                    rect.x += num2 + 4f;
                    rect.y -= 13f;
                }
                break;

            default:
            {
                rect.width = num2;
                Rect ranges = !xCurve.signedRange ? kUnsignedRange : kSignedRange;
                for (int k = 0; k < minMaxCurves.Length; k++)
                {
                    Label(rect, contentArray[k]);
                    Rect position = rect;
                    position.xMin += 10f;
                    SerializedProperty minCurve = (state != MinMaxCurveState.k_TwoCurves) ? null : minMaxCurves[k].minCurve;
                    GUICurveField(position, minMaxCurves[k].maxCurve, minCurve, GetColor(minMaxCurves[k]), ranges, new CurveFieldMouseDownCallback(minMaxCurves[k].OnCurveAreaMouseDown));
                    rect.x += num2 + 4f;
                }
                break;
            }
            }
            GUIMMCurveStateList(popupRect, minMaxCurves);
        }
예제 #40
0
 public CurveStateCallbackData(MinMaxCurveState state, SerializedMinMaxCurve[] curves)
 {
   this.minMaxCurves = curves;
   this.selectedState = state;
 }
예제 #41
0
        public void GUITripleMinMaxCurve(GUIContent label, GUIContent x, SerializedMinMaxCurve xCurve, GUIContent y, SerializedMinMaxCurve yCurve, GUIContent z, SerializedMinMaxCurve zCurve, SerializedProperty randomizePerFrame)
        {
            MinMaxCurveState state = xCurve.state;
            bool             flag  = label != GUIContent.none;
            int num1 = !flag ? 1 : 2;

            if (state == MinMaxCurveState.k_TwoScalars)
            {
                ++num1;
            }
            Rect  controlRect   = ModuleUI.GetControlRect(13 * num1);
            Rect  popupRect     = ModuleUI.GetPopupRect(controlRect);
            Rect  totalPosition = ModuleUI.SubtractPopupWidth(controlRect);
            Rect  rect          = totalPosition;
            float num2          = (float)(((double)totalPosition.width - 8.0) / 3.0);

            if (num1 > 1)
            {
                rect.height = 13f;
            }
            if (flag)
            {
                ModuleUI.PrefixLabel(totalPosition, label);
                rect.y += rect.height;
            }
            rect.width = num2;
            GUIContent[] guiContentArray = new GUIContent[3] {
                x, y, z
            };
            SerializedMinMaxCurve[] minMaxCurves = new SerializedMinMaxCurve[3] {
                xCurve, yCurve, zCurve
            };
            if (state == MinMaxCurveState.k_Scalar)
            {
                for (int index = 0; index < minMaxCurves.Length; ++index)
                {
                    ModuleUI.Label(rect, guiContentArray[index]);
                    float a = ModuleUI.FloatDraggable(rect, minMaxCurves[index].scalar, minMaxCurves[index].m_RemapValue, 10f);
                    if (!minMaxCurves[index].signedRange)
                    {
                        minMaxCurves[index].scalar.floatValue = Mathf.Max(a, 0.0f);
                    }
                    rect.x += num2 + 4f;
                }
            }
            else if (state == MinMaxCurveState.k_TwoScalars)
            {
                for (int index = 0; index < minMaxCurves.Length; ++index)
                {
                    ModuleUI.Label(rect, guiContentArray[index]);
                    float minConstant = minMaxCurves[index].minConstant;
                    float maxConstant = minMaxCurves[index].maxConstant;
                    EditorGUI.BeginChangeCheck();
                    float num3 = ModuleUI.FloatDraggable(rect, maxConstant, minMaxCurves[index].m_RemapValue, 10f, "g5");
                    if (EditorGUI.EndChangeCheck())
                    {
                        minMaxCurves[index].maxConstant = num3;
                    }
                    rect.y += 13f;
                    EditorGUI.BeginChangeCheck();
                    float num4 = ModuleUI.FloatDraggable(rect, minConstant, minMaxCurves[index].m_RemapValue, 10f, "g5");
                    if (EditorGUI.EndChangeCheck())
                    {
                        minMaxCurves[index].minConstant = num4;
                    }
                    rect.x += num2 + 4f;
                    rect.y -= 13f;
                }
            }
            else
            {
                rect.width = num2;
                Rect ranges = !xCurve.signedRange ? ModuleUI.kUnsignedRange : ModuleUI.kSignedRange;
                for (int index = 0; index < minMaxCurves.Length; ++index)
                {
                    ModuleUI.Label(rect, guiContentArray[index]);
                    Rect position = rect;
                    position.xMin += 10f;
                    SerializedProperty minCurve = state != MinMaxCurveState.k_TwoCurves ? (SerializedProperty)null : minMaxCurves[index].minCurve;
                    ModuleUI.GUICurveField(position, minMaxCurves[index].maxCurve, minCurve, ModuleUI.GetColor(minMaxCurves[index]), ranges, new ModuleUI.CurveFieldMouseDownCallback(minMaxCurves[index].OnCurveAreaMouseDown));
                    rect.x += num2 + 4f;
                }
            }
            ModuleUI.GUIMMCurveStateList(popupRect, minMaxCurves);
        }