using System.Collections.Generic; using UnityEngine; namespace Assets.Scripts.Scenes.VideoRide { public class OnlineVideoPlayer : AbstractVideoPlayer { protected override void Start() { base.Start(); } protected override void Update() { base.Update(); } //计算 protected override void ComputePlayer() { } protected override void ComputeAnimator() { base.ComputeAnimator(); } protected override int GetCurrentFrame() { return this.currentFrame; } protected override void ComputeVideo() { base.ComputeVideo(); } protected 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(); } var f = totalDistance; preTime = f; 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/3.6; this.Diff = endDistance - currentPlayerDistance; this.currentFrame = frame; this.PreDistance = preDistance * 1000; this.EndDistance = endDistance * 1000; this.OnlineSpeed = speed / 3.6; } } }