void Start() { RC = GetComponent <RainCameraController>(); RC.Refresh(); RC.StopImmidiate(); NotificationCenter.DefaultCenter().AddObserver(this, "STARTRAIN"); NotificationCenter.DefaultCenter().AddObserver(this, "STOPRAIN"); }
// Use this for initialization protected void Awake() { base.Awake(); CurrentType = GestureManager.GestureTypes.Grab; specificEvent = grabBall; parent = GameObject.Find("ParentFrozen"); frozen = parent.transform.GetChild(0).gameObject; contr = frozen.GetComponent <RainCameraController>(); }
private void Init() { _rain = GetComponentInChildren <ParticleSystem>(); _light = GetComponentInChildren <Light>(); _rainVision = GetComponentInChildren <RainCameraController>(); _rainAudio = _rain.gameObject.GetComponentInChildren <AudioSource>(); _rainEmission = _rain.emission; _isInitialized = true; _audioList = GameObject.Find("Thunder").GetComponentsInChildren <AudioSource>(); }