public OpenGuideStep ExcuteCurrentStep(GameObject stepObj, GameObject panel, System.Action onFinish) { GuideStepData now; if (!GuideManager.Instance.GetStep(m_StepCurrentId, out now)) { return(null); } if (m_StepExcuteState != eStepExcuteState.Excuting) { return(null); } m_StepExcuteState = eStepExcuteState.Excuted; string excute_type = now.excute_type.ToString(); if (excute_type.Equals("default")) { OpenGuideStep step = new OpenGuideStep(); step.GuideId = m_StepCurrentId; step.m_Panel = panel; step.m_StepObj = stepObj; if (onFinish != null) { step.onFinish += onFinish; } step.ExcuteReal(); return(step); } else { System.Type type = System.Type.GetType(excute_type); object obj = System.Activator.CreateInstance(type); OpenGuideStep step = (OpenGuideStep)obj; step.GuideId = m_StepCurrentId; step.m_StepObj = stepObj; step.m_Panel = panel; if (onFinish != null) { step.onFinish += onFinish; } step.ExcuteReal(); return(step); } }
public void AddFx(GameObject fx, OpenGuideStep step) { m_StepFxs.Add(fx); m_Steps.Add(step); }