Skip to content

Commit

Permalink
sync with main upstream (#14)
Browse files Browse the repository at this point in the history
* inureyes#406 (inureyes#422)

* Issues inureyes#269 세팅메뉴에 intercept 버튼추가, 플레이중 esc 누를시 게임종료할건지 한번 더 물어봄 (inureyes#421)

* 세팅메뉴에 intercept 버튼추가, 플레이중 esc 누를 시 게임종료 할껀지 한번 더 물어봄
* charge, ultimate, life 글씨 추가

* refs inureyes#444 : modify - wrong README.md

* Resolved inureyes#430 (inureyes#431)

* license for sounds added
* some mistakes
* - Added new bullets. COOOOOL!
Thanks to Bonsaiheldin. See this : https://opengameart.org/content/sci-fi-space-simple-bullets
- Moved unnecessary gfx files to another folder 'old_gfx' (But not all)

* refs inureyes#430 : bugfix - typo

* speedTime 아이템의 매커니즘 변경 (inureyes#437)

* 일부 들여쓰기 일관성 문제 수정 (inureyes#439)

* Rebase

* Fix incorrect indentation

* issue#385 아이템의 위력 세분화 해결 (inureyes#438)

* speedTime 아이템의 매커니즘 변경

* 크기에 따라 위력이 달라지도록 아이템 작동 방식 변경. 그에 따른 아이템의 위력 조정.

* inureyes#432 Bug is fixed (inureyes#436)

* inureyes#432 bug is fixed

* refs inureyes#436 : bugfix - missing variable

* Fix README.md: inureyes#444 (inureyes#445)

* charge, ultimate, life 글씨 추가

* README.md fix

마크다운 문법에 알맞게 수정하였습니다.

* resolved inureyes#387(no conflict) (inureyes#427)

* resolved inureyes#387

*  * modify - naming scheme to know the difference between invincibility
 and shield

* resolve inureyes#393, inureyes#398 issue (inureyes#411)

* remodify code for issue inureyes#393, inureyes#398

* refs inureyes#411, inureyes#398 : bugfix - revert some of eafb56e which disables speed
setting on menu.
 * When you delete others' code, review and understand first.

* refs inureyes#411  : bugfix - wrong rollback / reference

*  * Modify indentations

* refs inureyes#411  : bugfix - when self.Limit = 0, alien / fleetDrop stops.
  • Loading branch information
jaeheeLee17 authored Apr 18, 2018
1 parent c682e59 commit 3cf0768
Show file tree
Hide file tree
Showing 73 changed files with 364 additions and 200 deletions.
Empty file modified Fonts/Square.ttf
100755 → 100644
Empty file.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@


| Participant | Role | ETC |
|===============|============|=====|
| Jeongkyu Shin | Instructor | |
|---------------|------------|-----|
| Jeongkyu Shin | Instructor | |
| Lee jaehee | student | |
| Minseok Kang | Student | |
Expand All @@ -13,7 +12,7 @@
| Jaewoo Yang | Student | |
| Cho young il | Student | |
| Jinsung An | Student | |
| Minwoo Son | Student | |
| Minwoo Son | Student | |
| Kim Dain | Student | |
| Jeongin Lee | Student | |
| Minwoo Son | Student | |
Expand All @@ -39,10 +38,10 @@
| Hoesung Jung | Student^^7 | Nerd|
| Hyunjun Lee | Student | |
| Minseok Kang | Student | |
| Jaehun Kim. | student. | |
| Jaehun Kim | student | |
| Hansae Ju | Student | |
| ChaeHyun Baek | Student | |
| Kim Tae Yoon | Student | |
| Kim Tae Yoon | Student | |
| KeonWoong Noh | Student | |
| Onyu Park | Student | |
| TaeWoong Kong | Student | |
Expand All @@ -63,15 +62,15 @@
| Yejun Kim | Student | |
| Yunjea Nam | Student | |
| Cho young il | Student | |
| Yerim Hwang | Student | |
| Yerim Hwang | Student | |
| Kim yong jun | Student   | |
| Yerim Hwang | Student | |
| Yerim Hwang | Student | |
| Minjun Kim | Student | |
| JaeHun Lee | Student | |
| Taewan Park | Student | |
| HoJin Seo | Student | |
| Sungho Yun | Student | |
| Keunmo Koo. | Genius | |
| Keunmo Koo | Genius | |



Expand Down
11 changes: 4 additions & 7 deletions alien.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import pygame as pg
from pygame.sprite import Sprite
from animations import AnimatedSprite

import sounds
from animations import AnimatedSprite
from eBullet import EBullet


class Alien(Sprite):
"""A class to represent a single alien in the fleet"""

def __init__(self, setting, screen, hitPoint=3, isboss = False):
def __init__(self, setting, screen, hitPoint=3, isboss=False):
"""Initialize the alien and set its starting point"""
super(Alien, self).__init__()
self.screen = screen
Expand All @@ -23,7 +23,7 @@ def __init__(self, setting, screen, hitPoint=3, isboss = False):
self.image = self.sprite.getFrame(0)
self.image = pg.transform.rotate(self.image, 180)
if self.isboss == True:
self.image = pg.transform.scale(self.image,(setting.screenWidth // 8, setting.screenWidth // 8))
self.image = pg.transform.scale(self.image, (setting.screenWidth // 8, setting.screenWidth // 8))
self.rect = self.image.get_rect()

# start each new alien near the top left of the screen
Expand Down Expand Up @@ -60,7 +60,6 @@ def checkBottom(self):

def update(self, setting, screen, ship, aliens, eBullets):
"""Move the alien right or left"""
import random
self.ship = ship
self.aliens = aliens
self.eBullets = eBullets
Expand All @@ -77,7 +76,7 @@ def update(self, setting, screen, ship, aliens, eBullets):

def shoot(self, setting, screen, ship, aliens, eBullets):
if setting.gameLevel == 'hard':
setting.shootTimer = 10 # default = 50
setting.shootTimer = 10 # default = 50

if self.isboss == False:
setting.shootTimer = 50
Expand Down Expand Up @@ -112,5 +111,3 @@ def shoot(self, setting, screen, ship, aliens, eBullets):
def blitme(self):
"""draw hte alien"""
self.screen.blit(self.image, self.rect)


2 changes: 1 addition & 1 deletion background.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ def draw(self):
while (drawY < self.screenRect.height):
self.screen.blit(self.image, (drawX, drawY))
drawY += self.imageRect.height
drawX += self.imageRect.width
drawX += self.imageRect.width
10 changes: 6 additions & 4 deletions bullet.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ def __init__(self, setting, screen, ship, traj, damage, charge=0):
self.isUltimate = False

# load the bullet image and set its rect attribute
self.image = pg.image.load('gfx/bullet2.png')
self.image = pg.transform.rotate(self.image, 180)
self.image = pg.image.load('gfx/pBullet.png')
if (self.traj == 1):
self.image = pg.transform.rotate(self.image, 315)
elif (self.traj == 2):
self.image = pg.transform.rotate(self.image, 45)
self.rect = self.image.get_rect()
if (charge != 0):
bulletSize = (self.rect.width * (charge + 1), self.rect.height * (charge + 1))
Expand All @@ -34,7 +37,6 @@ def __init__(self, setting, screen, ship, traj, damage, charge=0):
# store the bullets position as a decimal value
self.x = float(self.rect.centerx)
self.y = float(self.rect.y)
self.color = setting.bulletColor
self.setting = setting

# damage of basic bullet (default : 1)
Expand Down Expand Up @@ -78,7 +80,7 @@ def __init__(self, setting, screen, pos, damage):
self.isUltimate = True

# load the bullet image and set its rect attribute
self.image = pg.image.load('gfx/bullet.png')
self.image = pg.image.load('gfx/sBullet.png')
self.rect = self.image.get_rect()

# Create a bullet rect at (0,0)
Expand Down
11 changes: 5 additions & 6 deletions buttonMenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def __init__(self, screen):
def addButton(self, name, msg):
self.buttons[name] = Button(self.screen, msg, self.btnWidth, self.btnHeight)


def removeButton(self, name):
if name in self.buttons:
del self.buttons[name]
Expand Down Expand Up @@ -121,11 +120,11 @@ def updateButtonsPos(self):
for name in self.menuButtons:
self.setButtonPos(name, self.x, btnY)
btnY += offsetY

def drawButton(self, name):
if name in self.buttons:
self.buttons[name].drawBtn()

def drawMenuButtons(self):
for name in self.menuButtons:
self.drawButton(name)
Expand Down Expand Up @@ -205,13 +204,13 @@ def setPosByButton(self, btn):
def draw(self):
self.screen.blit(self.image, self.rect)


class CurrentState():
def __init__(self,screen,current):
def __init__(self, screen, current):
self.screen = screen
self.image = pg.image.load('gfx/ebullet.bmp')
self.image = pg.transform.scale(self.image,(10,10))
self.image = pg.transform.scale(self.image, (10, 10))
self.current = current

def draw(self):
self.screen.blit(self.image, self.current)

1 change: 0 additions & 1 deletion data-files/highscore.json

This file was deleted.

5 changes: 2 additions & 3 deletions eBullet.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
class EBullet(Sprite):
"""A class to manage bullets fired from the alien"""

def __init__(self, setting, screen, alien, boss_bullet = 0):
def __init__(self, setting, screen, alien, boss_bullet=0):
"""Create a bullet object at the ships current position"""
super(EBullet, self).__init__()
self.screen = screen

# load the bullet image and set its rect attribute
self.image = pg.image.load('gfx/ebullet.bmp')
self.image = pg.image.load('gfx/eBullet.png')
self.rect = self.image.get_rect()
self.boss_bullet = boss_bullet
# Create a collision mask
Expand All @@ -37,7 +37,6 @@ def __init__(self, setting, screen, alien, boss_bullet = 0):
# store the bullets position as a decimal value
self.y = float(self.rect.y)
self.x = float(self.rect.x)
self.color = setting.bulletColor
self.setting = setting

def update(self, alien):
Expand Down
Loading

0 comments on commit 3cf0768

Please sign in to comment.