天津23维预案
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
1.2 KiB

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<Text>();
}
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<SaveSuccess>().GetIt("风力值超出最大范围!");
//WindMain = 12;
//TheShowUI.SetActive(true);
//TheShowUI.GetComponent<SaveSuccess>().GetIt("风力值超出最小范围!");
//WindMain = 1;
}
}