コード例 #1
0
        public LanceTrucShot(Vector2 loc, LanceTruc wpn, double angle, SpriteEffects _flip) :
            base(loc,
                 Rectangle.Empty,             //Sprite
                 new Vector2(550.0f, 450.0f), //Speed
                 Vector2.One,                 //Scale
                 _flip, wpn, angle, false)
        {
            //Random item between 12 ones (each one = 128*128 sprite)
            int x = RandomMachine.GetRandomInt(0, 768) / 128;
            int y = RandomMachine.GetRandomInt(0, 256) / 128;

            sRect      = new Rectangle(128 * x, 742 + (128 * y), 128, 128);
            this.Scale = new Vector2(0.5f, 0.5f);
            bounce     = true;
            ttl        = 7000f;

            UseRotationWhenDrawing = true;
        }
コード例 #2
0
        public LanceTrucShot(Vector2 loc, LanceTruc wpn, double angle, SpriteEffects _flip)
            : base(loc,
            Rectangle.Empty,    //Sprite
            new Vector2(550.0f, 450.0f),          //Speed
            Vector2.One,                    //Scale
            _flip, wpn, angle, false)
        {
            //Random item between 12 ones (each one = 128*128 sprite)
            int x = RandomMachine.GetRandomInt(0, 768) / 128;
            int y = RandomMachine.GetRandomInt(0, 256) / 128;

            sRect = new Rectangle(128 * x, 742 + (128 * y), 128, 128);
            this.Scale = new Vector2(0.5f, 0.5f);
            bounce = true;
            ttl = 7000f;

            UseRotationWhenDrawing = true;
        }