10 override void OnEnterCalculations(
Particle p )
13 float velocity_min = MIN_SCALING_PARAM + (m_StoppingForce * m_EnterSplashCoef);
14 float velocity_max = MIN_SCALING_PARAM + (m_StoppingForce * m_EnterSplashCoef);
15 float size = MIN_SCALING_PARAM + ( m_StoppingForce * m_EnterSplashCoef)*0.5;
16 float birth_rate = MIN_SCALING_PARAM + (m_StoppingForce * m_EnterSplashCoef)*0.5;
18 if (velocity_min < MIN_SCALING_PARAM)
19 velocity_min = MIN_SCALING_PARAM;
21 if (size < MIN_SCALING_PARAM)
22 size = MIN_SCALING_PARAM;
24 if (birth_rate < MIN_SCALING_PARAM)
25 birth_rate = MIN_SCALING_PARAM;
29 p.ScaleParticleParam(
EmitorParam.VELOCITY, velocity_min);
30 p.ScaleParticleParam(
EmitorParam.VELOCITY_RND, velocity_max);
32 p.ScaleParticleParam(
EmitorParam.BIRTH_RATE, birth_rate);
35 override void OnExitCalculations(
Particle p,
float outSpeedf)
37 float velocity_min = 1 + (outSpeedf * m_ExitSplashCoef);
38 float velocity_max = 1 + (outSpeedf * m_ExitSplashCoef);
39 float size = 1 + ( outSpeedf * m_ExitSplashCoef)*0.5;
40 float birth_rate = 1 + (outSpeedf * m_ExitSplashCoef)*0.5;
42 if (velocity_min < MIN_SCALING_PARAM)
43 velocity_min = MIN_SCALING_PARAM;
45 if (size < MIN_SCALING_PARAM)
46 size = MIN_SCALING_PARAM;
48 if (birth_rate < MIN_SCALING_PARAM)
49 birth_rate = MIN_SCALING_PARAM;
51 p.ScaleParticleParam(
EmitorParam.VELOCITY, velocity_min);
52 p.ScaleParticleParam(
EmitorParam.VELOCITY_RND, velocity_max);
54 p.ScaleParticleParam(
EmitorParam.BIRTH_RATE, birth_rate);