Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MapInitializer"/> class.
 /// </summary>
 /// <param name="configuration">The configuration.</param>
 public MapInitializer(GameConfiguration configuration)
 {
     this.defaultDropGenerator = new DefaultDropGenerator(configuration, Rand.GetRandomizer());
     this.configuration        = configuration;
     this.ItemDropDuration     = 60;
     this.ChunkSize            = 8;
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MapInitializer"/> class.
 /// </summary>
 /// <param name="configuration">The configuration.</param>
 /// <param name="mapStateObserver">The map state observer.</param>
 public MapInitializer(GameConfiguration configuration, IMapStateObserver mapStateObserver)
 {
     this.defaultDropGenerator = new DefaultDropGenerator(configuration, Rand.GetRandomizer());
     this.configuration        = configuration;
     this.ItemDropDuration     = 60;
     this.ChunkSize            = 8;
     this.mapStateObserver     = mapStateObserver;
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Monster"/> class.
 /// </summary>
 /// <param name="spawnInfo">The spawn information.</param>
 /// <param name="stats">The stats.</param>
 /// <param name="id">The identifier.</param>
 /// <param name="map">The map on which this instance will spawn.</param>
 /// <param name="dropGenerator">The drop generator.</param>
 /// <param name="monsterIntelligence">The monster intelligence.</param>
 public Monster(MonsterSpawnArea spawnInfo, MonsterDefinition stats, ushort id, GameMap map, IDropGenerator dropGenerator, IMonsterIntelligence monsterIntelligence)
     : base(spawnInfo, stats, id, map)
 {
     this.dropGenerator        = dropGenerator;
     this.Attributes           = new MonsterAttributeHolder(this);
     this.walker               = new Walker(this);
     this.intelligence         = monsterIntelligence;
     this.intelligence.Monster = this;
     this.intelligence.Start();
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Monster" /> class.
 /// </summary>
 /// <param name="spawnInfo">The spawn information.</param>
 /// <param name="stats">The stats.</param>
 /// <param name="map">The map on which this instance will spawn.</param>
 /// <param name="dropGenerator">The drop generator.</param>
 /// <param name="npcIntelligence">The monster intelligence.</param>
 /// <param name="plugInManager">The plug in manager.</param>
 public Monster(MonsterSpawnArea spawnInfo, MonsterDefinition stats, GameMap map, IDropGenerator dropGenerator, INpcIntelligence npcIntelligence, PlugInManager plugInManager)
     : base(spawnInfo, stats, map)
 {
     this.dropGenerator    = dropGenerator;
     this.Attributes       = new MonsterAttributeHolder(this);
     this.MagicEffectList  = new MagicEffectsList(this);
     this.walker           = new Walker(this, () => this.StepDelay);
     this.intelligence     = npcIntelligence;
     this.plugInManager    = plugInManager;
     this.intelligence.Npc = this;
     this.intelligence.Start();
 }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Monster"/> class.
 /// </summary>
 /// <param name="spawnInfo">The spawn information.</param>
 /// <param name="stats">The stats.</param>
 /// <param name="map">The map on which this instance will spawn.</param>
 /// <param name="dropGenerator">The drop generator.</param>
 /// <param name="monsterIntelligence">The monster intelligence.</param>
 public Monster(MonsterSpawnArea spawnInfo, MonsterDefinition stats, GameMap map, IDropGenerator dropGenerator, IMonsterIntelligence monsterIntelligence)
     : base(spawnInfo, stats, map)
 {
     this.dropGenerator        = dropGenerator;
     this.Attributes           = new MonsterAttributeHolder(this);
     this.MagicEffectList      = new MagicEffectsList(this);
     this.walker               = new Walker(this, () => this.StepDelay);
     this.intelligence         = monsterIntelligence;
     this.intelligence.Monster = this;
     this.intelligence.Start();
     this.Initialize();
 }