mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-18 22:44:04 +09:00
actors are now active/dormant depending on the distance to the player, only the active actors are to be updated. Actors outside of the camera (actually a distance to the player) are not rendered
Former-commit-id: 5f80c2ef3592aab5567723087c264e05458e98b3 Former-commit-id: 7714c6f5a6d7a48d4f5adfe8f6990b249bdb80b0
This commit is contained in:
@@ -19,6 +19,6 @@ abstract class Actor : Comparable<Actor> {
|
||||
|
||||
override fun equals(other: Any?) = referenceID == (other as Actor).referenceID
|
||||
override fun hashCode() = referenceID
|
||||
override fun toString() = "ActorID: ${hashCode()}"
|
||||
override fun toString() = "ID: ${hashCode()}"
|
||||
override fun compareTo(other: Actor): Int = this.referenceID - other.referenceID
|
||||
}
|
||||
@@ -35,7 +35,7 @@ object CollisionSolver {
|
||||
}
|
||||
}
|
||||
|
||||
// sort list x (will use Timsort with Java SE >= 8, Mergesort otherwise)
|
||||
// sort list x
|
||||
collListX.sortBy { it.pos }
|
||||
|
||||
// set candidateX
|
||||
|
||||
Reference in New Issue
Block a user