예제 #1
0
 public void AddDroppedWeapon(WeaponDrop DroppedWeapon)
 {
     if (Owner.IsOfflineOrServer)
     {
         AddDroppedWeapon(Owner.NextDroppedWeaponID, DroppedWeapon);
     }
 }
예제 #2
0
        public void UpdateWeaponDropCollisionWithWorld(WeaponDrop ActiveWeaponDrop)
        {
            PolygonCollisionResult FinalCollisionResult       = new PolygonCollisionResult(Vector2.Zero, -1);
            PolygonCollisionResult FinalCollisionGroundResult = new PolygonCollisionResult(Vector2.Zero, -1);
            Polygon FinalCollisionPolygon = null;

            foreach (WorldPolygon ActivePolygon in GetCollidingWorldObjects(ActiveWeaponDrop))
            {
                foreach (Polygon CollisionPolygon in ActiveWeaponDrop.Collision.ListCollisionPolygon)
                {
                    PolygonCollisionResult CollisionGroundResult;
                    PolygonCollisionResult CollisionResult = Polygon.PolygonCollisionSAT(CollisionPolygon, ActivePolygon.Collision.ListCollisionPolygon[0], ActiveWeaponDrop.Speed, out CollisionGroundResult);

                    if (FinalCollisionResult.Distance < 0 || (CollisionResult.Distance >= 0 && CollisionResult.Distance > FinalCollisionResult.Distance))
                    {
                        FinalCollisionResult       = CollisionResult;
                        FinalCollisionGroundResult = CollisionGroundResult;
                        FinalCollisionPolygon      = ActivePolygon.Collision.ListCollisionPolygon[0];
                    }
                }
            }

            if (FinalCollisionResult.Distance >= 0)
            {
                ActiveWeaponDrop.Speed = Vector2.Zero;
                ActiveWeaponDrop.UpdateSkills(TripleThunderAttackRequirement.OnGroundCollisionAttackName);
            }
        }
예제 #3
0
 public void RemoveDroppedWeapon(WeaponDrop DroppedWeaponToRemove)
 {
     ListWeaponDropToRemove.Add(DroppedWeaponToRemove.ID);
 }
예제 #4
0
 public void AddDroppedWeapon(uint ID, WeaponDrop DroppedWeapon)
 {
     DroppedWeapon.ID = ID;
     DicWeaponDrop.Add(ID, DroppedWeapon);
 }