-
Notifications
You must be signed in to change notification settings - Fork 9
FollowEntity
A component to make one entity follow another.
CompanionActions companionActions = new CompanionActions();
void FollowComponent: Set up the following speed and the entity that this entity is following
void setFollowSpeed: Given a speed, adjust the following speed of the entity
void update: Checks if companion is being moved. If it isn't, call MoveEntityTowardFollowingEntity
void moveEntityTowardFollowingEntity: Move the entity towards the following entity
PhysicsComponent: Manages the physics simulation of the companion entity.
Entity: Represents the companion entity and facilitates interactions.
CompanionActions.isCompanionBeingMoved: Represents a bool which reveals if the entity is being moved or not
FollowEntity Making sure that there actually is an entity to follow
ServiceLocator: Manages game resources and services.
The follow component is currently configured for companion. It listens to the movement variable of the companion (seeing if it is being controlled). If the companion is not moving on its own, it is drawn towards the player. This helps keep the companion close to the player, and not fall outside of the screen.
None
Escape Earth Game
Interaction Controller and Interactable Components
Game and Entity Configuration Files
Loading Game Configuration Files