// Use this for initialization void Start() { playerStamina = GetComponent <PlayerStamina> (); camera = Camera.main; tool = Tools.NONE; hoe = GetComponent <Hoe> (); plant = GetComponent <PlantSeeds> (); wateringCan = GetComponent <WateringCan> (); sickle = GetComponent <Sickle> (); none = GetComponent <None> (); holdingItem = GetComponent <HoldingItem> (); inventory = GetComponent <InventoryManager> (); fountainCollision = GetComponent <FountainCollider> (); NPCCollision = GetComponentInChildren <NPCCollision> (); if (SceneManager.GetActiveScene().name.Contains("Outside") || SceneManager.GetActiveScene().name == "Farming" || SceneManager.GetActiveScene().name == "Farm") { outside = true; } else { outside = false; } anim = GetComponent <Animator> (); hoeGO = this.transform.Find("hoe").gameObject; wcanGO = this.transform.Find("wateringcan").gameObject; sickleGO = this.transform.Find("sickle").gameObject; buttonToPress = FindObjectOfType(typeof(ButtonToPress)) as ButtonToPress; }
private void Start() { plants = new PlantSeeds[3]; plants[0] = PlantSeeds.Beet; plants[1] = PlantSeeds.Tomato; plants[2] = PlantSeeds.Cabbage; currentPlant = plants[0]; }
void Update() { if (Input.GetKeyDown(_key)) { //skip back to first plant after last if (plantMode == plants.Length - 1) { plantMode = 0; } else { ++plantMode; } currentPlant = plants[plantMode]; StartCoroutine(showCurrentPlant()); } }