Skip to content
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

feature(ecs-gestalt): Migrate Components to gestalt's Components #82

Merged
merged 7 commits into from
Aug 25, 2021

Conversation

skaldarnar
Copy link
Contributor

@Replicate
public FactionList faction = PlanetFactionList.EARTH;

@Override
public void copy(FactionComponent other) {
this.faction = other.faction;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FactionList is just an interface 🤔 not sure how to do a deep copy of instances of that in the end ... not even sure what the design decision here was...

Comment on lines 10 to 12
public RandomDamageComponent() {

}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add the default constructor here if there are no other constructors.

Suggested change
public RandomDamageComponent() {
}

Comment on lines 8 to 13
public class ActivateOnPlaceComponent implements Component<ActivateOnPlaceComponent> {

@Override
public void copy(ActivateOnPlaceComponent other) {

}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should just extend EmptyComponent.


public class PrimaryAttackComponent implements Component<PrimaryAttackComponent> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should extend EmptyComponent


public class SecondaryAttackComponent implements Component{
public class SecondaryAttackComponent implements Component<SecondaryAttackComponent> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should extend EmptyComponent.


@Override
public void copy(AddSwitchDoorsComponent other) {
this.doorsToSpawn = Lists.newArrayList(other.doorsToSpawn);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a deep copy we should create copies of DoorsToSpawn (or investigate whether we can make it immutable instead).

@jdrueckert jdrueckert merged commit dfb4934 into develop Aug 25, 2021
@jdrueckert jdrueckert deleted the feature/migrate-ecs-to-gestalt branch August 25, 2021 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants