Exemplo n.º 1
0
        public void LerpOnPreset(float t_RateOfChange)
        {
            if (mainModuleReference != null)
            {
                mainModuleReference.LerpOnPreset(t_RateOfChange);
            }

            if (emissionModuleReference != null)
            {
                emissionModuleReference.LerpOnPreset(t_RateOfChange);
            }

            if (velocityOverLifeTimeModuleReference != null)
            {
                velocityOverLifeTimeModuleReference.LerpOnPreset(t_RateOfChange);
            }

            if (sizeOverLifeTimeModuleReference != null)
            {
                sizeOverLifeTimeModuleReference.LerpOnPreset(t_RateOfChange);
            }
        }
Exemplo n.º 2
0
        private void CustomGUI()
        {
            EditorGUILayout.Space();

            m_Reference.debugPanel = EditorGUILayout.Foldout(
                m_Reference.debugPanel,
                "Debug Option"
                );

            if (m_Reference.debugPanel)
            {
                EditorGUILayout.BeginHorizontal();
                {
                    EditorGUILayout.BeginVertical();
                    {
                        if (GUILayout.Button("Initialize"))
                        {
                            m_Reference.Initialize();
                        }

                        if (GUILayout.Button("Restore Default"))
                        {
                            m_Reference.RestoreToDefault();
                        }
                    }
                    EditorGUILayout.EndVertical();



                    EditorGUILayout.BeginVertical();
                    {
                        if (GUILayout.Button("Lerp -> Default (0.05%)"))
                        {
                            m_Reference.LerpOnDefault(0.05f);
                        }

                        if (GUILayout.Button("Lerp -> Max (0.05%)"))
                        {
                            m_Reference.LerpOnPreset(0.05f);
                        }
                    }
                    EditorGUILayout.EndVertical();
                }
                EditorGUILayout.EndHorizontal();
            }



            EditorGUILayout.Space();

            m_Reference.manupulateStartLifeTime = EditorGUILayout.Toggle(
                "Manupulate : StartLifeTime",
                m_Reference.manupulateStartLifeTime
                );



            if (m_Reference.manupulateStartLifeTime)
            {
                m_Reference.maxChangeOfStartLifeTime = EditorGUILayout.Slider(
                    "MaxChangeOfStartLifeTime",
                    m_Reference.maxChangeOfStartLifeTime,
                    -1f,
                    100f
                    );
            }
        }