Skip to content

Commit

Permalink
adapt example to pixi.js v6
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoschenkel committed May 11, 2022
1 parent 36935de commit 0e83899
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/pixi-palidor/example/Game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

import { Context } from "@robotlegsjs/core";
import { ContextView } from "@robotlegsjs/pixi";
import { autoDetectRenderer, Container, Renderer } from "pixi.js";
import { AbstractRenderer, autoDetectRenderer, Container } from "pixi.js";
import { PalidorBundle } from "../src/robotlegs/bender/bundles/palidor/PalidorBundle";
import { ExampleConfig } from "./config/ExampleConfig";

export class Game {
private _canvas: HTMLCanvasElement;
private _stage: Container;
private _renderer: Renderer;
private _renderer: AbstractRenderer;
private _context: Context;

public constructor() {
Expand Down
2 changes: 0 additions & 2 deletions packages/pixi-palidor/example/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
// in accordance with the terms of the license agreement accompanying it.
// ------------------------------------------------------------------------------

/// <reference path="../node_modules/@robotlegsjs/pixi/definitions/pixi.d.ts" />

import "reflect-metadata";
import { Game } from "./Game";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export class FloatingViewMediator extends Mediator<FloatingView> {
public initialize(): void {
this.view.interactive = true;
this.view.setTitle(this.view.parent.children.length);
this.eventMap.mapListener(this.view.addViewButton, "click", this._onAddView, this);
this.eventMap.mapListener(this.view.closeAllButton, "click", this._onCloseAll, this);
this.eventMap.mapListener(this.view.closeButton, "click", this._onClose, this);
this.eventMap.on(this.view.addViewButton, "click", this._onAddView, this);
this.eventMap.on(this.view.closeAllButton, "click", this._onCloseAll, this);
this.eventMap.on(this.view.closeButton, "click", this._onClose, this);
}

public destroy(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { PalidorView } from "../views/PalidorView";
@injectable()
export class PalidorViewMediator extends Mediator<PalidorView> {
public initialize(): void {
this.eventMap.mapListener(this.view.setViewButton, "click", this._onSetView, this);
this.eventMap.mapListener(this.view.addViewButton, "click", this._onAddView, this);
this.eventMap.on(this.view.setViewButton, "click", this._onSetView, this);
this.eventMap.on(this.view.addViewButton, "click", this._onAddView, this);
}

public destroy(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { RobotlegsView } from "../views/RobotlegsView";
@injectable()
export class RobotlegsViewMediator extends Mediator<RobotlegsView> {
public initialize(): void {
this.eventMap.mapListener(this.view.setViewButton, "click", this._onSetView, this);
this.eventMap.mapListener(this.view.addViewButton, "click", this._onAddView, this);
this.eventMap.on(this.view.setViewButton, "click", this._onSetView, this);
this.eventMap.on(this.view.addViewButton, "click", this._onAddView, this);
}

public destroy(): void {
Expand Down

0 comments on commit 0e83899

Please sign in to comment.