コード例 #1
0
 public Powerup(Vector2 pos)
 {
     Id          = powerUpIdCounter++;
     Position    = pos;
     BoundingBox = new CustomBoundingBox();
     BoundingBox.SetFullRectangle(Position, new Rectangle(0, 0, 16, 16), Velocity);
 }
コード例 #2
0
        public StaticTile(Vector2 position, string tileKey)
        {
            TileKey = tileKey;

            Position = position;

            BoundingBox = new CustomBoundingBox();
            BoundingBox.SetFullRectangle(Position, new Rectangle(0, 0, 32, 32), Vector2.Zero);
        }
コード例 #3
0
        public Particle(PlatformGame game, Vector2 position, HorizontalDirection horizontalDirection)
        {
            //spriteSheetInstance = new CustomSpriteSheetInstance(game.GameDataLoader.BulletImpactSpriteSheet, 2);

            Position            = position;
            HorizontalDirection = horizontalDirection;

            BoundingBox = new CustomBoundingBox();
            UpdateBoundingBox();
        }
コード例 #4
0
        public Projectile(PlatformGame game, string shooterName, Vector2 position, HorizontalDirection horizontalDirection)
        {
            this.game = game;

            Position            = position;
            this.shooterName    = shooterName;
            HorizontalDirection = horizontalDirection;

            BoundingBox = new CustomBoundingBox();
            UpdateBoundingBox();
        }
コード例 #5
0
        public Player(PlatformGame game, string name, CustomSpriteSheetDefinition spriteSheetDefinition)
        {
            this.game = game;

            HorizontalDirection = HorizontalDirection.None;

            BoundingBox = new CustomBoundingBox();

            Name = name;

            Score = new Score();
            Team  = new NeutralTeam();

            spriteSheetInstance = new CustomSpriteSheetInstance(spriteSheetDefinition, 3);
        }