| | | 1 | | using System.Collections; |
| | | 2 | | using System.Collections.Generic; |
| | | 3 | | using UnityEngine; |
| | | 4 | | |
| | | 5 | | public class ReplaceFlower : MonoBehaviour { |
| | | 6 | | |
| | | 7 | | private GameObject flower; |
| | | 8 | | |
| | 2 | 9 | | void Start() { |
| | 2 | 10 | | flower = GameObject.FindWithTag("flower"); |
| | 2 | 11 | | flower.SetActive(false); |
| | 2 | 12 | | } |
| | | 13 | | |
| | | 14 | | // Add flower from desk to vase |
| | 1 | 15 | | public void PlaceFlower() { |
| | 1 | 16 | | flower.SetActive(true); |
| | 1 | 17 | | GameObject.FindWithTag("mirror").GetComponent<Usable>().inspectMessage = "The flower isn't in the reflection..." |
| | 1 | 18 | | GameObject.FindWithTag("vase").GetComponent<Collectable>().enabled = false; |
| | 1 | 19 | | GameObject.FindWithTag("vase").GetComponent<Usable>().enabled = false; |
| | 1 | 20 | | GameObject.FindWithTag("vase").GetComponent<Collider>().enabled = false; |
| | 1 | 21 | | } |
| | | 22 | | } |