// Update is called once per frame public void Move() { if ( !Dead && GameController.mode == 3 ) { DegreeAngle += dirrection * DegreesPerSecond * Time.deltaTime; transform.position = DegreeAngle.PointByRadius (Radius); //get radius changes ChangeRingDirrection = InputController.GetInput (); Radius += ChangeRingDirrection * RadiusLerpSpeed * Time.deltaTime; if ( Radius < InitialRadius ) Radius = InitialRadius; else if ( Radius > FinalRadius ) Radius = FinalRadius; //draw surrounding circle } else { if ( SurroundingCircle != null ) { foreach ( GameObject i in SurroundingCircle ) i.GetComponent<LineRenderer>().renderer.enabled = true; SurroundingCircle = null; } } }
public static void SpawnObject( Angle Degree, long mode ) { for ( long i = 0; i < (int)NumerOfObjectsInPool; i++) { if ( PoolObjects[i].active == false ) { PoolObjects[i].transform.position = Degree.PointByRadius ( Menu.Radius ); PoolObjects[i].active = true; PoolObjects[i].GetComponent<EnemyMovement>().Reset( Menu.Radius, Degree, mode ); break; } } }
public static Vector3 PointByRadius(Angle k, float Radius ) { return k.PointByRadius ( Radius ); }