少年修仙传客户端代码仓库
hch
2025-06-12 204ef05a831c9484e2abc561d27ecbff7c797453
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using UnityEngine;
using System.IO;
 
namespace H2Engine
{
    [System.Serializable]
    public class MapTrigger
    {
        public enum E_TriggerType
        {
            Trigger,
            EnterStage,
            Mission,
        }
 
        public Evt.E_EventType type;
        public E_TriggerType triggerType;
        public int prevID;
        public int nextID;
        public int id;
        public int[] evevntIDs;
        public Vector3 position;
        public float rotationY;
        public Vector3 size;
 
        public void Load(BinaryReader br)
        {
            id = br.ReadInt32();
            triggerType = (E_TriggerType)br.ReadByte();
            type = (Evt.E_EventType)br.ReadByte();
            prevID = br.ReadInt32();
            nextID = br.ReadInt32();
            float _pX = br.ReadSingle();
            float _pY = br.ReadSingle();
            float _pZ = br.ReadSingle();
            float _x = br.ReadSingle();
            float _z = br.ReadSingle();
            float _eY = br.ReadSingle();
            int _count = br.ReadInt32();
            evevntIDs = new int[_count];
            for (int i = 0; i < _count; ++i)
            {
                evevntIDs[i] = br.ReadInt32();
            }
            position = new Vector3(_pX, _pY, _pZ);
            size = new Vector3(_x, 1, _z);
            rotationY = _eY;
        }
    }
}