public List <Island> GetColliders(Island island)
 {
     if (TopdownIslandIndex == null)
     {
         TopdownIslandIndex = new TopDownCircleSpaceIndex(100);
     }
     return(TopdownIslandIndex.GetColliders(island, island.Position).Select(c => (Island)c).ToList());
 }
 public void AddIsland(Island island)
 {
     if (TopdownIslandIndex == null)
     {
         TopdownIslandIndex = new TopDownCircleSpaceIndex(100);
     }
     IslandToPosition[island] = island.Position;
     TopdownIslandIndex.Add(island);
 }
 public void RemoveIsland(Island island)
 {
     if (TopdownIslandIndex == null)
     {
         TopdownIslandIndex = new TopDownCircleSpaceIndex(100);
     }
     IslandToPosition.Remove(island);
     TopdownIslandIndex.Remove(island);
 }
        public bool MoveDetectCollision(Island island, Vector3 newPosition)
        {
            if (TopdownIslandIndex == null)
            {
                TopdownIslandIndex = new TopDownCircleSpaceIndex(100);
            }
            var ret = TopdownIslandIndex.MoveDetectCollision(island, IslandToPosition[island], newPosition);

            IslandToPosition[island] = newPosition;
            return(ret);
        }
Example #5
0
 public Minimap(TopDownCircleSpaceIndex TopdownIslandIndex, FollowCamera toFollow)
 {
     this.TopdownIslandIndex = TopdownIslandIndex;
     this.toFollow           = toFollow;
     minimapBase             = gOM.LoadViaResources("MinimapBase");
 }