2023-02-20 17:32:24 +08:00

61 lines
1.8 KiB
C#

using UnityEngine;
namespace Assets.Scripts.Scenes.VideoRide
{
public class OnlineVideoPlayer : AbstractVideoPlayer
{
protected override void Start()
{
base.Start();
}
protected override void Update()
{
base.Update();
}
public override void ComputeAnimator()
{
base.ComputeAnimator();
}
public override void ComputeAnimatorSpeed()
{
base.ComputeAnimatorSpeed();
}
public override void CreateHeadImage()
{
base.CreateHeadImage();
if (Diff < 0)
((RectTransform)head.transform).anchoredPosition = new Vector2(((RectTransform)head.transform).anchoredPosition.x, -800f);
}
public override void SetPlayer(string name, double speed, double preDistance, double endDistance, double cadance, double heartRate, double wkg, int userId, double power, double currentPlayerDistance, int frame)
{
if (manager == null)
{
manager = FindObjectOfType<VideoGameManager>();
}
this.wkg = wkg;
this.userName = name;
this.cadance = cadance;
this.totalDistance = endDistance;
this.heartRate = (int?)heartRate;
this.userId = userId;
this.power = power;
this.speed = speed;
this.Speed = speed;
this.OnlineSpeed = this.Speed/3.6f;
this.Diff = endDistance - currentPlayerDistance;
this.currentFrame = frame;
this.PreDistance = preDistance * 1000;
this.EndDistance = endDistance * 1000;
}
public override void ComputePlayer()
{
distance = this.speed;
}
}
}