/*public MapEventData[] GetMapEventData()
         * {
         *  int index = SceneManager.GetActiveScene().buildIndex;
         *  return MapEvents.Where(val => val.SceneNumber == index).ToArray();
         * }*/
        public TransParam[] GetTransitionParams(MapEventData mapEvent, Vector2Int pos)
        {
            var param = TransParams.SingleOrDefault(p => p.CurrentScene == mapEvent.SceneNumber);
            var list  = new List <TransParam>();

            foreach (var e in mapEvent[pos])
            {
                if (e.Event == MapEventData.Event.Transition || e.Event == MapEventData.Event.Transition_Action)
                {
                    list.AddRange(param.GetParameters(e.NextScene));
                }
            }
            return(list.ToArray());
        }
        public TalkParam[] GetTalkParams(MapEventData mapEvent, Vector2Int pos)
        {
            //Debug.LogFormat("{0}, {1}", TalkParams[0].CurrentScene, mapEvent.SceneNumber);
            var param = TalkParams.SingleOrDefault(p => p.CurrentScene == mapEvent.SceneNumber);
            var list  = new List <TalkParam>();

            foreach (var e in mapEvent[pos])
            {
                if (e.Event == MapEventData.Event.Talk || e.Event == MapEventData.Event.Talk_Action)
                {
                    list.AddRange(param.GetParameters(e.NextScene));
                }
            }
            return(list.ToArray());
            //return param.GetParameters(mapEvent[pos].NextScene);
        }