static void Main() { { var i = new InteractiveObject(); i.click += delegate { }; } { var i = new Stage(); i.fullScreen += delegate { }; } { var i = new Stage(); i.click += delegate { }; } }
public KeyboardButton(Stage s) { s.keyDown += e => { if (this.Down == null) return; if (CheckButton(e.keyCode, e.keyLocation)) { this.Down(); } }; s.keyUp += e => { if (this.Up == null) return; if (CheckButton(e.keyCode, e.keyLocation)) { this.Up(); } }; }
// X:\jsc.svn\examples\actionscript\test\TestResolveNativeImplementationExtension\TestResolveNativeImplementationExtension\Class1.cs public static StageTasks get_async(Stage that) { //Console.WriteLine("InteractiveObject get_async"); return new StageTasks { that_Stage = that , that_DisplayObject = that }; }
public static void remove_mouseLeave(Stage that, Action<Event> value) { CommonExtensions.RemoveDelegate(that, value, Event.MOUSE_LEAVE); }
public static void remove_fullScreen(Stage that, Action<FullScreenEvent> value) { CommonExtensions.RemoveDelegate(that, value, FullScreenEvent.FULL_SCREEN); }
/// <summary> /// Opens the purchase process for the item defined in the request. /// </summary> /// <param name="stage">You must pass your stage object to the API for it to work.</param> /// <param name="item">The item's string identifier, you configure this in the shop admin, under edit game.</param> /// <param name="callback">Authenticating is done asynchronously, so a callback method is used to get the result state.</param> public static void ShowShop(Stage stage, string item, Action<string, bool> callback) { NonobaAPI.ShowShop(stage, item, callback.ToFunction()); }
/// <summary> /// Shows the purchase process for item. /// </summary> /// <param name="stage"></param> /// <param name="item"></param> /// <param name="callback"></param> public static void ShowShop(Stage stage, string item, Function callback) { // http://nonoba.com/developers/documentation/multiplayerapi/classnonobaapi }
/// <summary> /// Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. /// </summary> public static Connection MakeMultiplayer(Stage stage) { return default(Connection); }
public static void remove_fullScreen(Stage that, Action value) { }
public static void add_fullScreen(Stage that, Action value) { }
public KeyboardButton(Stage s, int fps) { var t = new Timer(fps); t.timer += delegate { if (a) { a = false; t.stop(); return; } if (this.Tick != null) this.Tick(); }; this.ForceKeyDown = delegate { a = false; if (this.Down != null) this.Down(); if (!t.running) { if (this.Tick != null) this.Tick(); t.start(); } }; s.keyDown += e => { if (CheckButton(e.keyCode, e.keyLocation, false)) { this.ForceKeyDown(); } }; this.ForceKeyUp = delegate { if (this.Up != null) this.Up(); a = true; }; s.keyUp += e => { if (CheckButton(e.keyCode, e.keyLocation, true)) { this.ForceKeyUp(); } }; }
public KeyboardButton(Stage s) : this(s, 1000 / 30) { }
/// <summary> /// Pops up this menu at the specified location. /// </summary> public void display(Stage stage, double stageX, double stageY) { }
public PlayerInput(Stage stage, PlayerShip Ego, DisplayObject Owner) { #region Ego Movement // ego input stage.click += e => { if (!Enabled) return; var p = Owner.globalToLocal(e.ToStagePoint()); if (SmartMoveTo != null) SmartMoveTo(p.x, p.y); }; stage.mouseMove += e => { if (!Enabled) return; if (e.buttonDown) { var p = Owner.globalToLocal(e.ToStagePoint()); if (SmartMoveTo != null) SmartMoveTo(p.x, p.y); } }; var GoLeft = new KeyboardButton(stage) { Groups = new[] { MovementWASD[Keyboard.A], MovementArrows[Keyboard.LEFT], }, Filter = Enabled, Tick = () => this.StepLeft(), Up = () => this.StepLeftEnd() }; var GoRight = new KeyboardButton(stage) { Groups = new[] { MovementWASD[Keyboard.D], MovementArrows[Keyboard.RIGHT], }, Filter = Enabled, Tick = () => this.StepRight(), Up = () => this.StepRightEnd() }; #endregion #region EgoFire var DoFire = new KeyboardButton(stage, 700) { Groups = new[] { MovementWASD[Keyboard.CONTROL , KeyLocation.LEFT], MovementArrows[Keyboard.RIGHT , KeyLocation.RIGHT], MovementArrows[Keyboard.SPACE], }, Filter = Enabled, Tick = () => FireBullet() }; stage.mouseDown += delegate { if (!Enabled) return; DoFire.ForceKeyDown(); }; stage.mouseUp += delegate { if (!Enabled) return; DoFire.ForceKeyUp(); }; #endregion }
public static void add_resize(Stage that, Action<Event> value) { CommonExtensions.CombineDelegate(that, value, Event.RESIZE); }
public static void remove_resize(Stage that, Action<Event> value) { CommonExtensions.RemoveDelegate(that, value, Event.RESIZE); }
/// <summary> /// Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event. /// </summary> public static Connection MakeMultiplayer(Stage stage, string s, int p) { return default(Connection); }