예제 #1
0
파일: Map.cs 프로젝트: yazici/erebus
    // careful, this implementation is straight from MGNE, it's efficiency is questionable, to say the least
    // it does support bigger than 1*1 events though
    public List <MapEvent> GetEventsAt(Vector2Int loc)
    {
        List <MapEvent> events = new List <MapEvent>();

        foreach (MapEvent mapEvent in objectLayer.GetComponentsInChildren <MapEvent>())
        {
            if (mapEvent.ContainsPosition(loc))
            {
                events.Add(mapEvent);
            }
        }
        return(events);
    }