private static void AddWeapon(AddWeaponArgs dna, WorldVars arg) { Weapon weapon = new Weapon(dna.Weapon, dna.Position, arg.World, arg.MaterialIDs.Weapon); if (dna.AngularVelocity != null) { weapon.PhysicsBody.AngularVelocity = dna.AngularVelocity.Value; } arg.Keep2D.Add(weapon, false); arg.Map.AddItem(weapon); // Call delegate if (dna.ItemAdded != null) { dna.ItemAdded(weapon); } }
public void Add(AddWeaponArgs weapon) { _addRemoves.Enqueue(new Tuple<object, bool>(weapon, true)); }
public void Add(AddWeaponArgs weapon) { _addRemoves.Enqueue(new Tuple <object, bool>(weapon, true)); }