Пример #1
0
 public void AddPod(Pod pod)
 {
     mPods.Add(new CityPod(mPodTexture, new Vector2(mLeftBoundary + 10, mUpperBoundary + rnd.Next(0, mScreenHeight / 3)), mScreenWidth, mCityPosition, new Vector2(rnd.Next(-5, 5), rnd.Next(-5, 5)), rnd.Next(-5, 5), rnd.Next(-5, 5), pod, mCityRadius, mCityPodTexture));
 }
Пример #2
0
 public CityPod(Texture2D texture, Vector2 pos, float screenWidth, Vector2 cityCenter, Vector2 takeOffDirection, int rndX, int rndY, Pod pod, int cityRadius, Texture2D cityPodTexture) : base(texture, pos)
 {
     mCityRadius = cityRadius;
     mCityCenter = cityCenter;
     takeOffDirection.Normalize();
     mTakeOffTarget      = mCityCenter + (takeOffDirection * mCityRadius);
     takeOffDirection.X += rndX;
     takeOffDirection.Y += rndY;
     mExitPoint          = mCityCenter + (takeOffDirection * mCityRadius * 20);
     maxVelocity         = 1;
     mTarget             = mCityCenter;
     mPod            = pod;
     mCityPodTexture = cityPodTexture;
 }