public void Lunge(Vector3 lungeVector, float speed) { if (!movementActuator.GetIsHuggingWall()) { movementActuator.LungeCommand(lungeVector, speed); } }
void PositionHand() { // if (aimingController.GetIsAiming ()) { float shoulderOffset = idleX * aimingController.GetFacingDirection(); if (movementActuator.GetIsHuggingWall()) { shoulderOffset = shoulderAttachmentXWallGrab * aimingController.GetFacingDirection(); } this.transform.localPosition = aimingController.GetAimingVector() * aimingDisplacement + new Vector3(shoulderOffset, idleY, 0f); //} }
void SetAnimatorState() { previousAnimationState = currentAnimationState; //States //0 ground/steep - Idle or moving animation then depends on horizontal speed. //1 airborn //2 wall grab //3 dead if (characterContacts.GetContactState() == ContactState.FLATGROUND) { currentAnimationState = 0; } if (characterContacts.GetContactState() == ContactState.STEEPSLOPE) { currentAnimationState = 0; } if (characterContacts.GetContactState() == ContactState.AIRBORNE) { currentAnimationState = 1; } if (characterMovement.GetIsHuggingWall()) { currentAnimationState = 2; } if (isSwinging) { currentAnimationState = 5; } if (corpus.GetIsReeling()) { currentAnimationState = 4; } if (!corpus.GetIsAlive()) { currentAnimationState = 3; } //Use this if rigging so all transitions come from any state //to prevent repeated triggering. if (previousAnimationState != currentAnimationState) { animator.SetInteger("State", currentAnimationState); hasAnimationStateChanged = true; } else { hasAnimationStateChanged = false; } }
void CheckCharacterWallAdjacent() { if (characterContact != null) { if (movementActuator.GetIsHuggingWall()) { isWallAdjacent = true; } else { isWallAdjacent = false; } } if (isWallAdjacent) { wallSide = characterContact.GetSideAdjacent(); } else { wallSide = MovementDirection.NEUTRAL; } }