public CSimulateParameter GetSimulateParameter() { CSimulateParameter ret = new CSimulateParameter(); ret.m_fAlpha = TryParse(m_InputAlpha.text, m_pConfigSimulation.m_ConfigAlpha.m_fDefault, m_pConfigSimulation.m_ConfigAlpha.m_fMin, m_pConfigSimulation.m_ConfigAlpha.m_fMax); ret.m_fStep = TryParse(m_InputStep.text, m_pConfigSimulation.m_ConfigStep.m_fDefault, m_pConfigSimulation.m_ConfigStep.m_fMin, m_pConfigSimulation.m_ConfigStep.m_fMax); ret.m_sBoundaryImage = m_pConfigSimulation.m_ConfigBoundary.m_sImage; ret.m_fJMin = m_sliderJMin.value; ret.m_fJMax = m_sliderJMax.value; ret.m_sJImage = m_pParameter.m_sJImage; ret.m_fDMin = m_sliderDMin.value; ret.m_fDMax = m_sliderDMax.value; ret.m_sDImage = m_pParameter.m_sDImage; ret.m_fBMin = m_sliderBMin.value; ret.m_fBMax = m_sliderBMax.value; ret.m_sBImage = m_pParameter.m_sBImage; ret.m_fKMin = m_sliderKMin.value; ret.m_fKMax = m_sliderKMax.value; ret.m_sKImage = m_pParameter.m_sKImage; return(ret); }
private void UpdateWithParameters(CSimulateParameter parameter) { m_InputAlpha.text = parameter.m_fAlpha.ToString(); m_InputStep.text = parameter.m_fStep.ToString(); m_txtBoundary.text = parameter.m_sBoundaryImage; m_sliderJMin.value = parameter.m_fJMin; m_sliderJMax.value = parameter.m_fJMax; m_sliderDMin.value = parameter.m_fDMin; m_sliderDMax.value = parameter.m_fDMax; m_sliderBMin.value = parameter.m_fBMin; m_sliderBMax.value = parameter.m_fBMax; m_sliderKMin.value = parameter.m_fKMin; m_sliderKMax.value = parameter.m_fKMax; }
public override void Show(CUIPageConfig config) { base.Show(config); CUIPageConfigSimulate cfgSim = config as CUIPageConfigSimulate; m_pConfigSimulation = cfgSim; m_pParameter = new CSimulateParameter(); SetupTabs(cfgSim); m_txtTitle.text = cfgSim.m_sTitle; m_txtInfo.text = "步数: 0"; m_iStep = 0; m_pParameter = GetSimulateParameter(); for (int i = 0; i < m_pAnims.Length; ++i) { if (0 == i) { m_pAnims[i]["LeftSlideIn"].normalizedTime = 0.0001f; m_pAnims[i]["LeftSlideIn"].speed = 0.0001f; m_pAnims[i]["LeftSlideIn"].wrapMode = WrapMode.Clamp; m_pAnims[i].Play("LeftSlideIn"); } else { m_pAnims[i]["RightSlideIn"].normalizedTime = 0.0001f; m_pAnims[i]["RightSlideIn"].speed = 0.0001f; m_pAnims[i]["RightSlideIn"].wrapMode = WrapMode.Clamp; m_pAnims[i].Play("RightSlideIn"); } } OnEnterPage(); }