Esempio n. 1
0
        public static void NewUFO(Vector2 position)
        {
            UFO currentInstance = new UFO();

            /*for (int p = 0; p < Main.MaxProjectiles; p++)
             * {
             *  if (Main.activeProjectiles[p] == null)
             *  {
             *      Main.activeProjectiles[p] = currentInstance;
             *  }
             * }*/
            currentInstance.position = position;
            currentInstance.hitbox   = new Rectangle((int)currentInstance.position.X, (int)currentInstance.position.Y, ufoAnimationArray[0].Width, ufoAnimationArray[0].Height);
            Main.activeEntities.Add(currentInstance);
        }
Esempio n. 2
0
 public void DestroyInstance(UFO ufo)
 {
     Main.gameScore += 1;
     Main.activeEntities.Remove(ufo);
 }