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;
|
}
|
}
|
}
|