generations-of-me's People
generations-of-me's Issues
Maak gebruik van constants
Je hebt feedback gekregen van BerendWeij
op:
inline
URL: https://github.com/NLferdiNL/Generations-Of-Me/blob/master/Assets/_Scripts/Audio/AudioController.cs
Feedback: Probeer niet 'inline' strings te gebruiken zoals inline. Je maakt snel typfouten. Voor andere developers is het ook moeilijk om de 'strings' te vinden in je code. Probeer daarom altijd met variabelen te werken waar de 'strings' in zijn opgeslagen en plaats deze variabelen bovenin je Class.
In het geval van de namen van je Scenes en tags is het erg handig om een 'constants' Class te maken met alleen maar constant variables. Hierin zet je alle namen. Vervolgens kun je verwijzen naar deze variabelen door bijvoorbeeld gebruik te maken van Application.LoadLevel(Scenes.GAME). Een voorbeeld van zo'n Class kun je hier vinden: http://unity3d.com/learn/tutorials/projects/stealth/tag-management .
SRP
Je hebt feedback gekregen van BerendWeij
op:
private int coinCount;
public GameObject coinCountText;
Text _coinCountTextField;
URL: https://github.com/NLferdiNL/Generations-Of-Me/blob/master/Assets/_Scripts/Player/Pickup.cs
Feedback: Let op de single responsibility principle.
Wat is de verantwoordelijkheid van deze Class?
Data bijhouden?
Data weergeven?
Collision checken?
enzovoorts...
Single responsibility betekent 1 verantwoordelijkheid uit het lijstje hierboven. Dus niet meerdere.
Dictionary
Je hebt feedback gekregen van BerendWeij
op:
dictionary
URL: https://github.com/NLferdiNL/Generations-Of-Me/blob/master/Assets/_Scripts/Data/KeyboardConfig.cs
Feedback: Probeer meer gebruik te maken van dictionary jongens. Dat maakt je code een stuk overzichtelijker.
Bijna altijd als je een switch case gebruikt, kun je ook een dictionary gebruiken.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.