// Use this for initialization void Start() { totalZoom = -0.2f; cameraTransform = GetComponent <Transform>(); position = cameraTransform.position; bezierPoints = new Vector3[] { new Vector3(0, 0, 0), transform.rotation *Vector3.forward * 6, new Vector3(0, -12, 14), new Vector3(0, -12, 20) }; defaultAngle = transform.eulerAngles.x; bVisualizer = GetComponent <BezierVisualizer>(); if (bVisualizer != null) { bVisualizer.points = bezierPoints; } }
// Use this for initialization void Start() { // TODO: Add a random offset so the towers wont fire in sync cause it's loud as hell. timer = new TaylorTimer(60000 / speed); timer.Elapsed += Timer_Elapsed; meshRenderer = GetComponent <MeshRenderer>(); audioSource = GetComponent <AudioSource>(); SetTowerPosition(gridPositionX, gridPositionY); visualizer = gameObject.GetComponent <BezierVisualizer>(); if (projectileObject != null) { projectileSize = projectileObject.transform.Find("Projectile_Front").gameObject.GetComponent <MeshRenderer>().bounds.size;//projectileObject.GetComponentInChildren<MeshRenderer>().bounds.size; } SetSpawnPos(); if (visualizeBezier) { VisualizeBezier(); } height = meshRenderer.bounds.max.y; creatures = PlayerManager.GetCreatures(ownerID); if (radiusVisualizer != null) { radiusVisualizer.range = range; } rangeRounded = (int)(range + 0.5f); //TEST ONLY: Modifiers.Add(new Modifier(ModiferTypes.Fire, 1)); Modifiers.Add(new Modifier(ModiferTypes.Ice, 1)); Modifiers.Add(new Modifier(ModiferTypes.Acid, 1)); }