46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
using System;
|
|
using DG.Tweening;
|
|
using DragonSoul.Shared;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace UnityTest.ZXL
|
|
{
|
|
public class ClockUI : UI
|
|
{
|
|
public Image h;
|
|
public Image m;
|
|
|
|
public float mInt = 0.6f;
|
|
public float hInt = 0.06f;
|
|
|
|
public override void OnInit()
|
|
{
|
|
base.OnInit();
|
|
// button.onClick.AddListener(Over);
|
|
}
|
|
|
|
private void OnEnable()
|
|
{
|
|
m.transform.localEulerAngles = Vector3.zero;
|
|
h.transform.localEulerAngles = new Vector3(0, 0, -90);
|
|
}
|
|
|
|
private void OnDisable()
|
|
{
|
|
m.transform.localEulerAngles = Vector3.zero;
|
|
h.transform.localEulerAngles = new Vector3(0, 0, -90);
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
m.transform.localEulerAngles += new Vector3(0, 0, mInt);
|
|
h.transform.localEulerAngles += new Vector3(0, 0, hInt);
|
|
}
|
|
|
|
public async ETTask WaitFinish(float time)
|
|
{
|
|
await ETTaskHelper.WaitTime(time);
|
|
}
|
|
}
|
|
} |