コード例 #1
0
        public Bird(Vector2 loc, Vector2 scroll, Bonus bonus, MovePattern pattern, SpriteEffects flip, String[] flags)
            : base(loc, scroll, bonus, pattern, flags, flip,
                new Rectangle(0, 0, 256, 128), //Source sprite
                new Vector2(350, 350.0f), //Speed
                new Vector2(0.3f, 0.3f),
                null)
        {
            //Stats
            hp = 3;

            points = 1000;
            Difficulty = 5;
            targetFound = false;
            this.UseSpriteOrigin();
            UseRotationWhenDrawing = flip == SpriteEffects.None;
            Hitbox = new CircleHitbox(this, true, 3f);
        }
コード例 #2
0
        public MegabombShot(Vector2 loc, Megabomb wpn, double angle, SpriteEffects _flip)
            : base(loc,
            new Rectangle(830, 0, 180, 236),    //Sprite
            new Vector2(450, 350),          //Speed
            Vector2.One,                    //Scale
            _flip, wpn, angle, false)
        {
            ttl = InfiniteTimeToLive;
            saveRotation = angle;
            UseRotationWhenDrawing = true;

            hitbox = new CircleHitbox(this,true,0.5f);
        }
コード例 #3
0
 public void Initialize()
 {
     wpn = new MachineGun();
     bomb = new Megabomb();
     this.speed = new Vector2(400.0f, 400.0f); //In case of a flip before
     frame = 0;
     Score = 0;
     Lives = 0;
     invincibleTime = 3.0f;
     DeathTime = 0.0f;
     trajectory = new Vector2();
     Hitbox = new CircleHitbox(this, false, 3.5f);
     this.Flip = SpriteEffects.None;
     enableCommands = true;
 }
コード例 #4
0
        public BouleEpine(Vector2 loc, Vector2 scroll, Bonus bonus, MovePattern pattern, SpriteEffects flip, String[] flags)
            : base(loc, scroll, bonus, pattern, flags, flip,
                new Rectangle(20, 137, 200, 110), //Source sprite
                Vector2.Zero, //Speed
                Vector2.One,
                new BEWeapon())
        {
            //Stats
            hp = 30;
            Background = true;
            points = 3000;
            Difficulty = 10;

            Hitbox = new CircleHitbox(this, false, 2f);
        }