Пример #1
0
        public MainMenu(Engine engine)
            : base(engine)
        {
            this.button1 = new MenuButton(this.Engine);
            this.button2 = new MenuButton(this.Engine);

            this.button1.Position = new Vector2(0, -40);
            this.button2.Position = new Vector2(0, 40);

            this.button1.Text = "new game";
            this.button2.Text = "high scores";

            this.button1.Color = new Color(0.3f, 0.3f, 0.3f);
            this.button2.Color = new Color(0.3f, 0.3f, 0.3f);

            button1.Action = () =>
                                 {
                                     this.Dispose();
                                     new NewGameMenu(this.Engine).Initialize().Attach();
                                 };

            button2.Action = () =>
                                 {
                                     this.Dispose();
                                     new HighScoreMenu(this.Engine).Initialize().Attach();
                                 };

            this.buttons.Add(button1);
            this.buttons.Add(button2);

            this.oldButton = new BehaviorSubject<MenuButton>(null);
            this.currentButton = new BehaviorSubject<MenuButton>(this.button1);
        }
Пример #2
0
 public MenuButton(Engine engine)
     : base(engine)
 {
     this.Text = "";
     this.Color = Color.Black;
     this.Action = () => { };
 }
Пример #3
0
        public KeyboardCameraController(Engine engine, Camera camera)
            : base(engine)
        {
            this.camera = camera;

            this.MoveSpeed = 5f;
            this.ZoomSpeed = 0.5f;
        }
Пример #4
0
 public Weapon(Engine engine)
     : base(engine)
 {
     this.FireRequests   = new Subject<Unit>();
     this.ReloadRequests = new Subject<Unit>();
     this.Fires          = new Subject<Unit>();
     this.Reloads        = new Subject<Unit>();
     this.Kickbacks      = new Subject<Vector2>();
 }
Пример #5
0
 public Bolt(Engine engine)
     : base(engine)
 {
 }
Пример #6
0
 public Shot(Engine engine)
     : base(engine)
 {
 }
Пример #7
0
 public SpeedBoost(Engine engine)
     : base(engine)
 {
 }
Пример #8
0
 public RobotCameraController(Engine engine, Robot robot, Camera camera)
     : base(engine)
 {
     this.robot = robot;
     this.camera = camera;
 }
Пример #9
0
 public NewLevel(Engine engine)
     : base(engine)
 {
 }
Пример #10
0
 public SplashScreen(Engine engine)
     : base(engine)
 {
 }
Пример #11
0
 public Flame(Engine engine)
     : base(engine)
 {
 }
Пример #12
0
 public NewGameMenu(Engine engine)
     : base(engine)
 {
 }
Пример #13
0
 public Robot(Engine engine)
     : base(engine)
 {
     this.weapon = Fireable.Empty;
 }
Пример #14
0
 public Rocketlauncher(Engine engine)
     : base(engine)
 {
 }
Пример #15
0
 public DebugLogger(Engine engine)
     : base(engine)
 {
 }
Пример #16
0
 public Crossbow(Engine engine)
     : base(engine)
 {
 }
Пример #17
0
 //Basic Constructor
 public Pistol(Engine engine)
     : base(engine)
 {
 }
Пример #18
0
 public Shotgun(Engine engine)
     : base(engine)
 {
 }
Пример #19
0
 public SampleLevel(Engine engine)
     : base(engine)
 {
 }
Пример #20
0
        protected override void Initialize()
        {
            this.engine = new Engine(this);

            new SplashScreen(this.engine).Initialize().Attach();
        }
Пример #21
0
 public Rocket(Engine engine)
     : base(engine)
 {
 }
Пример #22
0
 public FlyingBrick(Engine engine)
     : base(engine)
 {
 }
Пример #23
0
 public HighScoreMenu(Engine engine)
     : base(engine)
 {
 }