public AttackInfo( Weapon _w, int _dmg, SpaceObject _src ) { Weapon = _w; Damage = _dmg; Source = _src; }
public Item( string _name, World _world, int _id = -1, bool _inSpace = true, //debuggish, leave for now int _count = 1 ) : base(_world) { Name = _name; World = _world; ID = _id; Count = _count; Carrier = null; Tags = new List<string>(); Tags.Add("Item"); Size = new Vector2(16, 16); rotationDirection = Game.Random.NextDouble() > 0.5f; rotationSpeed = 0.01f + (float)Game.Random.NextDouble() * 0.01f; if (_inSpace) { World.SpaceObjects.Add(this); } }
public static void Untag(SpaceObject _i, string _tag) { _i.Tags = _i.Tags.FindAll(x => !x.Equals(_tag)); _i.Tags = _i.Tags.Distinct().ToList(); }
public static void Tag(SpaceObject _i, string _tag) { _i.Tags.Add(_tag); _i.Tags = _i.Tags.Distinct().ToList(); }