void Start() { //locate the fish manager fishManager = FishManager.instance; myHyper = GetComponent <HyperObject>(); _cachedRigidbody = GetComponent <Rigidbody>(); Invoke("LifeEnd", lifeTime); }
// Use this for initialization void Start() { player = HyperCreature.instance; myHyper = GetComponent <HyperObject>(); rake = GameObject.Find("Rake"); tine1 = GameObject.FindGameObjectWithTag("Tine 1"); tine2 = GameObject.FindGameObjectWithTag("Tine 2"); tine3 = GameObject.FindGameObjectWithTag("Tine 3"); tine4 = GameObject.FindGameObjectWithTag("Tine 4"); gravel = GameObject.FindGameObjectWithTag("Gravel"); gravelShrine = Object.FindObjectOfType <GravelShrine>(); GetComponent <Renderer>().material.mainTexture = texture; drawingSizeX = Mathf.Ceil(drawingSizeX * rake.GetComponent <Transform>().localScale.x / gravel.GetComponent <Transform>().localScale.x); drawingSizeZ = Mathf.Ceil(drawingSizeZ * rake.GetComponent <Transform>().localScale.z / gravel.GetComponent <Transform>().localScale.z); raked = 0; originalColor.r = 0.0f; originalColor.g = 0.0f; originalColor.b = 0.0f; originalColor.a = 0.0f; coordinates = new int[1024, 1024]; originalThird = (int)Mathf.Ceil((float)texture.width / 10.0f); tine1Collision = false; tine2Collision = false; tine3Collision = false; tine4Collision = false; isRakedEnough = false; lastTine1Node = null; lastTine2Node = null; lastTine3Node = null; lastTine4Node = null; lineNumber = 1; drawPeriod = 900.0f; frame = 1; texture.Apply(); }