Ejemplo n.º 1
0
 public HopText(GameBase game)
     : base(game)
 {
     SpeedX = (random.NextDouble() * 2 - 1) * 2;
     SpeedY = -random.NextDouble() * 3;
     Gravity = 0.05;
     Alpha = 0.8;
 }
Ejemplo n.º 2
0
        public ItemBoard(GameBase game)
            : base(game)
        {
            texture = Game.Content.Load<Texture2D>(@"itemboard");
            frameAnimation = new FrameAnimation(texture, frameWidth, frameHeight, 400);

            HitCount = 0;
        }
Ejemplo n.º 3
0
 public Passer(GameBase game)
     : base(game)
 {
     X = 0;
     Y = 0;
     Width = 64;
     Height = 64;
     Speed = 1;
 }
Ejemplo n.º 4
0
 public ItemBox(GameBase game)
     : base(game)
 {
     bounds = new Rectangle(
         0,
         0,
         (int)(32),
         (int)(32));
 }
Ejemplo n.º 5
0
        public GameLogic Generate(GameBase game, Scene scene, double textureScale)
        {
            var args = new object[] { game, scene, textureScale };
            var sum = 0;
            foreach (var specialInfo in infos)
            {
                sum += specialInfo.weight;
            }
            var threshold = sum * random.NextDouble();

            foreach (var specialInfo in infos)
            {
                threshold -= specialInfo.weight;
                if (threshold <= 0)
                {
                    return CreateGameLogic(specialInfo, args);
                }
            }

            return CreateGameLogic(infos[0], args);
        }
Ejemplo n.º 6
0
        public Splash(
            GameBase game, Vector2 center, int size, Color color,
            double delay, double span, double period, int count)
            : base(game)
        {
            this.game = game;
            this.center = center;
            this.size = size;
            this.delay = delay;
            this.span = span;
            this.period = period;
            this.count = count;

            EasingFunction = p => (1 - Math.Cos(p * Math.PI)) / 2;

            Initialize(game, center, size, color);

            // create render target
            bufferTexture = new RenderTarget2D(
                game.GraphicsDevice, size, size, false,
                game.GraphicsDevice.PresentationParameters.BackBufferFormat,
                DepthFormat.Depth24);
        }
Ejemplo n.º 7
0
 public ShowerSpecial(GameBase game, GameScene scene, double textureScale)
     : base(game, scene, textureScale)
 {
 }
Ejemplo n.º 8
0
 public BlackoutSwitchScene(GameBase game, Scene next)
     : base(game)
 {
     this.next = next;
     elapsed = 0;
 }
Ejemplo n.º 9
0
 public GameScene(GameBase game)
     : base(game)
 {
 }
Ejemplo n.º 10
0
 public Player(GameBase game)
     : base(game)
 {
 }
Ejemplo n.º 11
0
 public Indicator(GameBase game)
     : base(game)
 {
 }
Ejemplo n.º 12
0
 public CountdownScene(GameBase game)
     : base(game)
 {
 }
Ejemplo n.º 13
0
 public BiforkSpecial(GameBase game, GameScene scene, double textureScale)
     : base(game, scene, textureScale)
 {
 }
Ejemplo n.º 14
0
 public TimeupScene(GameBase game)
     : base(game)
 {
 }
Ejemplo n.º 15
0
 public Egg(GameBase game)
     : base(game)
 {
 }
Ejemplo n.º 16
0
 public Couple(GameBase game)
     : base(game)
 {
     texture = Game.Content.Load<Texture2D>(@"couple1");
     frameAnimation = new FrameAnimation(texture, frameWidth, frameHeight, 400);
 }
Ejemplo n.º 17
0
 public TitleScene(GameBase game)
     : base(game)
 {
 }
Ejemplo n.º 18
0
 public ChildComponent(GameBase game)
 {
     Game = game;
 }
Ejemplo n.º 19
0
 public GameLogic(GameBase game, GameScene scene, double textureScale)
 {
     this.game = game;
     this.scene = scene;
     this.textureScale = textureScale;
 }
Ejemplo n.º 20
0
 public SpecialLaunchScene(GameBase game, ItemBoard itemBoard)
     : base(game)
 {
     this.itemBoard = itemBoard;
 }
Ejemplo n.º 21
0
 public Basin(GameBase game)
     : base(game)
 {
 }
Ejemplo n.º 22
0
 public Dirt(GameBase game)
     : base(game)
 {
 }
Ejemplo n.º 23
0
 public ChristmasSpecial(GameBase game, GameScene scene, double textureScale)
     : base(game, scene, textureScale)
 {
 }
Ejemplo n.º 24
0
 public Waterdrop(GameBase game)
     : base(game)
 {
 }
Ejemplo n.º 25
0
 public ResultScene(GameBase game)
     : base(game)
 {
 }
Ejemplo n.º 26
0
 public PressureSpecial(GameBase game, GameScene scene, double textureScale)
     : base(game, scene, textureScale)
 {
 }
Ejemplo n.º 27
0
 public Scene(GameBase game)
     : base((Game)game)
 {
     game.ClientSizeChanged += (sender, e) => LayoutComponents();
 }
Ejemplo n.º 28
0
 public ByciclePasser(GameBase game)
     : base(game)
 {
     texture = Game.Content.Load<Texture2D>(@"passer");
     frameAnimation = new FrameAnimation(texture, frameWidth, frameHeight, 400);
 }
Ejemplo n.º 29
0
 public PressableComponent(GameBase game)
     : base(game)
 {
 }