Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
 public void Add(AddWeaponArgs weapon)
 {
     _addRemoves.Enqueue(new Tuple<object, bool>(weapon, true));
 }
Esempio n. 4
0
 public void Add(AddWeaponArgs weapon)
 {
     _addRemoves.Enqueue(new Tuple <object, bool>(weapon, true));
 }