Ejemplo n.º 1
0
		public Missile(WorldLayer _layer, LiveMapCell _from, int _speed, Item _ammo, LiveMapCell _to)
			: base(_ammo.ENoun, _layer, _speed)
		{
			Ammo = _ammo;
			var d = (_to.PathMapCoords - _from.PathMapCoords)*10;
			if(d.Lenght>32)
			{
				d = d*31/(int)d.Lenght;
			}
			World.TheWorld.CreatureManager.AddCreature(this, _from.WorldCoords, _from.LiveCoords, _layer);
			m_path = _from.LiveCoords.GetLineToPoints(_from.LiveCoords + d).ToList();
			m_light = new LightSource(10, new FColor(2f, 1f, 0.8f, 0.4f));
		}
Ejemplo n.º 2
0
		public ItemBattleInfo this[Item _item, Creature _creature, bool _try = false]
		{
			get
			{
				ItemBattleInfo info;
				if (!m_items.TryGetValue(_item, out info) && !_try)
				{
					info = _item.CreateItemInfo(_creature);
					m_items[_item] = info;
				}
				return info;
			}
		}