public Asteroid Half() { Radius /= 2; Speed *= 2; UnitDirectionVector = VMath.RotateVector(UnitDirectionVector, 25); Asteroid splitAsteroid = new Asteroid(Position, UnitDirectionVector, Speed, Radius); if (CanSplit()) { splitAsteroid.UnitDirectionVector = VMath.RotateVector(UnitDirectionVector, -50); } else { Destroy(); splitAsteroid.Health = 0; } return(splitAsteroid); }
public void Rotate(float degrees) { UnitDirectionVector = VMath.RotateVector(UnitDirectionVector, degrees); }