コード例 #1
0
ファイル: HopText.cs プロジェクト: haripo/sprinkler
 public HopText(GameBase game)
     : base(game)
 {
     SpeedX = (random.NextDouble() * 2 - 1) * 2;
     SpeedY = -random.NextDouble() * 3;
     Gravity = 0.05;
     Alpha = 0.8;
 }
コード例 #2
0
ファイル: ItemBoard.cs プロジェクト: haripo/sprinkler
        public ItemBoard(GameBase game)
            : base(game)
        {
            texture = Game.Content.Load<Texture2D>(@"itemboard");
            frameAnimation = new FrameAnimation(texture, frameWidth, frameHeight, 400);

            HitCount = 0;
        }
コード例 #3
0
ファイル: Passer.cs プロジェクト: haripo/sprinkler
 public Passer(GameBase game)
     : base(game)
 {
     X = 0;
     Y = 0;
     Width = 64;
     Height = 64;
     Speed = 1;
 }
コード例 #4
0
ファイル: ItemBox.cs プロジェクト: haripo/sprinkler
 public ItemBox(GameBase game)
     : base(game)
 {
     bounds = new Rectangle(
         0,
         0,
         (int)(32),
         (int)(32));
 }
コード例 #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);
        }
コード例 #6
0
ファイル: Splash.cs プロジェクト: haripo/sprinkler
        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);
        }
コード例 #7
0
ファイル: ShowerSpecial.cs プロジェクト: haripo/sprinkler
 public ShowerSpecial(GameBase game, GameScene scene, double textureScale)
     : base(game, scene, textureScale)
 {
 }
コード例 #8
0
 public BlackoutSwitchScene(GameBase game, Scene next)
     : base(game)
 {
     this.next = next;
     elapsed = 0;
 }
コード例 #9
0
ファイル: GameScene.cs プロジェクト: haripo/sprinkler
 public GameScene(GameBase game)
     : base(game)
 {
 }
コード例 #10
0
ファイル: Player.cs プロジェクト: haripo/sprinkler
 public Player(GameBase game)
     : base(game)
 {
 }
コード例 #11
0
ファイル: Indicator.cs プロジェクト: haripo/sprinkler
 public Indicator(GameBase game)
     : base(game)
 {
 }
コード例 #12
0
ファイル: CountdownScene.cs プロジェクト: haripo/sprinkler
 public CountdownScene(GameBase game)
     : base(game)
 {
 }
コード例 #13
0
ファイル: BiforkSpecial.cs プロジェクト: haripo/sprinkler
 public BiforkSpecial(GameBase game, GameScene scene, double textureScale)
     : base(game, scene, textureScale)
 {
 }
コード例 #14
0
ファイル: TimeupScene.cs プロジェクト: haripo/sprinkler
 public TimeupScene(GameBase game)
     : base(game)
 {
 }
コード例 #15
0
ファイル: Egg.cs プロジェクト: haripo/sprinkler
 public Egg(GameBase game)
     : base(game)
 {
 }
コード例 #16
0
ファイル: Couple.cs プロジェクト: haripo/sprinkler
 public Couple(GameBase game)
     : base(game)
 {
     texture = Game.Content.Load<Texture2D>(@"couple1");
     frameAnimation = new FrameAnimation(texture, frameWidth, frameHeight, 400);
 }
コード例 #17
0
ファイル: TitleScene.cs プロジェクト: haripo/sprinkler
 public TitleScene(GameBase game)
     : base(game)
 {
 }
コード例 #18
0
ファイル: ChildComponent.cs プロジェクト: haripo/sprinkler
 public ChildComponent(GameBase game)
 {
     Game = game;
 }
コード例 #19
0
ファイル: GameLogic.cs プロジェクト: haripo/sprinkler
 public GameLogic(GameBase game, GameScene scene, double textureScale)
 {
     this.game = game;
     this.scene = scene;
     this.textureScale = textureScale;
 }
コード例 #20
0
 public SpecialLaunchScene(GameBase game, ItemBoard itemBoard)
     : base(game)
 {
     this.itemBoard = itemBoard;
 }
コード例 #21
0
ファイル: Basin.cs プロジェクト: haripo/sprinkler
 public Basin(GameBase game)
     : base(game)
 {
 }
コード例 #22
0
ファイル: Dirt.cs プロジェクト: haripo/sprinkler
 public Dirt(GameBase game)
     : base(game)
 {
 }
コード例 #23
0
ファイル: ChristmasSpecial.cs プロジェクト: haripo/sprinkler
 public ChristmasSpecial(GameBase game, GameScene scene, double textureScale)
     : base(game, scene, textureScale)
 {
 }
コード例 #24
0
ファイル: Waterdrop.cs プロジェクト: haripo/sprinkler
 public Waterdrop(GameBase game)
     : base(game)
 {
 }
コード例 #25
0
ファイル: ResultScene.cs プロジェクト: haripo/sprinkler
 public ResultScene(GameBase game)
     : base(game)
 {
 }
コード例 #26
0
ファイル: PressureSpecial.cs プロジェクト: haripo/sprinkler
 public PressureSpecial(GameBase game, GameScene scene, double textureScale)
     : base(game, scene, textureScale)
 {
 }
コード例 #27
0
ファイル: Scene.cs プロジェクト: haripo/sprinkler
 public Scene(GameBase game)
     : base((Game)game)
 {
     game.ClientSizeChanged += (sender, e) => LayoutComponents();
 }
コード例 #28
0
ファイル: ByciclePasser.cs プロジェクト: haripo/sprinkler
 public ByciclePasser(GameBase game)
     : base(game)
 {
     texture = Game.Content.Load<Texture2D>(@"passer");
     frameAnimation = new FrameAnimation(texture, frameWidth, frameHeight, 400);
 }
コード例 #29
0
 public PressableComponent(GameBase game)
     : base(game)
 {
 }