public ApplicationSprite() { this.InvokeWhenStageIsReady( () => { var content0 = new FlashHeatZeeker.UnitPedControl.ApplicationSprite(); content0.AttachTo(this); content1.r.Opacity = 0; var InactiveOpaciy = 0.07; #region bind Action<UIElement, Keys> bind = (ui, key) => { // Implementation not found for type import : //type: System.Windows.UIElement //method: Void add_MouseDown(System.Windows.Input.MouseButtonEventHandler) //ui.MouseDown += ui.Opacity = InactiveOpaciy; ui.MouseLeftButtonDown += (sender, e) => { ui.Opacity = 1; e.Handled = true; StarlingGameSpriteWithPedControl.__keyDown[key] = true; }; //ui.MouseUp += ui.MouseLeftButtonUp += (sender, e) => { ui.Opacity = InactiveOpaciy; e.Handled = true; StarlingGameSpriteWithPedControl.__keyDown[key] = false; }; ui.TouchDown += (sender, e) => { ui.Opacity = 1; e.Handled = true; StarlingGameSpriteWithPedControl.__keyDown[key] = true; }; ui.TouchUp += (sender, e) => { ui.Opacity = InactiveOpaciy; e.Handled = true; StarlingGameSpriteWithPedControl.__keyDown[key] = false; }; }; #endregion bind(content1.up, Keys.Up); bind(content1.down, Keys.Down); bind(content1.left, Keys.Left); bind(content1.right, Keys.Right); bind(content1.space, Keys.Space); bind(content1.control, Keys.ControlKey); content1.AttachToContainer(this); content1.AutoSizeTo(this.stage); // http://www.flare3d.com/support/index.php?topic=1101.0 this.addChild(new Stats()); } ); }
public ApplicationSprite() { this.InvokeWhenStageIsReady( () => { var content0 = new FlashHeatZeeker.UnitPedControl.ApplicationSprite(); content0.AttachTo(this); content1.r.Opacity = 0; var InactiveOpaciy = 0.07; #region bind Action <UIElement, Keys> bind = (ui, key) => { // Implementation not found for type import : //type: System.Windows.UIElement //method: Void add_MouseDown(System.Windows.Input.MouseButtonEventHandler) //ui.MouseDown += ui.Opacity = InactiveOpaciy; ui.MouseLeftButtonDown += (sender, e) => { ui.Opacity = 1; e.Handled = true; StarlingGameSpriteWithPedControl.__keyDown[key] = true; }; //ui.MouseUp += ui.MouseLeftButtonUp += (sender, e) => { ui.Opacity = InactiveOpaciy; e.Handled = true; StarlingGameSpriteWithPedControl.__keyDown[key] = false; }; ui.TouchDown += (sender, e) => { ui.Opacity = 1; e.Handled = true; StarlingGameSpriteWithPedControl.__keyDown[key] = true; }; ui.TouchUp += (sender, e) => { ui.Opacity = InactiveOpaciy; e.Handled = true; StarlingGameSpriteWithPedControl.__keyDown[key] = false; }; }; #endregion bind(content1.up, Keys.Up); bind(content1.down, Keys.Down); bind(content1.left, Keys.Left); bind(content1.right, Keys.Right); bind(content1.space, Keys.Space); bind(content1.control, Keys.ControlKey); content1.AttachToContainer(this); content1.AutoSizeTo(this.stage); // http://www.flare3d.com/support/index.php?topic=1101.0 this.addChild(new Stats()); } ); }