| 123456789101112131415161718192021222324252627 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class BaseSpeedSlider : MonoBehaviour
- {
- Text text;
- public static BaseSpeedSlider ins;
- void Start()
- {
- ins = this;
- text = this.transform.Find("Text").GetComponent<Text>();
- }
- public void onSlider()
- {
- float value = this.GetComponent<Slider>().value;
- text.text = "发射速度 " + (value).ToString("#0.00") + "m/s";
- }
- public float getValue()
- {
- return this.GetComponent<Slider>().value * 0.5f;
- }
- }
|