Comments (7)
When you get back we can make a branch off of the development branch to solve this issue.
from fruitfever.
If this is an object in the game then use FruitFever's addToThings method. If this going to be part of the GUI or something then it will end up being done through ScreenHandler.
from fruitfever.
"And another thing, why do we need animate and draw? should they not be combined into a single method?"
Can you please be more specific, I'm not sure which 'draw' method you speak of. The Thing class only has an animate method.
from fruitfever.
Perhaps I am misunderstanding how drawing and animating work. But some methods are called draw, others are called animate.
If I am understanding correctly these are all different ways of placing something on the screen, no?
// FruitFever
Block.drawBlocks();
player.animate();
ScreenHandler.adjustHearts(player.getLives());
things.get(i).animate();
//ScreenHandler, other rendering methods
public void drawEndOfLevel()
public void shiftLevelLabels(int shift)
public void addBackground()
Do you agree there's work to be done renaming methods?
from fruitfever.
Currently drawing things is happening like this:
for (int i = 0; i < list.size(); i++) {
if (condition == true) {
removeItemFromList();
} else {
animateSomeThing();
}
}
if (something != null) {
drawSomeThingOnScreen();
}
player.animate();
In my idealized version of FF this is how it should happen.
// I named all of these draw but they could be called animate too.
// Arguments are cool, lets use them
screenHandler.drawEndOfLevel(levelComplete);
screenHandler.drawLevelSelection(levelComplete);
drawAllText(hintText, levelTexts);
drawAllThings();
player.draw();
// Even though they're being drawn in other classes
// it's fine since we know where they are.
Block.drawBlocks();
ScreenHandler.drawHearts();
from fruitfever.
@micahstairs About drawing different items to the screen would it be a good idea to have a Wiki page? Or is that overkill?
from fruitfever.
NOTE: I use the word 'draw' for when I'm drawing a new screen. Ex: drawMainMenu, drawPauseMenu, drawLevelSelection, drawEndOfLevel.
// FruitFever
Block.drawBlocks(); // No idea what this does, you made it
player.animate(); // This is Thing.animate()
ScreenHandler.adjustHearts(player.getLives()); // This just adjusts the visibility and the location of GImages already on the screen
things.get(i).animate(); // This is Thing.animate()
//ScreenHandler, other rendering methods
public void drawEndOfLevel()
public void shiftLevelLabels(int shift) // This just adjusts the visibility and location of GImages already on-screen
public void addBackground()
from fruitfever.
Related Issues (20)
- Implement Multiplayer feature HOT 4
- Falling Block Error
- Falling Block Speed difference HOT 1
- Trailing scenery HOT 4
- Undo Hotkey HOT 3
- Sticky Fruits HOT 3
- unchecked operation HOT 7
- Silent Crash
- Silent Crash HOT 2
- Teleporting Respawn bounds HOT 3
- Level Designer Null Pointer HOT 4
- Falling Blocks HOT 16
- Level folder access HOT 3
- Invisible Flags
- Background Music
- Hover Bug in end_screen branch HOT 2
- Sound Effects HOT 2
- Move critter bones to scenery file
- Swirl Crash
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.
from fruitfever.