abstract class AbstractBorder extends AnyRef
Abstract class implementing the border collision strategy
- Alphabetic
- By Inheritance
- AbstractBorder
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
AbstractBorder(levelCenter: Point, collisionRule: mvc.controller.levels.structure.CollisionRules.Value)
- levelCenter
center of the level
- collisionRule
the collision rule
Abstract Value Members
-
abstract
def
computeNewPosition(): Point
Takes inside the playable field an entity that was outside
Takes inside the playable field an entity that was outside
- returns
the entity position after bounce
- Attributes
- protected
-
abstract
def
computeNewRadius(): Double
Returns the entity radius minus the radius portion outside the level borders
Returns the entity radius minus the radius portion outside the level borders
- returns
the entity radius after the operations
- Attributes
- protected
-
abstract
def
computeNewSpeed(newPosition: Point): Vector
Computes the new speed direction after colliding with the border
Computes the new speed direction after colliding with the border
- newPosition
the entity position computed at computeNewPosition()
- returns
the entity speed after bounce
- Attributes
- protected
-
abstract
def
hasCollidedWithBorder: Boolean
Returns true if collision with border has happened
Returns true if collision with border has happened
- returns
true if collision with border has happened
- Attributes
- protected
-
abstract
def
reposition(): Unit
Repositions an entity (outside the map) to a legal position as close as possible to the map's edge
Repositions an entity (outside the map) to a legal position as close as possible to the map's edge
- Attributes
- protected
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
checkAndSolveCollision(entity: CollidableProperty): Unit
Checks if an entity has collided with the border.
Checks if an entity has collided with the border. If so, computes it's new position and speed.
- entity
the entity to check
-
def
checkIfOutsideMap(entity: CollidableProperty): Unit
Checks if an entity is outside of the playable field.
Checks if an entity is outside of the playable field. If so, repositions it inside the playable field. Used after collision between entities check.
- entity
the entity to check
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
var
currentPosition: Point
- Attributes
- protected
-
var
dimensionComponent: DimensionComponent
- Attributes
- protected
-
var
entityRadius: Double
- Attributes
- protected
-
var
entitySpeed: Vector
- Attributes
- protected
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
initCollisionParameters(entity: CollidableProperty): Unit
Initializes the current entity's fundamental parameters to perform border collision operations
Initializes the current entity's fundamental parameters to perform border collision operations
- entity
the current entity
- Attributes
- protected
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
var
positionComponent: PositionComponent
- Attributes
- protected
-
val
restitution: Double
- Attributes
- protected
-
var
speedComponent: SpeedComponent
- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )