// Start is called before the first frame update void Start() { mMan = GameObject.FindGameObjectWithTag("Player").transform.GetChild(0).GetComponent <MeditationManager>(); appleParent = GameObject.FindGameObjectWithTag("AppleParent").transform; myMat = transform.GetComponent <MeshRenderer>().material; StartCoroutine(Grow()); }
// Start is called before the first frame update void Start() { mMan = GameObject.FindGameObjectWithTag("Player").transform.GetChild(0).GetComponent <MeditationManager>(); dayCycle = GameObject.FindGameObjectWithTag("Sun").GetComponent <DayCycle>(); if (!loaded) { liveBranchPositions = new List <Vector3>(); allBranchPositions = new List <Vector3>(); liveBranchRotations = new List <Quaternion>(); allBranchRotations = new List <Quaternion>(); allBranchScales = new List <Vector3>(); //debugText.text = "Planted"; StartCoroutine(BreakSurface()); } else { //do stuff if (allBranchPositions.Count < 1) { liveBranchPositions.Clear(); liveBranchRotations.Clear(); StartCoroutine(BreakSurface()); } else { for (int i = 0; i < allBranchPositions.Count; i++) { CreateBranchInstantly(allBranchPositions[i], allBranchRotations[i], allBranchScales[i], i != 0); } int branchLevel = allBranchPositions.Count / branchRate + 1; float growTime = branchTime * Mathf.Pow(growthRateDelay, branchLevel); for (int i = 0; i < oldBranchPositions.Count; i++) { StartCoroutine(CreateBranch(growTime, oldBranchPositions[i], oldBranchRotations[i], true)); } } } }
// Start is called before the first frame update void Start() { sAudio = transform.GetComponent <AudioSource>(); mDir = transform.GetComponent <DirectionalMovement>(); mMan = transform.GetComponent <MeditationManager>(); }
// Start is called before the first frame update void Start() { mMan = GameObject.FindGameObjectWithTag("Player").transform.GetChild(0).GetComponent <MeditationManager>(); StartCoroutine(TrackSeasons()); seasonText.text = "Season/Day: " + seasonCode + "/" + dayCode; }