發表文章

目前顯示的是 1月 7, 2019的文章

Pygame collision handling

圖片
0 I made a 2D platformer game with pygame. I am struggling to figure out how to determine the direction an object is moving in. For example: say the player is coming from above since his y velocity is greater than zero, then the problems are that his gravitation is acting on him constantly; this means that if he comes from the left side, his y velocity is greater than zero (so this if statement will get triggered even though I want the left-side-if statement to get triggered). The source code for this is the following: ` if self.hits: for platform in self.hits: if self.player.vel.y > 0: self.player.rect.y = platform.rect.top self.player.vel.y = 0 if self.player.vel.y < 0: self.player.rect.top = platform.rect.bottom self.player.vel.y

Sikorsky CH-53E Super Stallion

圖片
CH-53E Super Stallion MH-53E Sea Dragon A CH-53E Super Stallion with the 22nd Marine Expeditionary Unit Role Heavy-lift cargo helicopter National origin United States Manufacturer Sikorsky Aircraft First flight 1 March 1974 Introduction 1981 Status In service Primary users United States Marine Corps United States Navy Japan Maritime Self-Defense Force Produced 1978–1980s [ citation needed ] Number built 234 [ citation needed ] Unit cost US$24.36 million (1992, avg. cost) Developed from Sikorsky CH-53 Sea Stallion Developed into Sikorsky CH-53K King Stallion The Sikorsky CH-53E Super Stallion is a heavy-lift helicopter operated by the United States military. As the Sikorsky S-80 it was developed from the CH-53 Sea Stallion, mainly by adding a third engine, adding a seventh blade to the main rotor and canting the tail rotor 20 degrees. It was built by Sikorsky Aircraft for the United States Ma