Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void SpawnDropWaterDown()
- {
- TempListDown.Clear();
- heading = LCController.LineChild[1].transform.position - LCController.LineChild[2].transform.position;
- maxdist = heading.magnitude;
- distance = heading.magnitude;
- direction = heading / distance;
- Debug.DrawLine(new Vector3(Hero.transform.position.x, Hero.transform.position.y, Hero.transform.position.z), direction, Color.red);
- i = 0;
- iDown = 0;
- TempGO = Instantiate(DropWaterDown, new Vector3(Float[FFloat.i].transform.position.x+direction.x, Float[FFloat.i].transform.position.y + 0.2f, Float[FFloat.i].transform.position.z+direction.z), Quaternion.identity);
- TempGO.SetActive(false);
- Invoke("TempGODestroy", 0.5f);
- TempGO.transform.Rotate(90, 0, 0);
- Vector3 newScale = transform.localScale;
- newScale *= 2f;
- tempHeading = TempGO.transform.position - LCController.LineChild[1].transform.position;
- dist = tempHeading.magnitude;
- count = Convert.ToInt32(Math.Floor(Math.Round(maxdist, 1) / (Math.Floor(Math.Round(maxdist - dist, 1)))));
- Debug.Log("MaxDist: " + Math.Round(maxdist, 1) + " Dist: " + Math.Round(dist, 1) + " MaxDist - Dist: " + Math.Floor(Math.Round(maxdist - dist, 1)));
- Debug.Log("Dist: " + dist + " MaxDist: " + maxdist + " Count: " + count);
- for(i = 0; i < count; i++)
- {
- Invoke("InvokeSpawn", (i+1)*0.25f);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement