public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (team0ScoreInterpolation.Enabled && !team0ScoreInterpolation.current.UnityNear(team0ScoreInterpolation.target, 0.0015f))
            {
                _team0Score = (int)team0ScoreInterpolation.Interpolate();
                //RunChange_team0Score(team0ScoreInterpolation.Timestep);
            }
            if (team1ScoreInterpolation.Enabled && !team1ScoreInterpolation.current.UnityNear(team1ScoreInterpolation.target, 0.0015f))
            {
                _team1Score = (int)team1ScoreInterpolation.Interpolate();
                //RunChange_team1Score(team1ScoreInterpolation.Timestep);
            }
            if (timerInterpolation.Enabled && !timerInterpolation.current.UnityNear(timerInterpolation.target, 0.0015f))
            {
                _timer = (float)timerInterpolation.Interpolate();
                //RunChange_timer(timerInterpolation.Timestep);
            }
            if (originalTimerInterpolation.Enabled && !originalTimerInterpolation.current.UnityNear(originalTimerInterpolation.target, 0.0015f))
            {
                _originalTimer = (float)originalTimerInterpolation.Interpolate();
                //RunChange_originalTimer(originalTimerInterpolation.Timestep);
            }
        }
Exemplo n.º 2
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (isDeadInterpolation.Enabled && !isDeadInterpolation.current.UnityNear(isDeadInterpolation.target, 0.0015f))
            {
                _isDead = (bool)isDeadInterpolation.Interpolate();
                //RunChange_isDead(isDeadInterpolation.Timestep);
            }
            if (positionInterpolation.Enabled && !positionInterpolation.current.UnityNear(positionInterpolation.target, 0.0015f))
            {
                _position = (Vector3)positionInterpolation.Interpolate();
                //RunChange_position(positionInterpolation.Timestep);
            }
            if (rotationInterpolation.Enabled && !rotationInterpolation.current.UnityNear(rotationInterpolation.target, 0.0015f))
            {
                _rotation = (Quaternion)rotationInterpolation.Interpolate();
                //RunChange_rotation(rotationInterpolation.Timestep);
            }
            if (healthInterpolation.Enabled && !healthInterpolation.current.UnityNear(healthInterpolation.target, 0.0015f))
            {
                _health = (float)healthInterpolation.Interpolate();
                //RunChange_health(healthInterpolation.Timestep);
            }
        }
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (destNetwIdInterpolation.Enabled && !destNetwIdInterpolation.current.UnityNear(destNetwIdInterpolation.target, 0.0015f))
            {
                _destNetwId = (uint)destNetwIdInterpolation.Interpolate();
                //RunChange_destNetwId(destNetwIdInterpolation.Timestep);
            }
            if (avatorNetDimsInterpolation.Enabled && !avatorNetDimsInterpolation.current.UnityNear(avatorNetDimsInterpolation.target, 0.0015f))
            {
                _avatorNetDims = (Vector3)avatorNetDimsInterpolation.Interpolate();
                //RunChange_avatorNetDims(avatorNetDimsInterpolation.Timestep);
            }
            if (avatorNetSpeedInterpolation.Enabled && !avatorNetSpeedInterpolation.current.UnityNear(avatorNetSpeedInterpolation.target, 0.0015f))
            {
                _avatorNetSpeed = (float)avatorNetSpeedInterpolation.Interpolate();
                //RunChange_avatorNetSpeed(avatorNetSpeedInterpolation.Timestep);
            }
            if (avatorNetDestDistanceInterpolation.Enabled && !avatorNetDestDistanceInterpolation.current.UnityNear(avatorNetDestDistanceInterpolation.target, 0.0015f))
            {
                _avatorNetDestDistance = (float)avatorNetDestDistanceInterpolation.Interpolate();
                //RunChange_avatorNetDestDistance(avatorNetDestDistanceInterpolation.Timestep);
            }
        }
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (positionInterpolation.Enabled && !positionInterpolation.current.UnityNear(positionInterpolation.target, 0.0015f))
            {
                _position = (Vector2)positionInterpolation.Interpolate();
                //RunChange_position(positionInterpolation.Timestep);
            }
            if (aliveInterpolation.Enabled && !aliveInterpolation.current.UnityNear(aliveInterpolation.target, 0.0015f))
            {
                _alive = (bool)aliveInterpolation.Interpolate();
                //RunChange_alive(aliveInterpolation.Timestep);
            }
            if (playerInterpolation.Enabled && !playerInterpolation.current.UnityNear(playerInterpolation.target, 0.0015f))
            {
                _player = (uint)playerInterpolation.Interpolate();
                //RunChange_player(playerInterpolation.Timestep);
            }
            if (directionInterpolation.Enabled && !directionInterpolation.current.UnityNear(directionInterpolation.target, 0.0015f))
            {
                _direction = (Vector3)directionInterpolation.Interpolate();
                //RunChange_direction(directionInterpolation.Timestep);
            }
        }
Exemplo n.º 5
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (ownerNetworkIdInterpolation.Enabled && !ownerNetworkIdInterpolation.current.UnityNear(ownerNetworkIdInterpolation.target, 0.0015f))
            {
                _ownerNetworkId = (uint)ownerNetworkIdInterpolation.Interpolate();
                //RunChange_ownerNetworkId(ownerNetworkIdInterpolation.Timestep);
            }
            if (healthInterpolation.Enabled && !healthInterpolation.current.UnityNear(healthInterpolation.target, 0.0015f))
            {
                _health = (float)healthInterpolation.Interpolate();
                //RunChange_health(healthInterpolation.Timestep);
            }
            if (targetInterpolation.Enabled && !targetInterpolation.current.UnityNear(targetInterpolation.target, 0.0015f))
            {
                _target = (Vector3)targetInterpolation.Interpolate();
                //RunChange_target(targetInterpolation.Timestep);
            }
            if (baseRotationInterpolation.Enabled && !baseRotationInterpolation.current.UnityNear(baseRotationInterpolation.target, 0.0015f))
            {
                _baseRotation = (Quaternion)baseRotationInterpolation.Interpolate();
                //RunChange_baseRotation(baseRotationInterpolation.Timestep);
            }
            if (barrelRotationInterpolation.Enabled && !barrelRotationInterpolation.current.UnityNear(barrelRotationInterpolation.target, 0.0015f))
            {
                _barrelRotation = (Quaternion)barrelRotationInterpolation.Interpolate();
                //RunChange_barrelRotation(barrelRotationInterpolation.Timestep);
            }
        }
Exemplo n.º 6
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (ownerNetworkIdInterpolation.Enabled && !ownerNetworkIdInterpolation.current.UnityNear(ownerNetworkIdInterpolation.target, 0.0015f))
            {
                _ownerNetworkId = (uint)ownerNetworkIdInterpolation.Interpolate();
                //RunChange_ownerNetworkId(ownerNetworkIdInterpolation.Timestep);
            }
            if (positionInterpolation.Enabled && !positionInterpolation.current.UnityNear(positionInterpolation.target, 0.0015f))
            {
                _position = (Vector3)positionInterpolation.Interpolate();
                //RunChange_position(positionInterpolation.Timestep);
            }
            if (rotationInterpolation.Enabled && !rotationInterpolation.current.UnityNear(rotationInterpolation.target, 0.0015f))
            {
                _rotation = (Quaternion)rotationInterpolation.Interpolate();
                //RunChange_rotation(rotationInterpolation.Timestep);
            }
            if (healthInterpolation.Enabled && !healthInterpolation.current.UnityNear(healthInterpolation.target, 0.0015f))
            {
                _health = (float)healthInterpolation.Interpolate();
                //RunChange_health(healthInterpolation.Timestep);
            }
            if (shieldInterpolation.Enabled && !shieldInterpolation.current.UnityNear(shieldInterpolation.target, 0.0015f))
            {
                _shield = (float)shieldInterpolation.Interpolate();
                //RunChange_shield(shieldInterpolation.Timestep);
            }
        }
Exemplo n.º 7
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (RotationInterpolation.Enabled && !RotationInterpolation.current.UnityNear(RotationInterpolation.target, 0.0015f))
            {
                _Rotation = (float)RotationInterpolation.Interpolate();
                //RunChange_Rotation(RotationInterpolation.Timestep);
            }
            if (FromInterpolation.Enabled && !FromInterpolation.current.UnityNear(FromInterpolation.target, 0.0015f))
            {
                _From = (int)FromInterpolation.Interpolate();
                //RunChange_From(FromInterpolation.Timestep);
            }
            if (ToInterpolation.Enabled && !ToInterpolation.current.UnityNear(ToInterpolation.target, 0.0015f))
            {
                _To = (int)ToInterpolation.Interpolate();
                //RunChange_To(ToInterpolation.Timestep);
            }
            if (ResponderInterpolation.Enabled && !ResponderInterpolation.current.UnityNear(ResponderInterpolation.target, 0.0015f))
            {
                _Responder = (int)ResponderInterpolation.Interpolate();
                //RunChange_Responder(ResponderInterpolation.Timestep);
            }
            if (MovingInterpolation.Enabled && !MovingInterpolation.current.UnityNear(MovingInterpolation.target, 0.0015f))
            {
                _Moving = (bool)MovingInterpolation.Interpolate();
                //RunChange_Moving(MovingInterpolation.Timestep);
            }
        }
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (positionInterpolation.Enabled && !positionInterpolation.current.UnityNear(positionInterpolation.target, 0.0015f))
            {
                _position = (Vector2)positionInterpolation.Interpolate();
                //RunChange_position(positionInterpolation.Timestep);
            }
            if (rotationInterpolation.Enabled && !rotationInterpolation.current.UnityNear(rotationInterpolation.target, 0.0015f))
            {
                _rotation = (Quaternion)rotationInterpolation.Interpolate();
                //RunChange_rotation(rotationInterpolation.Timestep);
            }
            if (speedInterpolation.Enabled && !speedInterpolation.current.UnityNear(speedInterpolation.target, 0.0015f))
            {
                _speed = (float)speedInterpolation.Interpolate();
                //RunChange_speed(speedInterpolation.Timestep);
            }
            if (damageInterpolation.Enabled && !damageInterpolation.current.UnityNear(damageInterpolation.target, 0.0015f))
            {
                _damage = (int)damageInterpolation.Interpolate();
                //RunChange_damage(damageInterpolation.Timestep);
            }
            if (ownerNumInterpolation.Enabled && !ownerNumInterpolation.current.UnityNear(ownerNumInterpolation.target, 0.0015f))
            {
                _ownerNum = (int)ownerNumInterpolation.Interpolate();
                //RunChange_ownerNum(ownerNumInterpolation.Timestep);
            }
        }
        public SnapShot GetSnapshot(ulong timestep)
        {
            SnapShot lower;
            SnapShot upper;

            if (FindSnapshots(timestep, out lower, out upper))
            {
                float t = (timestep - lower.tick) / (float)(upper.tick - lower.tick);

                //Debug.LogFormat("UpdateSnapshot: {0} {1} {2} {3}", t, lower.tick, timestep, upper.tick);
                return(new SnapShot()
                {
                    tick = timestep,
                    position = InterpolateVector3.Interpolate(lower.position, upper.position, t),
                    rotation = InterpolateQuaternion.Interpolate(lower.rotation, upper.rotation, t),
                    velocity = InterpolateVector3.Interpolate(lower.velocity, upper.velocity, t),
                    Health = Interpolated <int> .Interpolate(lower.Health, upper.Health, t),
                    LastCommand = Interpolated <ulong> .Interpolate(lower.LastCommand, upper.LastCommand, t),
                });
            }
            else
            {
                ulong start;
                ulong end;
                int   count;
                GetSnapShotWindow(out start, out end, out count);
                float t = (timestep - start) / (float)(end - start);
                Debug.LogFormat("UpdateSnapshot: {0} {1} {2} {3} {4}", t, start, timestep, end, count);
            }

            return(new SnapShot());
        }
Exemplo n.º 10
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (PositionInterpolation.Enabled && !PositionInterpolation.current.UnityNear(PositionInterpolation.target, 0.0015f))
            {
                _Position = (Vector3)PositionInterpolation.Interpolate();
                //RunChange_Position(PositionInterpolation.Timestep);
            }
            if (RotationInterpolation.Enabled && !RotationInterpolation.current.UnityNear(RotationInterpolation.target, 0.0015f))
            {
                _Rotation = (Quaternion)RotationInterpolation.Interpolate();
                //RunChange_Rotation(RotationInterpolation.Timestep);
            }
            if (NetworkIDInterpolation.Enabled && !NetworkIDInterpolation.current.UnityNear(NetworkIDInterpolation.target, 0.0015f))
            {
                _NetworkID = (int)NetworkIDInterpolation.Interpolate();
                //RunChange_NetworkID(NetworkIDInterpolation.Timestep);
            }
            if (AnimationInterpolation.Enabled && !AnimationInterpolation.current.UnityNear(AnimationInterpolation.target, 0.0015f))
            {
                _Animation = (int)AnimationInterpolation.Interpolate();
                //RunChange_Animation(AnimationInterpolation.Timestep);
            }
        }
Exemplo n.º 11
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (isFlagThereInterpolation.Enabled && !isFlagThereInterpolation.current.UnityNear(isFlagThereInterpolation.target, 0.0015f))
            {
                _isFlagThere = (bool)isFlagThereInterpolation.Interpolate();
                //RunChange_isFlagThere(isFlagThereInterpolation.Timestep);
            }
            if (teamIndexInterpolation.Enabled && !teamIndexInterpolation.current.UnityNear(teamIndexInterpolation.target, 0.0015f))
            {
                _teamIndex = (int)teamIndexInterpolation.Interpolate();
                //RunChange_teamIndex(teamIndexInterpolation.Timestep);
            }
            if (typeInterpolation.Enabled && !typeInterpolation.current.UnityNear(typeInterpolation.target, 0.0015f))
            {
                _type = (int)typeInterpolation.Interpolate();
                //RunChange_type(typeInterpolation.Timestep);
            }
            if (radiusInterpolation.Enabled && !radiusInterpolation.current.UnityNear(radiusInterpolation.target, 0.0015f))
            {
                _radius = (float)radiusInterpolation.Interpolate();
                //RunChange_radius(radiusInterpolation.Timestep);
            }
        }
Exemplo n.º 12
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (GameStartedInterpolation.Enabled && !GameStartedInterpolation.current.UnityNear(GameStartedInterpolation.target, 0.0015f))
            {
                _GameStarted = (bool)GameStartedInterpolation.Interpolate();
                //RunChange_GameStarted(GameStartedInterpolation.Timestep);
            }
            if (LoggedPlayersInterpolation.Enabled && !LoggedPlayersInterpolation.current.UnityNear(LoggedPlayersInterpolation.target, 0.0015f))
            {
                _LoggedPlayers = (int)LoggedPlayersInterpolation.Interpolate();
                //RunChange_LoggedPlayers(LoggedPlayersInterpolation.Timestep);
            }
            if (WaitingPlayersInterpolation.Enabled && !WaitingPlayersInterpolation.current.UnityNear(WaitingPlayersInterpolation.target, 0.0015f))
            {
                _WaitingPlayers = (bool)WaitingPlayersInterpolation.Interpolate();
                //RunChange_WaitingPlayers(WaitingPlayersInterpolation.Timestep);
            }
            if (GameEndedInterpolation.Enabled && !GameEndedInterpolation.current.UnityNear(GameEndedInterpolation.target, 0.0015f))
            {
                _GameEnded = (bool)GameEndedInterpolation.Interpolate();
                //RunChange_GameEnded(GameEndedInterpolation.Timestep);
            }
            if (WinnerInterpolation.Enabled && !WinnerInterpolation.current.UnityNear(WinnerInterpolation.target, 0.0015f))
            {
                _Winner = (uint)WinnerInterpolation.Interpolate();
                //RunChange_Winner(WinnerInterpolation.Timestep);
            }
        }
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (moveRightInterpolation.Enabled && !moveRightInterpolation.current.UnityNear(moveRightInterpolation.target, 0.0015f))
            {
                _moveRight = (bool)moveRightInterpolation.Interpolate();
                //RunChange_moveRight(moveRightInterpolation.Timestep);
            }
            if (moveLeftInterpolation.Enabled && !moveLeftInterpolation.current.UnityNear(moveLeftInterpolation.target, 0.0015f))
            {
                _moveLeft = (bool)moveLeftInterpolation.Interpolate();
                //RunChange_moveLeft(moveLeftInterpolation.Timestep);
            }
            if (moveDownInterpolation.Enabled && !moveDownInterpolation.current.UnityNear(moveDownInterpolation.target, 0.0015f))
            {
                _moveDown = (bool)moveDownInterpolation.Interpolate();
                //RunChange_moveDown(moveDownInterpolation.Timestep);
            }
            if (moveUpInterpolation.Enabled && !moveUpInterpolation.current.UnityNear(moveUpInterpolation.target, 0.0015f))
            {
                _moveUp = (bool)moveUpInterpolation.Interpolate();
                //RunChange_moveUp(moveUpInterpolation.Timestep);
            }
            if (mousePositionInterpolation.Enabled && !mousePositionInterpolation.current.UnityNear(mousePositionInterpolation.target, 0.0015f))
            {
                _mousePosition = (Vector2)mousePositionInterpolation.Interpolate();
                //RunChange_mousePosition(mousePositionInterpolation.Timestep);
            }
        }
Exemplo n.º 14
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (positionInterpolation.Enabled && !positionInterpolation.current.UnityNear(positionInterpolation.target, 0.0015f))
            {
                _position = (Vector3)positionInterpolation.Interpolate();
                //RunChange_position(positionInterpolation.Timestep);
            }
            if (rotationInterpolation.Enabled && !rotationInterpolation.current.UnityNear(rotationInterpolation.target, 0.0015f))
            {
                _rotation = (Quaternion)rotationInterpolation.Interpolate();
                //RunChange_rotation(rotationInterpolation.Timestep);
            }
            if (ownerNetIdInterpolation.Enabled && !ownerNetIdInterpolation.current.UnityNear(ownerNetIdInterpolation.target, 0.0015f))
            {
                _ownerNetId = (uint)ownerNetIdInterpolation.Interpolate();
                //RunChange_ownerNetId(ownerNetIdInterpolation.Timestep);
            }
            if (playerIDInterpolation.Enabled && !playerIDInterpolation.current.UnityNear(playerIDInterpolation.target, 0.0015f))
            {
                _playerID = (int)playerIDInterpolation.Interpolate();
                //RunChange_playerID(playerIDInterpolation.Timestep);
            }
        }
		public override void InterpolateUpdate()
		{
			if (IsOwner)
				return;

			if (healthInterpolation.Enabled && !healthInterpolation.current.UnityNear(healthInterpolation.target, 0.0015f))
			{
				_health = (int)healthInterpolation.Interpolate();
				//RunChange_health(healthInterpolation.Timestep);
			}
		}
Exemplo n.º 16
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (positionInterpolation.Enabled && !positionInterpolation.current.UnityNear(positionInterpolation.target, 0.0015f))
            {
                _position = (Vector3)positionInterpolation.Interpolate();
                //RunChange_position(positionInterpolation.Timestep);
            }
            if (rotationInterpolation.Enabled && !rotationInterpolation.current.UnityNear(rotationInterpolation.target, 0.0015f))
            {
                _rotation = (Quaternion)rotationInterpolation.Interpolate();
                //RunChange_rotation(rotationInterpolation.Timestep);
            }
            if (axisDeltaInterpolation.Enabled && !axisDeltaInterpolation.current.UnityNear(axisDeltaInterpolation.target, 0.0015f))
            {
                _axisDelta = (Vector2)axisDeltaInterpolation.Interpolate();
                //RunChange_axisDelta(axisDeltaInterpolation.Timestep);
            }
            if (vertVelocityInterpolation.Enabled && !vertVelocityInterpolation.current.UnityNear(vertVelocityInterpolation.target, 0.0015f))
            {
                _vertVelocity = (float)vertVelocityInterpolation.Interpolate();
                //RunChange_vertVelocity(vertVelocityInterpolation.Timestep);
            }
            if (groundedInterpolation.Enabled && !groundedInterpolation.current.UnityNear(groundedInterpolation.target, 0.0015f))
            {
                _grounded = (bool)groundedInterpolation.Interpolate();
                //RunChange_grounded(groundedInterpolation.Timestep);
            }
            if (weaponIndexInterpolation.Enabled && !weaponIndexInterpolation.current.UnityNear(weaponIndexInterpolation.target, 0.0015f))
            {
                _weaponIndex = (int)weaponIndexInterpolation.Interpolate();
                //RunChange_weaponIndex(weaponIndexInterpolation.Timestep);
            }
            if (skillIndexInterpolation.Enabled && !skillIndexInterpolation.current.UnityNear(skillIndexInterpolation.target, 0.0015f))
            {
                _skillIndex = (int)skillIndexInterpolation.Interpolate();
                //RunChange_skillIndex(skillIndexInterpolation.Timestep);
            }
            if (blockedInterpolation.Enabled && !blockedInterpolation.current.UnityNear(blockedInterpolation.target, 0.0015f))
            {
                _blocked = (bool)blockedInterpolation.Interpolate();
                //RunChange_blocked(blockedInterpolation.Timestep);
            }
            if (lookatDirInterpolation.Enabled && !lookatDirInterpolation.current.UnityNear(lookatDirInterpolation.target, 0.0015f))
            {
                _lookatDir = (Vector3)lookatDirInterpolation.Interpolate();
                //RunChange_lookatDir(lookatDirInterpolation.Timestep);
            }
        }
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (positionInterpolation.Enabled && !positionInterpolation.current.UnityNear(positionInterpolation.target, 0.0015f))
            {
                _position = (Vector3)positionInterpolation.Interpolate();
                //RunChange_position(positionInterpolation.Timestep);
            }
            if (rotationInterpolation.Enabled && !rotationInterpolation.current.UnityNear(rotationInterpolation.target, 0.0015f))
            {
                _rotation = (Quaternion)rotationInterpolation.Interpolate();
                //RunChange_rotation(rotationInterpolation.Timestep);
            }
            if (IsGroundedInterpolation.Enabled && !IsGroundedInterpolation.current.UnityNear(IsGroundedInterpolation.target, 0.0015f))
            {
                _IsGrounded = (bool)IsGroundedInterpolation.Interpolate();
                //RunChange_IsGrounded(IsGroundedInterpolation.Timestep);
            }
            if (IsStrafingInterpolation.Enabled && !IsStrafingInterpolation.current.UnityNear(IsStrafingInterpolation.target, 0.0015f))
            {
                _IsStrafing = (bool)IsStrafingInterpolation.Interpolate();
                //RunChange_IsStrafing(IsStrafingInterpolation.Timestep);
            }
            if (IsSprintingInterpolation.Enabled && !IsSprintingInterpolation.current.UnityNear(IsSprintingInterpolation.target, 0.0015f))
            {
                _IsSprinting = (bool)IsSprintingInterpolation.Interpolate();
                //RunChange_IsSprinting(IsSprintingInterpolation.Timestep);
            }
            if (InputHorizontalInterpolation.Enabled && !InputHorizontalInterpolation.current.UnityNear(InputHorizontalInterpolation.target, 0.0015f))
            {
                _InputHorizontal = (float)InputHorizontalInterpolation.Interpolate();
                //RunChange_InputHorizontal(InputHorizontalInterpolation.Timestep);
            }
            if (InputVerticalInterpolation.Enabled && !InputVerticalInterpolation.current.UnityNear(InputVerticalInterpolation.target, 0.0015f))
            {
                _InputVertical = (float)InputVerticalInterpolation.Interpolate();
                //RunChange_InputVertical(InputVerticalInterpolation.Timestep);
            }
            if (InputMagnitudeInterpolation.Enabled && !InputMagnitudeInterpolation.current.UnityNear(InputMagnitudeInterpolation.target, 0.0015f))
            {
                _InputMagnitude = (float)InputMagnitudeInterpolation.Interpolate();
                //RunChange_InputMagnitude(InputMagnitudeInterpolation.Timestep);
            }
            if (GroundDistanceInterpolation.Enabled && !GroundDistanceInterpolation.current.UnityNear(GroundDistanceInterpolation.target, 0.0015f))
            {
                _GroundDistance = (float)GroundDistanceInterpolation.Interpolate();
                //RunChange_GroundDistance(GroundDistanceInterpolation.Timestep);
            }
        }
Exemplo n.º 18
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (indexInterpolation.Enabled && !indexInterpolation.current.UnityNear(indexInterpolation.target, 0.0015f))
            {
                _index = (int)indexInterpolation.Interpolate();
                //RunChange_index(indexInterpolation.Timestep);
            }
        }
Exemplo n.º 19
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (playerIdInterpolation.Enabled && !playerIdInterpolation.current.UnityNear(playerIdInterpolation.target, 0.0015f))
            {
                _playerId = (uint)playerIdInterpolation.Interpolate();
                //RunChange_playerId(playerIdInterpolation.Timestep);
            }
        }
Exemplo n.º 20
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (timeRemainingInterpolation.Enabled && !timeRemainingInterpolation.current.UnityNear(timeRemainingInterpolation.target, 0.0015f))
            {
                _timeRemaining = (int)timeRemainingInterpolation.Interpolate();
                //RunChange_timeRemaining(timeRemainingInterpolation.Timestep);
            }
        }
Exemplo n.º 21
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (isUsedInterpolation.Enabled && !isUsedInterpolation.current.UnityNear(isUsedInterpolation.target, 0.0015f))
            {
                _isUsed = (bool)isUsedInterpolation.Interpolate();
                //RunChange_isUsed(isUsedInterpolation.Timestep);
            }
        }
Exemplo n.º 22
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (ReadyInterpolation.Enabled && !ReadyInterpolation.current.UnityNear(ReadyInterpolation.target, 0.0015f))
            {
                _Ready = (bool)ReadyInterpolation.Interpolate();
                //RunChange_Ready(ReadyInterpolation.Timestep);
            }
        }
Exemplo n.º 23
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (ScoreInterpolation.Enabled && !ScoreInterpolation.current.UnityNear(ScoreInterpolation.target, 0.0015f))
            {
                _Score = (int)ScoreInterpolation.Interpolate();
                //RunChange_Score(ScoreInterpolation.Timestep);
            }
        }
Exemplo n.º 24
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (gameStateInterpolation.Enabled && !gameStateInterpolation.current.UnityNear(gameStateInterpolation.target, 0.0015f))
            {
                _gameState = (int)gameStateInterpolation.Interpolate();
                //RunChange_gameState(gameStateInterpolation.Timestep);
            }
        }
Exemplo n.º 25
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (TowerEntityNetIdInterpolation.Enabled && !TowerEntityNetIdInterpolation.current.UnityNear(TowerEntityNetIdInterpolation.target, 0.0015f))
            {
                _TowerEntityNetId = (uint)TowerEntityNetIdInterpolation.Interpolate();
                //RunChange_TowerEntityNetId(TowerEntityNetIdInterpolation.Timestep);
            }
        }
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (pickupTypeInterpolation.Enabled && !pickupTypeInterpolation.current.UnityNear(pickupTypeInterpolation.target, 0.0015f))
            {
                _pickupType = (int)pickupTypeInterpolation.Interpolate();
                //RunChange_pickupType(pickupTypeInterpolation.Timestep);
            }
        }
Exemplo n.º 27
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (numPlayersInterpolation.Enabled && !numPlayersInterpolation.current.UnityNear(numPlayersInterpolation.target, 0.0015f))
            {
                _numPlayers = (int)numPlayersInterpolation.Interpolate();
                //RunChange_numPlayers(numPlayersInterpolation.Timestep);
            }
        }
Exemplo n.º 28
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (CurrentHoleNumberInterpolation.Enabled && !CurrentHoleNumberInterpolation.current.UnityNear(CurrentHoleNumberInterpolation.target, 0.0015f))
            {
                _CurrentHoleNumber = (int)CurrentHoleNumberInterpolation.Interpolate();
                //RunChange_CurrentHoleNumber(CurrentHoleNumberInterpolation.Timestep);
            }
        }
Exemplo n.º 29
0
        public override void InterpolateUpdate()
        {
            if (IsOwner)
            {
                return;
            }

            if (SkippingInterpolation.Enabled && !SkippingInterpolation.current.UnityNear(SkippingInterpolation.target, 0.0015f))
            {
                _Skipping = (bool)SkippingInterpolation.Interpolate();
                //RunChange_Skipping(SkippingInterpolation.Timestep);
            }
        }
Exemplo n.º 30
0
        public override void InterpolateUpdate()
        {
            ///if (IsOwner)
            if (!IsRemote)
            {
                frameCount++;
                if (_dirtyFields[0] > 0)
                {
                    /// send frame data
                    frameSender.BMSData    = Convert.ToBase64String(dirtyFieldsData.CompressBytes());
                    frameSender.FrameCount = frameCount;
                    PTK.ArenaObservable.FrameData[] objs = { frameSender };
                    string json = frameSender.ToJson <PTK.ArenaObservable.FrameData>(objs, false);
                    PTK.Ansuz.Instance.PublishToTopic(playerFrameTopic, json, 0);
                }
                return;
            }

            if (positionInterpolation.Enabled && !positionInterpolation.current.UnityNear(positionInterpolation.target, 0.0015f))
            {
                _position = (Vector3)positionInterpolation.Interpolate();
                //RunChange_position(positionInterpolation.Timestep);
            }
            if (rotationInterpolation.Enabled && !rotationInterpolation.current.UnityNear(rotationInterpolation.target, 0.0015f))
            {
                _rotation = (Quaternion)rotationInterpolation.Interpolate();
                //RunChange_rotation(rotationInterpolation.Timestep);
            }
            if (spineRotationInterpolation.Enabled && !spineRotationInterpolation.current.UnityNear(spineRotationInterpolation.target, 0.0015f))
            {
                _spineRotation = (Vector3)spineRotationInterpolation.Interpolate();
                //RunChange_spineRotation(spineRotationInterpolation.Timestep);
            }
            if (verticalInterpolation.Enabled && !verticalInterpolation.current.UnityNear(verticalInterpolation.target, 0.0015f))
            {
                _vertical = (float)verticalInterpolation.Interpolate();
                //RunChange_vertical(verticalInterpolation.Timestep);
            }
            if (horizontalInterpolation.Enabled && !horizontalInterpolation.current.UnityNear(horizontalInterpolation.target, 0.0015f))
            {
                _horizontal = (float)horizontalInterpolation.Interpolate();
                //RunChange_horizontal(horizontalInterpolation.Timestep);
            }
            if (isMovingInterpolation.Enabled && !isMovingInterpolation.current.UnityNear(isMovingInterpolation.target, 0.0015f))
            {
                _isMoving = (bool)isMovingInterpolation.Interpolate();
                //RunChange_isMoving(isMovingInterpolation.Timestep);
            }
        }