-
Notifications
You must be signed in to change notification settings - Fork 9
Basic Player Tracking Feature
The Basic Player Tracking feature enables the companion entity to perform basic movement on the map while maintaining a certain distance from the player entity. This movement is achieved through the implementation of the CompanionActions component, which governs the companion's behavior. The main goal is to create a dynamic movement pattern that keeps the companion entity close to the player while preventing it from crossing over a designated point on the map.
CompanionActions companionActions = new CompanionActions();
void walk(Vector2 direction): Moves the companion in a given direction.
void stopWalking(): Stops the companion from walking.
void setPlayerEntity(Entity playerEntity): Sets the player entity reference for the companion.
void update(): Updates the companion's movement and speed based on user input.
boolean isMovementKeyPressed(): Checks if any movement keys are pressed.
void updateFollowPlayer(): Updates the companion's position to follow the player.
void updateSpeed(): Updates the companion's movement speed.
void create(): Initializes the companion's behavior and event listeners.
PhysicsComponent: Manages the physics simulation of the companion entity.
Entity: Represents the companion entity and facilitates interactions.
Vector2: Provides vector operations for position calculations.
ServiceLocator: Manages game resources and services.
The Individual Movement with Rotational Component feature introduces a more advanced movement system for the companion entity. The walk() method allows the companion to move in a given direction, providing a greater degree of control over its movement. The stopWalking() method halts the companion's movement, ensuring smooth and controlled navigation.
Escape Earth Game
Interaction Controller and Interactable Components
Game and Entity Configuration Files
Loading Game Configuration Files