Skip to content

Commit 4c35916

Browse files
GianlucaGianluca
Gianluca
authored and
Gianluca
committedAug 7, 2019
Minor modifications
1 parent dcf464c commit 4c35916

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ npm-debug.*
99
*.orig.*
1010
web-build/
1111
web-report/
12+
src/components/controls/index_panresponder.js

‎App.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ export default class App extends PureComponent {
3131

3232
// Un alieno in meno, aumentare la velocità
3333
// Non deve essere chiamato all'init (quando prima c'era un vincitore) o non resetta la velocità!
34-
if (!prevState.winner && !!prevState.aliens.length && prevState.aliens.length !== aliens.length) {
34+
if (!prevState.winner && prevState.aliens.length && prevState.aliens.length !== aliens.length) {
3535
this.increaseSpeed(prevState.speed)
3636
}
3737

38-
// C'è un vincitore
39-
if (winner && prevState.winner !== winner) {
38+
// C'è un vincitore (e solo se prima non ce n'erano altri)
39+
if (!prevState.winner && winner) {
4040
winner === 1 ? this.victory() : this.gameOver()
4141
}
4242

‎src/components/controls/index.js

-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ export default class Controls extends PureComponent {
7373
render() {
7474
const { width, height } = this.props
7575

76-
console.log('Controls rendered')
77-
7876
const animatedStyle = { transform: [{ translateY: this.translateY }] }
7977
const touchableArea = [styles.innerView, { width: width * 2 - options.cannonSize }]
8078

‎src/components/rocket/player-rocket.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { StyleSheet, Animated, Easing } from 'react-native'
33
import options from '../../config'
44

55
const offset = {
6-
bottom: options.alienSize - (options.alienSize * 0.9),
7-
top: options.alienSize * 0.9,
6+
bottom: options.alienSize - (options.alienSize * 0.8),
7+
top: options.alienSize * 0.8,
88
left: 0,
99
right: 0
1010
}

‎src/components/sky/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export default class Sky extends PureComponent {
1515
y: Math.random() * height
1616
}
1717

18-
// Genera un numero tra 0.3 e 1
19-
const luminosity = (Math.random() * 0.7 + 0.3).toFixed(2)
18+
// Genera un numero tra 0.4 e 1
19+
const luminosity = (Math.random() * 0.6 + 0.4).toFixed(2)
2020

2121
const isBig = Math.random() < 0.2
2222

0 commit comments

Comments
 (0)