void Start() { maxMoonIntensity = 3f; maxWindMain = 20f; maxWindTurbulance = 5f; nm_wind = wind.GetComponent <NM_Wind>(); }
public void windSettings(int speed, int angle) { Wind.GetComponent("WindZone"); Wind.transform.rotation = Quaternion.Euler(0, angle, 0); Wind.mode = WindZoneMode.Directional; Wind.windMain = speed; Wind.windTurbulence = 1; Wind.windPulseMagnitude = 0.5f; Wind.windPulseFrequency = 0.01f; }
void OnEnable() { windMain = serializedObject.FindProperty("m_WindMain"); windTurbulence = serializedObject.FindProperty("m_WindTurbulence"); WindZone windZone = target as WindZone; if (!windZone.GetComponent <BasicWindData>()) { windZone.gameObject.AddComponent <BasicWindData>(); } if (GameObject.FindObjectsOfType <BasicWindData>().Length > 1) { Debug.LogWarning("Your setup has more than one WindZone. Only one is supported by Basic Wind."); } }