Example #1
0
 public void ChangeAttachOrbit(Orbit newOrbit)
 {
     Vector2 thisPos = new Vector2(transform.position.x, transform.position.y);
     Vector2 orbitPos = new Vector2(newOrbit.transform.position.x, newOrbit.transform.position.y);
     OrbitingAngle = MathHelper.AngleBetween(orbitPos, thisPos);
     AttachOrbit = newOrbit;
     OrbitingTime = 0;
 }
Example #2
0
 protected override void Awake()
 {
     SelfOrbit = GetComponentInChildren<Orbit>();
     base.Awake();
 }