public Mob(MobBreedLocation mbl)
{
ID = mbl.MobID;
Init();
// Make random location
if (!mbl.Map.AssignObjectID(this))
{
Log.WriteLine(LogLevel.Warn, "Couldn't spawn mob, out of ID's");
return;
}
Map = mbl.Map;
Spawnplace = mbl;
while (true)
{
Position = Vector2.GetRandomSpotAround(Program.Randomizer, mbl.Position, 30);
if (Map.Block.CanWalk(Position.X, Position.Y))
{
break;
}
}
SetBoundriesFromPointAndRange(Position, 100);
Spawnplace.CurrentMobs++;
}