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