Esempio n. 1
0
    private void DoFx()
    {
        using (Dictionary <int, TimelineHierarchy.FrameRow> .Enumerator enumerator = this.frameSheets.get_Item(7).frameRows.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                KeyValuePair <int, TimelineHierarchy.FrameRow> current = enumerator.get_Current();
                TimelineHierarchy.FrameRow value = current.get_Value();
                if (this.currFrameIndex > value.idleFrameIndex)
                {
                    int num = value.frames.get_Item(this.currFrameIndex);
                    if (num != 0)
                    {
                        value.idleFrameIndex = this.currFrameIndex + 1;
                        ShiJianCanShuBiao shiJianCanShuBiao = DataReader <ShiJianCanShuBiao> .Get(num);

                        int        fx       = shiJianCanShuBiao.fx;
                        Vector3    position = this.List2Vector3(shiJianCanShuBiao.position);
                        Vector3    vector   = this.FloatToOrientation((float)shiJianCanShuBiao.towardAngle);
                        Quaternion rotation = Quaternion.LookRotation(vector);
                        FXManager.Instance.PlayFXOfDisplay(fx, null, position, rotation, 1f, 1f, 0, false, null, null);
                    }
                }
            }
        }
    }
Esempio n. 2
0
    private void DoDel()
    {
        using (Dictionary <int, TimelineHierarchy.FrameRow> .Enumerator enumerator = this.frameSheets.get_Item(8).frameRows.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                KeyValuePair <int, TimelineHierarchy.FrameRow> current = enumerator.get_Current();
                TimelineHierarchy.FrameRow value = current.get_Value();
                if (this.currFrameIndex > value.idleFrameIndex)
                {
                    int num = value.frames.get_Item(this.currFrameIndex);
                    if (num != 0)
                    {
                        value.idleFrameIndex = this.currFrameIndex + 1;
                        ShiJianCanShuBiao shiJianCanShuBiao = DataReader <ShiJianCanShuBiao> .Get(num);

                        Debug.LogError("DoDel=" + shiJianCanShuBiao.function);
                        if (shiJianCanShuBiao.function == 1)
                        {
                            TimelineGlobal.DelNpc(shiJianCanShuBiao.modelId);
                        }
                    }
                }
            }
        }
    }
Esempio n. 3
0
    private void DoComic()
    {
        using (Dictionary <int, TimelineHierarchy.FrameRow> .Enumerator enumerator = this.frameSheets.get_Item(5).frameRows.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                KeyValuePair <int, TimelineHierarchy.FrameRow> current = enumerator.get_Current();
                TimelineHierarchy.FrameRow value = current.get_Value();
                if (this.currFrameIndex > value.idleFrameIndex)
                {
                    int num = value.frames.get_Item(this.currFrameIndex);
                    if (num != 0)
                    {
                        value.idleFrameIndex = this.currFrameIndex + 1;
                        ShiJianCanShuBiao shiJianCanShuBiao = DataReader <ShiJianCanShuBiao> .Get(num);

                        Debug.LogError(string.Concat(new object[]
                        {
                            "DoComic anime=",
                            shiJianCanShuBiao.anime,
                            " anime2=",
                            shiJianCanShuBiao.anime2
                        }));
                        if (shiJianCanShuBiao.anime == -1)
                        {
                            CamerasMgr.OpenEye();
                        }
                        else if (shiJianCanShuBiao.anime <= 0)
                        {
                            if (shiJianCanShuBiao.anime2 != string.Empty)
                            {
                                this.isPause = true;
                                List <List <int> > list  = new List <List <int> >();
                                string[]           array = shiJianCanShuBiao.anime2.Split(new char[]
                                {
                                    ';'
                                });
                                for (int i = 0; i < array.Length; i++)
                                {
                                    List <int> list2  = new List <int>();
                                    string[]   array2 = array[i].Split(new char[]
                                    {
                                        ','
                                    });
                                    for (int j = 0; j < array2.Length; j++)
                                    {
                                        list2.Add(int.Parse(array2[j]));
                                    }
                                    list.Add(list2);
                                }
                                this.comics.set_Item(num, list);
                                this.PlaySpineCallback(num);
                            }
                        }
                        this.out_system_lock = true;
                    }
                }
            }
        }
    }
Esempio n. 4
0
    private void DoDialogue()
    {
        using (Dictionary <int, TimelineHierarchy.FrameRow> .Enumerator enumerator = this.frameSheets.get_Item(3).frameRows.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                KeyValuePair <int, TimelineHierarchy.FrameRow> current = enumerator.get_Current();
                TimelineHierarchy.FrameRow value = current.get_Value();
                if (this.currFrameIndex > value.idleFrameIndex)
                {
                    int num = value.frames.get_Item(this.currFrameIndex);
                    if (num != 0)
                    {
                        this.isPause         = true;
                        value.idleFrameIndex = this.currFrameIndex + 1;
                        ShiJianCanShuBiao shiJianCanShuBiao = DataReader <ShiJianCanShuBiao> .Get(num);

                        List <int> diolague = shiJianCanShuBiao.diolague;
                        MainTaskManager.Instance.OpenTalkUI(diolague, false, delegate
                        {
                            this.isPause = false;
                        }, 0);
                    }
                }
            }
        }
    }
Esempio n. 5
0
 private int GetMoveToFrameIndex(TimelineHierarchy.FrameRow frameRow, int moveFromFrameIndex)
 {
     while (!this.IsFrameEnd(++moveFromFrameIndex))
     {
         int num = frameRow.frames.get_Item(moveFromFrameIndex);
         if (num != 0)
         {
             return(moveFromFrameIndex);
         }
     }
     return(-1);
 }
Esempio n. 6
0
    private void DoCamera()
    {
        using (Dictionary <int, TimelineHierarchy.FrameRow> .Enumerator enumerator = this.frameSheets.get_Item(1).frameRows.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                KeyValuePair <int, TimelineHierarchy.FrameRow> current = enumerator.get_Current();
                TimelineHierarchy.FrameRow value = current.get_Value();
                if (this.currFrameIndex > value.idleFrameIndex)
                {
                    int num = value.frames.get_Item(this.currFrameIndex);
                    if (num != 0)
                    {
                        ShiJianCanShuBiao shiJianCanShuBiao = DataReader <ShiJianCanShuBiao> .Get(num);

                        List <float> position         = shiJianCanShuBiao.position;
                        List <float> towardPoint      = shiJianCanShuBiao.towardPoint;
                        int          moveToFrameIndex = this.GetMoveToFrameIndex(value, this.currFrameIndex);
                        if (moveToFrameIndex >= 0)
                        {
                            value.idleFrameIndex = moveToFrameIndex;
                            num = value.frames.get_Item(moveToFrameIndex);
                            shiJianCanShuBiao = DataReader <ShiJianCanShuBiao> .Get(num);

                            this.cameraMoveEnd   = this.List2Vector3(shiJianCanShuBiao.position);
                            this.cameraLookEnd   = this.List2Vector3(shiJianCanShuBiao.towardPoint);
                            this.cameraMoveBegin = this.List2Vector3(position);
                            this.cameraLookBegin = this.List2Vector3(towardPoint);
                            CamerasMgr.CameraMain.get_transform().set_position(this.cameraMoveBegin);
                            CamerasMgr.CameraMain.get_transform().LookAt(this.cameraLookBegin);
                            int num2 = moveToFrameIndex - this.currFrameIndex;
                            this.cameraMoveSpeed    = (this.cameraMoveEnd - this.cameraMoveBegin).get_magnitude() / (float)num2;
                            this.cameraForwardBegin = (this.cameraLookBegin - this.cameraMoveBegin).get_normalized();
                            this.cameraForwardEnd   = (this.cameraLookEnd - this.cameraMoveEnd).get_normalized();
                            this.cameraForwardSpeed = Vector3.Angle(this.cameraForwardBegin, this.cameraForwardEnd) * 0.0174532924f / (float)num2;
                            break;
                        }
                    }
                }
            }
        }
        if (this.cameraMoveBegin != this.cameraMoveEnd || CamerasMgr.MainCameraRoot.get_forward() != this.cameraForwardEnd)
        {
            Vector3 position2 = CamerasMgr.MainCameraRoot.get_position();
            Vector3 vector    = this.cameraMoveEnd;
            CamerasMgr.MainCameraRoot.set_position(Vector3.MoveTowards(position2, vector, this.cameraMoveSpeed * Time.get_deltaTime()));
            Vector3 forward = CamerasMgr.MainCameraRoot.get_forward();
            Vector3 vector2 = this.cameraForwardEnd;
            CamerasMgr.MainCameraRoot.set_forward(Vector3.RotateTowards(forward, vector2, this.cameraForwardSpeed * Time.get_deltaTime(), 0f));
            this.cameraMoveBegin = CamerasMgr.MainCameraRoot.get_position();
        }
    }
Esempio n. 7
0
 private void DoPause()
 {
     using (Dictionary <int, TimelineHierarchy.FrameRow> .Enumerator enumerator = this.frameSheets.get_Item(9).frameRows.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             KeyValuePair <int, TimelineHierarchy.FrameRow> current = enumerator.get_Current();
             TimelineHierarchy.FrameRow value = current.get_Value();
             if (this.currFrameIndex > value.idleFrameIndex)
             {
                 int num = value.frames.get_Item(this.currFrameIndex);
                 if (num != 0)
                 {
                     value.idleFrameIndex = this.currFrameIndex + 1;
                     Debug.LogError("DoPause=" + num);
                     this.isManualContinue = true;
                 }
             }
         }
     }
 }
Esempio n. 8
0
    private void DoSubtitle()
    {
        using (Dictionary <int, TimelineHierarchy.FrameRow> .Enumerator enumerator = this.frameSheets.get_Item(4).frameRows.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                KeyValuePair <int, TimelineHierarchy.FrameRow> current = enumerator.get_Current();
                TimelineHierarchy.FrameRow value = current.get_Value();
                if (this.currFrameIndex > value.idleFrameIndex)
                {
                    int num = value.frames.get_Item(this.currFrameIndex);
                    if (num != 0)
                    {
                        this.isPause         = true;
                        value.idleFrameIndex = this.currFrameIndex + 1;
                        List <string>     list = new List <string>();
                        ShiJianCanShuBiao shiJianCanShuBiao = DataReader <ShiJianCanShuBiao> .Get(num);

                        if (shiJianCanShuBiao != null)
                        {
                            for (int i = 0; i < shiJianCanShuBiao.word.get_Count(); i++)
                            {
                                list.Add(GameDataUtils.GetChineseContent(shiJianCanShuBiao.word.get_Item(i), false));
                            }
                        }
                        else
                        {
                            Debug.LogError("GameData.ShiJianCanShuBiao no exist, id = " + num);
                        }
                        SubtitlesUI subtitlesUI = UIManagerControl.Instance.OpenUI("SubtitlesUI", UINodesManager.T2RootOfSpecial, false, UIType.NonPush) as SubtitlesUI;
                        subtitlesUI.Init(list, delegate
                        {
                            this.isPause = false;
                        });
                    }
                }
            }
        }
    }
Esempio n. 9
0
    private void DoSound()
    {
        using (Dictionary <int, TimelineHierarchy.FrameRow> .Enumerator enumerator = this.frameSheets.get_Item(6).frameRows.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                KeyValuePair <int, TimelineHierarchy.FrameRow> current = enumerator.get_Current();
                TimelineHierarchy.FrameRow value = current.get_Value();
                if (this.currFrameIndex > value.idleFrameIndex)
                {
                    int num = value.frames.get_Item(this.currFrameIndex);
                    if (num != 0)
                    {
                        value.idleFrameIndex = this.currFrameIndex + 1;
                        ShiJianCanShuBiao shiJianCanShuBiao = DataReader <ShiJianCanShuBiao> .Get(num);

                        Debug.LogError("DoSound=" + shiJianCanShuBiao.voice);
                        SoundManager.Instance.PlayPlayer(base.get_gameObject().GetComponent <AudioPlayer>(), shiJianCanShuBiao.voice);
                    }
                }
            }
        }
    }
Esempio n. 10
0
    private void DoNpc()
    {
        using (Dictionary <int, TimelineHierarchy.FrameRow> .Enumerator enumerator = this.frameSheets.get_Item(2).frameRows.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                KeyValuePair <int, TimelineHierarchy.FrameRow> current = enumerator.get_Current();
                TimelineHierarchy.FrameRow value = current.get_Value();
                if (this.currFrameIndex > value.idleFrameIndex)
                {
                    int num = value.frames.get_Item(this.currFrameIndex);
                    if (num != 0)
                    {
                        ShiJianCanShuBiao shiJianCanShuBiao = DataReader <ShiJianCanShuBiao> .Get(num);

                        int     num2    = shiJianCanShuBiao.modelId;
                        string  action  = shiJianCanShuBiao.action;
                        float   time    = 0f;
                        Vector3 posA    = this.List2Vector3(shiJianCanShuBiao.position);
                        Vector3 towardA = this.FloatToOrientation((float)shiJianCanShuBiao.towardAngle);
                        Vector3 posB    = Vector3.get_zero();
                        Vector3 towardB = Vector3.get_zero();
                        if (action == "run" || action == "run_city")
                        {
                            int moveToFrameIndex = this.GetMoveToFrameIndex(value, this.currFrameIndex);
                            if (moveToFrameIndex < 0)
                            {
                                continue;
                            }
                            int key = value.frames.get_Item(moveToFrameIndex);
                            shiJianCanShuBiao = DataReader <ShiJianCanShuBiao> .Get(key);

                            time = (float)(moveToFrameIndex - this.currFrameIndex);
                            value.idleFrameIndex = moveToFrameIndex;
                            posB    = this.List2Vector3(shiJianCanShuBiao.position);
                            towardB = this.FloatToOrientation((float)shiJianCanShuBiao.towardAngle);
                        }
                        else
                        {
                            value.idleFrameIndex = this.currFrameIndex + 1;
                        }
                        if (num2 == 1)
                        {
                            num2 = EntityWorld.Instance.ActSelf.resGUID;
                        }
                        for (int i = 0; i < this.npcActionSeqs.get_Count(); i++)
                        {
                            TimelineNpc timelineNpc = this.npcActionSeqs.get_Item(i);
                            if (timelineNpc.npcId == num2)
                            {
                                timelineNpc.SwitchingAction(action, num2, posA, towardA, posB, towardB, time);
                                return;
                            }
                        }
                        TimelineNpc timelineNpc2 = new TimelineNpc(action, num2, posA, towardA, posB, towardB, time);
                        this.npcActionSeqs.Add(timelineNpc2);
                    }
                }
            }
        }
    }
Esempio n. 11
0
 private bool IsFrameIdle(TimelineHierarchy.FrameRow frameRow)
 {
     return(this.currFrameIndex > frameRow.idleFrameIndex);
 }