parent
40ab139deb
commit
7c23267c98
17 changed files with 74 additions and 86 deletions
@ -0,0 +1,7 @@ |
||||
const SETTINGS = { |
||||
GRID_WIDTH: 6, |
||||
GRID_HEIGHT: 5, |
||||
LIVES: 3 |
||||
}; |
||||
|
||||
export default SETTINGS; |
@ -1,7 +1,8 @@ |
||||
export const GRID_ACTION = 'GRID_ACTION'; |
||||
export const UPDATE = 'GRID_UPDATE'; |
||||
|
||||
export const update = () => ({ |
||||
export const update = (values) => ({ |
||||
type: GRID_ACTION, |
||||
action: UPDATE |
||||
action: UPDATE, |
||||
values: values |
||||
}); |
||||
|
@ -1,7 +1,9 @@ |
||||
export const MUNCHER_ACTION = 'MUNCHER_ACTION'; |
||||
export const UPDATE = 'MUNCHER_UPDATE'; |
||||
|
||||
export const update = () => ({ |
||||
export const update = (x, y) => ({ |
||||
type: MUNCHER_ACTION, |
||||
action: UPDATE |
||||
action: UPDATE, |
||||
x: x, |
||||
y: y |
||||
}); |
||||
|
@ -1,7 +1,10 @@ |
||||
export const SCOREBAR_ACTION = 'SCOREBAR_ACTION'; |
||||
export const UPDATE = 'SCOREBAR_UPDATE'; |
||||
|
||||
export const update = () => ({ |
||||
export const update = (lives, currentScore, highScore) => ({ |
||||
type: SCOREBAR_ACTION, |
||||
action: UPDATE |
||||
action: UPDATE, |
||||
lives: lives, |
||||
currentScore: currentScore, |
||||
highScore: highScore |
||||
}); |
||||
|
@ -1,10 +1,21 @@ |
||||
.troggles { |
||||
height:500px; |
||||
left:50%; |
||||
margin-left:-300px; |
||||
overflow:hidden; |
||||
position:absolute; |
||||
top:110px; |
||||
width:600px; |
||||
z-index:0; |
||||
} |
||||
|
||||
.troggle { |
||||
$bg: crimson; |
||||
|
||||
background: $bg; |
||||
height:100px; |
||||
margin-top:110px; |
||||
opacity: 0.5; |
||||
position:absolute; |
||||
transition:left 0.3s, top 0.3s; |
||||
width:100px; |
||||
} |
||||
|
Loading…
Reference in new issue