Ejemplo n.º 1
0
 private void Do(JuQingShiJian plotInfo)
 {
     if (plotInfo.eventType == 2)
     {
         this.DoNpc(plotInfo);
     }
     else if (plotInfo.eventType == 3)
     {
         this.DoDiolague(plotInfo);
     }
     else if (plotInfo.eventType == 4)
     {
         this.DoSubtile(plotInfo);
     }
     else if (plotInfo.eventType == 5)
     {
         this.DoPlay(plotInfo);
     }
     else if (plotInfo.eventType == 6)
     {
         this.DoSound(plotInfo);
     }
     else if (plotInfo.eventType == 7)
     {
         this.DoFx(plotInfo);
     }
     else if (plotInfo.eventType == 8)
     {
         this.DoDel(plotInfo);
     }
     else
     {
         Debug.LogError("[ERROR] eventType=" + plotInfo.eventType);
     }
 }
Ejemplo n.º 2
0
 private void DoDel(JuQingShiJian plotInfo)
 {
     if (plotInfo.function == 1)
     {
         CameraPathGlobal.instance.DelNpc(plotInfo.modelId, plotInfo.nameId);
     }
 }
Ejemplo n.º 3
0
 private void DoDiolague(JuQingShiJian plotInfo)
 {
     base.get_gameObject().GetComponent <CameraPathAnimator>().Pause();
     MainTaskManager.Instance.OpenTalkUI(plotInfo.diolague, false, delegate
     {
         base.get_gameObject().GetComponent <CameraPathAnimator>().Play();
     }, 0);
 }
Ejemplo n.º 4
0
 private void DoPlay(JuQingShiJian plotInfo)
 {
     if (plotInfo.anime == -1)
     {
         CamerasMgr.OpenEye();
     }
     else
     {
         GuideManager.Instance.guide_lock = true;
         FXManager.Instance.PlayFXOfUI(plotInfo.anime, UINodesManager.MiddleUIRoot, 0, 3001, delegate
         {
             GuideManager.Instance.guide_lock = false;
         });
     }
 }
Ejemplo n.º 5
0
    public static List <int> GetPreloadNpcs(int plotId)
    {
        List <int> list = new List <int>();

        for (int i = 0; i < 2; i++)
        {
            string path = string.Concat(new object[]
            {
                "CameraPath/jq_",
                plotId,
                "_",
                i + 1
            });
            Object @object = AssetManager.AssetOfNoPool.LoadAssetNowNoAB(path, typeof(Object));
            if (!(@object == null))
            {
                GameObject          gameObject = @object as GameObject;
                CameraPathEventList eventList  = gameObject.GetComponent <CameraPath>().eventList;
                for (int j = 0; j < eventList.realNumberOfPoints; j++)
                {
                    CameraPathEvent cameraPathEvent = eventList[j];
                    string[]        array           = cameraPathEvent.eventName.Split(new char[]
                    {
                        ';'
                    });
                    string[] array2 = array;
                    for (int k = 0; k < array2.Length; k++)
                    {
                        string        text          = array2[k];
                        JuQingShiJian juQingShiJian = DataReader <JuQingShiJian> .Get(int.Parse(text));

                        if (juQingShiJian != null)
                        {
                            if (juQingShiJian.eventType == 2)
                            {
                                list.Add(juQingShiJian.modelId);
                            }
                        }
                    }
                }
            }
        }
        for (int l = 0; l < list.get_Count(); l++)
        {
            Debug.LogError("preload=" + list.get_Item(l));
        }
        return(list);
    }
Ejemplo n.º 6
0
    private void Start()
    {
        this.PlotBegin();
        base.get_gameObject().GetComponent <CameraPathAnimator>().AnimationCustomEvent += delegate(string strArg)
        {
            Debug.LogError("AnimationCustomEvent=" + strArg);
            string[] array = strArg.Split(new char[]
            {
                ';'
            });
            string[] array2 = array;
            for (int i = 0; i < array2.Length; i++)
            {
                string        text          = array2[i];
                JuQingShiJian juQingShiJian = DataReader <JuQingShiJian> .Get(int.Parse(text));

                if (juQingShiJian != null)
                {
                    this.Do(juQingShiJian);
                }
            }
        };
        base.get_gameObject().GetComponent <CameraPathAnimator>().AnimationPointReachedWithNumberEvent += delegate(int arg)
        {
            Debug.LogError("AnimationPointReachedWithNumberEvent=" + arg);
        };
        base.get_gameObject().GetComponent <CameraPathAnimator>().AnimationFinishedEvent += delegate
        {
            CameraPath nextPath = base.get_gameObject().GetComponent <CameraPath>().nextPath;
            Debug.LogError("AnimationFinishedEvent nextPath=" + nextPath);
            if (nextPath != null)
            {
                nextPath.get_gameObject().GetComponent <CameraPathAnimator>().animationObject = CamerasMgr.MainCameraRoot;
                GameObject gameObject = Object.Instantiate <GameObject>(nextPath.get_gameObject());
                gameObject.SetActive(true);
            }
            else
            {
                this.PlotEnd();
            }
            Object.Destroy(base.get_gameObject());
        };
    }
Ejemplo n.º 7
0
    private void DoSubtile(JuQingShiJian plotInfo)
    {
        List <string> list = new List <string>();

        using (List <int> .Enumerator enumerator = plotInfo.word.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                int current = enumerator.get_Current();
                list.Add(GameDataUtils.GetChineseContent(current, false));
            }
        }
        base.get_gameObject().GetComponent <CameraPathAnimator>().Pause();
        SubtitlesUI subtitlesUI = UIManagerControl.Instance.OpenUI("SubtitlesUI", null, false, UIType.NonPush) as SubtitlesUI;

        subtitlesUI.Init(list, delegate
        {
            base.get_gameObject().GetComponent <CameraPathAnimator>().Play();
        });
    }
Ejemplo n.º 8
0
    private void DoNpc(JuQingShiJian plotInfo)
    {
        ActorModel npc = CameraPathGlobal.instance.GetNpc(plotInfo.modelId, plotInfo.nameId);

        new CameraPathNpc(npc, plotInfo.action, new Vector3(plotInfo.position.get_Item(0), plotInfo.position.get_Item(1), plotInfo.position.get_Item(2)), new Vector3(plotInfo.positionTo.get_Item(0), plotInfo.positionTo.get_Item(1), plotInfo.positionTo.get_Item(2)), 0f, (float)plotInfo.towardAngle, plotInfo.moveTime);
    }
Ejemplo n.º 9
0
 private void DoFx(JuQingShiJian plotInfo)
 {
     FXManager.Instance.PlayFXOfDisplay(plotInfo.fx, null, new Vector3(plotInfo.position.get_Item(0), plotInfo.position.get_Item(1), plotInfo.position.get_Item(2)), Quaternion.AngleAxis((float)plotInfo.towardAngle, Vector3.get_up()), 1f, 1f, 0, false, null, null);
 }
Ejemplo n.º 10
0
 private void DoSound(JuQingShiJian plotInfo)
 {
     SoundManager.Instance.PlayPlayer(base.get_gameObject().GetComponent <AudioPlayer>(), plotInfo.voice);
 }