-
Notifications
You must be signed in to change notification settings - Fork 4
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
Team 4 general mobs #136
Conversation
… the second xeno melee.
…am-4---General-Mobs---Animations
# 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
…rs to MobAttackTask and MobDeathTask
…obs will now die when shot & drop currency.
…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
…r used or maintained.
…-4---General-Mobs
…udio-3 into Team-4---General-Mobs
There was a problem hiding this 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); | ||
// |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the mention 😄
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
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.