Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class WateringCan : MonoBehaviour
  6. {
  7. void Update()
  8. {
  9. if (Input.GetButton("Water"))
  10. {
  11. Seed[] seeds = FindObjectsOfType<Seed>();
  12. foreach (Seed seed in seeds)
  13. {
  14. Debug.DrawLine(seed.transform.position, gameObject.transform.position, Color.blue, 2);
  15. }
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement