本地合并备份
This commit is contained in:
1 parent
2b275d6dc5
commit
4353a38c96
44 files changed
+5568
-4294
No files matched your search
@@ -67,6 +67,8 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
RawImage img;//海拔图头像
|
||||
RawImage miniMap;//小地图
|
||||
RawImage altitudeGraph;//海拔图
|
||||
Image leftImage;
|
||||
Image rightImage;
|
||||
#endregion
|
||||
|
||||
#region 控制器
|
||||
@@ -143,6 +145,8 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
closeQuitButton = transform.Find("Panel/QuitPanel/CloseButton").GetComponent<Button>();
|
||||
viewButton =transform.Find("Panel/ViewButton").GetComponent<Button>();
|
||||
altitudeGraph = transform.Find("Panel/TitlePanel/AltitudeGraph").GetComponent<RawImage>();
|
||||
leftImage = transform.Find("Panel/TitlePanel/Left").GetComponent<Image>();
|
||||
rightImage = transform.Find("Panel/TitlePanel/Right").GetComponent<Image>();
|
||||
|
||||
preSlopeText = transform.Find("Panel/PreSlopePanel/PreSlopeText").GetComponent<Text>();
|
||||
|
||||
@@ -165,7 +169,8 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
UIManager.AddEvent(shadowButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerEnter, OnPointEnter);
|
||||
UIManager.AddEvent(singleButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerExit, OnPointExit);
|
||||
UIManager.AddEvent(shadowButton.gameObject, UnityEngine.EventSystems.EventTriggerType.PointerExit, OnPointExit);
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -193,16 +198,49 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
}
|
||||
void Start()
|
||||
{
|
||||
Init();
|
||||
RenderChart();
|
||||
ContinueRide();//继续骑行
|
||||
}
|
||||
// Update is called once per frame
|
||||
float time = 1f;
|
||||
void Update()
|
||||
{
|
||||
time -= Time.deltaTime;
|
||||
while (time < 0) {
|
||||
MoveChartMarkPoint();
|
||||
BindDataSource();
|
||||
fps.text = (1 / Time.deltaTime).ToString();
|
||||
time = 1;
|
||||
}
|
||||
CountDown();
|
||||
MoveCamera();
|
||||
}
|
||||
private void Init()
|
||||
{
|
||||
playerController = FindObjectOfType<PlayerController>();
|
||||
mainController = FindObjectOfType<CyclingController>();
|
||||
|
||||
var route = mainController.GetRoute();
|
||||
mapName.text = route.RouteInstance.Name;
|
||||
totalDistance.text = Math.Round(mainController.GetMapData().TotalDistance, 1).ToString() + "KM";//总里程
|
||||
Utils.DisplayImage(StartCoroutine, altitudeGraph, route.RouteInstance.AltitudeGraph);//渲染海拔图
|
||||
RenderChart();
|
||||
startIndex = playerController.CurrentIndex;
|
||||
//继续骑行如果有伴侣就自动进入伴侣骑行
|
||||
|
||||
if (mainController.mapRouteRankingList == null || mainController.mapRouteRankingList.Count == 0)
|
||||
{
|
||||
shadowButton.enabled = false;
|
||||
shadowButton.interactable = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
shadowButton.enabled = true;
|
||||
shadowButton.interactable = true;
|
||||
}
|
||||
}
|
||||
//继续骑行如果有伴侣就自动进入伴侣骑行
|
||||
private void ContinueRide()
|
||||
{
|
||||
if (mainController.routeResult != null)
|
||||
{
|
||||
if (mainController.routeResult.Mode == CyclingModel.Review.ToString())
|
||||
@@ -221,61 +259,15 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
nearByPanel.SetActive(true);
|
||||
}
|
||||
}
|
||||
// Update is called once per frame
|
||||
float tt = 1f;
|
||||
void Update()
|
||||
//移动摄像头和箭头位置
|
||||
private void MoveCamera()
|
||||
{
|
||||
tt -= Time.deltaTime;
|
||||
while (tt < 0) {
|
||||
fps.text = (1 / Time.deltaTime).ToString();
|
||||
MoveChartMarkPoint();
|
||||
tt = 1;
|
||||
}
|
||||
//获取当前选中玩家绑定当前UI
|
||||
if (playerController != null)
|
||||
{
|
||||
//绑定UI
|
||||
speedTxt.text = $"{Math.Round(playerController.Speed,1)}";
|
||||
powerTxt.text = $"{playerController.Power}";
|
||||
timerTxt.text = Helper.FormatTicks(playerController.TotalTicks);
|
||||
ditance.text = Math.Round(playerController.TotalDistance, 1).ToString("f1");
|
||||
heartRate.text = $"{Math.Round(playerController.HeartRate, 0)}";
|
||||
candance.text = $"{Math.Round(playerController.Cadance, 0)}";
|
||||
preSlopeText.text = $"{Math.Round(playerController.PreSlope, 1)}%";
|
||||
//倒计时
|
||||
if (count > 0)
|
||||
{
|
||||
timeRemaining -= Time.deltaTime;
|
||||
if (timeRemaining <= 0)//定时器
|
||||
{
|
||||
count--;
|
||||
if (count == 0)
|
||||
{
|
||||
mainController.SetStart();
|
||||
countDownTxt.gameObject.SetActive(false);
|
||||
}
|
||||
timeRemaining = 1.0f;
|
||||
}
|
||||
}
|
||||
countDownTxt.text = count.ToString();
|
||||
//坡度相关数据
|
||||
nextSlopeText.text = Math.Round(playerController.NextSlope, 1).ToString() + "%";
|
||||
nextSlopeDistanceText.text ="-" + Math.Round(playerController.NextSlopeDistance, 0).ToString()+"M";
|
||||
currentSlopeText.text = Math.Round(playerController.CurrentSlope, 1).ToString() + "%";
|
||||
currentSlopeDistanceText.text = Math.Round(playerController.CurrentSlopeDistance, 0).ToString() + "M";
|
||||
totalClimb.text = Math.Round(playerController.TotalClimb, 0).ToString();
|
||||
//动态显示当前人物移动动画
|
||||
|
||||
//移动海拔图头像 TODO:移动所有人的头像
|
||||
|
||||
//MoveChartMarkPoint();
|
||||
}
|
||||
if (target != null)
|
||||
{
|
||||
target.transform.position = playerController.transform.position; //new Vector3((float)Math.Round(player.transform.position.x,1), 0, (float)Math.Round(player.transform.position.z,1));
|
||||
if (!mainController.Is3dView)
|
||||
{ //target.transform.rotation = playerController.transform.rotation;//new Quaternion(playerController.transform.rotation.x, playerController.transform.rotation.y +1f, playerController.transform.rotation.z, playerController.transform.rotation.w);
|
||||
target.transform.eulerAngles = new Vector3(0, playerController.transform.eulerAngles.y + 155f, 0);
|
||||
target.transform.eulerAngles = new Vector3(0, playerController.transform.eulerAngles.y + 160f, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -293,7 +285,48 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//倒计时
|
||||
private void CountDown()
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
timeRemaining -= Time.deltaTime;
|
||||
if (timeRemaining <= 0)//定时器
|
||||
{
|
||||
count--;
|
||||
if (count == 0)
|
||||
{
|
||||
mainController.SetStart();
|
||||
countDownTxt.gameObject.SetActive(false);
|
||||
}
|
||||
timeRemaining = 1.0f;
|
||||
}
|
||||
}
|
||||
countDownTxt.text = count.ToString();
|
||||
}
|
||||
private void BindDataSource()
|
||||
{
|
||||
//获取当前选中玩家绑定当前UI
|
||||
if (playerController != null)
|
||||
{
|
||||
speedTxt.text = $"{Math.Round(playerController.Speed, 1)}";
|
||||
powerTxt.text = $"{playerController.Power}";
|
||||
timerTxt.text = Helper.FormatTicks(playerController.TotalTicks);
|
||||
ditance.text = Math.Round(playerController.TotalDistance, 1).ToString("f1");
|
||||
heartRate.text = $"{Math.Round(playerController.HeartRate, 0)}";
|
||||
candance.text = $"{Math.Round(playerController.Cadance, 0)}";
|
||||
preSlopeText.text = $"{Math.Round(playerController.PreSlope, 1)}%";
|
||||
currentSlopeToatalDistanceText.text = $"Total:{Math.Round(playerController.CurrentDistance, 0)}M";
|
||||
//坡度相关数据
|
||||
nextSlopeText.text = Math.Round(playerController.NextSlope, 1).ToString() + "%";
|
||||
//nextSlopeDistanceText.GetComponent<NumberDotween>().AnimateNum((float)playerController.NextSlopeDistance, 0, "-{0}M");
|
||||
nextSlopeDistanceText.text = $"{Math.Round(playerController.NextSlopeTotalDistance, 0)}M";
|
||||
currentSlopeText.text = Math.Round(playerController.CurrentSlope, 1).ToString() + "%";
|
||||
currentSlopeDistanceText.GetComponent<NumberDotween>().AnimateNum((float)playerController.CurrentSlopeDistance, 0, "{0}M");
|
||||
totalClimb.text = Math.Round(playerController.TotalClimb, 0).ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void SingleRide(BaseEventData baseEventData)
|
||||
{
|
||||
selectPanel.SetActive(false);
|
||||
@@ -369,7 +402,6 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
quitPanel.SetActive(false);
|
||||
}
|
||||
|
||||
//切换到3d视角
|
||||
private void ChangeView(BaseEventData baseEventData)
|
||||
{
|
||||
@@ -397,15 +429,14 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
{
|
||||
}
|
||||
int isSimple = 1;
|
||||
|
||||
private bool clearLock = true;
|
||||
private void ClearPanel(BaseEventData baseEventData)
|
||||
private void ClearPanel(BaseEventData baseEventData)
|
||||
{
|
||||
if (clearLock)
|
||||
{
|
||||
clearLock = false;
|
||||
leftPanel.transform.DOLocalMove(new Vector3(leftPanel.transform.localPosition.x + isSimple * -430f, leftPanel.transform.localPosition.y, leftPanel.transform.localPosition.z), 1);
|
||||
titlePanel.transform.DOLocalMove(new Vector3(titlePanel.transform.localPosition.x, titlePanel.transform.localPosition.y + isSimple * 180f, titlePanel.transform.localPosition.z), 1);
|
||||
titlePanel.transform.DOLocalMove(new Vector3(titlePanel.transform.localPosition.x, titlePanel.transform.localPosition.y + isSimple * 200f, titlePanel.transform.localPosition.z), 1);
|
||||
miniMap.transform.DOLocalMove(new Vector3(miniMap.transform.localPosition.x , miniMap.transform.localPosition.y + isSimple * 260f, miniMap.transform.localPosition.z), 1);
|
||||
nearByPanel.transform.DOLocalMove(new Vector3(nearByPanel.transform.localPosition.x + isSimple * 330f, nearByPanel.transform.localPosition.y, nearByPanel.transform.localPosition.z), 1).onComplete += () =>
|
||||
{
|
||||
@@ -417,42 +448,11 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
}
|
||||
|
||||
private int maxCacheDataNumber = 100;//海拔图最大点数
|
||||
private int totalCount;//路线实际点数
|
||||
private int startIndex;//选中玩家起始索引
|
||||
private int interval = 50;//选中玩家移动索引个数
|
||||
private float[] elevationList;
|
||||
GraphChartBase graph;
|
||||
ChartDataSourceScript chartDataSourceScript;
|
||||
//初始化海拔图
|
||||
void RenderChart()
|
||||
{
|
||||
|
||||
|
||||
//elevationChart.ClearData();
|
||||
//elevationList = mainController.GetLineChartData();
|
||||
//totalCount = elevationList.Length;
|
||||
//maxCacheDataNumber = Math.Min(totalCount, maxCacheDataNumber);
|
||||
//elevationChart.SetMaxCache(maxCacheDataNumber);
|
||||
////for (int i = 0; i < maxCacheDataNumber; i++)
|
||||
////{
|
||||
//// elevationChart.AddData(0, elevationList[i]);
|
||||
////}
|
||||
////elevationChart.RefreshChart();
|
||||
//ElevationToScreenPoint();
|
||||
//var endIndex = playerController.CurrentIndex;
|
||||
//var s = endIndex / maxCacheDataNumber;
|
||||
//var v = endIndex % maxCacheDataNumber;
|
||||
|
||||
//maxCacheDataNumber = Math.Min(totalCount-s* maxCacheDataNumber, maxCacheDataNumber);
|
||||
|
||||
//for (int i = 0; i < maxCacheDataNumber; i++)
|
||||
//{
|
||||
// initCount++;
|
||||
// if (initCount > maxCacheDataNumber) break;
|
||||
// AddOneData(s * maxCacheDataNumber + v + i);
|
||||
//}
|
||||
|
||||
//elevationChart.RefreshChart();
|
||||
var mapData = mainController.GetMapData();
|
||||
double x = 0;
|
||||
Dictionary<double, double> dataSource = new Dictionary<double, double>();
|
||||
@@ -467,151 +467,99 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
}
|
||||
dd.Add(item.Elevation);
|
||||
}
|
||||
var sc = transform.Find("Panel/GraphChart").GetComponent<ChartDataSourceScript>();
|
||||
|
||||
chartDataSourceScript = transform.Find("Panel/GraphChart").GetComponent<ChartDataSourceScript>();
|
||||
graph = transform.Find("Panel/GraphChart").GetComponent<GraphChartBase>();
|
||||
|
||||
sc.SetDataSource(dd.ToArray());
|
||||
|
||||
chartDataSourceScript.SetDataSource(dd.ToArray());
|
||||
////初始化头像坐标
|
||||
//var n = graph.DataSource.GetPoint("Player 2", 0);
|
||||
//graph.PointToWorldSpace(out Vector3 nextPosition, n.x, n.y, "Player 2");
|
||||
//img.transform.DOMove(new Vector3(nextPosition.x, nextPosition.y, 0), 1);
|
||||
if (App.CurrentUser != null)
|
||||
{
|
||||
Utils.DisplayImage(StartCoroutine, img, App.CurrentUser.WxHeadImg);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//长路线动态更新chart
|
||||
private int initCount;
|
||||
private float updateTime;
|
||||
private int lastIndex;
|
||||
private int chartAddNum;
|
||||
void UpdateRealTimeChart()
|
||||
{
|
||||
var endIndex = playerController.CurrentIndex;
|
||||
updateTime += Time.deltaTime;
|
||||
if (updateTime >= 1)
|
||||
{
|
||||
int delta = endIndex - lastIndex;
|
||||
if (delta >0 && initCount < totalCount)
|
||||
{
|
||||
lastIndex = endIndex;
|
||||
AddOneData(initCount);
|
||||
initCount++;
|
||||
updateTime = 0;
|
||||
chartAddNum++;
|
||||
}
|
||||
var v = (endIndex - chartAddNum) % maxCacheDataNumber;
|
||||
//MoveChartMarkPoint(v);
|
||||
App.CurrentUserHeadTexture = img.texture;
|
||||
}
|
||||
}
|
||||
void AddOneData(int index)
|
||||
{
|
||||
string category = index.ToString();
|
||||
|
||||
elevationChart.AddData(0, elevationList[index]);
|
||||
//elevationChart.AddXAxisData(category);
|
||||
//elevationChart.AddXAxisData(index.ToString(), index);
|
||||
|
||||
}
|
||||
private Dictionary<int, Vector2> pointMap = new Dictionary<int, Vector2>();
|
||||
void ElevationToScreenPoint()
|
||||
{
|
||||
|
||||
var xUnit =(float) Math.Round(854f * (Screen.width/1600f) / elevationList.Length);//x单位
|
||||
var maxelev = (float)elevationList.Max();
|
||||
var yUnit =(float)Math.Round(46f * (Screen.height / 900f) / maxelev);//y单位
|
||||
var xoffset = 373f * (Screen.width / 1600f);
|
||||
var yoffset = 175f * (Screen.height / 900f);
|
||||
for (int i = 0; i < elevationList.Length; i++)
|
||||
{
|
||||
var c = new Vector2(i*xUnit+ xoffset, elevationList[i]*yUnit + yoffset);
|
||||
pointMap.Add(i, c);
|
||||
}
|
||||
}
|
||||
public GameObject testButton;
|
||||
|
||||
//挪到人物脚本中处理
|
||||
void MoveChartMarkPoint()
|
||||
{
|
||||
Vector3 prePosition = img.transform.position;
|
||||
int nextIndex = playerController.CurrentIndex;
|
||||
double ditance = playerController.Distance;//当前移动距离
|
||||
double currentDistance = playerController.CurrentDistance;//当前区间距离
|
||||
var t = currentDistance != 0 ? ditance*1000 / currentDistance : 1;
|
||||
var n = graph.DataSource.GetPoint("Player 2", nextIndex);
|
||||
graph.PointToWorldSpace(out Vector3 nextPosition, n.x, n.y, "Player 2");
|
||||
//var currentPos = Vector3.Lerp(prePosition, nextPosition, (float)t);
|
||||
if (mainController.isStart)
|
||||
//if (mainController.isStart)
|
||||
{
|
||||
var ss = graph.GetComponentInChildren<ChartDataSourceScript>();
|
||||
if (ss.total <= ss.DownSampleToPoints)
|
||||
{
|
||||
img.transform.DOMove(new Vector3(nextPosition.x, nextPosition.y, 0), 0);
|
||||
}
|
||||
else
|
||||
{ //人 - 线(中点) - 人(ss.total - graph.HorizontalScrolling <100)
|
||||
//人物移动到中间的时候,线开始向左边平滑移动
|
||||
var mapData = mainController.GetMapData();
|
||||
//线移动
|
||||
var interval = ditance / mapData.TotalDistance * ss.total;
|
||||
|
||||
//线到头了开始移动人物
|
||||
var s = (ss.total - graph.HorizontalScrolling);
|
||||
img.transform.DOMove(new Vector3(nextPosition.x, nextPosition.y, 0), 1);
|
||||
//if (s < 200)
|
||||
//{
|
||||
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// graph.HorizontalScrolling = nextIndex + 1 - t;
|
||||
// img.transform.DOMove(new Vector3(prePosition.x, currentPos.y, 0), 1);
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
MoverCurrentUserHead();
|
||||
MoveOtherHeads();
|
||||
MoveElevationImage();
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// //人移动 当前中间的时候开始切换线移动
|
||||
// img.transform.DOMove(new Vector3(currentPos.x, currentPos.y, 0), 0);
|
||||
// //线快加载五年的时候
|
||||
//}
|
||||
}
|
||||
//移动当前用户头像
|
||||
private void MoverCurrentUserHead()
|
||||
{
|
||||
Vector3 prePos = img.transform.position;
|
||||
int nextIndex = playerController.CurrentIndex;
|
||||
var viewIndex = chartDataSourceScript.GetViewIndex(nextIndex);
|
||||
if (!mainController.isStart && !mainController.isPause && !mainController.isQuit)//未开始未暂停未结束
|
||||
{
|
||||
viewIndex = 0;
|
||||
}
|
||||
var n = graph.DataSource.GetPoint("Player 2", viewIndex);
|
||||
graph.PointToWorldSpace(out Vector3 nextPosition, n.x, n.y, "Player 2");
|
||||
nextPosition.x -= 14f;
|
||||
nextPosition.y += 5f;
|
||||
//人物移动 停止条件 到中间且线未加载完
|
||||
if (chartDataSourceScript.ReachMid(viewIndex) && !chartDataSourceScript.ReachEnd())
|
||||
{
|
||||
var currentDistance = playerController.CurrentDistance;
|
||||
var distance = playerController.Distance;
|
||||
var offset = currentDistance > 0 ? distance * 1000 / currentDistance : 1;
|
||||
graph.HorizontalScrolling += offset;
|
||||
img.transform.DOMove(new Vector3(prePos.x, nextPosition.y, 0), 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
img.transform.DOMove(new Vector3(nextPosition.x , nextPosition.y, 0), 1);
|
||||
}
|
||||
img.transform.SetSiblingIndex(999);
|
||||
}
|
||||
//移动其他骑手头像
|
||||
private void MoveOtherHeads()
|
||||
{
|
||||
var others = FindObjectsOfType<OtherPlayerController>();
|
||||
foreach (var item in others)
|
||||
{
|
||||
var itemIndex = chartDataSourceScript.GetViewIndex(item.CurrentIndex);
|
||||
if (!mainController.isStart && !mainController.isPause && !mainController.isQuit)//未开始未暂停未结束
|
||||
{
|
||||
itemIndex = 0;
|
||||
}
|
||||
var m = graph.DataSource.GetPoint("Player 2", itemIndex);
|
||||
graph.PointToWorldSpace(out Vector3 itemPosition, m.x, m.y, "Player 2");
|
||||
itemPosition.x -= 12f;
|
||||
itemPosition.y += 5f;
|
||||
item.MoveHead(graph.transform, itemPosition);
|
||||
}
|
||||
}
|
||||
//移动总海拔图范围
|
||||
private void MoveElevationImage()
|
||||
{
|
||||
if (chartDataSourceScript.mData.Count <= chartDataSourceScript.targetPoints)
|
||||
{
|
||||
leftImage.gameObject.SetActive(false);
|
||||
rightImage.gameObject.SetActive(false);
|
||||
altitudeGraph.gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
var start = chartDataSourceScript.GetRealTimeStart();
|
||||
var end = chartDataSourceScript.GetRealTimeEnd();
|
||||
|
||||
|
||||
//线即将加载完
|
||||
var originWith = Screen.width / 1600D * 30D;
|
||||
var with = Screen.width / 1600D * 286D;
|
||||
|
||||
var left = start * with + originWith;
|
||||
var right = end * with + originWith;
|
||||
|
||||
//int del = (int)Math.Round(graph.DataSource.HorizontalViewSize / 2, 0);
|
||||
//if (playerController.CurrentIndex % del == 0)
|
||||
//{
|
||||
// graph.HorizontalScrolling += 1;
|
||||
//}
|
||||
|
||||
#region 注释
|
||||
//var dataPoints = elevationChart.series.list[0].dataPoints.OrderBy(c => c.x).ToList();
|
||||
//if (dataPoints.Count > 0)
|
||||
//{
|
||||
// var pinLoction = dataPoints[index];
|
||||
// pinLoction.y = img.transform.localPosition.y;
|
||||
// img.transform.localPosition = pinLoction;
|
||||
//}
|
||||
|
||||
//if (pointMap.ContainsKey(playerController.CurrentIndex-1) )
|
||||
//{
|
||||
|
||||
|
||||
// Vector3 mousePos;
|
||||
// //testButton.transform.localPosition = new Vector3(pointMap[playerController.CurrentIndex - 1].x, pointMap[playerController.CurrentIndex - 1].y, 0);
|
||||
// //RectTransformUtility.ScreenPointToLocalPointInRectangle(transform.parent.GetComponent<RectTransform>(), new Vector3(pointMap[playerController.CurrentIndex - 1].x , pointMap[playerController.CurrentIndex - 1].y, 0), null, out mousePos);
|
||||
// ((RectTransform)testButton.transform).position = new Vector3(pointMap[playerController.CurrentIndex - 1].x, pointMap[playerController.CurrentIndex - 1].y, 0);
|
||||
// //testButton.transform.position = new Vector3( pointMap[index].x, 229f, 0);
|
||||
// //testButton.transform.position = new Vector3(pointMap[playerController.CurrentIndex-1].x, pointMap[playerController.CurrentIndex-1].y, 0);
|
||||
// //testButton.transform.DOMove(new Vector3(pointMap[playerController.CurrentIndex].x, pointMap[playerController.CurrentIndex].y,0),1).on;
|
||||
// //testButton.transform.DOLocalMove(new Vector3(pointMap[playerController.CurrentIndex - 1].x-Screen.width/2, pointMap[playerController.CurrentIndex - 1].y, 0),0.5f);
|
||||
// //pointMap.Remove(playerController.CurrentIndex - 1);
|
||||
//}
|
||||
#endregion
|
||||
leftImage.transform.DOMoveX((float)left, 1);
|
||||
rightImage.transform.DOMoveX((float)right, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user