Ejemplo n.º 1
0
        protected override void OnDelayedAttachAsMain(Character target)
        {
            this.character          = target;
            targetMovementComponent = targetEntity.GetComponent <MovementComponent>();
            targetMovementComponent.WallCollisionHandler += OnWallCollision;
            Direction movementDirection = StaggerModifier.CalculateMovementDirection(
                casterMovementComponent, targetMovementComponent,
                collidedProjectilePosition, knockdownInfo.MovementBehavior
                );
            Direction facingDirection = StaggerModifier.CalculateFacingDirection(
                casterMovementComponent, targetMovementComponent,
                collidedProjectilePosition, knockdownInfo.FacingBehavior, movementDirection
                );

            targetMovementComponent.MovingDirection = movementDirection.ToNormalizedVector2();
            targetMovementComponent.FacingDirection = facingDirection;

            target.InterruptChannelingSkill();
            target.PlayAnimation(AnimName().Upper, GetSpeedOfUpperAnimation(), true);
            //DLog.LogError("Jump on knockdown");
            jumpRequest = target.JumpOverDistance(
                knockdownInfo.Height, knockdownInfo.TimeToPeak, knockdownInfo.Distance,
                knockdownInfo.TimeToGround, false, knockdownInfo.FloatingDur,
                knockdownInfo.StopHorizontalMovementWhenMeet, false, false,
                knockdownInfo.MoveHorizontallyWhenFloat
                );
            PlayVfx();
            state = State.Peaking;
        }
Ejemplo n.º 2
0
        protected override void OnDelayedAttachAsMain(Character target)
        {
            this.character = target;
            Character casterCharacter       = caster.GetComponent <SkillComponent>().Character;
            Direction casterFacingDirection = casterCharacter.FacingDirection();

            targetMovementComponent = targetEntity.GetComponent <MovementComponent>();
            targetMovementComponent.WallCollisionHandler += OnWallCollision;
            Direction movementDirection = StaggerModifier.CalculateMovementDirection(
                casterMovementComponent, targetMovementComponent,
                collidedProjectilePosition, info.MovementBehavior
                );
            Direction facingDirection = StaggerModifier.CalculateFacingDirection(
                casterMovementComponent, targetMovementComponent,
                collidedProjectilePosition, info.FacingBehavior, movementDirection
                );

            targetMovementComponent.MovingDirection = movementDirection.ToNormalizedVector2();
            targetMovementComponent.FacingDirection = facingDirection;


            target.InterruptChannelingSkill();
            target.PlayAnimation(animProfile.Upper());
            target.JumpToFrame(4);
            //DLog.LogError("Jump on knockdown");
            blastRequest           = (BlastRequest)DoBlast(target);
            stageFromPreviousCheck = blastRequest.ShowStage();
            state = State.Peaking;
        }