Skip to content

Commit

Permalink
Change new ball creation conditions : A solution to the problem that …
Browse files Browse the repository at this point in the history
…no new ball is created when there is a vertical movement item.
  • Loading branch information
John Grib committed Jul 16, 2017
1 parent 9fb69a6 commit f239cfa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions autoload/VimGameCodeBreak/game.vim
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ function! s:userInputProc(input)
endfunction

function! s:createNewBall()
for l:item in s:item
if l:item.active
return
endif
endfor

if VimGameCodeBreak#game#getBallCount() > 0
return
endif

let l:y = line('$') - 1
let l:x = s:ship.getCenter()
let s:ball = VimGameCodeBreak#ball#new(s:screen, s:bounce, s:life, s:ship, s:config)
Expand Down
2 changes: 1 addition & 1 deletion autoload/VimGameCodeBreak/item_bomb.vim
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function! VimGameCodeBreak#item_bomb#new(screen, bounce, life, ship, config)
let l:obj = VimGameCodeBreak#abstractBall#new(a:screen, a:bounce, a:life, a:ship, a:config)
let l:obj = deepcopy(obj)

let l:obj.icon = 'O'
let l:obj.icon = 'I'
let l:obj.interval = 40
let l:obj.hitCount = 10
let l:obj.create = funcref('<SID>create')
Expand Down

0 comments on commit f239cfa

Please sign in to comment.