public GroundData(int _index, string _name, Data.type _type, bool _deletable, float _size) : base(_index, _name, _type, _deletable) { size = _size; }
public void showConfigurePanel(Data data, ConfigurationMode _configurationMode) { groundConfigurationPanel.SetActive(false); lightConfigurationPanel.SetActive(false); logSmokeDensityConfigurationPanel.SetActive(false); barrierConfigurationPanel.SetActive(false); windConfigurationPanel.SetActive(false); smokeConfigurationPanel.SetActive(false); dataType = data.dataType; switch (dataType) { case Data.type.GROUND: { groundConfigurationPanel.SetActive(true); groundConfigurationPanel.GetComponent <GroundConfigurationPanelController>().init((GroundData)data); break; } case Data.type.LIGHT: { lightConfigurationPanel.SetActive(true); lightConfigurationPanel.GetComponent <LightConfigurationPanelController>().init((LightData)data); break; } case Data.type.LOGDENSITY: { logSmokeDensityConfigurationPanel.SetActive(true); logSmokeDensityConfigurationPanel.GetComponent <LogDensityConfigurationPanelController>().init((LogSmokeDensityData)data); break; } case Data.type.BARRIER: { barrierConfigurationPanel.SetActive(true); barrierConfigurationPanel.GetComponent <BarrierConfigurationPanelController>().init((BarrierData)data); break; } case Data.type.WIND: { windConfigurationPanel.SetActive(true); windConfigurationPanel.GetComponent <WindConfigurationPanelController>().init((WindData)data); break; } case Data.type.SMOKE: { smokeConfigurationPanel.SetActive(true); smokeConfigurationPanel.GetComponent <SmokeConfigurationPanelController>().init((SmokeData)data); break; } default: { break; } } configurationMode = _configurationMode; switch (configurationMode) { case ConfigurationMode.ADD: commitButtonObject.GetComponent <CommitButtonController>().setText(addButtonText); break; case ConfigurationMode.SET: commitButtonObject.GetComponent <CommitButtonController>().setText(setButtonText); break; default: break; } }
public LogSmokeDensityData(int _index, string _name, Data.type _type, bool _deletable, bool _logFlag, float _interval) : base(_index, _name, _type, _deletable) { logFlag = _logFlag; interval = _interval; }
public void toAddConfiguration(Data.type type) { // Debug.Log(type); Data objectData = null; switch (type) { case Data.type.BARRIER: { number = number + 1; CubeGeometryData cubeGeometryData = new CubeGeometryData( new Vector3(0f, 0.5f, 0f), new Vector3(0.2f, 0.2f, 0.2f), new Vector3(0f, 0f, 0f) ); // Debug.Log(number); objectData = new BarrierData(number, "Barrier" + number.ToString(), Data.type.BARRIER, true, cubeGeometryData); break; } case Data.type.WIND: { number = number + 1; CubeGeometryData cubeGeometryData = new CubeGeometryData( new Vector3(0f, 0.5f, 0f), new Vector3(0.2f, 0.2f, 0.2f), new Vector3(0f, 0f, 0f) ); // Debug.Log(number); objectData = new WindData(number, "Wind" + number.ToString(), Data.type.WIND, true, cubeGeometryData, 1f, 0f); break; } case Data.type.SMOKE: { number = number + 1; CycleGeometryData cycleGeometryData = new CycleGeometryData( new Vector3(0f, 0.5f, 0f), 0.1f, new Vector3(0f, 0f, 0f) ); PhysicalData physicalData = new PhysicalData( 0.01f, 10.0f, 1000, 3f ); objectData = new SmokeData(number, "Smoke" + number.ToString(), Data.type.SMOKE, true, cycleGeometryData, physicalData, SmokeData.SmokeType.SMOKE, new Color(0, 0, 0)); break; } default: { string logString = "[Error] the " + new Data().dataTypeToString(type) + " object can't be added"; addLog(logString); break; } } if (objectData != null) { // Debug.Log(objectData.dataType); ObjectConfigurationPanel.GetComponent <ObjectConfigurationPanelController>().showConfigurePanel(objectData, ObjectConfigurationPanelController.ConfigurationMode.ADD); } }
public LightData(int _index, string _name, Data.type _type, bool _deletable, Color _color, float _intensity) : base(_index, _name, _type, _deletable) { color = _color; intensity = _intensity; }