开放划船机,增加阻力设置
This commit is contained in:
1 parent
c12df53c18
commit
7c1d1e797c
13 files changed
+2376
-1642
No files matched your search
@@ -42,7 +42,10 @@ public class HomeController : PFUIPanel
|
||||
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
var nav = transform.Find("MainNav-mobile").GetComponent<NewMainNav>();
|
||||
nav.SetButtonActive(new List<int> { 1, 3, 4, 6 });
|
||||
nav.SetButtonActive(new List<int> { 1, 3, 4, 6 },null,new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/Rower/划船"), () =>
|
||||
{
|
||||
UIManager.ShowRowerPanel();
|
||||
}));
|
||||
newNav = nav;
|
||||
UIManager.AddEvent(transform.Find("TodayData/Datas/Distance").gameObject, EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
|
||||
@@ -93,6 +93,14 @@ public class RowerHomeScript : PFUIPanel
|
||||
/// </summary>
|
||||
int stopSeconds = 0;
|
||||
uint totalDistance = 0;
|
||||
protected override void Start()
|
||||
{
|
||||
var nav = transform.Find("MainNav-mobile").GetComponent<NewMainNav>();
|
||||
nav.SetButtonActive(new List<int> {1,4,6 }, null, new NewMainNav.CustomButton(Resources.Load<Sprite>("Images/Rower/骑行"), () =>
|
||||
{
|
||||
ReturnHome();
|
||||
}));
|
||||
}
|
||||
protected override void Awake()
|
||||
{
|
||||
spriteDict = new Dictionary<object, Sprite>()
|
||||
@@ -127,6 +135,15 @@ public class RowerHomeScript : PFUIPanel
|
||||
left = transform.Find("Left");
|
||||
bottom = transform.Find("Bottom");
|
||||
PaintPullCurveDelegate = new EventHandler(PaintPullCurve);
|
||||
transform.Find("PFUISlider").GetComponent<PFUISlider>().SetValueChanged(r =>
|
||||
{
|
||||
var v = (ushort)(r * 65535);
|
||||
if (Rower != null)
|
||||
{
|
||||
Rower.SetResistanceLevel(v);
|
||||
//RowerData.
|
||||
}
|
||||
});
|
||||
Init();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user