Esempio n. 1
0
        //-----------------------------------------------------------------------------------
        private void RefreshSimulationScript()
        {
            if (Data.SimulationScript != null && simulationScript_ != Data.SimulationScript)
            {
                simulationScript_       = (CarSimulationScript)Data.SimulationScript;
                simulationScriptEditor_ = Editor.CreateEditor(Data.SimulationScript);
            }

            if (Data.SimulationScript == null)
            {
                simulationScript_       = null;
                simulationScriptEditor_ = null;
            }
        }
Esempio n. 2
0
        private static void RegisterSimulationScripts(List <CNScriptPlayerEditor> listSpEditor)
        {
            foreach (CNScriptPlayerEditor spEditor in listSpEditor)
            {
                if (spEditor.IsEnabledInHierarchy && !spEditor.IsExcludedInHierarchy)
                {
                    spEditor.InitSimulationScriptObject();

                    CarSimulationScript simScript = spEditor.GetSimulationScript();
                    if (simScript != null)
                    {
                        listSimulationScript_.Add(simScript);
                    }
                }
            }
        }