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

Team 4 general mobs #136

Merged
merged 52 commits into from
Sep 11, 2023
Merged

Team 4 general mobs #136

merged 52 commits into from
Sep 11, 2023

Conversation

BlairCannon97
Copy link
Contributor

Added basic functionality and animations to the Xeno Grunt, including death and shooting. Hitboxes have been modified to improve collisions. Waves of Xenos will spawn xenos in increasing numbers.

BlairCannon97 and others added 30 commits September 4, 2023 15:16
# Conflicts:
#	source/core/assets/images/mobs/xenoGruntDeath.atlas
#	source/core/assets/images/mobs/xenoGruntMeleeAttack.atlas
#	source/core/assets/images/mobs/xenoGruntRangedAttack.atlas
#	source/core/assets/images/mobs/xenoGruntRunning.atlas
#	source/core/assets/images/mobs/xenoGruntRunningDamaged.atlas
#	source/core/src/main/com/csse3200/game/areas/ForestGameArea.java
#	source/core/src/main/com/csse3200/game/entities/factories/NPCFactory.java
…obs will now die when shot & drop currency.
samsully and others added 21 commits September 10, 2023 13:28
…mies & change mob target to HUMANS

# Conflicts:
#	source/core/src/main/com/csse3200/game/areas/ForestGameArea.java
#	source/core/src/main/com/csse3200/game/components/TouchAttackComponent.java
#	source/core/src/main/com/csse3200/game/components/tasks/MobAttackTask.java
Copy link
Contributor

@The-AhmadAA The-AhmadAA left a comment

Choose a reason for hiding this comment

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

Great work on enhancing the mobs feature, just added some comments and questions regarding changes, specifically about physics modification and the new PhysicsLayer

// GridPoint2 minPos = new GridPoint2(0, 0);
// GridPoint2 maxPos = new GridPoint2(5, terrain.getMapBounds(0).sub(2, 2).y);
// GridPoint2 randomPos = RandomUtils.random(minPos, maxPos);
//
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this commented out code added here?

mobPosition = owner.getEntity().getPosition();

// If the mob is at zero health, kill the mob,
// play the death animation and stop the task
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the mention 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably call this a 'MobWanderTask' to make it clear it belongs to mobs, just in case someone else is tempted to modify it.

Entity npc =
new Entity()
.addComponent(new PhysicsComponent())
.addComponent(new PhysicsMovementComponent())
.addComponent(new ColliderComponent())
.addComponent(new HitboxComponent().setLayer(PhysicsLayer.NPC))
.addComponent(new TouchAttackComponent(PhysicsLayer.HUMANS, 1.5f))
.addComponent(new HitboxComponent().setLayer(PhysicsLayer.XENO))
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably should announce the existence of a new physical layer so that everyone is aware of it and can modify their code if necessary

Copy link
Contributor

Choose a reason for hiding this comment

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

What was the rationale for modifying physics?

@meganroxburgh meganroxburgh merged commit 65faa31 into main Sep 11, 2023
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.

5 participants