diff --git a/assets/Data/creatures/human.json b/assets/Data/creatures/human.json index 44787af9..1e4c8622 100644 --- a/assets/Data/creatures/human.json +++ b/assets/Data/creatures/human.json @@ -133,26 +133,14 @@ "nameThirdPerson" : "Jog", "priorityCategory" : "CORE_MOVEMENT" }, - "animationFirstPersonStartup" : { - "nameFirstPerson" : "Jog", - "priorityCategory" : "CORE_MOVEMENT" - }, "animationLoop" : { "nameThirdPerson" : "Jog", "priorityCategory" : "CORE_MOVEMENT" }, - "animationFirstPersonLoop" : { - "nameFirstPerson" : "Jog", - "priorityCategory" : "CORE_MOVEMENT" - }, "animationWindDown" : { "nameThirdPerson" : "Jog", "priorityCategory" : "CORE_MOVEMENT" }, - "animationFirstPersonWindDown" : { - "nameFirstPerson" : "Jog", - "priorityCategory" : "CORE_MOVEMENT" - }, "sprintSystem" : { "maxVelocity" : 0.058, "staminaMax" : 500, @@ -172,9 +160,6 @@ "jumpForce" : 500, "animationJump" : { "nameThirdPerson" : "Jump", - "priorityCategory" : "MOVEMENT_MODIFIER" - }, - "animationFirstPersonJump" : { "nameFirstPerson" : "Jump", "priorityCategory" : "MOVEMENT_MODIFIER" } @@ -331,7 +316,6 @@ { "attackMoveId" : "Sword1HSlash1", "type" : "MELEE_WEAPON_SWING_ONE_HAND", - "attackAnimationName" : "Sword1HSlash1", "windupFrames" : 5, "attackFrames" : 5, "cooldownFrames" : 25, @@ -345,23 +329,25 @@ "driftFrameStart" : 7, "driftFrameEnd" : 15, "initialMove" : true, - "animationFirstPersonWindup" : { - "nameFirstPerson" : "Jump", - "priorityCategory" : "MOVEMENT_MODIFIER" - }, - "animationFirstPersonHold" : { - "nameFirstPerson" : "Jump", - "priorityCategory" : "MOVEMENT_MODIFIER" - }, - "animationFirstPersonAttack" : { + "animationWindup" : { "nameFirstPerson" : "Sword1HSlash1", + "nameThirdPerson" : "Sword1HSlash1", + "priorityCategory" : "MOVEMENT_MODIFIER" + }, + "animationHold" : { + "nameFirstPerson" : "Sword1HSlash1", + "nameThirdPerson" : "Sword1HSlash1", + "priorityCategory" : "MOVEMENT_MODIFIER" + }, + "animationAttack" : { + "nameFirstPerson" : "Sword1HSlash1", + "nameThirdPerson" : "Sword1HSlash1", "priorityCategory" : "MOVEMENT_MODIFIER" } }, { "attackMoveId" : "Sword1HSlash2", "type" : "MELEE_WEAPON_SWING_ONE_HAND", - "attackAnimationName" : "Sword1HSlash2", "windupFrames" : 2, "attackFrames" : 5, "cooldownFrames" : 28, @@ -373,23 +359,25 @@ "driftFrameStart" : 1, "driftFrameEnd" : 10, "initialMove" : false, - "animationFirstPersonWindup" : { + "animationWindup" : { "nameFirstPerson" : "Jump", + "nameThirdPerson" : "Jump", "priorityCategory" : "MOVEMENT_MODIFIER" }, - "animationFirstPersonHold" : { + "animationHold" : { "nameFirstPerson" : "Jump", + "nameThirdPerson" : "Jump", "priorityCategory" : "MOVEMENT_MODIFIER" }, - "animationFirstPersonAttack" : { + "animationAttack" : { "nameFirstPerson" : "Sword1HSlash2", + "nameThirdPerson" : "Sword1HSlash2", "priorityCategory" : "MOVEMENT_MODIFIER" } }, { "attackMoveId" : "Sword2HSlash1", "type" : "MELEE_WEAPON_SWING_TWO_HAND", - "attackAnimationName" : "SwordR2HSlash", "windupFrames" : 2, "attackFrames" : 5, "cooldownFrames" : 28, @@ -400,25 +388,15 @@ "driftFrameStart" : 1, "driftFrameEnd" : 10, "initialMove" : true, - "animationFirstPersonWindup" : { - "nameFirstPerson" : "HoldItemR2H", - "priorityCategory" : "MOVEMENT_MODIFIER" - }, - "animationFirstPersonHold" : { - "nameFirstPerson" : "HoldItemR2H", - "priorityCategory" : "MOVEMENT_MODIFIER" - }, - "animationFirstPersonAttack" : { + "animationAttack" : { "nameFirstPerson" : "SwordR2HSlash", + "nameThirdPerson" : "SwordR2HSlash", "priorityCategory" : "MOVEMENT_MODIFIER" } }, { "attackMoveId" : "Bow2HFire", "type" : "RANGED_WEAPON_BOW_TWO_HAND", - "windupAnimationName" : "HoldBowString", - "holdAnimationName" : "HoldBow", - "attackAnimationName" : "HoldBowString", "damageStartFrame" : 30, "damageEndFrame" : 60, "firesProjectile" : true, @@ -429,16 +407,19 @@ "movementEnd" : 0, "movementGoal" : 0, "initialMove" : true, - "animationFirstPersonWindup" : { + "animationWindup" : { "nameFirstPerson" : "Jump", + "nameThirdPerson" : "HoldBowString", "priorityCategory" : "MOVEMENT_MODIFIER" }, - "animationFirstPersonHold" : { + "animationHold" : { "nameFirstPerson" : "Jump", + "nameThirdPerson" : "HoldBow", "priorityCategory" : "MOVEMENT_MODIFIER" }, - "animationFirstPersonAttack" : { + "animationAttack" : { "nameFirstPerson" : "Jump", + "nameThirdPerson" : "HoldBowString", "priorityCategory" : "MOVEMENT_MODIFIER" } } diff --git a/docs/src/progress/renderertodo.md b/docs/src/progress/renderertodo.md index 2b814af7..597375bc 100644 --- a/docs/src/progress/renderertodo.md +++ b/docs/src/progress/renderertodo.md @@ -472,6 +472,7 @@ Tear out first person rendering pipeline Partially fix first person attachment to viewmodel Creature data validation Unify animation format data on disk +Leverage animation masks to block while moving # TODO diff --git a/src/main/java/electrosphere/entity/state/attack/ClientAttackTree.java b/src/main/java/electrosphere/entity/state/attack/ClientAttackTree.java index 1b16f956..40f8af54 100644 --- a/src/main/java/electrosphere/entity/state/attack/ClientAttackTree.java +++ b/src/main/java/electrosphere/entity/state/attack/ClientAttackTree.java @@ -8,7 +8,6 @@ import electrosphere.entity.Entity; import electrosphere.entity.EntityDataStrings; import electrosphere.entity.EntityUtils; import electrosphere.entity.btree.BehaviorTree; -import electrosphere.entity.state.AnimationPriorities; import electrosphere.entity.state.client.firstPerson.FirstPersonTree; import electrosphere.entity.state.collidable.Impulse; import electrosphere.entity.state.equip.ClientEquipState; @@ -238,52 +237,47 @@ public class ClientAttackTree implements BehaviorTree { if(parent.containsKey(EntityDataStrings.CLIENT_ROTATOR_TREE)){ RotatorTree.getClientRotatorTree(parent).setActive(true); } - if(currentMove != null){ - if(entityActor != null){ - if(!entityActor.isPlayingAnimation() || !entityActor.isPlayingAnimation(currentMove.getWindupAnimationName())){ - entityActor.playAnimation( - currentMove.getWindupAnimationName(), - AnimationPriorities.getValue(AnimationPriorities.MOVEMENT_MODIFIER) - ); - entityActor.incrementAnimationTime(0.0001); - } - FirstPersonTree.conditionallyPlayAnimation( - Globals.firstPersonEntity, - currentMove.getAnimationFirstPersonWindup().getNameFirstPerson(), - AnimationPriorities.getValue(AnimationPriorities.MOVEMENT_MODIFIER) - ); - } - } - } break; - case HOLD: { - if(entityActor != null){ - if(!entityActor.isPlayingAnimation() || !entityActor.isPlayingAnimation(currentMove.getHoldAnimationName())){ + if(currentMove != null && entityActor != null && currentMove.getAnimationWindup() != null){ + if(!entityActor.isPlayingAnimation() || !entityActor.isPlayingAnimation(currentMove.getAnimationWindup())){ entityActor.playAnimation( - currentMove.getHoldAnimationName(), - AnimationPriorities.getValue(AnimationPriorities.MOVEMENT_MODIFIER) + currentMove.getAnimationWindup(), + true ); entityActor.incrementAnimationTime(0.0001); } FirstPersonTree.conditionallyPlayAnimation( Globals.firstPersonEntity, - currentMove.getAnimationFirstPersonHold().getNameFirstPerson(), - AnimationPriorities.getValue(AnimationPriorities.MOVEMENT_MODIFIER) + currentMove.getAnimationWindup() + ); + } + } break; + case HOLD: { + if(entityActor != null && currentMove.getAnimationHold() != null){ + if(!entityActor.isPlayingAnimation() || !entityActor.isPlayingAnimation(currentMove.getAnimationHold())){ + entityActor.playAnimation( + currentMove.getAnimationHold(), + true + ); + entityActor.incrementAnimationTime(0.0001); + } + FirstPersonTree.conditionallyPlayAnimation( + Globals.firstPersonEntity, + currentMove.getAnimationHold() ); } } break; case ATTACK: { if(entityActor != null && currentMove != null){ - if(!entityActor.isPlayingAnimation() || !entityActor.isPlayingAnimation(currentMove.getAttackAnimationName())){ + if(!entityActor.isPlayingAnimation() || !entityActor.isPlayingAnimation(currentMove.getAnimationAttack())){ entityActor.playAnimation( - currentMove.getAttackAnimationName(), - AnimationPriorities.getValue(AnimationPriorities.MOVEMENT_MODIFIER) + currentMove.getAnimationAttack(), + true ); entityActor.incrementAnimationTime(0.0001); } FirstPersonTree.conditionallyPlayAnimation( Globals.firstPersonEntity, - currentMove.getAnimationFirstPersonAttack().getNameFirstPerson(), - AnimationPriorities.getValue(AnimationPriorities.MOVEMENT_MODIFIER) + currentMove.getAnimationAttack() ); } //activate hitboxes diff --git a/src/main/java/electrosphere/entity/state/attack/ServerAttackTree.java b/src/main/java/electrosphere/entity/state/attack/ServerAttackTree.java index d32f4509..eea42176 100644 --- a/src/main/java/electrosphere/entity/state/attack/ServerAttackTree.java +++ b/src/main/java/electrosphere/entity/state/attack/ServerAttackTree.java @@ -125,14 +125,14 @@ public class ServerAttackTree implements BehaviorTree { projectileToFire = ItemUtils.getWeaponDataRaw(currentWeapon).getProjectileModel(); } - animationName = currentMove.getAttackAnimationName(); + animationName = currentMove.getAnimationAttack().getNameThirdPerson(); //intuit windup from presence of windup anim - currentMoveHasWindup = currentMove.getWindupAnimationName() != null; + currentMoveHasWindup = currentMove.getAnimationWindup() != null; if(currentMoveHasWindup){ - animationName = currentMove.getWindupAnimationName(); + animationName = currentMove.getAnimationWindup().getNameThirdPerson(); } //intuit can hold from presence of windup anim - currentMoveCanHold = currentMove.getHoldAnimationName() != null; + currentMoveCanHold = currentMove.getAnimationHold() != null; //stop movement tree if(parent.containsKey(EntityDataStrings.SERVER_MOVEMENT_BT)){ BehaviorTree movementTree = CreatureUtils.serverGetEntityMovementTree(parent); @@ -266,8 +266,8 @@ public class ServerAttackTree implements BehaviorTree { } break; case ATTACK: { if(entityPoseActor != null && currentMove != null){ - if(!entityPoseActor.isPlayingAnimation() || !entityPoseActor.isPlayingAnimation(currentMove.getAttackAnimationName())){ - entityPoseActor.playAnimation(currentMove.getAttackAnimationName(),1); + if(!entityPoseActor.isPlayingAnimation() || !entityPoseActor.isPlayingAnimation(currentMove.getAnimationAttack())){ + entityPoseActor.playAnimation(currentMove.getAnimationAttack(),true); entityPoseActor.incrementAnimationTime(0.0001); } } diff --git a/src/main/java/electrosphere/entity/state/movement/FallTree.java b/src/main/java/electrosphere/entity/state/movement/FallTree.java index 1ae3d688..8a8bbc2f 100644 --- a/src/main/java/electrosphere/entity/state/movement/FallTree.java +++ b/src/main/java/electrosphere/entity/state/movement/FallTree.java @@ -96,7 +96,7 @@ public class FallTree implements BehaviorTree { entityActor.playAnimation(fallMovementSystem.getLandState().getAnimation().getNameThirdPerson(),AnimationPriorities.getValue(AnimationPriorities.MOVEMENT_MODIFIER)); entityActor.incrementAnimationTime(0.0001); } - FirstPersonTree.conditionallyPlayAnimation(Globals.firstPersonEntity, fallMovementSystem.getLandState().getAnimation().getNameFirstPerson(), AnimationPriorities.getValue(AnimationPriorities.MOVEMENT_MODIFIER)); + FirstPersonTree.conditionallyPlayAnimation(Globals.firstPersonEntity, fallMovementSystem.getLandState().getAnimation()); } } } diff --git a/src/main/java/electrosphere/entity/state/movement/JumpTree.java b/src/main/java/electrosphere/entity/state/movement/JumpTree.java index 203e48fb..f01dc659 100644 --- a/src/main/java/electrosphere/entity/state/movement/JumpTree.java +++ b/src/main/java/electrosphere/entity/state/movement/JumpTree.java @@ -64,7 +64,7 @@ public class JumpTree implements BehaviorTree { entityActor.playAnimation(jumpData.getAnimationJump().getNameThirdPerson(),AnimationPriorities.getValue(AnimationPriorities.MOVEMENT_MODIFIER)); entityActor.incrementAnimationTime(0.0001); } - FirstPersonTree.conditionallyPlayAnimation(Globals.firstPersonEntity, jumpData.getAnimationFirstPersonJump().getNameFirstPerson(), AnimationPriorities.getValue(AnimationPriorities.MOVEMENT_MODIFIER)); + FirstPersonTree.conditionallyPlayAnimation(Globals.firstPersonEntity, jumpData.getAnimationJump()); } currentFrame++; currentJumpForce = currentJumpForce * jumpFalloff; diff --git a/src/main/java/electrosphere/entity/state/movement/groundmove/ClientGroundMovementTree.java b/src/main/java/electrosphere/entity/state/movement/groundmove/ClientGroundMovementTree.java index e89594ed..8abd2068 100644 --- a/src/main/java/electrosphere/entity/state/movement/groundmove/ClientGroundMovementTree.java +++ b/src/main/java/electrosphere/entity/state/movement/groundmove/ClientGroundMovementTree.java @@ -294,7 +294,7 @@ public class ClientGroundMovementTree implements BehaviorTree { entityActor.playAnimation(animationToPlay,AnimationPriorities.getValue(AnimationPriorities.CORE_MOVEMENT)); entityActor.incrementAnimationTime(0.0001); } - FirstPersonTree.conditionallyPlayAnimation(Globals.firstPersonEntity, groundMovementData.getAnimationFirstPersonStartup().getNameThirdPerson(), AnimationPriorities.getValue(AnimationPriorities.CORE_MOVEMENT)); + FirstPersonTree.conditionallyPlayAnimation(Globals.firstPersonEntity, groundMovementData.getAnimationStartup().getNameFirstPerson(), AnimationPriorities.getValue(AnimationPriorities.CORE_MOVEMENT)); } //run startup code velocity = velocity + acceleration * (float)Globals.timekeeper.getSimFrameTime(); @@ -328,7 +328,7 @@ public class ClientGroundMovementTree implements BehaviorTree { entityActor.playAnimation(animationToPlay,AnimationPriorities.getValue(AnimationPriorities.CORE_MOVEMENT)); entityActor.incrementAnimationTime(0.0001); } - FirstPersonTree.conditionallyPlayAnimation(Globals.firstPersonEntity, groundMovementData.getAnimationFirstPersonLoop().getNameThirdPerson(), AnimationPriorities.getValue(AnimationPriorities.CORE_MOVEMENT)); + FirstPersonTree.conditionallyPlayAnimation(Globals.firstPersonEntity, groundMovementData.getAnimationLoop().getNameFirstPerson(), AnimationPriorities.getValue(AnimationPriorities.CORE_MOVEMENT)); } if(velocity != maxNaturalVelocity){ velocity = maxNaturalVelocity; @@ -356,7 +356,7 @@ public class ClientGroundMovementTree implements BehaviorTree { entityActor.playAnimation(animationToPlay,AnimationPriorities.getValue(AnimationPriorities.CORE_MOVEMENT)); entityActor.incrementAnimationTime(0.0001); } - FirstPersonTree.conditionallyPlayAnimation(Globals.firstPersonEntity, groundMovementData.getAnimationFirstPersonWindDown().getNameThirdPerson(), AnimationPriorities.getValue(AnimationPriorities.CORE_MOVEMENT)); + FirstPersonTree.conditionallyPlayAnimation(Globals.firstPersonEntity, groundMovementData.getAnimationWindDown().getNameFirstPerson(), AnimationPriorities.getValue(AnimationPriorities.CORE_MOVEMENT)); } //velocity stuff velocity = velocity - acceleration * (float)Globals.timekeeper.getSimFrameTime(); diff --git a/src/main/java/electrosphere/game/data/creature/type/CreatureDataValidator.java b/src/main/java/electrosphere/game/data/creature/type/CreatureDataValidator.java index a735ea55..9b4c5ffe 100644 --- a/src/main/java/electrosphere/game/data/creature/type/CreatureDataValidator.java +++ b/src/main/java/electrosphere/game/data/creature/type/CreatureDataValidator.java @@ -84,9 +84,9 @@ public class CreatureDataValidator { List animations = new LinkedList(); if(data.getAttackMoves() != null){ for(AttackMove move : data.getAttackMoves()){ - animations.add(move.getAnimationFirstPersonAttack()); - animations.add(move.getAnimationFirstPersonHold()); - animations.add(move.getAnimationFirstPersonWindup()); + animations.add(move.getAnimationAttack()); + animations.add(move.getAnimationHold()); + animations.add(move.getAnimationWindup()); } } if(data.getEquipPoints() != null){ @@ -100,16 +100,12 @@ public class CreatureDataValidator { for(MovementSystem system : data.getMovementSystems()){ if(system instanceof GroundMovementSystem){ GroundMovementSystem groundMovementSystem = (GroundMovementSystem)system; - animations.add(groundMovementSystem.getAnimationFirstPersonLoop()); - animations.add(groundMovementSystem.getAnimationFirstPersonStartup()); - animations.add(groundMovementSystem.getAnimationFirstPersonWindDown()); animations.add(groundMovementSystem.getAnimationLoop()); animations.add(groundMovementSystem.getAnimationStartup()); animations.add(groundMovementSystem.getAnimationWindDown()); } if(system instanceof JumpMovementSystem){ JumpMovementSystem jumpMovementSystem = (JumpMovementSystem)system; - animations.add(jumpMovementSystem.getAnimationFirstPersonJump()); animations.add(jumpMovementSystem.getAnimationJump()); } if(system instanceof FallMovementSystem){ diff --git a/src/main/java/electrosphere/game/data/creature/type/attack/AttackMove.java b/src/main/java/electrosphere/game/data/creature/type/attack/AttackMove.java index 2e911035..1c461bd8 100644 --- a/src/main/java/electrosphere/game/data/creature/type/attack/AttackMove.java +++ b/src/main/java/electrosphere/game/data/creature/type/attack/AttackMove.java @@ -16,13 +16,9 @@ public class AttackMove { /* Animation stuff */ - String windupAnimationName; - String holdAnimationName; - String attackAnimationName; - - TreeDataAnimation animationFirstPersonWindup; - TreeDataAnimation animationFirstPersonHold; - TreeDataAnimation animationFirstPersonAttack; + TreeDataAnimation animationWindup; + TreeDataAnimation animationHold; + TreeDataAnimation animationAttack; /* Damage stuff @@ -65,51 +61,27 @@ public class AttackMove { } /** - * Gets the name of the animation to play in 3rd person for the windup - * @return the animation name + * Gets the animation to play for the windup + * @return the animation */ - public String getWindupAnimationName() { - return windupAnimationName; + public TreeDataAnimation getAnimationWindup() { + return animationWindup; } /** - * Gets the name of the animation to play in 3rd person for the hold - * @return the animation name + * Gets the name of the animation to play for the hold + * @return the animation */ - public String getHoldAnimationName() { - return holdAnimationName; + public TreeDataAnimation getAnimationHold() { + return animationHold; } /** - * Gets the name of the animation to play in 3rd person for the attack - * @return the animation name + * Gets the animation to play for the attack + * @return the animation */ - public String getAttackAnimationName() { - return attackAnimationName; - } - - /** - * Gets the animation data for the 1st person windup - * @return the animation data - */ - public TreeDataAnimation getAnimationFirstPersonWindup(){ - return animationFirstPersonWindup; - } - - /** - * Gets the animation data for the 1st person hold - * @return the animation data - */ - public TreeDataAnimation getAnimationFirstPersonHold(){ - return animationFirstPersonHold; - } - - /** - * Gets the animation data for the 1st person attack - * @return the animation data - */ - public TreeDataAnimation getAnimationFirstPersonAttack(){ - return animationFirstPersonAttack; + public TreeDataAnimation getAnimationAttack() { + return animationAttack; } /** diff --git a/src/main/java/electrosphere/game/data/creature/type/movement/GroundMovementSystem.java b/src/main/java/electrosphere/game/data/creature/type/movement/GroundMovementSystem.java index d7390b1f..c788cf7f 100644 --- a/src/main/java/electrosphere/game/data/creature/type/movement/GroundMovementSystem.java +++ b/src/main/java/electrosphere/game/data/creature/type/movement/GroundMovementSystem.java @@ -20,15 +20,12 @@ public class GroundMovementSystem implements MovementSystem { //startup data TreeDataAnimation animationStartup; - TreeDataAnimation animationFirstPersonStartup; //loop data TreeDataAnimation animationLoop; - TreeDataAnimation animationFirstPersonLoop; //wind down data TreeDataAnimation animationWindDown; - TreeDataAnimation animationFirstPersonWindDown; //sprint data SprintSystem sprintSystem; @@ -51,7 +48,7 @@ public class GroundMovementSystem implements MovementSystem { } /** - * Gets the animation to play in 3rd person for startup + * Gets the animation to play for startup * @return The animation data */ public TreeDataAnimation getAnimationStartup() { @@ -59,15 +56,7 @@ public class GroundMovementSystem implements MovementSystem { } /** - * Gets the animation to play in 1st person for startup - * @return The animation data - */ - public TreeDataAnimation getAnimationFirstPersonStartup(){ - return animationFirstPersonStartup; - } - - /** - * Gets the animation to loop in 3rd person + * Gets the animation to loop * @return The animation data */ public TreeDataAnimation getAnimationLoop() { @@ -75,29 +64,13 @@ public class GroundMovementSystem implements MovementSystem { } /** - * Gets the animation to loop in 1st person - * @return The animation data - */ - public TreeDataAnimation getAnimationFirstPersonLoop(){ - return animationFirstPersonLoop; - } - - /** - * Gets the animation to play in 3rd person to wind down + * Gets the animation to play to wind down * @return The animation data */ public TreeDataAnimation getAnimationWindDown() { return animationWindDown; } - /** - * Gets the animation to play in 1st person to wind down - * @return The animation data - */ - public TreeDataAnimation getAnimationFirstPersonWindDown(){ - return animationFirstPersonWindDown; - } - /** * Gets the sprint system data * @return The sprint system data diff --git a/src/main/java/electrosphere/game/data/creature/type/movement/JumpMovementSystem.java b/src/main/java/electrosphere/game/data/creature/type/movement/JumpMovementSystem.java index d5d0cf28..cdc50e12 100644 --- a/src/main/java/electrosphere/game/data/creature/type/movement/JumpMovementSystem.java +++ b/src/main/java/electrosphere/game/data/creature/type/movement/JumpMovementSystem.java @@ -2,34 +2,58 @@ package electrosphere.game.data.creature.type.movement; import electrosphere.game.data.common.TreeDataAnimation; +/** + * A jump tree's data + */ public class JumpMovementSystem implements MovementSystem { + /** + * The name for this movement tree system + */ public static final String JUMP_MOVEMENT_SYSTEM = "JUMP"; + //The type of tree String type; + /** + * The animation to play when jumping + */ TreeDataAnimation animationJump; - TreeDataAnimation animationFirstPersonJump; + /** + * The number of frames to apply the jump force + */ int jumpFrames; + + /** + * The force to apply while jump state + */ float jumpForce; + /** + * Gets the number of frames to apply jump force for + * @return The number of frames + */ public int getJumpFrames(){ return jumpFrames; } + /** + * Gets the force to jump with + * @return The force + */ public float getJumpForce(){ return jumpForce; } + /** + * Gets the animation to play while jumping + * @return The animation + */ public TreeDataAnimation getAnimationJump(){ return animationJump; } - public TreeDataAnimation getAnimationFirstPersonJump(){ - return animationFirstPersonJump; - } - @Override public String getType() { return type;