Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,948 additions
and
1,920 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
#detect collisions of two different rectangles | ||
# detect collisions of two different rectangles | ||
def iscollision(AposX, AposY, AsizeX, AsizeY, BposX, BposY, BsizeX, BsizeY): | ||
if ((AposX+AsizeX <= BposX +BsizeX \ | ||
and AposX +AsizeX >= BposX )\ | ||
or | ||
(AposX <= BposX + BsizeX\ | ||
and AposX +AsizeX >= BposX ))\ | ||
\ | ||
and ((AposY+AsizeY <= BposY +BsizeY \ | ||
and AposY +AsizeY> BposY) \ | ||
or | ||
(AposY <= BposY +BsizeY \ | ||
and AposY > BposY)): | ||
return True | ||
else: | ||
return False | ||
if ((AposX + AsizeX <= BposX + BsizeX | ||
and AposX + AsizeX >= BposX) | ||
or | ||
(AposX <= BposX + BsizeX | ||
and AposX + AsizeX >= BposX ))\ | ||
\ | ||
and ((AposY + AsizeY <= BposY + BsizeY | ||
and AposY + AsizeY > BposY) | ||
or | ||
(AposY <= BposY + BsizeY | ||
and AposY > BposY)): | ||
return True | ||
else: | ||
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
import pygame, sys, pygame.mixer | ||
import pygame | ||
import sys | ||
import pygame.mixer | ||
from pygame.locals import * | ||
|
||
pygame.init() | ||
|
||
clock = pygame.time.Clock() | ||
screen = pygame.display.set_mode((800,600)) | ||
screen = pygame.display.set_mode((800, 600)) | ||
pygame.mouse.set_visible(False) | ||
#pygame.mouse.set_visible(0) | ||
# pygame.mouse.set_visible(0) | ||
pygame.mixer.set_num_channels(32) | ||
pygame.display.set_caption("MICshooter") | ||
|
||
screenwidth=screen.get_width() | ||
screenheight=screen.get_height() | ||
|
||
explosions=0 | ||
screenwidth = screen.get_width() | ||
screenheight = screen.get_height() | ||
|
||
explosions = 0 |
Oops, something went wrong.