| | |
| | | [SerializeField] float m_Scale = 1; |
| | | [SerializeField] EnterPictureType m_EnterPictureType; |
| | | |
| | | [SerializeField] ShowAnimation m_EnterShowAnimation; |
| | | [SerializeField] ShowAnimation m_RoutimeShowAnimation; |
| | | |
| | | [SerializeField] Effect[] m_PersistentEffect; |
| | | [SerializeField] Effect[] m_EnterShowEffect; |
| | | [SerializeField] Effect[] m_RoutimeShowEffect; |
| | | |
| | | [SerializeField] CreateRoleHeroPlatform m_Platform; |
| | |
| | | public State state { get; private set; } |
| | | |
| | | List<SFXController> sfxControllers = new List<SFXController>(); |
| | | |
| | | public void DoEnterShow() |
| | | { |
| | | CreateRoleManager.Instance.LoadModel(m_Job, (bool ok, UnityEngine.Object @object) => |
| | | { |
| | | if (ok) |
| | | { |
| | | var model = @object as GameObject; |
| | | model.transform.SetParentEx(m_Platform.transform, Vector3.zero, Quaternion.identity, Vector3.one * m_Scale); |
| | | m_Shadow.Cast(model.transform); |
| | | model.SetActive(true); |
| | | |
| | | ReleaseEffects(); |
| | | |
| | | state = State.EnterShow; |
| | | showTimeLine.ClearNode(); |
| | | |
| | | foreach (var effect in m_PersistentEffect) |
| | | { |
| | | showTimeLine.AddNone(effect.delay, () => |
| | | { |
| | | PlayEffect(model.transform, effect); |
| | | }); |
| | | } |
| | | |
| | | foreach (var effect in m_EnterShowEffect) |
| | | { |
| | | showTimeLine.AddNone(effect.delay, () => |
| | | { |
| | | PlayEffect(model.transform, effect); |
| | | }); |
| | | } |
| | | |
| | | showTimeLine.AddNone(m_EnterShowAnimation.delay, () => |
| | | { |
| | | var animator = model.GetComponent<Animator>(); |
| | | animator.Play(m_EnterShowAnimation.animation); |
| | | }); |
| | | |
| | | showTimeLine.AddNone(5f, () => |
| | | { |
| | | WindowCenter.Instance.Open<CreateRoleWin>(); |
| | | }); |
| | | |
| | | showTimeLine.OnComplete(() => { state = State.Idle; }); |
| | | showTimeLine.Begin(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | public void DoRoutineShow() |
| | | { |