-
Notifications
You must be signed in to change notification settings - Fork 0
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 invisible period after spawn #32
base: main
Are you sure you want to change the base?
Added invisible period after spawn #32
Conversation
Maybe if object is invisible return his bounding box as null/empty point ? |
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.
Very strange idea with invisibility, that is ignored half of the time.
core/src/com/po/fuck/model/collections/CollidableCollection.java
Outdated
Show resolved
Hide resolved
@@ -11,6 +11,8 @@ public interface Collidable { | |||
|
|||
Polygon getCollision(); | |||
|
|||
boolean isInvisible(); |
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.
What does it mean ? Very strange logic, it does not even affect collide
.
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.
It affects it. return objects.stream().filter(x -> !x.isInvisible() && x.collide(other)).collect(Collectors.toList());
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.
But what does invisible
state mean ? If it still collides, and it only affects physics.
// TODO: this is a temporary solution, we need to add a way to check if the enemies are dead | ||
// without relying on collidable collection. |
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 don't think that enemies should leave the room.
Move `getZ` into drawers
…nstead-of-some-constants' into 15-use-properties-instead-of-some-constants
…ation-when-spawning-gameobject-intersecting-entity' into 23-avoid-stuck-situation-when-spawning-gameobject-intersecting-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.
I still don't like the idea with invisibility that can be tested, why are we getting "internal" object state ?
core/src/com/po/fuck/model/collections/CollidableCollection.java
Outdated
Show resolved
Hide resolved
We are not getting an internal state. We are checking whether it is invisible. I consider it normal. |
Then what does invisible mean ? |
…veral fields private
…ome-constants Added .properties files
It means that object currently cannot collide with anyone. |
…ation-when-spawning-gameobject-intersecting-entity' into 23-avoid-stuck-situation-when-spawning-gameobject-intersecting-entity
So why is there a method |
No description provided.