Beispiel #1
0
    public void endSample()
    {
        FixVector3 curPosition = get3DPosition();

        if (this.owner == null &&
            (forceCheck || (curPosition - lastPosition).squareLength > (Fix64)0.0001f)
            )
        {
            if (positionSampleType == FBBall.SampleType.TimeSlerp)
            {
                world.fbGame.generateRenderAction <RAL.BallSlerpMoveAction>(curPosition.toVector3(), (float)slerpTotalTime);
            }
            else if (positionSampleType == FBBall.SampleType.IgnorePositionSampleSlerp)
            {
                world.fbGame.generateRenderAction <RAL.InstantBallMovingAction>(curPosition.toVector3());
            }
            else if (positionSampleType == FBBall.SampleType.NormalSample)
            {
                world.fbGame.generateRenderAction <RAL.BallMovingAction>(curPosition.toVector3());
            }
        }
        if (positionSampleType == SampleType.IgnorePositionSampleSlerp || positionSampleType == SampleType.TimeSlerp)
        {
            positionSampleType = SampleType.NormalSample;
        }
        if (forceCheck)
        {
            forceCheck = false;
        }
    }
Beispiel #2
0
 public void onBallCollidedNet(FixVector3 point, FixVector3 preVelocity, FixVector3 curVelocity, FiveElements kickerElement)
 {
     fbGame.generateRenderAction <RAL.BallCollidedNetAction>(point.toVector3(), preVelocity.toVector3(), curVelocity.toVector3(), kickerElement);
 }
Beispiel #3
0
 public void onBallLanded(FixVector2 point, bool pass, int times, FixVector3 velocity, Fix64 preHeightVelocity)
 {
     fbGame.generateRenderAction <RAL.BallLandedAction>(point.toVector2(), pass, times, velocity.toVector3(), (float)preHeightVelocity);
 }
Beispiel #4
0
 public void onBallCollidedWall(FixVector3 point, FixVector3 normal, FixVector3 velocity, FiveElements kickerElement)
 {
     fbGame.generateRenderAction <RAL.BallCollidedWallAction>(point.toVector3(), normal.toVector3(), velocity.toVector3(), kickerElement);
 }
Beispiel #5
0
    public void onShootBallOut(FBActor actor, FixVector3 velocity, Fix64 angle, FixVector3 target)
    {
        //jlx2017.05.26-log:因为行为树也要使用这个消息,所以使用fire,而不使用fire2Rendering
        LogicEvent.fire("onShootBallOut", actor.id);

        fbGame.generateRenderAction <RAL.BallShootAction>(actor.id, actor.shootingType, velocity.toVector3(), (float)angle, target.toVector3());
    }
Beispiel #6
0
 public void onPassBallOut(FBActor actor, FixVector3 velocity)
 {
     fbGame.generateRenderAction <RAL.BallPassAction>(actor.id, velocity.toVector3());
 }