Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lj litter #39

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
14b682a
Merge pull request #1 from AdaGold/scaffolding
kariabancroft May 29, 2018
9bd0742
Update README.md
kariabancroft May 29, 2018
21c7cf5
Upgrade to create-react-app 2.1.1
Hamled Nov 21, 2018
c422b77
Merge pull request #3 from AdaGold/C10/updates/cra
Hamled Nov 21, 2018
1e5b664
Update package-lock.json
Hamled Nov 21, 2018
82966ff
Merge pull request #4 from AdaGold/package-lock
Hamled Nov 21, 2018
2aaf247
Remove bins and game logic
Hamled Nov 26, 2018
ab28abe
Rename page styles
Hamled Nov 26, 2018
38549ac
Randomly spawn and move objects
Hamled Nov 26, 2018
7678907
Parallax level background
Hamled Nov 26, 2018
43be772
Improve tick performance
Hamled Nov 26, 2018
3823ee0
Litter Patrol logo
Hamled Nov 26, 2018
1f331eb
Remove unused SVG files
Hamled Nov 26, 2018
33f06e5
Rename Trash component to GameItem
Hamled Nov 26, 2018
b8de0b8
README updates for new project structure
Hamled Nov 27, 2018
1e5f510
Improve visuals for spotted items
Hamled Nov 27, 2018
7fd611c
Basic styles cleanup
Hamled Nov 27, 2018
949fa74
Reorganize requirements
Hamled Nov 27, 2018
519baa3
Comprehension questions
Hamled Nov 27, 2018
7f34498
CS Fundamentals questions
Hamled Nov 27, 2018
019f5ff
README links to deployed completed version
Hamled Nov 27, 2018
4d9eebf
README: Debugging tips
Hamled Nov 27, 2018
eb96294
Use PropTypes
Hamled Nov 28, 2018
00bb1d6
Merge pull request #5 from AdaGold/C10/updates/gameplay
Hamled Nov 28, 2018
bb7bf35
Due date for C10 project
Hamled Nov 28, 2018
b953ac6
Merge pull request #6 from Ada-C10/C10/due-date
Hamled Nov 28, 2018
7320b4c
Revert "Due date for C10 project"
Hamled Nov 28, 2018
5332949
Merge pull request #7 from AdaGold/revert-6-C10/due-date
Hamled Nov 28, 2018
b34919f
Due date for C10 project
Hamled Nov 28, 2018
53ad99c
Merge pull request #1 from Ada-C10/C10/due-date
Hamled Nov 28, 2018
0d7ef74
only some click events working
elle-johnnie Nov 30, 2018
b7501ee
only some click events working
elle-johnnie Nov 30, 2018
5b6e51a
removed .idea
elle-johnnie Nov 30, 2018
27a07d5
removed .idea
elle-johnnie Nov 30, 2018
ad5cd88
Merge branch 'master' of https://github.com/elle-johnnie/litter-patrol
elle-johnnie Nov 30, 2018
510c5c0
git weirdness
elle-johnnie Nov 30, 2018
ea49845
fixed clicked icons and points
elle-johnnie Dec 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.idea
4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/litter-patrol.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

221 changes: 221 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ body {
margin: 5px;
cursor: pointer;

animation-duration: 4s;
animation-duration: 9s;
animation-name: item-move;
animation-timing-function: linear;

Expand Down
25 changes: 17 additions & 8 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,21 @@ class App extends Component {
};

// Uncomment this to spawn a single test item
//const testItem = this.spawnItem(Date.now());
//this.state.items.push(testItem);
// const testItem = this.spawnItem(Date.now());
// this.state.items.push(testItem);

// Uncomment this to automatically spawn new items
// // Uncomment this to automatically spawn new items
this.enableSpawner();

console.log(this.state);
}

onItemClicked = () => {
// Fill this in!
}
onItemClicked = () => {
// Fill this in!
console.log(this);
this.setState({
points: this.state.points + 1
});
};

render() {
const items = this.state.items.map((item, i) => {
Expand All @@ -50,7 +53,13 @@ class App extends Component {
layer={100 + i} // Layer - used for a CSS style to show items on-top of bg
key={item.id} // Key - to help React with performance

// Additional props (event callbacks, etc.) can be passed here
// Additional props (event c
// \allbacks, etc.) can be passed here
type={item.type}
index={i}
clicked={item.clicked}
onClickedCallback={this.onItemClicked}

/>;
});

Expand Down
Loading