-
Notifications
You must be signed in to change notification settings - Fork 92
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
Added Boat #592
base: main
Are you sure you want to change the base?
Added Boat #592
Conversation
Added benefit for boats to make them useful
Ah, CodeQL reminds you that the input system has been changed, do consider syncing your branch to solve this. |
Right, you'll also have to modify your code to use the new input system. |
What about following the rule of "everything costs stamina"? Using boat on water still costs stamina, but it consumes stamina per a certain distance travelled continuously. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My main impression from this is a feeling of confusion, but that is not your fault I suppose.
I don't know if I fully addressed your concerns, but the following is what I managed to find.
import minicraft.gfx.Screen; | ||
import minicraft.gfx.SpriteLinker; | ||
|
||
public class RideableEntity extends Entity { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this class exist? It does nothing different from Boat
.
return !stopped; | ||
} | ||
|
||
public boolean move2(double xa, double ya) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move
and move2
should probably use the corresponding methods in the Entity
class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ll try
public Boat clone() { | ||
return new Boat(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class must probably override the die()
method to make sure dying works as intentional.
|
||
private int tickTime = 0; | ||
|
||
private Direction pushDir = Direction.NONE; // the direction to push the furniture |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check if the fields above are already defined in the Entity
class.
For people interested, this is my version of implementation for boat: https://github.com/BenCheung0422/minicraft-plus-revived/tree/boat |
The ultimate and so useful feature has been added. Introducing the boat, the float on water that consumes no stamina!
All jokes aside:
Additions:
Notes: