Ejemplo n.º 1
0
        public void Spawn(int spawnCount)
        {
            fireTimer.Reset();
            float spawnPercent = (float)(Math.Pow(0.915, spawnCount / (Main.instance.Wave + 1)) * 100);

            if (Main.instance.RandomMinMax(0, 99) < spawnPercent - (Main.instance.Score / 400))
            {
                type = UFOType.Large;
                UFOentity.Transform.Scale = Vector3.One;
                points = 200;
                radius = 0.446f * adj;
            }
            else
            {
                type = UFOType.Small;
                UFOentity.Transform.Scale = Vector3.One * 0.5f;
                points = 1000;
                radius = (0.446f * adj) * 0.5f;
            }

            float posY = Main.instance.RandomMinMax(-edge.Y * 0.25f, edge.Y * 0.25f);
            float posX;

            if (Main.instance.RandomMinMax(0, 10) > 5)
            {
                posX  = -edge.X;
                speed = 0.03666f;
            }
            else
            {
                posX  = edge.X;
                speed = -0.03666f;
            }

            velocity.X = speed;
            position   = new Vector3(posX, posY, 0);
            UpdatePR();
            Enable();
        }
Ejemplo n.º 2
0
 public UFO(GameObject.GameObjectName mGameObjectName, int index, Sprite.SpriteName mSpriteName, UFO.UFOType ufoType) : base(mGameObjectName, index, mSpriteName)
 {
     this.type   = ufoType;
     this.launch = false;
 }
Ejemplo n.º 3
0
 protected UFOCategory(GameObjectName goName, SpriteBaseName sName, UFOType type, int idx)
     : base(goName, sName, AlienType.UFO, idx)
 {
     this.type = type;
 }
Ejemplo n.º 4
0
 public GenerateEnemyEvent(UFOType type, int qta, int delay)
 {
     this.type  = type;
     this.qta   = qta;
     this.delay = delay;
 }