using UnityEngine; using System.Collections; using UnityEngine.UI; public class WindzoneController : ScriptableWindzoneInterface { private Text WindText; void Awake() { WindText = GameObject.Find("ShowWeather").transform.Find("FengLiText").GetComponent(); } void Start () { base.Init(); } public void SetWind(float force,int angle) { WindMain = force; transform.rotation = Quaternion.Euler(transform.rotation.x, angle, transform.rotation.z); } void Update () { //SetWind(3, 5); //WindMain = Mathf.PingPong((Time.time / 1.0f), 1.0f); WindTurbulence = 2; WindPulseMagnitude = 0.01f; WindPulseFrequency = 2; //Radius = WindMain; string[] str = WindText.text.Split('级'); WindMain = int.Parse(str[0]); //TheShowUI.SetActive(true); //TheShowUI.GetComponent().GetIt("风力值超出最大范围!"); //WindMain = 12; //TheShowUI.SetActive(true); //TheShowUI.GetComponent().GetIt("风力值超出最小范围!"); //WindMain = 1; } }