def init(self): CollegiateCombat.mode = "MainTitle" # Start Music CollegiateCombat.playMusic() # Import and resize background image self.background = pygame.image.load( "images/backgrounds/fireicefists.png") wBackground, hBackground = self.width, self.height self.background = pygame.transform.scale(self.background, (wBackground, hBackground)) # Import and resize title image self.titleImage = CollegiateCombat.titleImage wTitle, hTitle = self.titleImage.get_size() factorTitle = 1 if wTitle > (self.width // 2): factorTitle = (self.width // 2) / wTitle elif hTitle > (self.height // 2): factorTitle = (self.height // 2) / hTitle self.titleImage = pygame.transform.scale( self.titleImage, (int(wTitle * factorTitle), int(hTitle * factorTitle))) self.timePassed = 0 # Render text for name self.NameFont = DrawText.createFont("Alger", 30) self.NameText = DrawText.createText(text="By: Lucky Wavai", color=CollegiateCombat.blue, fontType=self.NameFont) self.NameTextCX, self.NameTextCY = self.width // 7, self.height - 50
def init(self): CollegiateCombat.mode == "BackgroundSelect" # Create background and board sizes margin = 10 self.iconImageWidth = 200 self.iconImageHeight = 200 self.iconImageY = self.height // 8 - 15 self.iconImageLeftX = margin + (self.width // 5) self.iconImageRightX = self.width - margin - self.iconImageWidth - (self.width // 5) self.backImageWidth = 300 self.backImageHeight = 200 self.backImageY = self.height // 8 - 15 self.backImageX1 = margin + (self.width // 2) - (self.backImageWidth // 2) self.backImageX2 = self.width - margin - self.backImageWidth - (self.width // 5) self.rectWidth = 100 self.rectHeight = 100 self.rectY = self.height // 4 self.leftRectX = margin + (self.width // 5) self.rightRectX = self.width - margin - self.rectWidth - (self.width // 5) self.imageY = (self.rectY ) self.imageLeftX = (self.leftRectX ) self.imageRightX = (self.rightRectX) # Upload each icon image and resize accordingly self.backgrounds = ["0-outside uc", "1-outside hammershlag", "2-fence", "3-wiegand", "4-tennis courts", "5-maggy mo", "6-gates bridge", "7-hunt", "8-the maze baker-porter", "9-mcconomy", "10-practice field", "11-stadium", "12-pittsburgh winter", "13-pittsburgh spring"] self.images = [] self.selectedImages = [] for imageName in self.backgrounds: image = pygame.image.load("images/backgrounds/game/%s.png" %imageName) selectedImage = image image = pygame.transform.scale( image, ( self.rectWidth, self.rectHeight ) ) selectedImage = pygame.transform.scale( image, ( self.backImageWidth, self.backImageHeight ) ) self.images.append(image) self.selectedImages.append(selectedImage) #print("Num backgrounds: %d, NumImages: %d" %(len(self.backgrounds), len(self.images))) # Create a dictionary of backgrounds self.backBoard = [ [{}, {}, {}, {}, {}, {}, {}], [{}, {}, {}, {}, {}, {}, {}] ] rowLst = [] j = 0 for row in range(len(self.backBoard)): for col in range(len(self.backBoard[0])): dict = {} dict = {self.backgrounds[j]: [ self.images[j], self.selectedImages[j] ]} self.backBoard[row][col] = dict j += 1 self.imageRow = 0 self.imageCol = 0 #for row in range(len(self.backBoard)): #print(self.backBoard[row]) for back in self.backBoard[self.imageRow][self.imageCol]: self.currentBackground = back self.currentImage = self.backBoard[self.imageRow][self.imageCol][back][1] self.SelectBackFont = DrawText.createFont("Alger", 50) self.SelectBackText = DrawText.createText(text = "Select Background", color = CollegiateCombat.red, fontType = self.SelectBackFont) self.SelectBackTextCX, self.SelectBackTextCY = ( ( (2 * self.backImageX1) + self.backImageWidth ) // 2), 20 self.InfoFont = DrawText.createFont("Alger", 25) self.InfoText = DrawText.createText(text = "Use Arrow Keys", color = CollegiateCombat.white, fontType = self.InfoFont) self.InfoTextCX, self.InfoTextCY = (self.width // 6), (self.height // 3) self.BackgroundFont = DrawText.createFont("Alger", 20) self.BackgroundText = DrawText.createText(text = "%s" %self.currentBackground, color = CollegiateCombat.white, fontType = self.BackgroundFont) self.BackgroundTextCX, self.BackgroundTextCY = ( ( (2 * self.backImageX1) + self.backImageWidth) // 2), (self.backImageY + self.backImageHeight + 25) self.PressEnterFont = DrawText.createFont("Alger", 40) self.PressEnterText = DrawText.createText(text = "Press Enter To Continue", color = CollegiateCombat.red, fontType = self.PressEnterFont) self.PressEnterTextCX, self.PressEnterTextCY = ( ( (2 * self.backImageX1) + self.backImageWidth ) // 2), (self.BackgroundTextCY + 30)
def init(self): CollegiateCombat.mode == "CharacterSelect" # Create icon and board sizes wBackground, hBackground = self.width, self.height margin = 10 self.iconImageWidth = 200 self.iconImageHeight = 200 self.iconImageY = self.height // 8 - 15 self.iconImageLeftX = margin + (self.width // 5) self.iconImageRightX = self.width - margin - self.iconImageWidth - ( self.width // 5) self.rectWidth = 100 self.rectHeight = 100 self.rectY = self.height // 4 self.leftRectX = margin + (self.width // 5) self.rightRectX = self.width - margin - self.rectWidth - (self.width // 5) self.imageY = (self.rectY) self.imageLeftX = (self.leftRectX) self.imageRightX = (self.rightRectX) # Upload each icon image and resize accordingly self.images = [] path = "images/icons" for imageName in os.listdir(path): image = pygame.image.load(path + os.sep + imageName) image = pygame.transform.scale(image, (self.rectWidth, self.rectHeight)) self.images.append(image) # Create a dictionary of characters self.characters = [ "subzero", "scorpion", "raizen", "goku", "naruto", "sasuke" ] #print("Num Characters: %d, NumImages: %d" %(len(self.characters), len(self.images))) self.charBoard = [[{}, {}, {}], [{}, {}, {}]] rowLst = [] j = 0 for row in range(len(self.charBoard)): for col in range(len(self.charBoard[0])): dict = {} dict = {self.characters[j]: self.images[j]} self.charBoard[row][col] = dict j += 1 self.imageRowLeft = 0 self.imageColLeft = 0 self.imageRowRight = 0 self.imageColRight = len(self.charBoard[0]) - 1 #for row in range(len(self.charBoard)): #print(self.charBoard[row]) for charLeft in self.charBoard[self.imageRowLeft][self.imageColLeft]: self.currentLeftCharacter = charLeft self.currentLeftImage = self.charBoard[self.imageRowLeft][ self.imageColLeft][charLeft] for charRight in self.charBoard[self.imageRowRight][ self.imageColRight]: self.currentRightCharacter = charRight self.currentRightImage = self.charBoard[self.imageRowRight][ self.imageColRight][charRight] self.SelectCharFont = DrawText.createFont("Alger", 50) self.SelectCharText = DrawText.createText(text="Select Character", color=CollegiateCombat.red, fontType=self.SelectCharFont) self.SelectCharTextCX, self.SelectCharTextCY = self.width // 2, 20 self.PressEnterFont = DrawText.createFont("Alger", 40) self.PressEnterText = DrawText.createText( text="Press Enter To Continue", color=CollegiateCombat.red, fontType=self.PressEnterFont) self.PressEnterTextCX, self.PressEnterTextCY = self.width // 2, ( self.height // 2 + 15) self.LeftInfoFont = DrawText.createFont("Alger", 25) self.LeftInfoText = DrawText.createText(text="Use W,A,S,D", color=CollegiateCombat.white, fontType=self.LeftInfoFont) self.LeftInfoTextCX, self.LeftInfoTextCY = self.width // 9, self.height // 4 self.RightInfoFont = DrawText.createFont("Alger", 25) self.RightInfoText = DrawText.createText(text="Use Arrow Keys", color=CollegiateCombat.white, fontType=self.RightInfoFont) self.RightInfoTextCX, self.RightInfoTextCY = ( 8 * self.width) // 9, self.height // 4 self.CharacterLeftFont = DrawText.createFont("Alger", 20) self.CharacterLeftText = DrawText.createText( text="%s" % self.currentLeftCharacter, color=CollegiateCombat.white, fontType=self.CharacterLeftFont) self.CharacterLeftTextCX, self.CharacterLeftTextCY = ( ((2 * self.iconImageLeftX) + self.iconImageWidth) // 2), (self.iconImageY + self.iconImageHeight + 25) self.CharacterRightFont = DrawText.createFont("Alger", 20) self.CharacterRightText = DrawText.createText( text="%s" % self.currentRightCharacter, color=CollegiateCombat.white, fontType=self.CharacterRightFont) self.CharacterRightTextCX, self.CharacterRightTextCY = ( ((2 * self.iconImageRightX) + self.iconImageWidth) // 2), (self.iconImageY + self.iconImageHeight + 25)
def init(self): CollegiateCombat.mode == "Menu" # Add a background self.background = pygame.image.load("images/backgrounds/menuBackground.png") wBackground, hBackground = self.width, self.height self.background = pygame.transform.scale( self.background, ( wBackground, hBackground) ) # Add credit Images self.creditX, self.creditY = 0, 0 self.creditImages = [] self.creditsIndex = 0 path = "images/credits" for imageName in os.listdir(path): image = pygame.image.load(path + os.sep + imageName) w, h = image.get_size() factor = self.width // w w = self.width h = 1580 image = pygame.transform.scale( image, ( w, h ) ) self.creditImages.append(image) self.creditWidth, self.creditHeight = self.creditImages[0].get_size() #print("credit height =", self.creditHeight) #print("screen height =", self.height) self.isOptions = False self.isCredits = False self.isMusicPlaying = True # Main menu title self.TitleFont = DrawText.createFont("Alger", 110) self.TitleText = DrawText.createText(text = "Collegiate Combat", color = CollegiateCombat.white, fontType = self.TitleFont) self.TitleCX, self.TitleCY = self.width // 2, 100 # Make main menu buttons self.mainRectOutline = 2 self.mainRectBoarder = 4 self.mainRectWidth = 150 self.mainRectHeight = 70 self.mainRectSpace = 20 + self.mainRectHeight self.mainRectX = (self.width // 2) - (self.mainRectWidth // 2) self.playRectY = (3 * self.height) // 7 self.optionsRectY = self.playRectY + self.mainRectSpace self.creditsRectY = self.optionsRectY + self.mainRectSpace # Render Text: self.PlayFont = DrawText.createFont("Alger", 50) self.PlayText = DrawText.createText(text = "Play", color = CollegiateCombat.black, fontType = self.PlayFont) self.PlayTextCX, self.PlayTextCY = ( (2 * self.mainRectX) + self.mainRectWidth) // 2, ( (2 * self.playRectY) + self.mainRectHeight) // 2 self.OptionsFont = DrawText.createFont("Alger", 35) self.OptionsText = DrawText.createText(text = "Options", color = CollegiateCombat.black, fontType = self.OptionsFont) self.OptionsTextCX, self.OptionsTextCY = ( (2 * self.mainRectX) + self.mainRectWidth) // 2, ( (2 * self.optionsRectY) + self.mainRectHeight) // 2 self.CreditsFont = DrawText.createFont("Alger", 35) self.CreditsText = DrawText.createText(text = "Credits", color = CollegiateCombat.black, fontType = self.CreditsFont) self.CreditsTextCX, self.CreditsTextCY = ( (2 * self.mainRectX) + self.mainRectWidth) // 2, ( (2 * self.creditsRectY) + self.mainRectHeight) // 2 # Draw options menu buttons and text self.marginOptionsMenu = 10 self.textSizeOptionsMenu = 50 # Options title self.OptionsFontOptionsMenu = DrawText.createFont("Alger", 70) self.OptionsTextOptionsMenu = DrawText.createText(text = "Options", color = CollegiateCombat.white, fontType = self.OptionsFontOptionsMenu) self.OptionsTextOptionsMenuCX, self.OptionsTextOptionsMenuCY = self.width // 2, 35 # Music text self.MusicFontOptionsMenu = DrawText.createFont("Alger", self.textSizeOptionsMenu) self.MusicTextOptionsMenu = DrawText.createText(text = "Music", color = CollegiateCombat.white, fontType = self.MusicFontOptionsMenu) self.MusicTextOptionsMenuCX, self.MusicTextOptionsMenuCY = self.marginOptionsMenu + (2 * self.textSizeOptionsMenu), self.OptionsTextOptionsMenuCY + (2 * self.textSizeOptionsMenu) # On/Off buttons and text self.onOffRectOutline = 2 self.onffRectBoarder = 4 self.onOffRectWidth = 150 self.onOffRectHeight = 70 self.onOffRectSpace = 20 + self.onOffRectWidth self.onOffRectY = self.MusicTextOptionsMenuCY - 35 self.onRectX = self.MusicTextOptionsMenuCX + (self.onOffRectSpace // 2) self.offRectX = self.onRectX + self.onOffRectSpace self.OnFontOptionsMenu = DrawText.createFont("Alger", self.textSizeOptionsMenu) self.OnTextOptionsMenu = DrawText.createText(text = "On", color = CollegiateCombat.white, fontType = self.OnFontOptionsMenu) self.OnTextOptionsMenuCX, self.OnTextOptionsMenuCY = ( (2 * self.onRectX) + self.onOffRectWidth) // 2, ( (2 * self.onOffRectY) + self.onOffRectHeight) // 2 self.OffFontOptionsMenu = DrawText.createFont("Alger", self.textSizeOptionsMenu) self.OffTextOptionsMenu = DrawText.createText(text = "Off", color = CollegiateCombat.white, fontType = self.OffFontOptionsMenu) self.OffTextOptionsMenuCX, self.OffTextOptionsMenuCY = ( (2 * self.offRectX) + self.onOffRectWidth) // 2, ( (2 * self.onOffRectY) + self.onOffRectHeight) // 2 # Back button self.backWidth = 50 self.backHeight = 25 self.backP1 = (self.marginOptionsMenu, self.OptionsTextOptionsMenuCY) self.backP2 = ( (self.backP1[0] + self.backWidth), ( self.backP1[1] - (self.backHeight // 2) ) ) self.backP3 = ( self.backP2[0], (self.backP2[1] + self.backHeight) ) self.backPoints = [self.backP1, self.backP2, self.backP3] # In game info # In-Game Text Title self.InGameFontOptionsMenu = DrawText.createFont("Alger", 50) self.InGameTextOptionsMenu = DrawText.createText(text = "In-Game Controls", color = CollegiateCombat.white, fontType = self.InGameFontOptionsMenu) self.InGameTextOptionsMenuCX, self.InGameTextOptionsMenuCY = self.OptionsTextOptionsMenuCX, self.MusicTextOptionsMenuCY + 100 # Move Labels self.moveTextSize = 40 self.moveFont = DrawText.createFont("Alger", self.moveTextSize) self.MoveText = DrawText.createText(text = "Move", color = CollegiateCombat.silver, fontType = self.moveFont) self.MotionText = DrawText.createText(text = "Motion", color = CollegiateCombat.white, fontType = self.moveFont) self.BlockText = DrawText.createText(text = "Block", color = CollegiateCombat.red, fontType = self.moveFont) self.PunchText = DrawText.createText(text = "Punch", color = CollegiateCombat.lightBlue, fontType = self.moveFont) self.KickText = DrawText.createText(text = "Kick", color = CollegiateCombat.green, fontType = self.moveFont) self.SpecialText = DrawText.createText(text = "Special", color = CollegiateCombat.gold, fontType = self.moveFont) self.moveText = [self.MoveText, self.MotionText, self.BlockText, self.PunchText, self.KickText, self.SpecialText] self.moveTextCX, self.moveTextCY = (self.width // 4), self.InGameTextOptionsMenuCY + 50 # Move Buttons self.buttonTextSize = 30 self.buttonFont = DrawText.createFont("Alger", self.buttonTextSize) self.Player1Text = DrawText.createText(text = "Player 1", color = CollegiateCombat.orange, fontType = self.buttonFont) self.Player2Text = DrawText.createText(text = "Player 2", color = CollegiateCombat.orange, fontType = self.buttonFont) self.Motion1Text = DrawText.createText(text = "W, A, D", color = CollegiateCombat.white, fontType = self.buttonFont) self.Motion2Text = DrawText.createText(text = "Up, Left, Right", color = CollegiateCombat.white, fontType = self.buttonFont) self.Block1Text = DrawText.createText(text = "S", color = CollegiateCombat.red, fontType = self.buttonFont) self.Block2Text = DrawText.createText(text = "Down", color = CollegiateCombat.red, fontType = self.buttonFont) self.Punch1Text = DrawText.createText(text = "V", color = CollegiateCombat.lightBlue, fontType = self.buttonFont) self.Punch2Text = DrawText.createText(text = "L", color = CollegiateCombat.lightBlue, fontType = self.buttonFont) self.Kick1Text = DrawText.createText(text = "C", color = CollegiateCombat.green, fontType = self.buttonFont) self.Kick2Text = DrawText.createText(text = "K", color = CollegiateCombat.green, fontType = self.buttonFont) self.Special1Text = DrawText.createText(text = "Space x 2", color = CollegiateCombat.gold, fontType = self.buttonFont) self.Special2Text = DrawText.createText(text = "J x 2", color = CollegiateCombat.gold, fontType = self.buttonFont) self.buttonText1 = [self.Player1Text, self.Motion1Text, self.Block1Text, self.Punch1Text, self.Kick1Text, self.Special1Text] self.buttonText2 = [self.Player2Text, self.Motion2Text, self.Block2Text, self.Punch2Text, self.Kick2Text, self.Special2Text] self.button1TextCX, self.button2TextCX = self.moveTextCX - 200, self.moveTextCX + 200 # Music In game controls self.MusicInGameFontOptionsMenu = DrawText.createFont("Alger", self.textSizeOptionsMenu) self.MusicInGameTextOptionsMenu = DrawText.createText(text = "Music", color = CollegiateCombat.white, fontType = self.MusicInGameFontOptionsMenu) self.MusicInGameTextOptionsMenuCX, self.MusicInGameTextOptionsMenuCY = ( (3 * self.width) // 4 ), self.InGameTextOptionsMenuCY + 100 # On and Off in game buttons self.OnOffInGameTextOptionsMenuCY = self.MusicInGameTextOptionsMenuCY + 50 self.OnOffInGameTextOptionsMenuSpace = 100 self.OnOffInGameFontOptionsMenu = DrawText.createFont("Alger", self.textSizeOptionsMenu) self.OnInGameTextOptionsMenu = DrawText.createText(text = "On: 'M'", color = CollegiateCombat.white, fontType = self.OnOffInGameFontOptionsMenu) self.OnInGameTextOptionsMenuCX = self.MusicInGameTextOptionsMenuCX - self.OnOffInGameTextOptionsMenuSpace self.OffInGameTextOptionsMenu = DrawText.createText(text = "Off: 'N'", color = CollegiateCombat.white, fontType = self.OnOffInGameFontOptionsMenu) self.OffInGameTextOptionsMenuCX = self.MusicInGameTextOptionsMenuCX + self.OnOffInGameTextOptionsMenuSpace # Pause In game controls self.PauseInGameFontOptionsMenu = DrawText.createFont("Alger", self.textSizeOptionsMenu) self.PauseInGameTextOptionsMenu = DrawText.createText(text = "Pause: 'P'", color = CollegiateCombat.white, fontType = self.PauseInGameFontOptionsMenu) self.PauseInGameTextOptionsMenuCX, self.PauseInGameTextOptionsMenuCY = ( (3 * self.width) // 4 ), self.OnOffInGameTextOptionsMenuCY + 65 self.RestartInGameFontOptionsMenu = DrawText.createFont("Alger", self.textSizeOptionsMenu) self.RestartInGameTextOptionsMenu = DrawText.createText(text = "Restart: 'R'", color = CollegiateCombat.white, fontType = self.RestartInGameFontOptionsMenu) self.RestartInGameTextOptionsMenuCX, self.RestartInGameTextOptionsMenuCY = self.PauseInGameTextOptionsMenuCX, self.PauseInGameTextOptionsMenuCY + 65
def init(self): CollegiateCombat.mode = "RunGame" CollegiateCombat.stopMusic() CollegiateCombat.playMusic() # Resize title image: self.titleImageDim = 125 self.titleImage = pygame.transform.scale( CollegiateCombat.titleImage, (self.titleImageDim, self.titleImageDim)) self.titleImageW, self.titleImageH = self.titleImage.get_size() # Set game over and pause booleans self.isGameOver = False self.isPaused = False # Set ending sound boolean self.isEnding = False # Obtain and resize background w, h = self.width, self.height if "spring" in CollegiateCombat.gameBackground: self.initialBackground = pygame.image.load( "images/backgrounds/game/13-pittsburgh spring.png") self.initialBackground = pygame.transform.scale( self.initialBackground, (w, h)) self.realBackground = pygame.image.load( "images/backgrounds/game/14-pittsburgh spring alt.png") w, h = self.width, self.height self.realBackground = pygame.transform.scale( self.realBackground, (w, h)) self.background = self.initialBackground elif "spring" not in CollegiateCombat.gameBackground: self.background = pygame.image.load( "images/backgrounds/game/%s.png" % CollegiateCombat.gameBackground) self.background = pygame.transform.scale(self.background, (w, h)) self.gameOverImage = pygame.image.load("images/gameover.png") # Resize game over image wGameOver, hGameOver = self.width, self.height self.gameOverImage = pygame.transform.scale(self.gameOverImage, (wGameOver, hGameOver)) character1 = super().character1 character2 = super().character2 Character.init(character1) Character.init(character2) self.characterGroup = pygame.sprite.Group() self.characterRight = Character(character1, self.width, self.height, True, 1) self.characterGroup = pygame.sprite.Group(self.characterRight) self.characterLeft = Character(character2, self.width, self.height, False, 2) self.characterGroup.add(self.characterLeft) # Get character icons and resize for health and energy bars charIconDim = 40 self.imageLeft = self.characterLeft.spriteDict["icon"] self.imageLeft = pygame.transform.scale(self.imageLeft, (charIconDim, charIconDim)) self.imageRight = self.characterRight.spriteDict["icon"] self.imageRight = pygame.transform.scale(self.imageRight, (charIconDim, charIconDim)) # Get character icons and resize for pause menu self.pauseCharIconDim = 100 self.pauseImageLeft = self.characterLeft.spriteDict["icon"] self.pauseImageLeft = pygame.transform.scale( self.pauseImageLeft, (self.pauseCharIconDim, self.pauseCharIconDim)) self.pauseImageRight = self.characterRight.spriteDict["icon"] self.pauseImageRight = pygame.transform.scale( self.pauseImageRight, (self.pauseCharIconDim, self.pauseCharIconDim)) self.characterRightProjectiles = pygame.sprite.Group() self.characterLeftProjectiles = pygame.sprite.Group() # Set the sounds dictionaries equal to their appropriate sounds self.characterLeft.sounds = CollegiateCombat.characterSounds[ self.characterLeft.character] self.characterRight.sounds = CollegiateCombat.characterSounds[ self.characterRight.character] # print(self.characterRight.sounds) self.damage = 0 self.timerFiredCounter = 0 self.timeCount = 0 self.characterLeft.isProbation = False self.characterRight.isProbation = False # Create a font: specify the font and size; None gives default font or specify a TTF font file from C:/Windows/Fonts # Render text self.fightFont = DrawText.createFont("Alger", 50) self.fightText = DrawText.createText(text="Fight!", color=CollegiateCombat.red, fontType=self.fightFont) self.QPAFont = DrawText.createFont("Alger", 25) self.QPAText = DrawText.createText(text="QPA", color=CollegiateCombat.red, fontType=self.QPAFont) self.QPATextLeftCX, self.QPATextLeftCY = 0, 0 self.QPATextRightCX, self.QPATextRightCY = 0, 0 self.SleepFont = DrawText.createFont("Alger", 25) self.SleepText = DrawText.createText(text="Sleep", color=CollegiateCombat.red, fontType=self.SleepFont) self.SleepTextLeftCX, self.SleepTextLeftCY = 0, 0 self.SleepTextRightCX, self.SleepTextRightCY = 0, 0 # Pause Screen text # Move Labels self.moveTextSize = 40 self.moveFont = DrawText.createFont("Alger", self.moveTextSize) self.MotionText = DrawText.createText(text="Motion", color=CollegiateCombat.white, fontType=self.moveFont) self.BlockText = DrawText.createText(text="Block", color=CollegiateCombat.red, fontType=self.moveFont) self.PunchText = DrawText.createText(text="Punch", color=CollegiateCombat.lightBlue, fontType=self.moveFont) self.KickText = DrawText.createText(text="Kick", color=CollegiateCombat.green, fontType=self.moveFont) self.SpecialText = DrawText.createText(text="Special", color=CollegiateCombat.gold, fontType=self.moveFont) self.moveText = [ self.MotionText, self.BlockText, self.PunchText, self.KickText, self.SpecialText ] self.moveTextCX, self.moveTextCY = 0, 0 # Move Buttons self.buttonTextSize = 25 self.buttonFont = DrawText.createFont("Alger", self.buttonTextSize) self.Motion1Text = DrawText.createText(text="W, A, D", color=CollegiateCombat.white, fontType=self.buttonFont) self.Motion2Text = DrawText.createText(text="Up, Left, Right", color=CollegiateCombat.white, fontType=self.buttonFont) self.Block1Text = DrawText.createText(text="S", color=CollegiateCombat.red, fontType=self.buttonFont) self.Block2Text = DrawText.createText(text="Down", color=CollegiateCombat.red, fontType=self.buttonFont) self.Punch1Text = DrawText.createText(text="V", color=CollegiateCombat.lightBlue, fontType=self.buttonFont) self.Punch2Text = DrawText.createText(text="L", color=CollegiateCombat.lightBlue, fontType=self.buttonFont) self.Kick1Text = DrawText.createText(text="C", color=CollegiateCombat.green, fontType=self.buttonFont) self.Kick2Text = DrawText.createText(text="K", color=CollegiateCombat.green, fontType=self.buttonFont) self.Special1Text = DrawText.createText( text="Space x 2: %s" % self.characterRight.specialName, color=CollegiateCombat.gold, fontType=self.buttonFont) self.Special2Text = DrawText.createText(text="J x 2: %s" % self.characterLeft.specialName, color=CollegiateCombat.gold, fontType=self.buttonFont) self.buttonText1 = [ self.Motion1Text, self.Block1Text, self.Punch1Text, self.Kick1Text, self.Special1Text ] self.buttonText2 = [ self.Motion2Text, self.Block2Text, self.Punch2Text, self.Kick2Text, self.Special2Text ] self.button1TextCX, self.button2TextCX, self.buttonTextCY = 0, 0, 0 # Select Character Text self.restartRectOutline = 2 self.restartRectBoarder = 4 self.restartRectWidth = 200 self.restartRectHeight = 70 self.restartRectSpace = 20 + self.restartRectWidth self.restartRectY = (self.height // 2) + 130 self.restartRectX = (self.width // 2) - (self.restartRectWidth // 2) self.RestartFont = DrawText.createFont("Alger", 35) self.RestartText = DrawText.createText(text="Restart", color=CollegiateCombat.white, fontType=self.RestartFont) self.RestartTextCX, self.RestartTextCY = ( (2 * self.restartRectX) + self.restartRectWidth) // 2, ( (2 * self.restartRectY) + self.restartRectHeight) // 2 # Create Winner Screen self.winner = "" self.WinnerFont = DrawText.createFont("Alger", 80) self.WinnerTextCX, self.WinnerTextCY = self.width // 2, ( 3 * self.height) // 4