Exemplo n.º 1
0
 public override void applyItemEffect(MyCharacterController src, params ObjectEntity[] targets)
 {
     //var tposs = Array.ConvertAll(targets, t => t.Position);
     bool isdetected = src.buffRegisterd(typeof(Perception));
     if (src.InRoom != null)
     {
         makeTrapsInRoom(src.InRoom, GameController.DungeonInformation,isdetected);
     }
     else {
         GameController.DungeonInformation.CurrentFloor.Rooms.Sort((a, b) => (int)(Vector2.Distance(a.CenterToInt, src.CurrentPosition) - Vector2.Distance(b.CenterToInt, src.CurrentPosition)));
         makeTrapsInRoom(GameController.DungeonInformation.CurrentFloor.Rooms[0], GameController.DungeonInformation,isdetected);
     }
 }