// Use this for initialization public virtual void Start() { cuttlefish = GameObject.FindGameObjectWithTag("Player").GetComponent<CuttlefishMovement>(); enemyPieces = GetComponentsInChildren<Renderer>(); origColors = new Color[enemyPieces.Length]; for(int i =0; i<enemyPieces.Length; i++) { if(enemyPieces[i].renderer!=null) { origColors[i] = enemyPieces[i].renderer.material.color; } } origHitPoints = hitPoints; }
//Ragesplosion void Start() { cuttlefish = GameObject.FindGameObjectWithTag("Player").GetComponent <CuttlefishMovement>(); float height = Screen.height / divisorForRageMeter; rageMeterBack.pixelInset = new Rect(0, Screen.height - height, Screen.width, height); rageMeterBack.color = Color.black; rageMeter.pixelInset = new Rect(Screen.width * (1f - rageMeterWidthPercent) / 2f, Screen.height - height + (height * (1f - rageMeterWidthPercent) / 2f), getCurrentRageMeterWidth(), height * rageMeterWidthPercent); rageMeter.color = Color.white; // place the cool down mark at the 80% mark of the rage meter coolDownMarker.pixelInset = new Rect((float)(Screen.width - (0.3 * Screen.width)), Screen.height - height + (height * (1f - rageMeterWidthPercent) / 2f), markerWidth, height); coolDownMarker.transform.position = new Vector3(0, 0, 5); coolDownMarker.active = false; currRage = maxRage / 2; currGoal = currRage; resetRageMeterVisual(); }