private void OnMouseDown() { print("salut"); if (!TouchManager.Instance.TouchIsUsed && !_parent.IsOpen && PlayerInside) { _parent.EnablePlatforms(); DisablePopUp(); } }
private void OnTriggerEnter2D(Collider2D collider) { PlayerPollen _player = collider.gameObject.GetComponent <PlayerPollen> (); PollenGrain _grain = collider.gameObject.GetComponent <PollenGrain> (); if (_player) { if (_player.PlayerPollenColor == Bud.PollenColor && PlayerPollen.GrainCount > 0) { Bud.EnablePlatforms(); _player.DestroyOneGrain(); } } else if (_grain) { if (_grain.GrainColor == Bud.PollenColor) { Destroy(_grain.gameObject); Bud.EnablePlatforms(); } } }