public void AddDroppedWeapon(WeaponDrop DroppedWeapon) { if (Owner.IsOfflineOrServer) { AddDroppedWeapon(Owner.NextDroppedWeaponID, DroppedWeapon); } }
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); } }
public void RemoveDroppedWeapon(WeaponDrop DroppedWeaponToRemove) { ListWeaponDropToRemove.Add(DroppedWeaponToRemove.ID); }
public void AddDroppedWeapon(uint ID, WeaponDrop DroppedWeapon) { DroppedWeapon.ID = ID; DicWeaponDrop.Add(ID, DroppedWeapon); }