-
Notifications
You must be signed in to change notification settings - Fork 3
WeaponHitboxComponent
jac0be edited this page Aug 31, 2021
·
5 revisions
WeaponHitboxComponents are the same as normal hit-boxes with a few key differences:
- Weapon hit-boxes can be resized at run-time. This is done by destroying & resetting the fixture.
- They are positioned relative to the entity, using constants defined in
MeleeWeapon.java
- They aren't set by default, i.e. the create() function doesn't set the fixture.
Weapon hit-boxes can be set using the set() method. This method takes two parameters:
-
size
- A vector that represents the attack width & range of the weapon, as x & y components. The size is relative to the entity. -
direction
- The direction of the hit-box, relative to the entity. Must be one of the five constants defined in MeleeWeapon.java
Using the above example, this gives:
-
Attack width
= 1 (1 * entity's width) -
Attack range
= 0.5 (0.5 * entity's height) -
Direction
= MeleeWeapon.RIGHT
Weapon hit-boxes can be destroyed simply using
- Although every melee weapon requires a weaponHitboxComponent on its owner entity, that relationship is not bi-directional.
- i.e. you can have an entity that has a weaponHitboxComponent, but not a meleeWeapon. This becomes useful for things such as AOE attacks, abilities, time-activated traps/explosions, and more.
This class was written by Jacob Edwards @jac0be
Design Document
- Story
- Music
-
Characters
- Main Character
- Bosses
-
Enemies
- Sprint 1: Final Design
-
Sprint 2: Elvish Boss
- Decision to make our boss a mage
- Design Inspiration: Staff Weapon
- Design decisions for boss
- Archery attack animation for minions
- Different types of minion elves and designs
- Melee attack animation
- Boss attack animation using sceptre
- Design Inspiration: Shooting fireballs
- Mage Boss attack method: fireball
- Sprint 3: Walk Animations and Design Amendments
- Sprint 4: Refining animations
- Map Design
- User + Play Testing
- Gameplay
- Art Style Design Guidelines
- Emotional Goals